Repository: plotly/dash-daq Branch: master Commit: c6be5941d9ce Files: 154 Total size: 6.1 MB Directory structure: gitextract_v6o4ev20/ ├── .Rbuildignore ├── .circleci/ │ └── config.yml ├── .eslintignore ├── .eslintrc ├── .github/ │ ├── CODEOWNERS │ └── FUNDING.yml ├── .gitignore ├── .npmignore ├── .prettierrc ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── DESCRIPTION ├── LICENSE ├── MANIFEST.in ├── NAMESPACE ├── R/ │ ├── daqBooleanSwitch.R │ ├── daqColorPicker.R │ ├── daqDarkThemeProvider.R │ ├── daqGauge.R │ ├── daqGraduatedBar.R │ ├── daqIndicator.R │ ├── daqJoystick.R │ ├── daqKnob.R │ ├── daqLEDDisplay.R │ ├── daqNumericInput.R │ ├── daqPowerButton.R │ ├── daqPrecisionInput.R │ ├── daqSlider.R │ ├── daqStopButton.R │ ├── daqTank.R │ ├── daqThermometer.R │ ├── daqToggleSwitch.R │ └── internal.R ├── README.md ├── babel.config.js ├── bin/ │ └── generateDocs ├── dash-info.yaml ├── dash_daq/ │ ├── BooleanSwitch.py │ ├── ColorPicker.py │ ├── DarkThemeProvider.py │ ├── Gauge.py │ ├── GraduatedBar.py │ ├── Indicator.py │ ├── Joystick.py │ ├── Knob.py │ ├── LEDDisplay.py │ ├── NumericInput.py │ ├── PowerButton.py │ ├── PrecisionInput.py │ ├── Slider.py │ ├── StopButton.py │ ├── Tank.py │ ├── Thermometer.py │ ├── ToggleSwitch.py │ ├── __init__.py │ ├── _imports_.py │ ├── async-colorpicker.js │ ├── dash_daq.dev.js │ └── package-info.json ├── demo/ │ ├── Demo.react.js │ ├── index.html │ └── index.js ├── demo.py ├── get_version_info.py ├── inst/ │ └── deps/ │ ├── async-colorpicker.js │ ├── bundle.js │ └── dash_daq.dev.js ├── man/ │ ├── daqBooleanSwitch.Rd │ ├── daqColorPicker.Rd │ ├── daqDarkThemeProvider.Rd │ ├── daqGauge.Rd │ ├── daqGraduatedBar.Rd │ ├── daqIndicator.Rd │ ├── daqJoystick.Rd │ ├── daqKnob.Rd │ ├── daqLEDDisplay.Rd │ ├── daqNumericInput.Rd │ ├── daqPowerButton.Rd │ ├── daqPrecisionInput.Rd │ ├── daqSlider.Rd │ ├── daqStopButton.Rd │ ├── daqTank.Rd │ ├── daqThermometer.Rd │ ├── daqToggleSwitch.Rd │ └── dashDaq-package.Rd ├── package.json ├── requirements.txt ├── setup.py ├── src/ │ ├── components/ │ │ ├── BooleanSwitch.react.js │ │ ├── ColorPicker.react.js │ │ ├── DarkThemeProvider.react.js │ │ ├── Gauge.react.js │ │ ├── GraduatedBar.react.js │ │ ├── Indicator.react.js │ │ ├── Joystick.react.js │ │ ├── Knob.react.js │ │ ├── LEDDisplay.react.js │ │ ├── NumericInput.react.js │ │ ├── PowerButton.react.js │ │ ├── PrecisionInput.react.js │ │ ├── Slider.react.js │ │ ├── StopButton.react.js │ │ ├── Tank.react.js │ │ ├── Thermometer.react.js │ │ ├── ToggleSwitch.react.js │ │ └── __tests__/ │ │ ├── .eslintrc │ │ ├── BooleanSwitch.test.js │ │ ├── ColorPicker.test.js │ │ ├── Gauge.test.js │ │ ├── GraduatedBar.test.js │ │ ├── Indicator.test.js │ │ ├── Knob.test.js │ │ ├── LEDDisplay.test.js │ │ ├── NumericInput.test.js │ │ ├── PowerButton.test.js │ │ ├── PrecisionInput.test.js │ │ ├── Slider.test.js │ │ ├── StopButton.test.js │ │ ├── Tank.test.js │ │ ├── Thermometer.test.js │ │ └── ToggleSwitch.test.js │ ├── fragments/ │ │ ├── ColorPicker.react.js │ │ └── Slider.react.js │ ├── helpers/ │ │ ├── GaugeSvg.react.js │ │ ├── KnobSvg.react.js │ │ ├── LEDDisplaySvg.react.js │ │ ├── NumericInput.js │ │ ├── PowerButtonSvg.react.js │ │ ├── classNameGenerator.js │ │ ├── colorRanges.js │ │ ├── logarithm.js │ │ ├── scale.js │ │ ├── shared/ │ │ │ └── TrackSvg.js │ │ └── util.js │ ├── index.js │ └── styled/ │ ├── ColorPicker.styled.js │ ├── CurrentValue.styled.js │ ├── Gauge.styled.js │ ├── GraduatedBar.styled.js │ ├── Knob.styled.js │ ├── LEDDisplay.styled.js │ ├── PowerButton.styled.js │ ├── PrecisionInput.styled.js │ ├── Slider.styled.js │ ├── StopButton.styled.js │ ├── Tank.styled.js │ ├── Thermometer.styled.js │ ├── ToggleSwitch.styled.js │ ├── constants.js │ └── shared/ │ ├── DarkGradient.js │ ├── Indicator.styled.js │ ├── Label.styled.js │ └── LabelContainer.styled.js └── webpack.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .Rbuildignore ================================================ # ignore JS config files/folders node_modules/ coverage/ src/ lib/ .babelrc .builderrc .eslintrc .npmignore .editorconfig .eslintignore .prettierrc .circleci .github # demo folder has special meaning in R # this should hopefully make it still # allow for the possibility to make R demos demo/.*\.js demo/.*\.html demo/.*\.css # ignore Python files/folders setup.py usage.py setup.py requirements.txt MANIFEST.in CHANGELOG.md test/ # CRAN has weird LICENSE requirements LICENSE.txt ^.*\.Rproj$ ^\.Rproj\.user$ ================================================ FILE: .circleci/config.yml ================================================ version: 2 jobs: build_and_test_node: docker: - image: circleci/python:3.7-stretch-node auth: username: dashautomation password: $DASH_PAT_DOCKERHUB steps: - checkout - run: name: Check current version of node command: node -v - restore_cache: key: deps1-{{ .Branch }}-{{ checksum "package-lock.json" }} - run: name: Install package.json command: npm ci - save_cache: key: deps1-{{ .Branch }}-{{ checksum "package-lock.json" }} paths: - node_modules - run: name: Install Dash for package build and build package command: | python -m venv venv . venv/bin/activate pip install --upgrade dash[dev,testing] - run: name: Run unit tests command: | npm run test workflows: version: 2 build: jobs: - build_and_test_node ================================================ FILE: .eslintignore ================================================ build/ coverage/ dist/ lib/ lib/*.js* node_modules/ dash_daq/metadata.json dash_daq/*.js* inst/deps/*.js* babel.config.js webpack.config.js .npm vv/ venv/ *.pyc *.egg-info *.log .DS_Store ================================================ FILE: .eslintrc ================================================ { "extends": [ "./node_modules/dash-components-archetype/config/eslint/eslintrc-react.json" ], "parser": "babel-eslint", "plugins": [ "react", "import" ], "settings": { "import/extensions": [ ".css$" ] } } ================================================ FILE: .github/CODEOWNERS ================================================ # These owners will be the default owners for everything in # the repo. Unless a later match takes precedence * @Marc-Andre-Rivet @shammamah ================================================ FILE: .github/FUNDING.yml ================================================ custom: https://plotly.com/products/consulting-and-oem/ ================================================ FILE: .gitignore ================================================ build/ coverage/ dist/ lib/ lib/bundle.js* node_modules/ dash_daq/metadata.json dash_daq/bundle.js* .npm vv/ venv/ *.pyc *.egg-info *.log .DS_Store .vscode ================================================ FILE: .npmignore ================================================ node_modules/ .npm .git/ vv/ venv/ *.pyc *.log .DS_Store build/ coverage/ dist/ lib/ lib/bundle.js* node_modules/ *.egg-info ================================================ FILE: .prettierrc ================================================ { "singleQuote": true } ================================================ FILE: CHANGELOG.md ================================================ # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] ### Added - [#117](https://github.com/plotly/dash-daq/pull/117) Added `digits` prop to `Gauge` component. ## [0.5.0] - 2020-04-27 ### Added - [#105](https://github.com/plotly/dash-daq/pull/105) Added [persistence](https://dash.plotly.com/persistence) for components BooleanSwitch, ColorPicker, Knob, NumericInput, PowerButton, PrecisionInput, Slider and ToggleSwitch ### Changed - [#92](https://github.com/plotly/dash-daq/pull/92) Update from React 16.8.6 to 16.13.0 ## [0.4.0] - 2020-03-04 ### Added - [#80](https://github.com/plotly/dash-daq/pull/80) Added `theme` prop to `GraduatedBar` component. ### Changed - [#91](https://github.com/plotly/dash-daq/pull/91) Renamed async modules with hyphen `-` instead of tilde `~` - [#80](https://github.com/plotly/dash-daq/pull/80) Changed class names for components according to BEM conventions. ### Fixed - [#80](https://github.com/plotly/dash-daq/pull/80) Fixed color problems for dark-theme buttons and inputs. ## [0.3.3] - 2020-01-23 ### Changed - [#82](https://github.com/plotly/dash-daq/pull/82) Updated `rc-slider` package and `daq.Slider` styling. ## [0.3.2] - 2020-01-22 ### Fixed - [#84](https://github.com/plotly/dash-daq/pull/84) Fixed JS map not being included in the `js_dist` for the Python package. ## [0.3.1] - 2019-11-14 ### Fixed - [#73](https://github.com/plotly/dash-daq/pull/73) Fix IE11 compatibility issues and ES5 compatibility and validation ## [0.3.0] - 2019-11-05 ### Added - [#70](https://github.com/plotly/dash-daq/pull/70) Async ColorPicker and Slider components ## [0.2.2] - 2019-10-04 ### Fixed - Fixed ThemeProvider warning by updating `styled-components` to `v4.4.0`. ## [0.2.1] - 2019-09-24 ### Fixed - Fixed "Cannot read property 'subscribe' of undefined" JavaScript error. ## [0.2.0] - 2019-09-24 ### Added - Added `height` and `width` parameters to `daq.Tank` and `daq.Thermometer`. ## [0.1.7] - 2019-07-24 ### Changed - Updated library to React 16 for compatibility with `dash-1.0.0`. ## [0.1.6] - 2019-07-16 ### Added - Added ability for LEDDisplay to handle negative numbers. ## [0.1.5] - 2019-05-09 ### Fixed - Fixed missing locationSlider entry in Slider.propTypes. ### Added - Updated package.json with additional metadata for R package building. - Added JavaScript bundle and source map to dash_daq subfolder. - Initial commit of dashDaq R package. ## [0.1.4] - 2019-02-18 ### Fixed - Fixed init file to include the correct bundle location. - Fixed NPM package to include bundle, and updated Python package version accordingly. ## [0.1.2] - 2019-02-15 ### Fixed - Fixed version to correspond to the correct/published npm version. ## [0.1.1] - 2019-02-14 ### Fixed - Fixed version to correspond to the correct/published npm version. ## [0.1.0] - 2019-01-28 ### Fixed - Fixed incompatibility issue with Dash `0.36.0`. ### Removed - Removed unused headers in CHANGELOG. - Removed all mentioned of `fireEvent` and anything else that used Dash events (which have been removed). The `n_clicks` and `value` props should be used instead to determine when something has been updated. ## [0.0.2] - 2018-06-04 ### Fixed - Error on Windows when generating tarball. Fixed dependency problems with import dash_daq. ## [0.0.1] - 2018-05-28 ### Fixed - Display error on ColorPicker Light component fixed - Gauge component error with default values fixed - Knob component error with JavaScript split method fixed ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at accounts@plot.ly. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.4, available at [http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4/), and may also be found online at . ================================================ FILE: DESCRIPTION ================================================ Package: dashDaq Title: Interactive Data Acquisition and Control Components for Dash Version: 0.5.1 Description: A robust set of controls that make it simpler to integrate data acquisition and controls into your Dash applications. Depends: R (>= 3.0.2) Imports: Suggests: Authors@R: person("The", "Team", role = c("aut", "cre"), email = "dashdaq@plotly.com") License: MIT + file LICENSE URL: https://github.com/plotly/dash-daq BugReports: https://github.com/plotly/dash-daq/issues Encoding: UTF-8 LazyData: true KeepSource: true ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2019-2024 Plotly Technologies Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: MANIFEST.in ================================================ include dash_daq/dash_daq.min.js include dash_daq/dash_daq.min.js.map include dash_daq/async-*.js include dash_daq/async-*.js.map include dash_daq/metadata.json include dash_daq/package-info.json include README.md include LICENSE ================================================ FILE: NAMESPACE ================================================ # AUTO GENERATED FILE - DO NOT EDIT export(daqBooleanSwitch) export(daqColorPicker) export(daqDarkThemeProvider) export(daqGauge) export(daqGraduatedBar) export(daqIndicator) export(daqJoystick) export(daqKnob) export(daqLEDDisplay) export(daqNumericInput) export(daqPowerButton) export(daqPrecisionInput) export(daqSlider) export(daqStopButton) export(daqTank) export(daqThermometer) export(daqToggleSwitch) ================================================ FILE: R/daqBooleanSwitch.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqBooleanSwitch <- function(id=NULL, className=NULL, color=NULL, disabled=NULL, label=NULL, labelPosition=NULL, on=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, size=NULL, style=NULL, theme=NULL, vertical=NULL) { props <- list(id=id, className=className, color=color, disabled=disabled, label=label, labelPosition=labelPosition, on=on, persisted_props=persisted_props, persistence=persistence, persistence_type=persistence_type, size=size, style=style, theme=theme, vertical=vertical) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'BooleanSwitch', namespace = 'dash_daq', propNames = c('id', 'className', 'color', 'disabled', 'label', 'labelPosition', 'on', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme', 'vertical'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqColorPicker.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqColorPicker <- function(id=NULL, className=NULL, disabled=NULL, label=NULL, labelPosition=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, size=NULL, style=NULL, theme=NULL, value=NULL) { props <- list(id=id, className=className, disabled=disabled, label=label, labelPosition=labelPosition, persisted_props=persisted_props, persistence=persistence, persistence_type=persistence_type, size=size, style=style, theme=theme, value=value) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'ColorPicker', namespace = 'dash_daq', propNames = c('id', 'className', 'disabled', 'label', 'labelPosition', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme', 'value'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqDarkThemeProvider.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqDarkThemeProvider <- function(children=NULL, theme=NULL) { props <- list(children=children, theme=theme) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'DarkThemeProvider', namespace = 'dash_daq', propNames = c('children', 'theme'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqGauge.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqGauge <- function(id=NULL, base=NULL, className=NULL, color=NULL, digits=NULL, exceedMessage=NULL, label=NULL, labelPosition=NULL, lagingMessage=NULL, logarithmic=NULL, max=NULL, min=NULL, scale=NULL, showCurrentValue=NULL, size=NULL, style=NULL, textColor=NULL, theme=NULL, units=NULL, value=NULL) { props <- list(id=id, base=base, className=className, color=color, digits=digits, exceedMessage=exceedMessage, label=label, labelPosition=labelPosition, lagingMessage=lagingMessage, logarithmic=logarithmic, max=max, min=min, scale=scale, showCurrentValue=showCurrentValue, size=size, style=style, textColor=textColor, theme=theme, units=units, value=value) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'Gauge', namespace = 'dash_daq', propNames = c('id', 'base', 'className', 'color', 'digits', 'exceedMessage', 'label', 'labelPosition', 'lagingMessage', 'logarithmic', 'max', 'min', 'scale', 'showCurrentValue', 'size', 'style', 'textColor', 'theme', 'units', 'value'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqGraduatedBar.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqGraduatedBar <- function(id=NULL, className=NULL, color=NULL, label=NULL, labelPosition=NULL, max=NULL, min=NULL, showCurrentValue=NULL, size=NULL, step=NULL, style=NULL, theme=NULL, value=NULL, vertical=NULL) { props <- list(id=id, className=className, color=color, label=label, labelPosition=labelPosition, max=max, min=min, showCurrentValue=showCurrentValue, size=size, step=step, style=style, theme=theme, value=value, vertical=vertical) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'GraduatedBar', namespace = 'dash_daq', propNames = c('id', 'className', 'color', 'label', 'labelPosition', 'max', 'min', 'showCurrentValue', 'size', 'step', 'style', 'theme', 'value', 'vertical'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqIndicator.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqIndicator <- function(id=NULL, className=NULL, color=NULL, height=NULL, label=NULL, labelPosition=NULL, size=NULL, style=NULL, theme=NULL, value=NULL, width=NULL) { props <- list(id=id, className=className, color=color, height=height, label=label, labelPosition=labelPosition, size=size, style=style, theme=theme, value=value, width=width) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'Indicator', namespace = 'dash_daq', propNames = c('id', 'className', 'color', 'height', 'label', 'labelPosition', 'size', 'style', 'theme', 'value', 'width'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqJoystick.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqJoystick <- function(id=NULL, angle=NULL, className=NULL, force=NULL, label=NULL, labelPosition=NULL, size=NULL, style=NULL, theme=NULL) { props <- list(id=id, angle=angle, className=className, force=force, label=label, labelPosition=labelPosition, size=size, style=style, theme=theme) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'Joystick', namespace = 'dash_daq', propNames = c('id', 'angle', 'className', 'force', 'label', 'labelPosition', 'size', 'style', 'theme'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqKnob.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqKnob <- function(id=NULL, className=NULL, color=NULL, digits=NULL, disabled=NULL, label=NULL, labelPosition=NULL, max=NULL, min=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, scale=NULL, showCurrentValue=NULL, size=NULL, style=NULL, textColor=NULL, theme=NULL, value=NULL) { props <- list(id=id, className=className, color=color, digits=digits, disabled=disabled, label=label, labelPosition=labelPosition, max=max, min=min, persisted_props=persisted_props, persistence=persistence, persistence_type=persistence_type, scale=scale, showCurrentValue=showCurrentValue, size=size, style=style, textColor=textColor, theme=theme, value=value) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'Knob', namespace = 'dash_daq', propNames = c('id', 'className', 'color', 'digits', 'disabled', 'label', 'labelPosition', 'max', 'min', 'persisted_props', 'persistence', 'persistence_type', 'scale', 'showCurrentValue', 'size', 'style', 'textColor', 'theme', 'value'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqLEDDisplay.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqLEDDisplay <- function(id=NULL, backgroundColor=NULL, className=NULL, color=NULL, label=NULL, labelPosition=NULL, size=NULL, style=NULL, theme=NULL, value=NULL) { props <- list(id=id, backgroundColor=backgroundColor, className=className, color=color, label=label, labelPosition=labelPosition, size=size, style=style, theme=theme, value=value) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'LEDDisplay', namespace = 'dash_daq', propNames = c('id', 'backgroundColor', 'className', 'color', 'label', 'labelPosition', 'size', 'style', 'theme', 'value'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqNumericInput.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqNumericInput <- function(id=NULL, className=NULL, disabled=NULL, label=NULL, labelPosition=NULL, max=NULL, min=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, size=NULL, style=NULL, theme=NULL, value=NULL) { props <- list(id=id, className=className, disabled=disabled, label=label, labelPosition=labelPosition, max=max, min=min, persisted_props=persisted_props, persistence=persistence, persistence_type=persistence_type, size=size, style=style, theme=theme, value=value) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'NumericInput', namespace = 'dash_daq', propNames = c('id', 'className', 'disabled', 'label', 'labelPosition', 'max', 'min', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme', 'value'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqPowerButton.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqPowerButton <- function(id=NULL, className=NULL, color=NULL, disabled=NULL, label=NULL, labelPosition=NULL, offButtonStyle=NULL, on=NULL, onButtonStyle=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, size=NULL, style=NULL, theme=NULL) { props <- list(id=id, className=className, color=color, disabled=disabled, label=label, labelPosition=labelPosition, offButtonStyle=offButtonStyle, on=on, onButtonStyle=onButtonStyle, persisted_props=persisted_props, persistence=persistence, persistence_type=persistence_type, size=size, style=style, theme=theme) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'PowerButton', namespace = 'dash_daq', propNames = c('id', 'className', 'color', 'disabled', 'label', 'labelPosition', 'offButtonStyle', 'on', 'onButtonStyle', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqPrecisionInput.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqPrecisionInput <- function(id=NULL, className=NULL, disabled=NULL, label=NULL, labelPosition=NULL, max=NULL, min=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, precision=NULL, size=NULL, style=NULL, theme=NULL, value=NULL) { props <- list(id=id, className=className, disabled=disabled, label=label, labelPosition=labelPosition, max=max, min=min, persisted_props=persisted_props, persistence=persistence, persistence_type=persistence_type, precision=precision, size=size, style=style, theme=theme, value=value) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'PrecisionInput', namespace = 'dash_daq', propNames = c('id', 'className', 'disabled', 'label', 'labelPosition', 'max', 'min', 'persisted_props', 'persistence', 'persistence_type', 'precision', 'size', 'style', 'theme', 'value'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqSlider.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqSlider <- function(id=NULL, className=NULL, color=NULL, disabled=NULL, dots=NULL, fullSize=NULL, handleLabel=NULL, included=NULL, labelPosition=NULL, marks=NULL, max=NULL, min=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, size=NULL, step=NULL, style=NULL, targets=NULL, theme=NULL, updatemode=NULL, value=NULL, vertical=NULL) { props <- list(id=id, className=className, color=color, disabled=disabled, dots=dots, fullSize=fullSize, handleLabel=handleLabel, included=included, labelPosition=labelPosition, marks=marks, max=max, min=min, persisted_props=persisted_props, persistence=persistence, persistence_type=persistence_type, size=size, step=step, style=style, targets=targets, theme=theme, updatemode=updatemode, value=value, vertical=vertical) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'Slider', namespace = 'dash_daq', propNames = c('id', 'className', 'color', 'disabled', 'dots', 'fullSize', 'handleLabel', 'included', 'labelPosition', 'marks', 'max', 'min', 'persisted_props', 'persistence', 'persistence_type', 'size', 'step', 'style', 'targets', 'theme', 'updatemode', 'value', 'vertical'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqStopButton.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqStopButton <- function(children=NULL, id=NULL, buttonText=NULL, className=NULL, disabled=NULL, label=NULL, labelPosition=NULL, n_clicks=NULL, size=NULL, style=NULL, theme=NULL) { props <- list(children=children, id=id, buttonText=buttonText, className=className, disabled=disabled, label=label, labelPosition=labelPosition, n_clicks=n_clicks, size=size, style=style, theme=theme) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'StopButton', namespace = 'dash_daq', propNames = c('children', 'id', 'buttonText', 'className', 'disabled', 'label', 'labelPosition', 'n_clicks', 'size', 'style', 'theme'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqTank.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqTank <- function(id=NULL, base=NULL, className=NULL, color=NULL, currentValueStyle=NULL, exceedMessage=NULL, height=NULL, label=NULL, labelPosition=NULL, lagingMessage=NULL, logarithmic=NULL, max=NULL, min=NULL, scale=NULL, showCurrentValue=NULL, style=NULL, textColor=NULL, theme=NULL, units=NULL, value=NULL, width=NULL) { props <- list(id=id, base=base, className=className, color=color, currentValueStyle=currentValueStyle, exceedMessage=exceedMessage, height=height, label=label, labelPosition=labelPosition, lagingMessage=lagingMessage, logarithmic=logarithmic, max=max, min=min, scale=scale, showCurrentValue=showCurrentValue, style=style, textColor=textColor, theme=theme, units=units, value=value, width=width) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'Tank', namespace = 'dash_daq', propNames = c('id', 'base', 'className', 'color', 'currentValueStyle', 'exceedMessage', 'height', 'label', 'labelPosition', 'lagingMessage', 'logarithmic', 'max', 'min', 'scale', 'showCurrentValue', 'style', 'textColor', 'theme', 'units', 'value', 'width'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqThermometer.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqThermometer <- function(id=NULL, base=NULL, className=NULL, color=NULL, height=NULL, label=NULL, labelPosition=NULL, logarithmic=NULL, max=NULL, min=NULL, scale=NULL, showCurrentValue=NULL, style=NULL, theme=NULL, units=NULL, value=NULL, width=NULL) { props <- list(id=id, base=base, className=className, color=color, height=height, label=label, labelPosition=labelPosition, logarithmic=logarithmic, max=max, min=min, scale=scale, showCurrentValue=showCurrentValue, style=style, theme=theme, units=units, value=value, width=width) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'Thermometer', namespace = 'dash_daq', propNames = c('id', 'base', 'className', 'color', 'height', 'label', 'labelPosition', 'logarithmic', 'max', 'min', 'scale', 'showCurrentValue', 'style', 'theme', 'units', 'value', 'width'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/daqToggleSwitch.R ================================================ # AUTO GENERATED FILE - DO NOT EDIT daqToggleSwitch <- function(id=NULL, className=NULL, color=NULL, disabled=NULL, label=NULL, labelPosition=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, size=NULL, style=NULL, theme=NULL, value=NULL, vertical=NULL) { props <- list(id=id, className=className, color=color, disabled=disabled, label=label, labelPosition=labelPosition, persisted_props=persisted_props, persistence=persistence, persistence_type=persistence_type, size=size, style=style, theme=theme, value=value, vertical=vertical) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'ToggleSwitch', namespace = 'dash_daq', propNames = c('id', 'className', 'color', 'disabled', 'label', 'labelPosition', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme', 'value', 'vertical'), package = 'dashDaq' ) structure(component, class = c('dash_component', 'list')) } ================================================ FILE: R/internal.R ================================================ .dashDaq_js_metadata <- function() { deps_metadata <- list(`dash_daq` = structure(list(name = "dash_daq", version = "0.5.1", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-colorpicker.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashDaq", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_daq` = structure(list(name = "dash_daq", version = "0.5.1", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-slider.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashDaq", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_daq` = structure(list(name = "dash_daq", version = "0.5.1", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-colorpicker.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashDaq", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_daq` = structure(list(name = "dash_daq", version = "0.5.1", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-slider.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashDaq", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_daq` = structure(list(name = "dash_daq", version = "0.5.1", src = list(href = NULL, file = "deps"), meta = NULL, script = 'dash_daq.min.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashDaq", all_files = FALSE), class = "html_dependency"), `dash_daq` = structure(list(name = "dash_daq", version = "0.5.1", src = list(href = NULL, file = "deps"), meta = NULL, script = 'dash_daq.min.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashDaq", all_files = FALSE, dynamic = TRUE), class = "html_dependency")) return(deps_metadata) } ================================================ FILE: README.md ================================================ # dash_daq DAQ components for Dash. Docs: https://dash.plotly.com/dash-daq
Maintained by Plotly
## Installation `pip install dash_daq` (Or for Python 3, `pip3 install dash_daq`) ## Getting started for contributors The source code and all the subsequent changes should be done inside `src` folder/directory. Create a python virtual environment and activate it. inside that virtual enviornment ```sh pip install dash pip install pyyaml ``` This will install necessary build tools for building and testing library. ```sh # Clone this repository git clone https://github.com/plotly/dash-daq.git # Install dependencies $ npm install --also=dev # Watch source for changes and build to `lib/` $ npm start ``` ## Documentation Component API documentation can be found at https://dash.plotly.com/dash-daq ## Development ### Demo server You can start up a demo development server to see a demo of the rendered components: ```sh $ npm run dash-demo ``` You have to maintain the list of components in `demo/Demo.react.js`. ### Code quality and tests #### To run lint and unit tests: ```sh $ npm run test ``` ### Testing your components in Dash 1. Build development bundle to `lib/` ```sh $ npm run start ``` 2. Install module locally (after every change) in virtual environment ```sh # Generate metadata, and install the daq pacakage locally for testing $ npm run install-local ``` 3. Run the Dash demo ```sh $ npm run dash-demo ``` ## Installing python package locally Before publishing to PyPi, you can test installing the module locally: ```sh # Install in `site-packages` on your machine $ yarn run install-local ``` ## Uninstalling python package locally ```sh $ yarn run uninstall-local ``` ## Producing a new release as a tarball ```sh vim dash_daq/version.py # and increase it to X.X.X rm -rf node_modules dist build lib yarn install yarn build-tarball ls dist/dash_daq-X.X.X.tar.gz # this is your tarball ``` ## Demo applications - Dash Daq HP Multimeter - [http://dash-gallery.plotly.host/dash-daq-hp-multimeter](http://dash-gallery.plotly.host/dash-daq-hp-multimeter) - Dash Daq IV Tracer - [http://dash-gallery.plotly.host/dash-daq-iv-tracer](http://dash-gallery.plotly.host/dash-daq-iv-tracer) - Dash Daq Pressure Gauge KJL - [http://dash-gallery.plotly.host/dash-daq-pressure-gauge-kjl](http://dash-gallery.plotly.host/dash-daq-pressure-gauge-kjl) - Dash Daq Pressure Gauge Pfeiffer - [https://dash-gallery.plotly.host/dash-daq-pressure-gauge-pv](https://dash-gallery.plotly.host/dash-daq-pressure-gauge-pv) - Dash Daq Sparki - [http://dash-gallery.plotly.host/dash-daq-sparki](http://dash-gallery.plotly.host/dash-daq-sparki) - Dash Daq Stepper Motor - [http://dash-gallery.plotly.host/dash-daq-stepper-motor](http://dash-gallery.plotly.host/dash-daq-stepper-motor) - Dash Tektronix 350 - [http://dash-gallery.plotly.host/dash-daq-tektronix350](http://dash-gallery.plotly.host/dash-daq-tektronix350) - Dash Ocean Optics - [http://dash-gallery.plotly.host/dash-ocean-optics](http://dash-gallery.plotly.host/dash-ocean-optics) ================================================ FILE: babel.config.js ================================================ module.exports = { presets: [ '@babel/preset-env', '@babel/preset-react' ], plugins: [ '@babel/plugin-syntax-dynamic-import' ] } ================================================ FILE: bin/generateDocs ================================================ #!/usr/bin/env node const path = require('path'); const fs = require('fs-extra'); const chalk = require('chalk'); const reactDocgen = require('react-docgen'); const ReactDocGenMarkdownRenderer = require('react-docgen-markdown-renderer'); const componentDir = path.join(__dirname, '..', 'src', 'components'); const documentationDir = path.join(__dirname, '..', 'docs'); const componentDocTemplate = ` ## {{componentName}} {{#if srcLink }}Component file: [\`{{srcLink}}\`]({{srcLink}}){{/if}} {{#if description}}{{{description}}}{{/if}} prop | type | default | description ---- | :----: | :-------: | ----------- {{#each props}} **{{@key}}** | \`{{> (typePartial this) this}}\` | {{#if this.defaultValue}}\`{{{this.defaultValue}}}\`{{/if}} | {{#if this.description}}{{{this.description}}}{{/if}} {{/each}} `; const renderer = new ReactDocGenMarkdownRenderer({ template: componentDocTemplate }); genDocumention() .then(() => console.log(chalk.green('Documentation successfully generated.'))) .catch(console.error); // helper async function genDocumention () { const componentFilenames = fs.readdirSync(componentDir).filter((filename) => filename.includes('.js')); await genComponentDocs(componentFilenames); await genIndexDoc(componentFilenames); } async function genComponentDocs (componentFilenames) { const promises = componentFilenames.map((componentFilename) => { const docFilename = getDocFilename(componentFilename); const componentPath = path.join(componentDir, componentFilename); const docPath = path.join(documentationDir, docFilename) return documentComponent(componentPath, docPath); }); return Promise.all(promises); } async function genIndexDoc (componentFilenames) { const indexDocPath = path.join(documentationDir, 'README.md') let content = ''; content += '## Component API Documentation\n\n'; componentFilenames.forEach((filename) => { const componentName = getComponentName(filename); const docFilename = getDocFilename(filename); content += `\n - [${componentName}](/docs/${docFilename})\n`; }) return fs.writeFile(indexDocPath, content); } async function documentComponent (componentPath, docPath) { const componentName = getComponentName(componentPath); const fileContent = await fs.readFile(componentPath); const doc = reactDocgen.parse(fileContent); const markdown = renderer.render(componentPath, doc, []) .split('src/components').join('/src/components') return fs.writeFile(docPath, markdown); } function getDocFilename (componentPath) { return `${path.basename(componentPath).split('.').shift()}.md`; } function getComponentName (componentPath) { return path.basename(componentPath).split('.').shift(); } ================================================ FILE: dash-info.yaml ================================================ pkg_help_description: >- A robust set of controls that make it simpler to integrate data acquisition and controls into your Dash applications. pkg_help_title: >- Interactive Data Acquisition and Control Components for Dash ================================================ FILE: dash_daq/BooleanSwitch.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class BooleanSwitch(Component): """A BooleanSwitch component. A switch component that toggles between on and off. Keyword arguments: - id (string; optional): The ID used to identify this component in Dash callbacks. - className (string; optional): Class to apply to the root component element. - color (string; optional): Color to highlight active switch background. - disabled (boolean; optional): If True, switch cannot be clicked. - label (dict; optional): Description to be displayed alongside the control. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the component label is positioned. - on (boolean; default False): Whether or not the switch is on. - persisted_props (list of a value equal to: 'on's; default ['on']): Properties whose user interactions will persist after refreshing the component or the page. Since only `on` is allowed this prop can normally be ignored. - persistence (boolean | string | number; optional): Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`. - persistence_type (a value equal to: 'local', 'session', 'memory'; default 'local'): Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit. - size (number; optional): size of the switch. - style (dict; optional): Style to apply to the root object. - theme (dict; default light): Theme configuration to be set by a ThemeProvider. - vertical (boolean; default False): If True, switch will be vertical instead of horizontal.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, on=Component.UNDEFINED, color=Component.UNDEFINED, vertical=Component.UNDEFINED, disabled=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, persistence=Component.UNDEFINED, persisted_props=Component.UNDEFINED, persistence_type=Component.UNDEFINED, size=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'className', 'color', 'disabled', 'label', 'labelPosition', 'on', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme', 'vertical'] self._type = 'BooleanSwitch' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'className', 'color', 'disabled', 'label', 'labelPosition', 'on', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme', 'vertical'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(BooleanSwitch, self).__init__(**args) ================================================ FILE: dash_daq/ColorPicker.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class ColorPicker(Component): """A ColorPicker component. A color picker. Keyword arguments: - id (string; optional): The ID used to identify the color picker in Dash callbacks. - className (string; optional): Class to apply to the root component element. - disabled (boolean; optional): If True, color cannot be picked. - label (dict; optional): Description to be displayed alongside the control. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the indicator label is positioned. - persisted_props (list of a value equal to: 'value's; default ['value']): Properties whose user interactions will persist after refreshing the component or the page. Since only `value` is allowed this prop can normally be ignored. - persistence (boolean | string | number; optional): Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`. - persistence_type (a value equal to: 'local', 'session', 'memory'; default 'local'): Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit. - size (number; default 225): Size (width) of the component in pixels. - style (dict; optional): Style to apply to the root component element. - theme (dict; default light): Theme configuration to be set by a ThemeProvider. - value (dict; optional): Color value of the picker. `value` is a dict with keys: - hex (string; optional): Hex string. - rbg (dict; optional): RGB/RGBA object. `rbg` is a dict with keys: - a (number; optional) - b (number; optional) - g (number; optional) - r (number; optional)""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, disabled=Component.UNDEFINED, size=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, persistence=Component.UNDEFINED, persisted_props=Component.UNDEFINED, persistence_type=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'className', 'disabled', 'label', 'labelPosition', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme', 'value'] self._type = 'ColorPicker' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'className', 'disabled', 'label', 'labelPosition', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme', 'value'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(ColorPicker, self).__init__(**args) ================================================ FILE: dash_daq/DarkThemeProvider.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class DarkThemeProvider(Component): """A DarkThemeProvider component. DarkThemeProvider is a component that is placed at the root of the component tree to make all components match the dark theme Keyword arguments: - children (list of a list of or a singular dash component, string or numbers | a list of or a singular dash component, string or number; optional): The children of this component. - theme (dict; optional): Theme object to override with a custom theme. `theme` is a dict with keys: - dark (boolean; optional): True for Dark mode, False for Light. - detail (string; optional): Color used for UI details, like borders. - primary (string; optional): Highlight color. - secondary (string; optional): Supporting color.""" @_explicitize_args def __init__(self, children=None, theme=Component.UNDEFINED, **kwargs): self._prop_names = ['children', 'theme'] self._type = 'DarkThemeProvider' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['children', 'theme'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(DarkThemeProvider, self).__init__(children=children, **args) ================================================ FILE: dash_daq/Gauge.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Gauge(Component): """A Gauge component. A Gauge component that points to a value between some range. Keyword arguments: - id (string; optional): The ID used to identify this compnent in Dash callbacks. - base (number; default 10): Base to be used in logarithmic scale. - className (string; optional): Class to apply to the root component element. - color (dict; optional): Color configuration for the gauge's track. `color` is a string | dict with keys: - default (string; optional): Color used for current value text and other minor accents. - gradient (boolean; optional): Display ranges as a gradient between given colors. - ranges (dict; optional): Define multiple color ranges on the gauge's track. The key determines the color of the range and the value is the start,end of the range itself. Ranges must be contiguous along the entirety of the gauge's range of values. `ranges` is a dict with keys: - color (list of number | list of numberss; optional) - digits (number; default 1): Number of digits for current value. - exceedMessage (string; optional): Warning message when value exceed max. - label (dict; optional): Description to be displayed alongside the control. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the component label is positioned. - lagingMessage (string; optional): Warning message when value is laging from min. - logarithmic (boolean; optional): If set to True, a logarithmic scale will be used. - max (number; default 10): The maximum value of the gauge. If logarithmic, represents the maximum exponent. - min (number; default 0): The minimum value of the gauge. If logarithmic, represents the minimum exponent. - scale (dict; optional): Configuration for the component scale. `scale` is a dict with keys: - custom (dict; optional): Custom scale marks. The key determines the position and the value determines what will show. If you want to set the style of a specific mark point, the value should be an object which contains style and label properties. `custom` is a number Or dict with keys: - label (string; optional) - style (string; optional) - interval (number; optional): Interval by which the scale goes up. Attempts to dynamically divide min-max range by default. - labelInterval (number; optional): Interval by which labels are added to scale marks. Defaults to 2 (every other mark has a label). - start (number; optional): Value to start the scale from. Defaults to min. - showCurrentValue (boolean; optional): If True, the current value of the gauge will be displayed. - size (number; default 208): The size (diameter) of the gauge in pixels. - style (dict; optional): Style to apply to the root component element. - textColor (string; optional): text color for theme. - theme (dict; default light): Theme configuration to be set by a ThemeProvider. - units (string; optional): Label for the current value. - value (number; optional): The value of gauge. If logarithmic, the displayed value will be the logarithm of the inputted value.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, size=Component.UNDEFINED, min=Component.UNDEFINED, max=Component.UNDEFINED, base=Component.UNDEFINED, logarithmic=Component.UNDEFINED, showCurrentValue=Component.UNDEFINED, digits=Component.UNDEFINED, units=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, scale=Component.UNDEFINED, color=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, exceedMessage=Component.UNDEFINED, lagingMessage=Component.UNDEFINED, textColor=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'base', 'className', 'color', 'digits', 'exceedMessage', 'label', 'labelPosition', 'lagingMessage', 'logarithmic', 'max', 'min', 'scale', 'showCurrentValue', 'size', 'style', 'textColor', 'theme', 'units', 'value'] self._type = 'Gauge' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'base', 'className', 'color', 'digits', 'exceedMessage', 'label', 'labelPosition', 'lagingMessage', 'logarithmic', 'max', 'min', 'scale', 'showCurrentValue', 'size', 'style', 'textColor', 'theme', 'units', 'value'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(Gauge, self).__init__(**args) ================================================ FILE: dash_daq/GraduatedBar.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class GraduatedBar(Component): """A GraduatedBar component. A graduated bar component that displays a value within some range as a percentage. Keyword arguments: - id (string; optional): The ID used to identify this compnent in Dash callbacks. - className (string; optional): Class to apply to the root component element. - color (dict; default light.primary): Color configuration for the graduated bar's progress blocks. `color` is a string | dict with keys: - default (string; optional): Fallback color to use when color.ranges has gaps. - gradient (boolean; optional): Display ranges as a gradient between given colors. Requires color.ranges to be contiguous along the entirety of the graduated bar's range of values. - ranges (dict; optional): Define multiple color ranges on the graduated bar's track. The key determines the color of the range and the value is the start,end of the range itself. `ranges` is a dict with keys: - color (list of numbers; optional) - label (dict; optional): Description to be displayed alongside the control. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the component label is positioned. - max (number; default 10): The maximum value of the graduated bar. - min (number; default 0): The minimum value of the graduated bar. - showCurrentValue (boolean; optional): If True, the current percentage of the bar will be displayed. - size (number; default 250): The size (length) of the graduated bar in pixels. - step (number; default 0.5): Value by which progress blocks appear. - style (dict; optional): Style to apply to the root component element. - theme (dict; default light): Theme configuration to be set by a ThemeProvider. - value (number; optional): The value of the graduated bar. - vertical (boolean; optional): If True, will display bar vertically instead of horizontally.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, color=Component.UNDEFINED, size=Component.UNDEFINED, vertical=Component.UNDEFINED, min=Component.UNDEFINED, max=Component.UNDEFINED, step=Component.UNDEFINED, showCurrentValue=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'className', 'color', 'label', 'labelPosition', 'max', 'min', 'showCurrentValue', 'size', 'step', 'style', 'theme', 'value', 'vertical'] self._type = 'GraduatedBar' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'className', 'color', 'label', 'labelPosition', 'max', 'min', 'showCurrentValue', 'size', 'step', 'style', 'theme', 'value', 'vertical'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(GraduatedBar, self).__init__(**args) ================================================ FILE: dash_daq/Indicator.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Indicator(Component): """An Indicator component. A boolean indicator LED. Keyword arguments: - id (string; optional): The ID used to identify the indicator in Dash callbacks. - className (string; optional): Class to apply to the root component element. - color (string; default colors.DARKER_PRIMARY): Color of the indicator. - height (number; optional): Height of the component. Set both width and height for a rectangular indicator. - label (dict; optional): Description to be displayed alongside the control. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom', 'right', 'left'; default 'top'): Where the indicator label is positioned. - size (number; default 15): Size of the component. Either use this or width and height. - style (dict; optional): Style to apply to the root component element. - theme (dict; default light): Theme configuration to be set by a ThemeProvider. - value (boolean; optional): If True, indicator is illuminated. - width (number; optional): Width of the component. Set both width and height for a rectangular indicator.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, color=Component.UNDEFINED, size=Component.UNDEFINED, width=Component.UNDEFINED, height=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'className', 'color', 'height', 'label', 'labelPosition', 'size', 'style', 'theme', 'value', 'width'] self._type = 'Indicator' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'className', 'color', 'height', 'label', 'labelPosition', 'size', 'style', 'theme', 'value', 'width'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(Indicator, self).__init__(**args) ================================================ FILE: dash_daq/Joystick.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Joystick(Component): """A Joystick component. A joystick. Keyword arguments: - id (string; optional): The ID used to identify the Joystick in Dash callbacks. - angle (number; optional): Joystick angle in degrees, 0 = right, 90 = up, 180 = left, 270 = down. - className (string; optional): Class to apply to the root component element. - force (number; optional): Joystick force: distance between cursor and center in big-circle radii. - label (dict; optional): Description to be displayed alongside the control. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the indicator label is positioned. - size (number; default 100): Size (width) of the component in pixels. - style (dict; optional): Style to apply to the root component element. - theme (dict; default light): Theme configuration to be set by a ThemeProvider.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, angle=Component.UNDEFINED, force=Component.UNDEFINED, size=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'angle', 'className', 'force', 'label', 'labelPosition', 'size', 'style', 'theme'] self._type = 'Joystick' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'angle', 'className', 'force', 'label', 'labelPosition', 'size', 'style', 'theme'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(Joystick, self).__init__(**args) ================================================ FILE: dash_daq/Knob.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Knob(Component): """A Knob component. A knob component that can be turned to a value between some range. Keyword arguments: - id (string; optional): The ID used to identify this compnent in Dash callbacks. - className (string; optional): Class to apply to the root component element. - color (dict; optional): Color configuration for the knob's track. `color` is a string | dict with keys: - default (string; optional): Color used for current value text and other minor accents. - gradient (boolean; optional): Display ranges as a gradient between given colors. - ranges (dict; optional): Define multiple color ranges on the knob's track. The key determines the color of the range and the value is the start,end of the range itself. Ranges must be contiguous along the entirety of the knob's range of values. `ranges` is a dict with keys: - color (list of numbers; optional) - digits (number; optional): number of digits to show after decimal places. - disabled (boolean; optional): If True, knob cannot be moved. - label (dict; optional): Description to be displayed alongside the control. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the knob label is positioned. - max (number; default 10): The maximum value of the knob. - min (number; default 0): The minimum value of the knob. - persisted_props (list of a value equal to: 'value's; default ['value']): Properties whose user interactions will persist after refreshing the component or the page. Since only `value` is allowed this prop can normally be ignored. - persistence (boolean | string | number; optional): Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`. - persistence_type (a value equal to: 'local', 'session', 'memory'; default 'local'): Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit. - scale (dict; optional): Configuration for the component scale. `scale` is a dict with keys: - custom (dict; optional): Custom scale marks. The key determines the position and the value determines what will show. If you want to set the style of a specific mark point, the value should be an object which contains style and label properties. `custom` is a number Or dict with keys: - label (string; optional) - style (string; optional) - interval (number; optional): Interval by which the scale goes up. Attempts to dynamically divide min-max range by default. - labelInterval (number; optional): Interval by which labels are added to scale marks. Defaults to 2 (every other mark has a label). - start (number; optional): Value to start the scale from. Defaults to min. - showCurrentValue (boolean; optional): show current value of knob. - size (number; default 114): The size (diameter) of the knob in pixels. - style (dict; optional): Style to apply to the root component element. - textColor (string; optional): text color of scale. - theme (dict; default light): Theme configuration to be set by a ThemeProvider. - value (number; optional): The value of knob.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, color=Component.UNDEFINED, size=Component.UNDEFINED, min=Component.UNDEFINED, max=Component.UNDEFINED, disabled=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, scale=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, persistence=Component.UNDEFINED, persisted_props=Component.UNDEFINED, persistence_type=Component.UNDEFINED, showCurrentValue=Component.UNDEFINED, textColor=Component.UNDEFINED, digits=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'className', 'color', 'digits', 'disabled', 'label', 'labelPosition', 'max', 'min', 'persisted_props', 'persistence', 'persistence_type', 'scale', 'showCurrentValue', 'size', 'style', 'textColor', 'theme', 'value'] self._type = 'Knob' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'className', 'color', 'digits', 'disabled', 'label', 'labelPosition', 'max', 'min', 'persisted_props', 'persistence', 'persistence_type', 'scale', 'showCurrentValue', 'size', 'style', 'textColor', 'theme', 'value'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(Knob, self).__init__(**args) ================================================ FILE: dash_daq/LEDDisplay.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class LEDDisplay(Component): """A LEDDisplay component. A 7-bar LED display component. Keyword arguments: - id (string; optional): The ID used to identify the display in Dash callbacks. - backgroundColor (string; default '#fff'): Color of the display's background. - className (string; optional): Class to apply to the root component element. - color (string; default colors.PRIMARY): Color of the display. - label (dict; optional): Description to be displayed alongside the control. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the display label is positioned. - size (number; default 42): Size of the display. - style (dict; optional): Style to apply to the root component element. - theme (dict; default light): Theme configuration to be set by a ThemeProvider. - value (number | string; optional): Value to be displayed. A number or a string containing only digits (0-9), periods, and colons, and possibly starting with a minus sign.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, color=Component.UNDEFINED, backgroundColor=Component.UNDEFINED, size=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'backgroundColor', 'className', 'color', 'label', 'labelPosition', 'size', 'style', 'theme', 'value'] self._type = 'LEDDisplay' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'backgroundColor', 'className', 'color', 'label', 'labelPosition', 'size', 'style', 'theme', 'value'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(LEDDisplay, self).__init__(**args) ================================================ FILE: dash_daq/NumericInput.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class NumericInput(Component): """A NumericInput component. A numeric input component that can be set to a value between some range. Keyword arguments: - id (string; optional): The ID used to identify this compnent in Dash callbacks. - className (string; optional): Class to apply to the root component element. - disabled (boolean; optional): If True, numeric input cannot changed. - label (dict; optional): Description to be displayed alongside the control. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the numeric input label is positioned. - max (number; default 10): The maximum value of the numeric input. - min (number; default 0): The minimum value of the numeric input. - persisted_props (list of a value equal to: 'value's; default ['value']): Properties whose user interactions will persist after refreshing the component or the page. Since only `value` is allowed this prop can normally be ignored. - persistence (boolean | string | number; optional): Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`. - persistence_type (a value equal to: 'local', 'session', 'memory'; default 'local'): Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit. - size (number; optional): The size (length) of the numeric input in pixels. - style (dict; default { display: 'flex', justifyContent: 'center' }): Style to apply to the root component element. - theme (dict; default light): Theme configuration to be set by a ThemeProvider. - value (number; optional): The value of numeric input.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, size=Component.UNDEFINED, min=Component.UNDEFINED, max=Component.UNDEFINED, disabled=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, persistence=Component.UNDEFINED, persisted_props=Component.UNDEFINED, persistence_type=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'className', 'disabled', 'label', 'labelPosition', 'max', 'min', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme', 'value'] self._type = 'NumericInput' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'className', 'disabled', 'label', 'labelPosition', 'max', 'min', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme', 'value'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(NumericInput, self).__init__(**args) ================================================ FILE: dash_daq/PowerButton.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class PowerButton(Component): """A PowerButton component. A power button component can be turned on and off. Keyword arguments: - id (string; optional): The ID used to identify this compnent in Dash callbacks. - className (string; optional): Class to apply to the root component element. - color (string; optional): The indicator color to display when power button is on. - disabled (boolean; optional): If True, power button cannot be clicked. - label (dict; optional): Description to be displayed alongside the button. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the button label is positioned. - offButtonStyle (dict; optional): style to apply on switch off button. - on (boolean; default False): Whether or not the power button is on. - onButtonStyle (dict; optional): style to apply on switch on button. - persisted_props (list of a value equal to: 'on's; default ['on']): Properties whose user interactions will persist after refreshing the component or the page. Since only `on` is allowed this prop can normally be ignored. - persistence (boolean | string | number; optional): Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`. - persistence_type (a value equal to: 'local', 'session', 'memory'; default 'local'): Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit. - size (number; default 48): The size (diameter) of the power button in pixels. - style (dict; optional): Style to apply to the root component element. - theme (dict; default light): Theme configuration to be set by a ThemeProvider.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, on=Component.UNDEFINED, color=Component.UNDEFINED, size=Component.UNDEFINED, disabled=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, onButtonStyle=Component.UNDEFINED, offButtonStyle=Component.UNDEFINED, persistence=Component.UNDEFINED, persisted_props=Component.UNDEFINED, persistence_type=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'className', 'color', 'disabled', 'label', 'labelPosition', 'offButtonStyle', 'on', 'onButtonStyle', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme'] self._type = 'PowerButton' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'className', 'color', 'disabled', 'label', 'labelPosition', 'offButtonStyle', 'on', 'onButtonStyle', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(PowerButton, self).__init__(**args) ================================================ FILE: dash_daq/PrecisionInput.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class PrecisionInput(Component): """A PrecisionInput component. A numeric input component that converts an input value to the desired precision. Keyword arguments: - id (string; optional): The ID used to identify this compnent in Dash callbacks. - className (string; optional): Class to apply to the root component element. - disabled (boolean; optional): If True, numeric input cannot be changed. - label (dict; optional): Description to be displayed alongside the scientific notation. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the numeric input label is positioned. - max (number; default Number.MAX_SAFE_INTEGER): The maximum value of the numeric input. - min (number; default 0): The minimum value of the numeric input. - persisted_props (list of a value equal to: 'value's; default ['value']): Properties whose user interactions will persist after refreshing the component or the page. Since only `value` is allowed this prop can normally be ignored. - persistence (boolean | string | number; optional): Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`. - persistence_type (a value equal to: 'local', 'session', 'memory'; default 'local'): Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit. - precision (number; default 2): Number of significant figures. - size (number; optional): The size (length) of the numeric input in pixels. - style (dict; optional): Style to apply to the root component element. - theme (dict; default light): Theme configuration to be set by a ThemeProvider. - value (number; optional): The value of numeric input.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, size=Component.UNDEFINED, min=Component.UNDEFINED, max=Component.UNDEFINED, precision=Component.UNDEFINED, disabled=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, persistence=Component.UNDEFINED, persisted_props=Component.UNDEFINED, persistence_type=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'className', 'disabled', 'label', 'labelPosition', 'max', 'min', 'persisted_props', 'persistence', 'persistence_type', 'precision', 'size', 'style', 'theme', 'value'] self._type = 'PrecisionInput' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'className', 'disabled', 'label', 'labelPosition', 'max', 'min', 'persisted_props', 'persistence', 'persistence_type', 'precision', 'size', 'style', 'theme', 'value'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(PrecisionInput, self).__init__(**args) ================================================ FILE: dash_daq/Slider.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Slider(Component): """A Slider component. A slider component with support for a target value. Keyword arguments: - id (string; optional): The ID used to identify this component in Dash callbacks. - className (string; optional): Additional CSS class for the root DOM node. - color (dict; default colors.DARKER_PRIMARY): Color configuration for the slider's track. `color` is a string | dict with keys: - default (string; optional): Fallback color to use when color.ranges has gaps. - gradient (boolean; optional): Display ranges as a gradient between given colors. Requires color.ranges to be contiguous along the entirety of the gauge's range of values. - ranges (dict; optional): Define multiple color ranges on the slider's track. The key determines the color of the range and the value is the start,end of the range itself. `ranges` is a dict with keys: - color (list of numbers; optional) - disabled (boolean; optional): If True, the handles can't be moved. - dots (boolean; optional): When the step value is greater than 1, you can set the dots to True if you want to render the slider with dots. Note: dots are disabled automatically when using color.ranges. - fullSize (boolean; optional): make slider same size of its parent. - handleLabel (dict; optional): Configuration of the slider handle's label. Passing falsy value will disable the label. `handleLabel` is a string | dict with keys: - color (string; optional) - label (string; optional) - showCurrentValue (boolean; optional) - style (dict; optional) - included (boolean; optional): If the value is True, it means a continuous value is included. Otherwise, it is an independent value. - labelPosition (a value equal to: 'top', 'bottom'; default 'bottom'): Where the component label is positioned. - marks (dict; optional): Marks on the slider. The key determines the position, and the value determines what will show. If you want to set the style of a specific mark point, the value should be an object which contains style and label properties. `marks` is a dict with keys: - number (dict; optional) `number` is a string Or dict with keys: - label (string; optional) - style (dict; optional) - max (number; optional): Maximum allowed value of the slider. - min (number; default 0): Minimum allowed value of the slider. - persisted_props (list of a value equal to: 'value's; default ['value']): Properties whose user interactions will persist after refreshing the component or the page. Since only `value` is allowed this prop can normally be ignored. - persistence (boolean | string | number; optional): Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`. - persistence_type (a value equal to: 'local', 'session', 'memory'; default 'local'): Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit. - size (number; default 265): Size of the slider in pixels. - step (number; optional): Value by which increments or decrements are made. - style (dict; default { display: 'flex', justifyContent: 'center' }): Style to apply to the root component element. - targets (dict; optional): Targets on the slider. The key determines the position, and the value determines what will show. If you want to set the style of a specific target point, the value should be an object which contains style and label properties. `targets` is a dict with keys: - number (dict; optional) `number` is a string Or dict with keys: - color (string; optional) - label (string; optional) - showCurrentValue (boolean; optional) - style (dict; optional) - theme (dict; default light): Theme configuration to be set by a ThemeProvider. - updatemode (a value equal to: 'mouseup', 'drag'; default 'mouseup'): Determines when the component should update its value. If `mouseup`, then the slider will only trigger its value when the user has finished dragging the slider. If `drag`, then the slider will update its value continuously as it is being dragged. Only use `drag` if your updates are fast. - value (number; optional): The value of the input. - vertical (boolean; optional): If True, the slider will be vertical.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, style=Component.UNDEFINED, marks=Component.UNDEFINED, color=Component.UNDEFINED, value=Component.UNDEFINED, className=Component.UNDEFINED, labelPosition=Component.UNDEFINED, disabled=Component.UNDEFINED, dots=Component.UNDEFINED, included=Component.UNDEFINED, min=Component.UNDEFINED, max=Component.UNDEFINED, step=Component.UNDEFINED, vertical=Component.UNDEFINED, size=Component.UNDEFINED, targets=Component.UNDEFINED, theme=Component.UNDEFINED, handleLabel=Component.UNDEFINED, updatemode=Component.UNDEFINED, persistence=Component.UNDEFINED, persisted_props=Component.UNDEFINED, persistence_type=Component.UNDEFINED, fullSize=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'className', 'color', 'disabled', 'dots', 'fullSize', 'handleLabel', 'included', 'labelPosition', 'marks', 'max', 'min', 'persisted_props', 'persistence', 'persistence_type', 'size', 'step', 'style', 'targets', 'theme', 'updatemode', 'value', 'vertical'] self._type = 'Slider' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'className', 'color', 'disabled', 'dots', 'fullSize', 'handleLabel', 'included', 'labelPosition', 'marks', 'max', 'min', 'persisted_props', 'persistence', 'persistence_type', 'size', 'step', 'style', 'targets', 'theme', 'updatemode', 'value', 'vertical'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(Slider, self).__init__(**args) ================================================ FILE: dash_daq/StopButton.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class StopButton(Component): """A StopButton component. A Stop button component Keyword arguments: - children (a list of or a singular dash component, string or number; optional): The children of the button. - id (string; optional): The ID used to identify this compnent in Dash callbacks. - buttonText (string; default 'Stop'): Text displayed in the button. - className (string; optional): Class to apply to the root component element. - disabled (boolean; optional): If True, button cannot be pressesd. - label (dict; optional): Description to be displayed alongside the button. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the label is positioned. - n_clicks (number; default 0): Number of times the button was clicked. - size (number; default 92): The size (width) of the stop button in pixels. - style (dict; optional): Style to apply to the root component element. - theme (dict; optional): Theme configuration to be set by a ThemeProvider.""" @_explicitize_args def __init__(self, children=None, id=Component.UNDEFINED, size=Component.UNDEFINED, buttonText=Component.UNDEFINED, n_clicks=Component.UNDEFINED, disabled=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, **kwargs): self._prop_names = ['children', 'id', 'buttonText', 'className', 'disabled', 'label', 'labelPosition', 'n_clicks', 'size', 'style', 'theme'] self._type = 'StopButton' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['children', 'id', 'buttonText', 'className', 'disabled', 'label', 'labelPosition', 'n_clicks', 'size', 'style', 'theme'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(StopButton, self).__init__(children=children, **args) ================================================ FILE: dash_daq/Tank.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Tank(Component): """A Tank component. A Tank component that fills to a value between some range. Keyword arguments: - id (string; optional): The ID used to identify this component in Dash callbacks. - base (number; default 10): Base to be used in logarithmic scale. - className (string; optional): Class to apply to the root component element. - color (string; optional): The color of tank fill. - currentValueStyle (dict; optional): text style of current value. - exceedMessage (string; optional): Warning message when value exceed max. - height (number; default 192): The height of the tank in pixels. - label (dict; optional): Description to be displayed alongside the control. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the component label is positioned. - lagingMessage (string; optional): Warning message when value is laging from min. - logarithmic (boolean; optional): If set to True, a logarithmic scale will be used. - max (number; default 10): The maximum value of the tank. If logarithmic, represents the maximum exponent. - min (number; default 0): The minimum value of the tank. If logarithmic, represents minimum exponent. - scale (dict; optional): Configuration for the component scale. `scale` is a dict with keys: - custom (dict; optional): Custom scale marks. The key determines the position and the value determines what will show. If you want to set the style of a specific mark point, the value should be an object which contains style and label properties. `custom` is a number Or dict with keys: - label (string; optional) - style (string; optional) - interval (number; optional): Interval by which the scale goes up. Attempts to dynamically divide min-max range by default. - labelInterval (number; optional): Interval by which labels are added to scale marks. Defaults to 2 (every other mark has a label). - start (number; optional): Value to start the scale from. Defaults to min. - showCurrentValue (boolean; optional): If True, the current value of the tank will be displayed. - style (dict; optional): Style to apply to the root component element. - textColor (string; optional): text color. - theme (dict; default light): Theme configuration to be set by a ThemeProvider. - units (string; optional): Label for the current value. - value (number; optional): The value of tank. If logarithmic, the displayed value will be the logarithm of the inputted value. - width (number; default 112): The width of the tank in pixels.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, height=Component.UNDEFINED, width=Component.UNDEFINED, color=Component.UNDEFINED, theme=Component.UNDEFINED, currentValueStyle=Component.UNDEFINED, min=Component.UNDEFINED, max=Component.UNDEFINED, base=Component.UNDEFINED, logarithmic=Component.UNDEFINED, showCurrentValue=Component.UNDEFINED, units=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, scale=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, exceedMessage=Component.UNDEFINED, lagingMessage=Component.UNDEFINED, textColor=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'base', 'className', 'color', 'currentValueStyle', 'exceedMessage', 'height', 'label', 'labelPosition', 'lagingMessage', 'logarithmic', 'max', 'min', 'scale', 'showCurrentValue', 'style', 'textColor', 'theme', 'units', 'value', 'width'] self._type = 'Tank' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'base', 'className', 'color', 'currentValueStyle', 'exceedMessage', 'height', 'label', 'labelPosition', 'lagingMessage', 'logarithmic', 'max', 'min', 'scale', 'showCurrentValue', 'style', 'textColor', 'theme', 'units', 'value', 'width'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(Tank, self).__init__(**args) ================================================ FILE: dash_daq/Thermometer.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Thermometer(Component): """A Thermometer component. A thermometer component that fills to a value between some range Keyword arguments: - id (string; optional): The ID used to identify this compnent in Dash callbacks. - base (number; default 10): Base to be used in logarithmic scale. - className (string; optional): Class to apply to the root component element. - color (string; optional): The color of the thermometer fill/current value text. - height (number; default 192): The height of the thermometer in pixels. - label (dict; optional): Description to be displayed alongside the control. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the component label is positioned. - logarithmic (boolean; optional): If set to True, a logarithmic scale will be used. - max (number; default 10): The maximum value of the thermometer. If logarithmic, represents the maximum exponent. - min (number; default 0): The minimum value of the thermometer. If logarithmic, represents the minimum exponent. - scale (dict; optional): Configuration for the component scale. `scale` is a dict with keys: - custom (dict; optional): Custom scale marks. The key determines the position and the value determines what will show. If you want to set the style of a specific mark point, the value should be an object which contains style and label properties. `custom` is a number Or dict with keys: - label (string; optional) - style (string; optional) - interval (number; optional): Interval by which the scale goes up. Attempts to dynamically divide min-max range by default. - labelInterval (number; optional): Interval by which labels are added to scale marks. Defaults to 2 (every other mark has a label). - start (number; optional): Value to start the scale from. Defaults to min. - showCurrentValue (boolean; optional): If True, the current value of the thermometer will be displayed. - style (dict; optional): Style to apply to the root component element. - theme (dict; default light): Theme configuration to be set by a ThemeProvider. - units (string; optional): Label for the current value. - value (number; optional): The value of thermometer. If logarthmic, the value displayed will be the logarithm of the inputted value. - width (number; default 20): The width of the thermometer in pixels.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, height=Component.UNDEFINED, width=Component.UNDEFINED, color=Component.UNDEFINED, min=Component.UNDEFINED, max=Component.UNDEFINED, base=Component.UNDEFINED, logarithmic=Component.UNDEFINED, showCurrentValue=Component.UNDEFINED, units=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, scale=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'base', 'className', 'color', 'height', 'label', 'labelPosition', 'logarithmic', 'max', 'min', 'scale', 'showCurrentValue', 'style', 'theme', 'units', 'value', 'width'] self._type = 'Thermometer' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'base', 'className', 'color', 'height', 'label', 'labelPosition', 'logarithmic', 'max', 'min', 'scale', 'showCurrentValue', 'style', 'theme', 'units', 'value', 'width'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(Thermometer, self).__init__(**args) ================================================ FILE: dash_daq/ToggleSwitch.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class ToggleSwitch(Component): """A ToggleSwitch component. A switch component that toggles between two values. Keyword arguments: - id (string; optional): The ID used to identify this compnent in Dash callbacks. - className (string; optional): Class to apply to the root component element. - color (string; optional): Color to highlight button/indicator. - disabled (boolean; optional): If True, switch cannot be clicked. - label (dict; optional): Description to be displayed alongside the control. To control styling, pass an object with label and style properties. `label` is a string | dict with keys: - label (string; optional) - style (dict; optional) Or list of string | dict with keys: - label (string; optional) - style (dict; optional)s - labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the component label is positioned. - persisted_props (list of a value equal to: 'value's; default ['value']): Properties whose user interactions will persist after refreshing the component or the page. Since only `value` is allowed this prop can normally be ignored. - persistence (boolean | string | number; optional): Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`. - persistence_type (a value equal to: 'local', 'session', 'memory'; default 'local'): Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit. - size (number; optional): The size of the switch. - style (dict; optional): Style to apply to the root object. - theme (dict; default light): Theme configuration to be set by a ThemeProvider. - value (boolean; default False): The state of the switch. - vertical (boolean; default False): If True, switch will be vertical instead of horizontal.""" @_explicitize_args def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, size=Component.UNDEFINED, color=Component.UNDEFINED, vertical=Component.UNDEFINED, disabled=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, persistence=Component.UNDEFINED, persisted_props=Component.UNDEFINED, persistence_type=Component.UNDEFINED, **kwargs): self._prop_names = ['id', 'className', 'color', 'disabled', 'label', 'labelPosition', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme', 'value', 'vertical'] self._type = 'ToggleSwitch' self._namespace = 'dash_daq' self._valid_wildcard_attributes = [] self.available_properties = ['id', 'className', 'color', 'disabled', 'label', 'labelPosition', 'persisted_props', 'persistence', 'persistence_type', 'size', 'style', 'theme', 'value', 'vertical'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in []: if k not in args: raise TypeError( 'Required argument `' + k + '` was not specified.') super(ToggleSwitch, self).__init__(**args) ================================================ FILE: dash_daq/__init__.py ================================================ import os as _os import dash as _dash import sys as _sys import json _basepath = _os.path.dirname(__file__) _filepath = _os.path.abspath(_os.path.join(_basepath, 'package-info.json')) with open(_filepath) as f: __version__ = json.loads(f.read())['version'] from ._imports_ import * # noqa: F401, F403, E402 from ._imports_ import __all__ # noqa: E402 async_resources = [ 'colorpicker', 'slider' ] _js_dist = [] _js_dist.extend([{ 'relative_package_path': 'async-{}.js'.format(async_resource), 'external_url': ( 'https://unpkg.com/dash-daq@{}' '/dash_daq/async-{}.js' ).format(__version__, async_resource), 'namespace': 'dash_daq', 'async': True } for async_resource in async_resources]) _js_dist.extend([{ 'relative_package_path': 'async-{}.js.map'.format(async_resource), 'external_url': ( 'https://unpkg.com/dash-daq@{}' '/dash_daq/async-{}.js.map' ).format(__version__, async_resource), 'namespace': 'dash_daq', 'dynamic': True } for async_resource in async_resources]) _js_dist.extend([ { "relative_package_path": "dash_daq.min.js", "external_url": ( "https://unpkg.com/dash-daq@{}" "/dash_daq/dash_daq.min.js" ).format(__version__), "namespace": "dash_daq" } ]) _js_dist.extend([ { "relative_package_path": "dash_daq.min.js.map", "external_url": ( "https://unpkg.com/dash-daq@{}" "/dash_daq/dash_daq.min.js.map" ).format(__version__), "namespace": "dash_daq", 'dynamic': True } ]) _css_dist = [] for _component in __all__: setattr(locals()[_component], '_js_dist', _js_dist) ================================================ FILE: dash_daq/_imports_.py ================================================ from .BooleanSwitch import BooleanSwitch from .ColorPicker import ColorPicker from .DarkThemeProvider import DarkThemeProvider from .Gauge import Gauge from .GraduatedBar import GraduatedBar from .Indicator import Indicator from .Joystick import Joystick from .Knob import Knob from .LEDDisplay import LEDDisplay from .NumericInput import NumericInput from .PowerButton import PowerButton from .PrecisionInput import PrecisionInput from .Slider import Slider from .StopButton import StopButton from .Tank import Tank from .Thermometer import Thermometer from .ToggleSwitch import ToggleSwitch __all__ = [ "BooleanSwitch", "ColorPicker", "DarkThemeProvider", "Gauge", "GraduatedBar", "Indicator", "Joystick", "Knob", "LEDDisplay", "NumericInput", "PowerButton", "PrecisionInput", "Slider", "StopButton", "Tank", "Thermometer", "ToggleSwitch" ] ================================================ FILE: dash_daq/async-colorpicker.js ================================================ (window.webpackJsonpdash_daq=window.webpackJsonpdash_daq||[]).push([[0],Array(157).concat([function(e,t,r){"use strict";r.r(t);var n=r(1),o=r.n(n),a=r(273),i=r(2),u=r(29),l=r.n(u),c=r(3);function f(){var e=_(["\n box-shadow: 0px 0px 8px 2px rgba(100,100,100,0.075),\n 0px 0px 32px 2px rgba(255,255,255,0.05),\n 1px 1px 0px 0px rgba(25,25,25,0.6),\n -1px -1px 0px 0px rgba(255,255,255,0.2) !important;\n\n & .chrome-picker > div:first-child {\n border-radius: 0 !important;\n }\n\n & .chrome-picker > div:nth-child(2) {\n background: #0a0a0a !important;\n border-top: 1px solid rgba(255,255,255,0.075);\n }\n\n ","\n ","\n ","\n"]);return f=function(){return e},e}function s(){var e=_(["\n & .chrome-picker input {\n font-family: unset !important;\n color: #fff !important;\n border-radius: 0px !important;\n background-color: #22272a !important;\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.05) 0%,\n rgba(0, 0, 0, 0.5) 100%\n ) !important;\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1) !important;\n }\n\n & .chrome-picker input:focus {\n outline: 0 !important;\n border: none !important;\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.2) 0%,\n rgba(0, 0, 0, 0.4) 100%\n ) !important;\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.6), inset 0 0 4px 0 rgba(0, 0, 0, 0.6),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.6), 1px 1px 0px 0px rgba(255, 255, 255, 0.1) !important;\n }\n"]);return s=function(){return e},e}function p(){var e=_(["\n .chrome-picker .flexbox-fix div:nth-child(2) > div:nth-child(2) > div {\n background: #fff !important;\n }\n"]);return p=function(){return e},e}function d(){var e=_(["\n box-shadow: inset 0 0 1px 0 rgba(52, 52, 52, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.2),\n 0 0 12px 4px "," !important;\n "]);return d=function(){return e},e}function h(){var e=_(["\n & .chrome-picker .hue-horizontal > div > div,\n .chrome-picker\n > div:nth-child(2)\n > div:nth-child(1)\n > div:nth-child(2)\n > div:nth-child(2)\n > div\n > div:nth-child(3)\n > div\n > div {\n border-radius: 100% !important;\n border: none !important;\n background: #101010 !important;\n background-image: linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.3) -50%,\n rgba(0, 0, 0, 0.7) 100%\n ) !important;\n transition: all 0.3s ease-in !important;\n ",";\n }\n"]);return h=function(){return e},e}function b(){var e=_(["\n border: 1px solid ",";\n "]);return b=function(){return e},e}function v(){var e=_(["\n border-radius: 3px !important;\n\n "," ",";\n"]);return v=function(){return e},e}function g(){var e=_(["\n border: 1px solid "," !important;\n "]);return g=function(){return e},e}function x(){var e=_(["\n & .chrome-picker .hue-horizontal > div > div,\n .chrome-picker\n > div:nth-child(2)\n > div:nth-child(1)\n > div:nth-child(2)\n > div:nth-child(2)\n > div\n > div:nth-child(3)\n > div\n > div {\n box-shadow: none !important;\n background-color: #fff;\n border-radius: 100% !important;\n ",";\n }\n"]);return x=function(){return e},e}function y(){var e=_(["\n width: ","px !important;\n "]);return y=function(){return e},e}function m(){var e=_(["\n opacity: ",";\n cursor: not-allowed !important;\n & .chrome-picker {\n pointer-events: none !important;\n }\n "]);return m=function(){return e},e}function w(){var e=_(["\n "," & .chrome-picker {\n font-family: unset !important;\n box-shadow: none !important;\n ",";\n }\n\n & .chrome-picker svg {\n background: unset !important;\n }\n\n & .chrome-picker svg:hover path {\n fill: ",";\n }\n\n ",";\n"]);return w=function(){return e},e}function _(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var j=i.c.div(w(),(function(e){var t=e.disabled,r=e.theme;return t&&Object(i.b)(m(),r.dark?1:.65)}),(function(e){var t=e.size;return Object(i.b)(y(),t)}),(function(e){var t=e.theme;return e.color||t.primary}),(function(e){return e.theme.dark?P:E})),O=Object(i.b)(x(),(function(e){var t=e.theme;return Object(i.b)(g(),t.detail)})),E=Object(i.b)(v(),O,(function(e){var t=e.theme;return Object(i.b)(b(),t.detail)})),C=Object(i.b)(h(),(function(e){var t=e.glow;return Object(i.b)(d(),t)})),k=Object(i.b)(p()),S=Object(i.b)(s()),P=Object(i.b)(f(),C,S,k);j.defaultProps={theme:c.e};var M=r(7),B=r(61),A=r(4);function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function R(){return(R=Object.assign||function(e){for(var t=1;t1?t-1:0),i=1;i=128?"#000":"#fff"},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}};t.default=t},function(e,t,r){var n=r(226),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,r){var n=r(177),o=r(277),a=r(278),i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},function(e,t,r){var n=r(303),o=r(306);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},function(e,t,r){var n=r(399),o=r(404);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,r){var n=r(265),o=r(467),a=r(505),i=r(164);e.exports=function(e,t){return(i(e)?n:a)(e,o(t,3))}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){var n=r(190),o=r(400),a=r(401),i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},function(e,t,r){var n=r(215),o=r(220);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},function(e,t,r){var n=r(166).Symbol;e.exports=n},function(e,t,r){var n=r(228),o=r(285),a=r(180);e.exports=function(e){return a(e)?n(e):o(e)}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,r){var n=r(233),o=r(198);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},function(e,t,r){var n=r(293),o=r(294),a=r(295),i=r(296),u=r(297);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,r){(function(e){var n=r(226),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&n.process,u=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,r(173)(e))},function(e,t){var r=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},function(e,t,r){var n=r(232)(Object.getPrototypeOf,Object);e.exports=n},function(e,t,r){var n=r(181),o=r(298),a=r(299),i=r(300),u=r(301),l=r(302);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=l,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,r){var n=r(169)(r(166),"Map");e.exports=n},function(e,t,r){var n=r(307),o=r(314),a=r(316),i=r(317),u=r(318);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t,r){(function(e){var n=r(162),o=r(427),a=t&&!t.nodeType&&t,i=a&&"object"==typeof e&&e&&!e.nodeType&&e,u=i&&i.exports===a?n.Buffer:void 0,l=(u?u.isBuffer:void 0)||o;e.exports=l}).call(this,r(173)(e))},function(e,t,r){var n=r(429),o=r(430),a=r(431),i=a&&a.isTypedArray,u=i?o(i):n;e.exports=u},function(e,t){var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&ef))return!1;var p=l.get(e),d=l.get(t);if(p&&d)return p==t&&d==e;var h=-1,b=!0,v=2&r?new n:void 0;for(l.set(e,t),l.set(t,e);++h=t||r<0||v&&e-h>=f}function w(){var e=o();if(m(e))return _(e);p=setTimeout(w,function(e){var r=t-(e-d);return v?u(r,f-(e-h)):r}(e))}function _(e){return p=void 0,g&&l?x(e):(l=c=void 0,s)}function j(){var e=o(),r=m(e);if(l=arguments,c=this,d=e,r){if(void 0===p)return y(d);if(v)return clearTimeout(p),p=setTimeout(w,t),x(d)}return void 0===p&&(p=setTimeout(w,t)),s}return t=a(t)||0,n(r)&&(b=!!r.leading,f=(v="maxWait"in r)?i(a(r.maxWait)||0,t):f,g="trailing"in r?!!r.trailing:g),j.cancel=function(){void 0!==p&&clearTimeout(p),h=0,l=d=c=p=void 0},j.flush=function(){return void 0===p?s:_(o())},j}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var n=Object.assign||function(e){for(var t=1;tf))return!1;var p=l.get(e),d=l.get(t);if(p&&d)return p==t&&d==e;var h=-1,b=!0,v=2&r?new n:void 0;for(l.set(e,t),l.set(t,e);++h0&&void 0!==arguments[0]?arguments[0]:[],r=[];return(0,i.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return r.push(e)})):(0,a.default)(t)?(0,o.default)(t,(function(e,t){!0===e&&r.push(t),r.push(t+"-"+e)})):(0,n.default)(t)&&r.push(t)})),r};t.default=l},function(e,t,r){var n=r(168),o=r(161),a=r(167);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==n(e)}},function(e,t,r){var n=r(177),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=n?n.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(e){}var o=i.call(e);return n&&(t?e[u]=r:delete e[u]),o}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t,r){var n=r(280)();e.exports=n},function(e,t){e.exports=function(e){return function(t,r,n){for(var o=-1,a=Object(t),i=n(t),u=i.length;u--;){var l=i[e?u:++o];if(!1===r(a[l],l,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var r=-1,n=Array(e);++r-1}},function(e,t,r){var n=r(182);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},function(e,t,r){var n=r(181);e.exports=function(){this.__data__=new n,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,r){var n=r(181),o=r(205),a=r(206);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(i)}return r.set(e,t),this.size=r.size,this}},function(e,t,r){var n=r(233),o=r(304),a=r(174),i=r(236),u=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,s=c.hasOwnProperty,p=RegExp("^"+f.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(n(e)?p:u).test(i(e))}},function(e,t,r){var n,o=r(305),a=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!a&&a in e}},function(e,t,r){var n=r(166)["__core-js_shared__"];e.exports=n},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,r){var n=r(308),o=r(181),a=r(205);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||o),string:new n}}},function(e,t,r){var n=r(309),o=r(310),a=r(311),i=r(312),u=r(313);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],r=e.default&&(0,o.default)(e.default)||{};return t.map((function(t){var o=e[t];return o&&(0,n.default)(o,(function(e,t){r[t]||(r[t]={}),r[t]=a({},r[t],o[t])})),t})),r};t.default=u},function(e,t,r){var n=r(353);e.exports=function(e){return n(e,5)}},function(e,t,r){var n=r(203),o=r(354),a=r(248),i=r(356),u=r(357),l=r(360),c=r(361),f=r(362),s=r(363),p=r(240),d=r(364),h=r(185),b=r(365),v=r(366),g=r(371),x=r(161),y=r(197),m=r(373),w=r(174),_=r(375),j=r(178),O=r(210),E={};E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E["[object Function]"]=E["[object WeakMap]"]=!1,e.exports=function e(t,r,C,k,S,P){var M,B=1&r,A=2&r,F=4&r;if(C&&(M=S?C(t,k,S,P):C(t)),void 0!==M)return M;if(!w(t))return t;var R=x(t);if(R){if(M=b(t),!B)return c(t,M)}else{var T=h(t),z="[object Function]"==T||"[object GeneratorFunction]"==T;if(y(t))return l(t,B);if("[object Object]"==T||"[object Arguments]"==T||z&&!S){if(M=A||z?{}:g(t),!B)return A?s(t,u(M,t)):f(t,i(M,t))}else{if(!E[T])return S?t:{};M=v(t,T,B)}}P||(P=new n);var H=P.get(t);if(H)return H;P.set(t,M),_(t)?t.forEach((function(n){M.add(e(n,r,C,n,t,P))})):m(t)&&t.forEach((function(n,o){M.set(o,e(n,r,C,o,t,P))}));var D=R?void 0:(F?A?d:p:A?O:j)(t);return o(D||t,(function(n,o){D&&(n=t[o=n]),a(M,o,e(n,r,C,o,t,P))})),M}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,a,c;u(this,n);for(var f=arguments.length,s=Array(f),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,a,c;u(this,n);for(var f=arguments.length,s=Array(f),p=0;p1&&void 0!==arguments[1])||arguments[1];r[e]=t};return 0===e&&n("first-child"),e===t-1&&n("last-child"),(0===e||e%2==0)&&n("even"),1===Math.abs(e%2)&&n("odd"),n("nth-child",e),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var n=Object.assign||function(e){for(var t=1;ti?1:Math.round(100*f/i)/100,t.a!==s)return{h:t.h,s:t.s,l:t.l,a:s,source:"rgb"}}else{var p=void 0;if(n!==(p=c<0?0:c>a?1:Math.round(100*c/a)/100))return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}return null}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={},o=t.render=function(e,t,r,n){if("undefined"==typeof document&&!n)return null;var o=n?new n:document.createElement("canvas");o.width=2*r,o.height=2*r;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),o.toDataURL()):null};t.get=function(e,t,r,a){var i=e+"-"+t+"-"+r+(a?"-server":"");if(n[i])return n[i];var u=o(e,t,r,a);return n[i]=u,u}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var n=function(){function e(e,t){for(var r=0;r-1)){var o=r.getArrowOffset(),a=38===e.keyCode?n+o:n-o;r.setUpdatedValue(a,e)}},r.handleDrag=function(e){if(r.props.dragLabel){var t=Math.round(r.props.value+e.movementX);t>=0&&t<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(t),e)}},r.handleMouseDown=function(e){r.props.dragLabel&&(e.preventDefault(),r.handleDrag(e),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},r}return function(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)}(t,e),n(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var r=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(r,t);var n,o=function(e){return String(e).indexOf("%")>-1}(t.target.value);this.setState({value:o?(n=e,n+"%"):e})}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(o.PureComponent||o.Component);t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var n=function(){function e(e,t){for(var r=0;ra)f=0;else{f=360*(-100*c/a+100)/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"rgb"}}else{var s=void 0;if(l<0)s=0;else if(l>o)s=359;else{s=360*(100*l/o)/100}if(r.h!==s)return{h:s,s:r.s,l:r.l,a:r.a,source:"rgb"}}return null}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var n=u(r(1)),o=u(r(0)),a=u(r(158)),i=u(r(160));function u(e){return e&&e.__esModule?e:{default:e}}var l=t.Raised=function(e){var t=e.zDepth,r=e.radius,o=e.background,u=e.children,l=e.styles,c=void 0===l?{}:l,f=(0,a.default)((0,i.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:r,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},c),{"zDepth-1":1===t});return n.default.createElement("div",{style:f.wrap},n.default.createElement("div",{style:f.bg}),n.default.createElement("div",{style:f.content},u))};l.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number,styles:o.default.object},l.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}},t.default=l},function(e,t,r){var n=r(213),o=r(253),a=r(255),i=r(418),u=r(163),l=r(260),c=r(259);e.exports=function e(t,r,f,s,p){t!==r&&a(r,(function(a,l){if(p||(p=new n),u(a))i(t,r,l,f,e,s,p);else{var d=s?s(c(t,l),a,l+"",t,r,p):void 0;void 0===d&&(d=a),o(t,l,d)}}),l)}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,r){var n=r(189),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},function(e,t,r){var n=r(189);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},function(e,t,r){var n=r(189);e.exports=function(e){return n(this.__data__,e)>-1}},function(e,t,r){var n=r(189);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},function(e,t,r){var n=r(188);e.exports=function(){this.__data__=new n,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,r){var n=r(188),o=r(214),a=r(216);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(i)}return r.set(e,t),this.size=r.size,this}},function(e,t,r){var n=r(215),o=r(402),a=r(163),i=r(252),u=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,s=c.hasOwnProperty,p=RegExp("^"+f.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(n(e)?p:u).test(i(e))}},function(e,t,r){var n=r(190),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=n?n.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(e){}var o=i.call(e);return n&&(t?e[u]=r:delete e[u]),o}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t,r){var n,o=r(403),a=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!a&&a in e}},function(e,t,r){var n=r(162)["__core-js_shared__"];e.exports=n},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,r){var n=r(406),o=r(188),a=r(214);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||o),string:new n}}},function(e,t,r){var n=r(407),o=r(408),a=r(409),i=r(410),u=r(411);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t1?r[a-1]:void 0,u=a>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(a--,i):void 0,u&&o(r[0],r[1],u)&&(i=a<3?void 0:i,a=1),t=Object(t);++n0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,r){var n=r(179),o=r(176),a=r(223),i=r(163);e.exports=function(e,t,r){if(!i(r))return!1;var u=typeof t;return!!("number"==u?o(r)&&a(t,r.length):"string"==u&&t in r)&&n(r[t],e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var n=function(){function e(e,t){for(var r=0;ro&&(l=o),c<0?c=0:c>a&&(c=a);var f=l/o,s=1-c/a;return{h:t.h,s:f,v:s,a:t.a,source:"rgb"}}},function(e,t,r){e.exports=r(455)},function(e,t,r){var n=r(456),o=r(264),a=r(461),i=r(164);e.exports=function(e,t){return(i(e)?n:o)(e,a(t))}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var e,t,r;l(this,n);for(var o=arguments.length,a=Array(o),i=0;i1&&(e.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),r.props.onChange({h:e.h||r.props.hsl.h,s:Number(e.s&&e.s||r.props.hsl.s),l:Number(e.l&&e.l||r.props.hsl.l),source:"hsl"},t))},r.showHighlight=function(e){e.currentTarget.style.background="#eee"},r.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?r.state={view:"rgb"}:r.state={view:e.view},r}return function(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)}(t,e),n(t,[{key:"render",value:function(){var e=this,t=(0,a.default)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),r=void 0;return"hex"===this.state.view?r=o.default.createElement("div",{style:t.fields,className:"flexbox-fix"},o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?r=o.default.createElement("div",{style:t.fields,className:"flexbox-fix"},o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),o.default.createElement("div",{style:t.alpha},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(r=o.default.createElement("div",{style:t.fields,className:"flexbox-fix"},o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),o.default.createElement("div",{style:t.alpha},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),o.default.createElement("div",{style:t.wrap,className:"flexbox-fix"},r,o.default.createElement("div",{style:t.toggle},o.default.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},o.default.createElement(l.default,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(o.default.Component);f.defaultProps={view:"hex"},t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return i.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:r,width:a,height:l},f)},s),i.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChromePointer=void 0;var n=a(r(1)),o=a(r(158));function a(e){return e&&e.__esModule?e:{default:e}}var i=t.ChromePointer=function(){var e=(0,o.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return n.default.createElement("div",{style:e.picker})};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChromePointerCircle=void 0;var n=a(r(1)),o=a(r(158));function a(e){return e&&e.__esModule?e:{default:e}}var i=t.ChromePointerCircle=function(){var e=(0,o.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return n.default.createElement("div",{style:e.picker})};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Compact=void 0;var n=p(r(1)),o=p(r(0)),a=p(r(158)),i=p(r(172)),u=p(r(160)),l=p(r(165)),c=r(159),f=p(r(514)),s=p(r(515));function p(e){return e&&e.__esModule?e:{default:e}}var d=t.Compact=function(e){var t=e.onChange,r=e.onSwatchHover,o=e.colors,p=e.hex,d=e.rgb,h=e.styles,b=void 0===h?{}:h,v=e.className,g=void 0===v?"":v,x=(0,a.default)((0,u.default)({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},b)),y=function(e,r){e.hex?l.default.isValidHex(e.hex)&&t({hex:e.hex,source:"hex"},r):t(e,r)};return n.default.createElement(c.Raised,{style:x.Compact,styles:b},n.default.createElement("div",{style:x.compact,className:"compact-picker "+g},n.default.createElement("div",null,(0,i.default)(o,(function(e){return n.default.createElement(f.default,{key:e,color:e,active:e.toLowerCase()===p,onClick:y,onSwatchHover:r})})),n.default.createElement("div",{style:x.clear})),n.default.createElement(s.default,{hex:p,rgb:d,onChange:y})))};d.propTypes={colors:o.default.arrayOf(o.default.string),styles:o.default.object},d.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}},t.default=(0,c.ColorWrap)(d)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompactColor=void 0;var n=u(r(1)),o=u(r(158)),a=u(r(165)),i=r(159);function u(e){return e&&e.__esModule?e:{default:e}}var l=t.CompactColor=function(e){var t=e.color,r=e.onClick,u=void 0===r?function(){}:r,l=e.onSwatchHover,c=e.active,f=(0,o.default)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:a.default.getContrastingColor(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:c,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return n.default.createElement(i.Swatch,{style:f.color,color:t,onClick:u,onHover:l,focusStyle:{boxShadow:"0 0 4px "+t}},n.default.createElement("div",{style:f.dot}))};t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompactFields=void 0;var n=i(r(1)),o=i(r(158)),a=r(159);function i(e){return e&&e.__esModule?e:{default:e}}var u=t.CompactFields=function(e){var t=e.hex,r=e.rgb,i=e.onChange,u=(0,o.default)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),l=function(e,t){e.r||e.g||e.b?i({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},t):i({hex:e.hex,source:"hex"},t)};return n.default.createElement("div",{style:u.fields,className:"flexbox-fix"},n.default.createElement("div",{style:u.active}),n.default.createElement(a.EditableInput,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"hex",value:t,onChange:l}),n.default.createElement(a.EditableInput,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:r.r,onChange:l}),n.default.createElement(a.EditableInput,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:r.g,onChange:l}),n.default.createElement(a.EditableInput,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:r.b,onChange:l}))};t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Github=void 0;var n=f(r(1)),o=f(r(0)),a=f(r(158)),i=f(r(172)),u=f(r(160)),l=r(159),c=f(r(517));function f(e){return e&&e.__esModule?e:{default:e}}var s=t.Github=function(e){var t=e.width,r=e.colors,o=e.onChange,l=e.onSwatchHover,f=e.triangle,s=e.styles,p=void 0===s?{}:s,d=e.className,h=void 0===d?"":d,b=(0,a.default)((0,u.default)({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},p),{"hide-triangle":"hide"===f,"top-left-triangle":"top-left"===f,"top-right-triangle":"top-right"===f,"bottom-left-triangle":"bottom-left"===f,"bottom-right-triangle":"bottom-right"===f}),v=function(e,t){return o({hex:e,source:"hex"},t)};return n.default.createElement("div",{style:b.card,className:"github-picker "+h},n.default.createElement("div",{style:b.triangleShadow}),n.default.createElement("div",{style:b.triangle}),(0,i.default)(r,(function(e){return n.default.createElement(c.default,{color:e,key:e,onClick:v,onSwatchHover:l})})))};s.propTypes={width:o.default.oneOfType([o.default.string,o.default.number]),colors:o.default.arrayOf(o.default.string),triangle:o.default.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:o.default.object},s.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},t.default=(0,l.ColorWrap)(s)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GithubSwatch=void 0;var n=u(r(1)),o=r(158),a=u(o),i=r(159);function u(e){return e&&e.__esModule?e:{default:e}}var l=t.GithubSwatch=function(e){var t=e.hover,r=e.color,o=e.onClick,u=e.onSwatchHover,l={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},c=(0,a.default)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:l}},{hover:t});return n.default.createElement("div",{style:c.swatch},n.default.createElement(i.Swatch,{color:r,onClick:o,onHover:u,focusStyle:l}))};t.default=(0,o.handleHover)(l)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HuePicker=void 0;var n=Object.assign||function(e){for(var t=1;t.5});return n.default.createElement("div",{style:r.picker})};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopPointerCircle=void 0;var n=a(r(1)),o=a(r(158));function a(e){return e&&e.__esModule?e:{default:e}}var i=t.PhotoshopPointerCircle=function(){var e=(0,o.default)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return n.default.createElement("div",{style:e.pointer},n.default.createElement("div",{style:e.left},n.default.createElement("div",{style:e.leftInside})),n.default.createElement("div",{style:e.right},n.default.createElement("div",{style:e.rightInside})))};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopButton=void 0;var n=a(r(1)),o=a(r(158));function a(e){return e&&e.__esModule?e:{default:e}}var i=t.PhotoshopButton=function(e){var t=e.onClick,r=e.label,a=e.children,i=e.active,u=(0,o.default)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return n.default.createElement("div",{style:u.button,onClick:t},r||a)};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopPreviews=void 0;var n=a(r(1)),o=a(r(158));function a(e){return e&&e.__esModule?e:{default:e}}var i=t.PhotoshopPreviews=function(e){var t=e.rgb,r=e.currentColor,a=(0,o.default)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return n.default.createElement("div",null,n.default.createElement("div",{style:a.label},"new"),n.default.createElement("div",{style:a.swatches},n.default.createElement("div",{style:a.new}),n.default.createElement("div",{style:a.current})),n.default.createElement("div",{style:a.label},"current"))};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var n=Object.assign||function(e){for(var t=1;t100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},n))};return n.default.createElement("div",{style:f.fields,className:"flexbox-fix"},n.default.createElement("div",{style:f.double},n.default.createElement(i.EditableInput,{style:{input:f.input,label:f.label},label:"hex",value:l.replace("#",""),onChange:s})),n.default.createElement("div",{style:f.single},n.default.createElement(i.EditableInput,{style:{input:f.input,label:f.label},label:"r",value:r.r,onChange:s,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:f.single},n.default.createElement(i.EditableInput,{style:{input:f.input,label:f.label},label:"g",value:r.g,onChange:s,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:f.single},n.default.createElement(i.EditableInput,{style:{input:f.input,label:f.label},label:"b",value:r.b,onChange:s,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:f.alpha},n.default.createElement(i.EditableInput,{style:{input:f.input,label:f.label},label:"a",value:Math.round(100*r.a),onChange:s,dragLabel:"true",dragMax:"100"})))};t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var n=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return i.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:r,width:a,height:l},f)},s),i.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Twitter=void 0;var n=f(r(1)),o=f(r(0)),a=f(r(158)),i=f(r(172)),u=f(r(160)),l=f(r(165)),c=r(159);function f(e){return e&&e.__esModule?e:{default:e}}var s=t.Twitter=function(e){var t=e.onChange,r=e.onSwatchHover,o=e.hex,f=e.colors,s=e.width,p=e.triangle,d=e.styles,h=void 0===d?{}:d,b=e.className,v=void 0===b?"":b,g=(0,a.default)((0,u.default)({default:{card:{width:s,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},h),{"hide-triangle":"hide"===p,"top-left-triangle":"top-left"===p,"top-right-triangle":"top-right"===p}),x=function(e,r){l.default.isValidHex(e)&&t({hex:e,source:"hex"},r)};return n.default.createElement("div",{style:g.card,className:"twitter-picker "+v},n.default.createElement("div",{style:g.triangleShadow}),n.default.createElement("div",{style:g.triangle}),n.default.createElement("div",{style:g.body},(0,i.default)(f,(function(e,t){return n.default.createElement(c.Swatch,{key:t,color:e,hex:e,style:g.swatch,onClick:x,onHover:r,focusStyle:{boxShadow:"0 0 4px "+e}})})),n.default.createElement("div",{style:g.hash},"#"),n.default.createElement(c.EditableInput,{label:null,style:{input:g.input},value:o.replace("#",""),onChange:x}),n.default.createElement("div",{style:g.clear})))};s.propTypes={width:o.default.oneOfType([o.default.string,o.default.number]),triangle:o.default.oneOf(["hide","top-left","top-right"]),colors:o.default.arrayOf(o.default.string),styles:o.default.object},s.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}},t.default=(0,c.ColorWrap)(s)}])]); //# sourceMappingURL=async-colorpicker.js.map ================================================ FILE: dash_daq/dash_daq.dev.js ================================================ window["dash_daq"] = /******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ function webpackJsonpCallback(data) { /******/ var chunkIds = data[0]; /******/ var moreModules = data[1]; /******/ /******/ /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0, resolves = []; /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { /******/ resolves.push(installedChunks[chunkId][0]); /******/ } /******/ installedChunks[chunkId] = 0; /******/ } /******/ for(moduleId in moreModules) { /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { /******/ modules[moduleId] = moreModules[moduleId]; /******/ } /******/ } /******/ if(parentJsonpFunction) parentJsonpFunction(data); /******/ /******/ while(resolves.length) { /******/ resolves.shift()(); /******/ } /******/ /******/ }; /******/ /******/ /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // object to store loaded and loading chunks /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // Promise = chunk loading, 0 = chunk loaded /******/ var installedChunks = { /******/ "main": 0 /******/ }; /******/ /******/ /******/ /******/ // script path function /******/ function jsonpScriptSrc(chunkId) { /******/ return __webpack_require__.p + "" + ({"async-colorpicker":"async-colorpicker"}[chunkId]||chunkId) + ".js" /******/ } /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ // This file contains only the entry chunk. /******/ // The chunk loading function for additional chunks /******/ __webpack_require__.e = function requireEnsure(chunkId) { /******/ var promises = []; /******/ /******/ /******/ // JSONP chunk loading for javascript /******/ /******/ var installedChunkData = installedChunks[chunkId]; /******/ if(installedChunkData !== 0) { // 0 means "already installed". /******/ /******/ // a Promise means "currently loading". /******/ if(installedChunkData) { /******/ promises.push(installedChunkData[2]); /******/ } else { /******/ // setup Promise in chunk cache /******/ var promise = new Promise(function(resolve, reject) { /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; /******/ }); /******/ promises.push(installedChunkData[2] = promise); /******/ /******/ // start chunk loading /******/ var script = document.createElement('script'); /******/ var onScriptComplete; /******/ /******/ script.charset = 'utf-8'; /******/ script.timeout = 120; /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ script.src = jsonpScriptSrc(chunkId); /******/ /******/ // create error before stack unwound to get useful stacktrace later /******/ var error = new Error(); /******/ onScriptComplete = function (event) { /******/ // avoid mem leaks in IE. /******/ script.onerror = script.onload = null; /******/ clearTimeout(timeout); /******/ var chunk = installedChunks[chunkId]; /******/ if(chunk !== 0) { /******/ if(chunk) { /******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); /******/ var realSrc = event && event.target && event.target.src; /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; /******/ error.name = 'ChunkLoadError'; /******/ error.type = errorType; /******/ error.request = realSrc; /******/ chunk[1](error); /******/ } /******/ installedChunks[chunkId] = undefined; /******/ } /******/ }; /******/ var timeout = setTimeout(function(){ /******/ onScriptComplete({ type: 'timeout', target: script }); /******/ }, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ document.head.appendChild(script); /******/ } /******/ } /******/ return Promise.all(promises); /******/ }; /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // on error function for async loading /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; /******/ var getCurrentScript = function() { /******/ var script = document.currentScript; /******/ if (!script) { /******/ /* Shim for IE11 and below */ /******/ /* Do not take into account async scripts and inline scripts */ /******/ var scripts = Array.from(document.getElementsByTagName('script')).filter(function(s) { return !s.async && !s.text && !s.textContent; }); /******/ script = scripts.slice(-1)[0]; /******/ } /******/ /******/ return script; /******/ }; /******/ /******/ var isLocalScript = function(script) { /******/ return /\/_dash-component-suites\//.test(script.src); /******/ }; /******/ /******/ Object.defineProperty(__webpack_require__, 'p', { /******/ get: (function () { /******/ var script = getCurrentScript(); /******/ /******/ var url = script.src.split('/').slice(0, -1).join('/') + '/'; /******/ /******/ return function() { /******/ return url; /******/ }; /******/ })() /******/ }); /******/ /******/ if (typeof jsonpScriptSrc !== 'undefined') { /******/ var __jsonpScriptSrc__ = jsonpScriptSrc; /******/ jsonpScriptSrc = function(chunkId) { /******/ var script = getCurrentScript(); /******/ var isLocal = isLocalScript(script); /******/ /******/ var src = __jsonpScriptSrc__(chunkId); /******/ /******/ if(!isLocal) { /******/ return src; /******/ } /******/ /******/ var srcFragments = src.split('/'); /******/ var fileFragments = srcFragments.slice(-1)[0].split('.'); /******/ /******/ fileFragments.splice(1, 0, "v0_5_1m1634418925"); /******/ srcFragments.splice(-1, 1, fileFragments.join('.')) /******/ /******/ return srcFragments.join('/'); /******/ }; /******/ } /******/ /******/ /******/ var jsonpArray = window["webpackJsonpdash_daq"] = window["webpackJsonpdash_daq"] || []; /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); /******/ jsonpArray.push = webpackJsonpCallback; /******/ jsonpArray = jsonpArray.slice(); /******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); /******/ var parentJsonpFunction = oldJsonpFunction; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./src/index.js"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js": /*!*******************************************************************************!*\ !*** ./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js ***! \*******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/memoize.browser.esm.js"); var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23 var index = Object(_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) { return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 /* o */ && prop.charCodeAt(1) === 110 /* n */ && prop.charCodeAt(2) < 91; } /* Z+1 */ ); /* harmony default export */ __webpack_exports__["default"] = (index); /***/ }), /***/ "./node_modules/@emotion/memoize/dist/memoize.browser.esm.js": /*!*******************************************************************!*\ !*** ./node_modules/@emotion/memoize/dist/memoize.browser.esm.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function memoize(fn) { var cache = {}; return function (arg) { if (cache[arg] === undefined) cache[arg] = fn(arg); return cache[arg]; }; } /* harmony default export */ __webpack_exports__["default"] = (memoize); /***/ }), /***/ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js": /*!*********************************************************************!*\ !*** ./node_modules/@emotion/unitless/dist/unitless.browser.esm.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var unitlessKeys = { animationIterationCount: 1, borderImageOutset: 1, borderImageSlice: 1, borderImageWidth: 1, boxFlex: 1, boxFlexGroup: 1, boxOrdinalGroup: 1, columnCount: 1, columns: 1, flex: 1, flexGrow: 1, flexPositive: 1, flexShrink: 1, flexNegative: 1, flexOrder: 1, gridRow: 1, gridRowEnd: 1, gridRowSpan: 1, gridRowStart: 1, gridColumn: 1, gridColumnEnd: 1, gridColumnSpan: 1, gridColumnStart: 1, msGridRow: 1, msGridRowSpan: 1, msGridColumn: 1, msGridColumnSpan: 1, fontWeight: 1, lineHeight: 1, opacity: 1, order: 1, orphans: 1, tabSize: 1, widows: 1, zIndex: 1, zoom: 1, WebkitLineClamp: 1, // SVG-related properties fillOpacity: 1, floodOpacity: 1, stopOpacity: 1, strokeDasharray: 1, strokeDashoffset: 1, strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 }; /* harmony default export */ __webpack_exports__["default"] = (unitlessKeys); /***/ }), /***/ "./node_modules/add-dom-event-listener/lib/EventBaseObject.js": /*!********************************************************************!*\ !*** ./node_modules/add-dom-event-listener/lib/EventBaseObject.js ***! \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * @ignore * base event object for custom and dom event. * @author yiminghe@gmail.com */ Object.defineProperty(exports, "__esModule", { value: true }); function returnFalse() { return false; } function returnTrue() { return true; } function EventBaseObject() { this.timeStamp = Date.now(); this.target = undefined; this.currentTarget = undefined; } EventBaseObject.prototype = { isEventObject: 1, constructor: EventBaseObject, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, preventDefault: function preventDefault() { this.isDefaultPrevented = returnTrue; }, stopPropagation: function stopPropagation() { this.isPropagationStopped = returnTrue; }, stopImmediatePropagation: function stopImmediatePropagation() { this.isImmediatePropagationStopped = returnTrue; // fixed 1.2 // call stopPropagation implicitly this.stopPropagation(); }, halt: function halt(immediate) { if (immediate) { this.stopImmediatePropagation(); } else { this.stopPropagation(); } this.preventDefault(); } }; exports["default"] = EventBaseObject; module.exports = exports["default"]; /***/ }), /***/ "./node_modules/add-dom-event-listener/lib/EventObject.js": /*!****************************************************************!*\ !*** ./node_modules/add-dom-event-listener/lib/EventObject.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * @ignore * event object for dom * @author yiminghe@gmail.com */ Object.defineProperty(exports, '__esModule', { value: true }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _EventBaseObject = __webpack_require__(/*! ./EventBaseObject */ "./node_modules/add-dom-event-listener/lib/EventBaseObject.js"); var _EventBaseObject2 = _interopRequireDefault(_EventBaseObject); var _objectAssign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js"); var _objectAssign2 = _interopRequireDefault(_objectAssign); var TRUE = true; var FALSE = false; var commonProps = ['altKey', 'bubbles', 'cancelable', 'ctrlKey', 'currentTarget', 'eventPhase', 'metaKey', 'shiftKey', 'target', 'timeStamp', 'view', 'type']; function isNullOrUndefined(w) { return w === null || w === undefined; } var eventNormalizers = [{ reg: /^key/, props: ['char', 'charCode', 'key', 'keyCode', 'which'], fix: function fix(event, nativeEvent) { if (isNullOrUndefined(event.which)) { event.which = !isNullOrUndefined(nativeEvent.charCode) ? nativeEvent.charCode : nativeEvent.keyCode; } // add metaKey to non-Mac browsers (use ctrl for PC 's and Meta for Macs) if (event.metaKey === undefined) { event.metaKey = event.ctrlKey; } } }, { reg: /^touch/, props: ['touches', 'changedTouches', 'targetTouches'] }, { reg: /^hashchange$/, props: ['newURL', 'oldURL'] }, { reg: /^gesturechange$/i, props: ['rotation', 'scale'] }, { reg: /^(mousewheel|DOMMouseScroll)$/, props: [], fix: function fix(event, nativeEvent) { var deltaX = undefined; var deltaY = undefined; var delta = undefined; var wheelDelta = nativeEvent.wheelDelta; var axis = nativeEvent.axis; var wheelDeltaY = nativeEvent.wheelDeltaY; var wheelDeltaX = nativeEvent.wheelDeltaX; var detail = nativeEvent.detail; // ie/webkit if (wheelDelta) { delta = wheelDelta / 120; } // gecko if (detail) { // press control e.detail == 1 else e.detail == 3 delta = 0 - (detail % 3 === 0 ? detail / 3 : detail); } // Gecko if (axis !== undefined) { if (axis === event.HORIZONTAL_AXIS) { deltaY = 0; deltaX = 0 - delta; } else if (axis === event.VERTICAL_AXIS) { deltaX = 0; deltaY = delta; } } // Webkit if (wheelDeltaY !== undefined) { deltaY = wheelDeltaY / 120; } if (wheelDeltaX !== undefined) { deltaX = -1 * wheelDeltaX / 120; } // 默认 deltaY (ie) if (!deltaX && !deltaY) { deltaY = delta; } if (deltaX !== undefined) { /** * deltaX of mousewheel event * @property deltaX * @member Event.DomEvent.Object */ event.deltaX = deltaX; } if (deltaY !== undefined) { /** * deltaY of mousewheel event * @property deltaY * @member Event.DomEvent.Object */ event.deltaY = deltaY; } if (delta !== undefined) { /** * delta of mousewheel event * @property delta * @member Event.DomEvent.Object */ event.delta = delta; } } }, { reg: /^mouse|contextmenu|click|mspointer|(^DOMMouseScroll$)/i, props: ['buttons', 'clientX', 'clientY', 'button', 'offsetX', 'relatedTarget', 'which', 'fromElement', 'toElement', 'offsetY', 'pageX', 'pageY', 'screenX', 'screenY'], fix: function fix(event, nativeEvent) { var eventDoc = undefined; var doc = undefined; var body = undefined; var target = event.target; var button = nativeEvent.button; // Calculate pageX/Y if missing and clientX/Y available if (target && isNullOrUndefined(event.pageX) && !isNullOrUndefined(nativeEvent.clientX)) { eventDoc = target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = nativeEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); event.pageY = nativeEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); } // which for click: 1 === left; 2 === middle; 3 === right // do not use button if (!event.which && button !== undefined) { if (button & 1) { event.which = 1; } else if (button & 2) { event.which = 3; } else if (button & 4) { event.which = 2; } else { event.which = 0; } } // add relatedTarget, if necessary if (!event.relatedTarget && event.fromElement) { event.relatedTarget = event.fromElement === target ? event.toElement : event.fromElement; } return event; } }]; function retTrue() { return TRUE; } function retFalse() { return FALSE; } function DomEventObject(nativeEvent) { var type = nativeEvent.type; var isNative = typeof nativeEvent.stopPropagation === 'function' || typeof nativeEvent.cancelBubble === 'boolean'; _EventBaseObject2['default'].call(this); this.nativeEvent = nativeEvent; // in case dom event has been mark as default prevented by lower dom node var isDefaultPrevented = retFalse; if ('defaultPrevented' in nativeEvent) { isDefaultPrevented = nativeEvent.defaultPrevented ? retTrue : retFalse; } else if ('getPreventDefault' in nativeEvent) { // https://bugzilla.mozilla.org/show_bug.cgi?id=691151 isDefaultPrevented = nativeEvent.getPreventDefault() ? retTrue : retFalse; } else if ('returnValue' in nativeEvent) { isDefaultPrevented = nativeEvent.returnValue === FALSE ? retTrue : retFalse; } this.isDefaultPrevented = isDefaultPrevented; var fixFns = []; var fixFn = undefined; var l = undefined; var prop = undefined; var props = commonProps.concat(); eventNormalizers.forEach(function (normalizer) { if (type.match(normalizer.reg)) { props = props.concat(normalizer.props); if (normalizer.fix) { fixFns.push(normalizer.fix); } } }); l = props.length; // clone properties of the original event object while (l) { prop = props[--l]; this[prop] = nativeEvent[prop]; } // fix target property, if necessary if (!this.target && isNative) { this.target = nativeEvent.srcElement || document; // srcElement might not be defined either } // check if target is a text node (safari) if (this.target && this.target.nodeType === 3) { this.target = this.target.parentNode; } l = fixFns.length; while (l) { fixFn = fixFns[--l]; fixFn(this, nativeEvent); } this.timeStamp = nativeEvent.timeStamp || Date.now(); } var EventBaseObjectProto = _EventBaseObject2['default'].prototype; (0, _objectAssign2['default'])(DomEventObject.prototype, EventBaseObjectProto, { constructor: DomEventObject, preventDefault: function preventDefault() { var e = this.nativeEvent; // if preventDefault exists run it on the original event if (e.preventDefault) { e.preventDefault(); } else { // otherwise set the returnValue property of the original event to FALSE (IE) e.returnValue = FALSE; } EventBaseObjectProto.preventDefault.call(this); }, stopPropagation: function stopPropagation() { var e = this.nativeEvent; // if stopPropagation exists run it on the original event if (e.stopPropagation) { e.stopPropagation(); } else { // otherwise set the cancelBubble property of the original event to TRUE (IE) e.cancelBubble = TRUE; } EventBaseObjectProto.stopPropagation.call(this); } }); exports['default'] = DomEventObject; module.exports = exports['default']; /***/ }), /***/ "./node_modules/add-dom-event-listener/lib/index.js": /*!**********************************************************!*\ !*** ./node_modules/add-dom-event-listener/lib/index.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, '__esModule', { value: true }); exports['default'] = addEventListener; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _EventObject = __webpack_require__(/*! ./EventObject */ "./node_modules/add-dom-event-listener/lib/EventObject.js"); var _EventObject2 = _interopRequireDefault(_EventObject); function addEventListener(target, eventType, callback, option) { function wrapCallback(e) { var ne = new _EventObject2['default'](e); callback.call(target, ne); } if (target.addEventListener) { var _ret = (function () { var useCapture = false; if (typeof option === 'object') { useCapture = option.capture || false; } else if (typeof option === 'boolean') { useCapture = option; } target.addEventListener(eventType, wrapCallback, option || false); return { v: { remove: function remove() { target.removeEventListener(eventType, wrapCallback, useCapture); } } }; })(); if (typeof _ret === 'object') return _ret.v; } else if (target.attachEvent) { target.attachEvent('on' + eventType, wrapCallback); return { remove: function remove() { target.detachEvent('on' + eventType, wrapCallback); } }; } } module.exports = exports['default']; /***/ }), /***/ "./node_modules/babel-runtime/core-js/array/from.js": /*!**********************************************************!*\ !*** ./node_modules/babel-runtime/core-js/array/from.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/array/from */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/array/from.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/object/assign.js": /*!*************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/object/assign.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/assign */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/assign.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/object/create.js": /*!*************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/object/create.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/create */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/create.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/object/define-property.js": /*!**********************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/object/define-property.js ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/define-property */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/define-property.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js": /*!**********************************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/get-own-property-descriptor */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-own-property-descriptor.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/object/get-prototype-of.js": /*!***********************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/object/get-prototype-of.js ***! \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/get-prototype-of */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-prototype-of.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/object/set-prototype-of.js": /*!***********************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/object/set-prototype-of.js ***! \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/set-prototype-of */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/set-prototype-of.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/symbol.js": /*!******************************************************!*\ !*** ./node_modules/babel-runtime/core-js/symbol.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/symbol */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/index.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/symbol/iterator.js": /*!***************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/symbol/iterator.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/symbol/iterator */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/iterator.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/classCallCheck.js": /*!**************************************************************!*\ !*** ./node_modules/babel-runtime/helpers/classCallCheck.js ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/createClass.js": /*!***********************************************************!*\ !*** ./node_modules/babel-runtime/helpers/createClass.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(/*! ../core-js/object/define-property */ "./node_modules/babel-runtime/core-js/object/define-property.js"); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; (0, _defineProperty2.default)(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /***/ }), /***/ "./node_modules/babel-runtime/helpers/defineProperty.js": /*!**************************************************************!*\ !*** ./node_modules/babel-runtime/helpers/defineProperty.js ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(/*! ../core-js/object/define-property */ "./node_modules/babel-runtime/core-js/object/define-property.js"); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (obj, key, value) { if (key in obj) { (0, _defineProperty2.default)(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/extends.js": /*!*******************************************************!*\ !*** ./node_modules/babel-runtime/helpers/extends.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _assign = __webpack_require__(/*! ../core-js/object/assign */ "./node_modules/babel-runtime/core-js/object/assign.js"); var _assign2 = _interopRequireDefault(_assign); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = _assign2.default || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/get.js": /*!***************************************************!*\ !*** ./node_modules/babel-runtime/helpers/get.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _getPrototypeOf = __webpack_require__(/*! ../core-js/object/get-prototype-of */ "./node_modules/babel-runtime/core-js/object/get-prototype-of.js"); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); var _getOwnPropertyDescriptor = __webpack_require__(/*! ../core-js/object/get-own-property-descriptor */ "./node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js"); var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); if (desc === undefined) { var parent = (0, _getPrototypeOf2.default)(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/inherits.js": /*!********************************************************!*\ !*** ./node_modules/babel-runtime/helpers/inherits.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _setPrototypeOf = __webpack_require__(/*! ../core-js/object/set-prototype-of */ "./node_modules/babel-runtime/core-js/object/set-prototype-of.js"); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); var _create = __webpack_require__(/*! ../core-js/object/create */ "./node_modules/babel-runtime/core-js/object/create.js"); var _create2 = _interopRequireDefault(_create); var _typeof2 = __webpack_require__(/*! ../helpers/typeof */ "./node_modules/babel-runtime/helpers/typeof.js"); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); } subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/objectWithoutProperties.js": /*!***********************************************************************!*\ !*** ./node_modules/babel-runtime/helpers/objectWithoutProperties.js ***! \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js": /*!*************************************************************************!*\ !*** ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js ***! \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _typeof2 = __webpack_require__(/*! ../helpers/typeof */ "./node_modules/babel-runtime/helpers/typeof.js"); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/toConsumableArray.js": /*!*****************************************************************!*\ !*** ./node_modules/babel-runtime/helpers/toConsumableArray.js ***! \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _from = __webpack_require__(/*! ../core-js/array/from */ "./node_modules/babel-runtime/core-js/array/from.js"); var _from2 = _interopRequireDefault(_from); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return (0, _from2.default)(arr); } }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/typeof.js": /*!******************************************************!*\ !*** ./node_modules/babel-runtime/helpers/typeof.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _iterator = __webpack_require__(/*! ../core-js/symbol/iterator */ "./node_modules/babel-runtime/core-js/symbol/iterator.js"); var _iterator2 = _interopRequireDefault(_iterator); var _symbol = __webpack_require__(/*! ../core-js/symbol */ "./node_modules/babel-runtime/core-js/symbol.js"); var _symbol2 = _interopRequireDefault(_symbol); var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { return typeof obj === "undefined" ? "undefined" : _typeof(obj); } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/array/from.js": /*!**********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/array/from.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.string.iterator */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.string.iterator.js"); __webpack_require__(/*! ../../modules/es6.array.from */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.array.from.js"); module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Array.from; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/assign.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/object/assign.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.assign */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.assign.js"); module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Object.assign; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/create.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/object/create.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.create.js"); var $Object = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Object; module.exports = function create(P, D) { return $Object.create(P, D); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/define-property.js": /*!**********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/object/define-property.js ***! \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.define-property */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.define-property.js"); var $Object = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Object; module.exports = function defineProperty(it, key, desc) { return $Object.defineProperty(it, key, desc); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-own-property-descriptor.js": /*!**********************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-own-property-descriptor.js ***! \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.get-own-property-descriptor */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js"); var $Object = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Object; module.exports = function getOwnPropertyDescriptor(it, key) { return $Object.getOwnPropertyDescriptor(it, key); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-prototype-of.js": /*!***********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-prototype-of.js ***! \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.get-prototype-of */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-prototype-of.js"); module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Object.getPrototypeOf; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/set-prototype-of.js": /*!***********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/object/set-prototype-of.js ***! \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.set-prototype-of */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.set-prototype-of.js"); module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Object.setPrototypeOf; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/index.js": /*!************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/index.js ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.symbol */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.symbol.js"); __webpack_require__(/*! ../../modules/es6.object.to-string */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.to-string.js"); __webpack_require__(/*! ../../modules/es7.symbol.async-iterator */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.async-iterator.js"); __webpack_require__(/*! ../../modules/es7.symbol.observable */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.observable.js"); module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Symbol; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/iterator.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/iterator.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.string.iterator */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.string.iterator.js"); __webpack_require__(/*! ../../modules/web.dom.iterable */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/web.dom.iterable.js"); module.exports = __webpack_require__(/*! ../../modules/_wks-ext */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-ext.js").f('iterator'); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_a-function.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_a-function.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_add-to-unscopables.js": /*!************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_add-to-unscopables.js ***! \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function () { /* empty */ }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js"); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_array-includes.js": /*!********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_array-includes.js ***! \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-length.js"); var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-absolute-index.js"); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); var length = toLength(O.length); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_classof.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_classof.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(/*! ./_cof */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_cof.js"); var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_cof.js": /*!*********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_cof.js ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js": /*!**********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { var core = module.exports = { version: '2.6.9' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_create-property.js": /*!*********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_create-property.js ***! \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js"); var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js"); module.exports = function (object, index, value) { if (index in object) $defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ctx.js": /*!*********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_ctx.js ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_a-function.js"); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_defined.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_defined.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(/*! ./_fails */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js")(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_dom-create.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_dom-create.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js"); var document = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js").document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-bug-keys.js": /*!*******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-bug-keys.js ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-keys.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-keys.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys.js"); var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gops.js"); var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-pie.js"); module.exports = function (it) { var result = getKeys(it); var getSymbols = gOPS.f; if (getSymbols) { var symbols = getSymbols(it); var isEnum = pIE.f; var i = 0; var key; while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); } return result; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js": /*!************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js"); var core = __webpack_require__(/*! ./_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js"); var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ctx.js"); var hide = __webpack_require__(/*! ./_hide */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js"); var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var IS_WRAP = type & $export.W; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE]; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; var key, own, out; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; if (own && has(exports, key)) continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function (C) { var F = function (a, b, c) { if (this instanceof C) { switch (arguments.length) { case 0: return new C(); case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if (IS_PROTO) { (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js": /*!***********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js ***! \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js": /*!************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js": /*!*********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js": /*!**********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js"); var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js"); module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js") ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_html.js": /*!**********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_html.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var document = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js").document; module.exports = document && document.documentElement; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ie8-dom-define.js": /*!********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_ie8-dom-define.js ***! \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js")(function () { return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iobject.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iobject.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(/*! ./_cof */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_cof.js"); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array-iter.js": /*!*******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array-iter.js ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js"); var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array.js": /*!**************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array.js ***! \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(/*! ./_cof */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_cof.js"); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-call.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-call.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js"); module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (e) { var ret = iterator['return']; if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-create.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-create.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var create = __webpack_require__(/*! ./_object-create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-create.js"); var descriptor = __webpack_require__(/*! ./_property-desc */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js"); var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-to-string-tag.js"); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(/*! ./_hide */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js")(IteratorPrototype, __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-define.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-define.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_library.js"); var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_redefine.js"); var hide = __webpack_require__(/*! ./_hide */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js"); var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js"); var $iterCreate = __webpack_require__(/*! ./_iter-create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-create.js"); var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-to-string-tag.js"); var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gpo.js"); var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix native if ($anyNative) { IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-detect.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-detect.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('iterator'); var SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function () { SAFE_CLOSING = true; }; // eslint-disable-next-line no-throw-literal Array.from(riter, function () { throw 2; }); } catch (e) { /* empty */ } module.exports = function (exec, skipClosing) { if (!skipClosing && !SAFE_CLOSING) return false; var safe = false; try { var arr = [7]; var iter = arr[ITERATOR](); iter.next = function () { return { done: safe = true }; }; arr[ITERATOR] = function () { return iter; }; exec(arr); } catch (e) { /* empty */ } return safe; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-step.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-step.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (done, value) { return { value: value, done: !!done }; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_library.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_library.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = true; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_meta.js": /*!**********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_meta.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(/*! ./_uid */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_uid.js")('meta'); var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js"); var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var setDesc = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js").f; var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; var FREEZE = !__webpack_require__(/*! ./_fails */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js")(function () { return isExtensible(Object.preventExtensions({})); }); var setMeta = function (it) { setDesc(it, META, { value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function (it, create) { if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-assign.js": /*!*******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-assign.js ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 19.1.2.1 Object.assign(target, source, ...) var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js"); var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys.js"); var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gops.js"); var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-pie.js"); var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js"); var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iobject.js"); var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(/*! ./_fails */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js")(function () { var A = {}; var B = {}; // eslint-disable-next-line no-undef var S = Symbol(); var K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function (k) { B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars var T = toObject(target); var aLen = arguments.length; var index = 1; var getSymbols = gOPS.f; var isEnum = pIE.f; while (aLen > index) { var S = IObject(arguments[index++]); var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); var length = keys.length; var j = 0; var key; while (length > j) { key = keys[j++]; if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; } } return T; } : $assign; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-create.js": /*!*******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-create.js ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js"); var dPs = __webpack_require__(/*! ./_object-dps */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dps.js"); var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-bug-keys.js"); var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(/*! ./_dom-create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_dom-create.js")('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; __webpack_require__(/*! ./_html */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_html.js").appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js"); var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ie8-dom-define.js"); var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-primitive.js"); var dP = Object.defineProperty; exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dps.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dps.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js"); var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js"); var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys.js"); module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = getKeys(Properties); var length = keys.length; var i = 0; var P; while (length > i) dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopd.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopd.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-pie.js"); var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js"); var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-primitive.js"); var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ie8-dom-define.js"); var gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js") ? gOPD : function getOwnPropertyDescriptor(O, P) { O = toIObject(O); P = toPrimitive(P, true); if (IE8_DOM_DEFINE) try { return gOPD(O, P); } catch (e) { /* empty */ } if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn-ext.js": /*!*********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn-ext.js ***! \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn.js").f; var toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function (it) { try { return gOPN(it); } catch (e) { return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it) { return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys-internal.js"); var hiddenKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-bug-keys.js").concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gops.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gops.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gpo.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gpo.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js"); var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); var ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function (O) { O = toObject(O); if (has(O, IE_PROTO)) return O[IE_PROTO]; if (typeof O.constructor == 'function' && O instanceof O.constructor) { return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys-internal.js": /*!**************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys-internal.js ***! \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_array-includes.js")(false); var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys-internal.js"); var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-bug-keys.js"); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-pie.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-pie.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-sap.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-sap.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); var core = __webpack_require__(/*! ./_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js"); var fails = __webpack_require__(/*! ./_fails */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js"); module.exports = function (KEY, exec) { var fn = (core.Object || {})[KEY] || Object[KEY]; var exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js": /*!*******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_redefine.js": /*!**************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_redefine.js ***! \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(/*! ./_hide */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js"); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-proto.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-proto.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js"); var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js"); var check = function (O, proto) { anObject(O); if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function (test, buggy, set) { try { set = __webpack_require__(/*! ./_ctx */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ctx.js")(Function.call, __webpack_require__(/*! ./_object-gopd */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopd.js").f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch (e) { buggy = true; } return function setPrototypeOf(O, proto) { check(O, proto); if (buggy) O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-to-string-tag.js": /*!***********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-to-string-tag.js ***! \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js").f; var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared-key.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared-key.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(/*! ./_shared */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared.js")('keys'); var uid = __webpack_require__(/*! ./_uid */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_uid.js"); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared.js": /*!************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared.js ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(/*! ./_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js"); var global = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js"); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: __webpack_require__(/*! ./_library */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_library.js") ? 'pure' : 'global', copyright: '© 2019 Denis Pushkarev (zloirock.ru)' }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_string-at.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_string-at.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-integer.js"); var defined = __webpack_require__(/*! ./_defined */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_defined.js"); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { return function (that, pos) { var s = String(defined(that)); var i = toInteger(pos); var l = s.length; var a, b; if (i < 0 || i >= l) return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-absolute-index.js": /*!***********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-absolute-index.js ***! \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-integer.js"); var max = Math.max; var min = Math.min; module.exports = function (index, length) { index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-integer.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-integer.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iobject.js"); var defined = __webpack_require__(/*! ./_defined */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_defined.js"); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-length.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-length.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-integer.js"); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(/*! ./_defined */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_defined.js"); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-primitive.js": /*!******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-primitive.js ***! \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js"); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_uid.js": /*!*********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_uid.js ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-define.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-define.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js"); var core = __webpack_require__(/*! ./_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js"); var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_library.js"); var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-ext.js"); var defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js").f; module.exports = function (name) { var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-ext.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-ext.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { exports.f = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js"); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js": /*!*********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(/*! ./_shared */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared.js")('wks'); var uid = __webpack_require__(/*! ./_uid */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_uid.js"); var Symbol = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js").Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/core.get-iterator-method.js": /*!*****************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/core.get-iterator-method.js ***! \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(/*! ./_classof */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_classof.js"); var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('iterator'); var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js"); module.exports = __webpack_require__(/*! ./_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.array.from.js": /*!*******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.array.from.js ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ctx.js"); var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js"); var call = __webpack_require__(/*! ./_iter-call */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-call.js"); var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array-iter.js"); var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-length.js"); var createProperty = __webpack_require__(/*! ./_create-property */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_create-property.js"); var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/core.get-iterator-method.js"); $export($export.S + $export.F * !__webpack_require__(/*! ./_iter-detect */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-detect.js")(function (iter) { Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var O = toObject(arrayLike); var C = typeof this == 'function' ? this : Array; var aLen = arguments.length; var mapfn = aLen > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var index = 0; var iterFn = getIterFn(O); var length, result, step, iterator; if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for (result = new C(length); length > index; index++) { createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.array.iterator.js": /*!***********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.array.iterator.js ***! \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_add-to-unscopables.js"); var step = __webpack_require__(/*! ./_iter-step */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-step.js"); var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js"); var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = __webpack_require__(/*! ./_iter-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-define.js")(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function () { var O = this._t; var kind = this._k; var index = this._i++; if (!O || index >= O.length) { this._t = undefined; return step(1); } if (kind == 'keys') return step(0, index); if (kind == 'values') return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.assign.js": /*!**********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.assign.js ***! \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); $export($export.S + $export.F, 'Object', { assign: __webpack_require__(/*! ./_object-assign */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-assign.js") }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.create.js": /*!**********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.create.js ***! \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', { create: __webpack_require__(/*! ./_object-create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-create.js") }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.define-property.js": /*!*******************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.define-property.js ***! \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js"), 'Object', { defineProperty: __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js").f }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js": /*!*******************************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js ***! \*******************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); var $getOwnPropertyDescriptor = __webpack_require__(/*! ./_object-gopd */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopd.js").f; __webpack_require__(/*! ./_object-sap */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-sap.js")('getOwnPropertyDescriptor', function () { return function getOwnPropertyDescriptor(it, key) { return $getOwnPropertyDescriptor(toIObject(it), key); }; }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-prototype-of.js": /*!********************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-prototype-of.js ***! \********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 Object.getPrototypeOf(O) var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js"); var $getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gpo.js"); __webpack_require__(/*! ./_object-sap */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-sap.js")('getPrototypeOf', function () { return function getPrototypeOf(it) { return $getPrototypeOf(toObject(it)); }; }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.set-prototype-of.js": /*!********************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.set-prototype-of.js ***! \********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(/*! ./_set-proto */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-proto.js").set }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.to-string.js": /*!*************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.to-string.js ***! \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.string.iterator.js": /*!************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.string.iterator.js ***! \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $at = __webpack_require__(/*! ./_string-at */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_string-at.js")(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(/*! ./_iter-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-define.js")(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function () { var O = this._t; var index = this._i; var point; if (index >= O.length) return { value: undefined, done: true }; point = $at(O, index); this._i += point.length; return { value: point, done: false }; }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.symbol.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.symbol.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // ECMAScript 6 symbols shim var global = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js"); var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js"); var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_redefine.js"); var META = __webpack_require__(/*! ./_meta */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_meta.js").KEY; var $fails = __webpack_require__(/*! ./_fails */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js"); var shared = __webpack_require__(/*! ./_shared */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared.js"); var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-to-string-tag.js"); var uid = __webpack_require__(/*! ./_uid */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_uid.js"); var wks = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js"); var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-ext.js"); var wksDefine = __webpack_require__(/*! ./_wks-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-define.js"); var enumKeys = __webpack_require__(/*! ./_enum-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-keys.js"); var isArray = __webpack_require__(/*! ./_is-array */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array.js"); var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js"); var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js"); var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js"); var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-primitive.js"); var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js"); var _create = __webpack_require__(/*! ./_object-create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-create.js"); var gOPNExt = __webpack_require__(/*! ./_object-gopn-ext */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn-ext.js"); var $GOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopd.js"); var $GOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gops.js"); var $DP = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js"); var $keys = __webpack_require__(/*! ./_object-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys.js"); var gOPD = $GOPD.f; var dP = $DP.f; var gOPN = gOPNExt.f; var $Symbol = global.Symbol; var $JSON = global.JSON; var _stringify = $JSON && $JSON.stringify; var PROTOTYPE = 'prototype'; var HIDDEN = wks('_hidden'); var TO_PRIMITIVE = wks('toPrimitive'); var isEnum = {}.propertyIsEnumerable; var SymbolRegistry = shared('symbol-registry'); var AllSymbols = shared('symbols'); var OPSymbols = shared('op-symbols'); var ObjectProto = Object[PROTOTYPE]; var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; var QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function () { return _create(dP({}, 'a', { get: function () { return dP(this, 'a', { value: 7 }).a; } })).a != 7; }) ? function (it, key, D) { var protoDesc = gOPD(ObjectProto, key); if (protoDesc) delete ObjectProto[key]; dP(it, key, D); if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); } : dP; var wrap = function (tag) { var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { return typeof it == 'symbol'; } : function (it) { return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D) { if (it === ObjectProto) $defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if (has(AllSymbols, key)) { if (!D.enumerable) { if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; D = _create(D, { enumerable: createDesc(0, false) }); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P) { anObject(it); var keys = enumKeys(P = toIObject(P)); var i = 0; var l = keys.length; var key; while (l > i) $defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P) { return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key) { var E = isEnum.call(this, key = toPrimitive(key, true)); if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { it = toIObject(it); key = toPrimitive(key, true); if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; var D = gOPD(it, key); if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it) { var names = gOPN(toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { var IS_OP = it === ObjectProto; var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if (!USE_NATIVE) { $Symbol = function Symbol() { if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function (value) { if (this === ObjectProto) $set.call(OPSymbols, value); if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString() { return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; __webpack_require__(/*! ./_object-gopn */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn.js").f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__(/*! ./_object-pie */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-pie.js").f = $propertyIsEnumerable; $GOPS.f = $getOwnPropertySymbols; if (DESCRIPTORS && !__webpack_require__(/*! ./_library */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_library.js")) { redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function (name) { return wrap(wks(name)); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); for (var es6Symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function (key) { return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; }, useSetter: function () { setter = true; }, useSimple: function () { setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives // https://bugs.chromium.org/p/v8/issues/detail?id=3443 var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { getOwnPropertySymbols: function getOwnPropertySymbols(it) { return $GOPS.f(toObject(it)); } }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it) { var args = [it]; var i = 1; var replacer, $replacer; while (arguments.length > i) args.push(arguments[i++]); $replacer = replacer = args[1]; if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined if (!isArray(replacer)) replacer = function (key, value) { if (typeof $replacer == 'function') value = $replacer.call(this, key, value); if (!isSymbol(value)) return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(/*! ./_hide */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.async-iterator.js": /*!******************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.async-iterator.js ***! \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ./_wks-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-define.js")('asyncIterator'); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.observable.js": /*!**************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.observable.js ***! \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ./_wks-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-define.js")('observable'); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/web.dom.iterable.js": /*!*********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/web.dom.iterable.js ***! \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ./es6.array.iterator */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.array.iterator.js"); var global = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js"); var hide = __webpack_require__(/*! ./_hide */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js"); var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js"); var TO_STRING_TAG = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('toStringTag'); var DOMIterables = ('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(','); for (var i = 0; i < DOMIterables.length; i++) { var NAME = DOMIterables[i]; var Collection = global[NAME]; var proto = Collection && Collection.prototype; if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } /***/ }), /***/ "./node_modules/classnames/index.js": /*!******************************************!*\ !*** ./node_modules/classnames/index.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames () { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg) && arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } else if (argType === 'object') { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } return classes.join(' '); } if ( true && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return classNames; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }()); /***/ }), /***/ "./node_modules/color-convert/conversions.js": /*!***************************************************!*\ !*** ./node_modules/color-convert/conversions.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ var cssKeywords = __webpack_require__(/*! color-name */ "./node_modules/color-name/index.js"); // NOTE: conversions should only return primitive values (i.e. arrays, or // values that give correct `typeof` results). // do not use box values types (i.e. Number(), String(), etc.) var reverseKeywords = {}; for (var key in cssKeywords) { if (cssKeywords.hasOwnProperty(key)) { reverseKeywords[cssKeywords[key]] = key; } } var convert = module.exports = { rgb: {channels: 3, labels: 'rgb'}, hsl: {channels: 3, labels: 'hsl'}, hsv: {channels: 3, labels: 'hsv'}, hwb: {channels: 3, labels: 'hwb'}, cmyk: {channels: 4, labels: 'cmyk'}, xyz: {channels: 3, labels: 'xyz'}, lab: {channels: 3, labels: 'lab'}, lch: {channels: 3, labels: 'lch'}, hex: {channels: 1, labels: ['hex']}, keyword: {channels: 1, labels: ['keyword']}, ansi16: {channels: 1, labels: ['ansi16']}, ansi256: {channels: 1, labels: ['ansi256']}, hcg: {channels: 3, labels: ['h', 'c', 'g']}, apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, gray: {channels: 1, labels: ['gray']} }; // hide .channels and .labels properties for (var model in convert) { if (convert.hasOwnProperty(model)) { if (!('channels' in convert[model])) { throw new Error('missing channels property: ' + model); } if (!('labels' in convert[model])) { throw new Error('missing channel labels property: ' + model); } if (convert[model].labels.length !== convert[model].channels) { throw new Error('channel and label counts mismatch: ' + model); } var channels = convert[model].channels; var labels = convert[model].labels; delete convert[model].channels; delete convert[model].labels; Object.defineProperty(convert[model], 'channels', {value: channels}); Object.defineProperty(convert[model], 'labels', {value: labels}); } } convert.rgb.hsl = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var min = Math.min(r, g, b); var max = Math.max(r, g, b); var delta = max - min; var h; var s; var l; if (max === min) { h = 0; } else if (r === max) { h = (g - b) / delta; } else if (g === max) { h = 2 + (b - r) / delta; } else if (b === max) { h = 4 + (r - g) / delta; } h = Math.min(h * 60, 360); if (h < 0) { h += 360; } l = (min + max) / 2; if (max === min) { s = 0; } else if (l <= 0.5) { s = delta / (max + min); } else { s = delta / (2 - max - min); } return [h, s * 100, l * 100]; }; convert.rgb.hsv = function (rgb) { var rdif; var gdif; var bdif; var h; var s; var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var v = Math.max(r, g, b); var diff = v - Math.min(r, g, b); var diffc = function (c) { return (v - c) / 6 / diff + 1 / 2; }; if (diff === 0) { h = s = 0; } else { s = diff / v; rdif = diffc(r); gdif = diffc(g); bdif = diffc(b); if (r === v) { h = bdif - gdif; } else if (g === v) { h = (1 / 3) + rdif - bdif; } else if (b === v) { h = (2 / 3) + gdif - rdif; } if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } } return [ h * 360, s * 100, v * 100 ]; }; convert.rgb.hwb = function (rgb) { var r = rgb[0]; var g = rgb[1]; var b = rgb[2]; var h = convert.rgb.hsl(rgb)[0]; var w = 1 / 255 * Math.min(r, Math.min(g, b)); b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); return [h, w * 100, b * 100]; }; convert.rgb.cmyk = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var c; var m; var y; var k; k = Math.min(1 - r, 1 - g, 1 - b); c = (1 - r - k) / (1 - k) || 0; m = (1 - g - k) / (1 - k) || 0; y = (1 - b - k) / (1 - k) || 0; return [c * 100, m * 100, y * 100, k * 100]; }; /** * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance * */ function comparativeDistance(x, y) { return ( Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2) ); } convert.rgb.keyword = function (rgb) { var reversed = reverseKeywords[rgb]; if (reversed) { return reversed; } var currentClosestDistance = Infinity; var currentClosestKeyword; for (var keyword in cssKeywords) { if (cssKeywords.hasOwnProperty(keyword)) { var value = cssKeywords[keyword]; // Compute comparative distance var distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest if (distance < currentClosestDistance) { currentClosestDistance = distance; currentClosestKeyword = keyword; } } } return currentClosestKeyword; }; convert.keyword.rgb = function (keyword) { return cssKeywords[keyword]; }; convert.rgb.xyz = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; // assume sRGB r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); return [x * 100, y * 100, z * 100]; }; convert.rgb.lab = function (rgb) { var xyz = convert.rgb.xyz(rgb); var x = xyz[0]; var y = xyz[1]; var z = xyz[2]; var l; var a; var b; x /= 95.047; y /= 100; z /= 108.883; x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); l = (116 * y) - 16; a = 500 * (x - y); b = 200 * (y - z); return [l, a, b]; }; convert.hsl.rgb = function (hsl) { var h = hsl[0] / 360; var s = hsl[1] / 100; var l = hsl[2] / 100; var t1; var t2; var t3; var rgb; var val; if (s === 0) { val = l * 255; return [val, val, val]; } if (l < 0.5) { t2 = l * (1 + s); } else { t2 = l + s - l * s; } t1 = 2 * l - t2; rgb = [0, 0, 0]; for (var i = 0; i < 3; i++) { t3 = h + 1 / 3 * -(i - 1); if (t3 < 0) { t3++; } if (t3 > 1) { t3--; } if (6 * t3 < 1) { val = t1 + (t2 - t1) * 6 * t3; } else if (2 * t3 < 1) { val = t2; } else if (3 * t3 < 2) { val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; } else { val = t1; } rgb[i] = val * 255; } return rgb; }; convert.hsl.hsv = function (hsl) { var h = hsl[0]; var s = hsl[1] / 100; var l = hsl[2] / 100; var smin = s; var lmin = Math.max(l, 0.01); var sv; var v; l *= 2; s *= (l <= 1) ? l : 2 - l; smin *= lmin <= 1 ? lmin : 2 - lmin; v = (l + s) / 2; sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); return [h, sv * 100, v * 100]; }; convert.hsv.rgb = function (hsv) { var h = hsv[0] / 60; var s = hsv[1] / 100; var v = hsv[2] / 100; var hi = Math.floor(h) % 6; var f = h - Math.floor(h); var p = 255 * v * (1 - s); var q = 255 * v * (1 - (s * f)); var t = 255 * v * (1 - (s * (1 - f))); v *= 255; switch (hi) { case 0: return [v, t, p]; case 1: return [q, v, p]; case 2: return [p, v, t]; case 3: return [p, q, v]; case 4: return [t, p, v]; case 5: return [v, p, q]; } }; convert.hsv.hsl = function (hsv) { var h = hsv[0]; var s = hsv[1] / 100; var v = hsv[2] / 100; var vmin = Math.max(v, 0.01); var lmin; var sl; var l; l = (2 - s) * v; lmin = (2 - s) * vmin; sl = s * vmin; sl /= (lmin <= 1) ? lmin : 2 - lmin; sl = sl || 0; l /= 2; return [h, sl * 100, l * 100]; }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb convert.hwb.rgb = function (hwb) { var h = hwb[0] / 360; var wh = hwb[1] / 100; var bl = hwb[2] / 100; var ratio = wh + bl; var i; var v; var f; var n; // wh + bl cant be > 1 if (ratio > 1) { wh /= ratio; bl /= ratio; } i = Math.floor(6 * h); v = 1 - bl; f = 6 * h - i; if ((i & 0x01) !== 0) { f = 1 - f; } n = wh + f * (v - wh); // linear interpolation var r; var g; var b; switch (i) { default: case 6: case 0: r = v; g = n; b = wh; break; case 1: r = n; g = v; b = wh; break; case 2: r = wh; g = v; b = n; break; case 3: r = wh; g = n; b = v; break; case 4: r = n; g = wh; b = v; break; case 5: r = v; g = wh; b = n; break; } return [r * 255, g * 255, b * 255]; }; convert.cmyk.rgb = function (cmyk) { var c = cmyk[0] / 100; var m = cmyk[1] / 100; var y = cmyk[2] / 100; var k = cmyk[3] / 100; var r; var g; var b; r = 1 - Math.min(1, c * (1 - k) + k); g = 1 - Math.min(1, m * (1 - k) + k); b = 1 - Math.min(1, y * (1 - k) + k); return [r * 255, g * 255, b * 255]; }; convert.xyz.rgb = function (xyz) { var x = xyz[0] / 100; var y = xyz[1] / 100; var z = xyz[2] / 100; var r; var g; var b; r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); // assume sRGB r = r > 0.0031308 ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) : r * 12.92; g = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) : g * 12.92; b = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) : b * 12.92; r = Math.min(Math.max(0, r), 1); g = Math.min(Math.max(0, g), 1); b = Math.min(Math.max(0, b), 1); return [r * 255, g * 255, b * 255]; }; convert.xyz.lab = function (xyz) { var x = xyz[0]; var y = xyz[1]; var z = xyz[2]; var l; var a; var b; x /= 95.047; y /= 100; z /= 108.883; x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); l = (116 * y) - 16; a = 500 * (x - y); b = 200 * (y - z); return [l, a, b]; }; convert.lab.xyz = function (lab) { var l = lab[0]; var a = lab[1]; var b = lab[2]; var x; var y; var z; y = (l + 16) / 116; x = a / 500 + y; z = y - b / 200; var y2 = Math.pow(y, 3); var x2 = Math.pow(x, 3); var z2 = Math.pow(z, 3); y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; x *= 95.047; y *= 100; z *= 108.883; return [x, y, z]; }; convert.lab.lch = function (lab) { var l = lab[0]; var a = lab[1]; var b = lab[2]; var hr; var h; var c; hr = Math.atan2(b, a); h = hr * 360 / 2 / Math.PI; if (h < 0) { h += 360; } c = Math.sqrt(a * a + b * b); return [l, c, h]; }; convert.lch.lab = function (lch) { var l = lch[0]; var c = lch[1]; var h = lch[2]; var a; var b; var hr; hr = h / 360 * 2 * Math.PI; a = c * Math.cos(hr); b = c * Math.sin(hr); return [l, a, b]; }; convert.rgb.ansi16 = function (args) { var r = args[0]; var g = args[1]; var b = args[2]; var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization value = Math.round(value / 50); if (value === 0) { return 30; } var ansi = 30 + ((Math.round(b / 255) << 2) | (Math.round(g / 255) << 1) | Math.round(r / 255)); if (value === 2) { ansi += 60; } return ansi; }; convert.hsv.ansi16 = function (args) { // optimization here; we already know the value and don't need to get // it converted for us. return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); }; convert.rgb.ansi256 = function (args) { var r = args[0]; var g = args[1]; var b = args[2]; // we use the extended greyscale palette here, with the exception of // black and white. normal palette only has 4 greyscale shades. if (r === g && g === b) { if (r < 8) { return 16; } if (r > 248) { return 231; } return Math.round(((r - 8) / 247) * 24) + 232; } var ansi = 16 + (36 * Math.round(r / 255 * 5)) + (6 * Math.round(g / 255 * 5)) + Math.round(b / 255 * 5); return ansi; }; convert.ansi16.rgb = function (args) { var color = args % 10; // handle greyscale if (color === 0 || color === 7) { if (args > 50) { color += 3.5; } color = color / 10.5 * 255; return [color, color, color]; } var mult = (~~(args > 50) + 1) * 0.5; var r = ((color & 1) * mult) * 255; var g = (((color >> 1) & 1) * mult) * 255; var b = (((color >> 2) & 1) * mult) * 255; return [r, g, b]; }; convert.ansi256.rgb = function (args) { // handle greyscale if (args >= 232) { var c = (args - 232) * 10 + 8; return [c, c, c]; } args -= 16; var rem; var r = Math.floor(args / 36) / 5 * 255; var g = Math.floor((rem = args % 36) / 6) / 5 * 255; var b = (rem % 6) / 5 * 255; return [r, g, b]; }; convert.rgb.hex = function (args) { var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF); var string = integer.toString(16).toUpperCase(); return '000000'.substring(string.length) + string; }; convert.hex.rgb = function (args) { var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); if (!match) { return [0, 0, 0]; } var colorString = match[0]; if (match[0].length === 3) { colorString = colorString.split('').map(function (char) { return char + char; }).join(''); } var integer = parseInt(colorString, 16); var r = (integer >> 16) & 0xFF; var g = (integer >> 8) & 0xFF; var b = integer & 0xFF; return [r, g, b]; }; convert.rgb.hcg = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var max = Math.max(Math.max(r, g), b); var min = Math.min(Math.min(r, g), b); var chroma = (max - min); var grayscale; var hue; if (chroma < 1) { grayscale = min / (1 - chroma); } else { grayscale = 0; } if (chroma <= 0) { hue = 0; } else if (max === r) { hue = ((g - b) / chroma) % 6; } else if (max === g) { hue = 2 + (b - r) / chroma; } else { hue = 4 + (r - g) / chroma + 4; } hue /= 6; hue %= 1; return [hue * 360, chroma * 100, grayscale * 100]; }; convert.hsl.hcg = function (hsl) { var s = hsl[1] / 100; var l = hsl[2] / 100; var c = 1; var f = 0; if (l < 0.5) { c = 2.0 * s * l; } else { c = 2.0 * s * (1.0 - l); } if (c < 1.0) { f = (l - 0.5 * c) / (1.0 - c); } return [hsl[0], c * 100, f * 100]; }; convert.hsv.hcg = function (hsv) { var s = hsv[1] / 100; var v = hsv[2] / 100; var c = s * v; var f = 0; if (c < 1.0) { f = (v - c) / (1 - c); } return [hsv[0], c * 100, f * 100]; }; convert.hcg.rgb = function (hcg) { var h = hcg[0] / 360; var c = hcg[1] / 100; var g = hcg[2] / 100; if (c === 0.0) { return [g * 255, g * 255, g * 255]; } var pure = [0, 0, 0]; var hi = (h % 1) * 6; var v = hi % 1; var w = 1 - v; var mg = 0; switch (Math.floor(hi)) { case 0: pure[0] = 1; pure[1] = v; pure[2] = 0; break; case 1: pure[0] = w; pure[1] = 1; pure[2] = 0; break; case 2: pure[0] = 0; pure[1] = 1; pure[2] = v; break; case 3: pure[0] = 0; pure[1] = w; pure[2] = 1; break; case 4: pure[0] = v; pure[1] = 0; pure[2] = 1; break; default: pure[0] = 1; pure[1] = 0; pure[2] = w; } mg = (1.0 - c) * g; return [ (c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255 ]; }; convert.hcg.hsv = function (hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var v = c + g * (1.0 - c); var f = 0; if (v > 0.0) { f = c / v; } return [hcg[0], f * 100, v * 100]; }; convert.hcg.hsl = function (hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var l = g * (1.0 - c) + 0.5 * c; var s = 0; if (l > 0.0 && l < 0.5) { s = c / (2 * l); } else if (l >= 0.5 && l < 1.0) { s = c / (2 * (1 - l)); } return [hcg[0], s * 100, l * 100]; }; convert.hcg.hwb = function (hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var v = c + g * (1.0 - c); return [hcg[0], (v - c) * 100, (1 - v) * 100]; }; convert.hwb.hcg = function (hwb) { var w = hwb[1] / 100; var b = hwb[2] / 100; var v = 1 - b; var c = v - w; var g = 0; if (c < 1) { g = (v - c) / (1 - c); } return [hwb[0], c * 100, g * 100]; }; convert.apple.rgb = function (apple) { return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; }; convert.rgb.apple = function (rgb) { return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; }; convert.gray.rgb = function (args) { return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; }; convert.gray.hsl = convert.gray.hsv = function (args) { return [0, 0, args[0]]; }; convert.gray.hwb = function (gray) { return [0, 100, gray[0]]; }; convert.gray.cmyk = function (gray) { return [0, 0, 0, gray[0]]; }; convert.gray.lab = function (gray) { return [gray[0], 0, 0]; }; convert.gray.hex = function (gray) { var val = Math.round(gray[0] / 100 * 255) & 0xFF; var integer = (val << 16) + (val << 8) + val; var string = integer.toString(16).toUpperCase(); return '000000'.substring(string.length) + string; }; convert.rgb.gray = function (rgb) { var val = (rgb[0] + rgb[1] + rgb[2]) / 3; return [val / 255 * 100]; }; /***/ }), /***/ "./node_modules/color-convert/index.js": /*!*********************************************!*\ !*** ./node_modules/color-convert/index.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var conversions = __webpack_require__(/*! ./conversions */ "./node_modules/color-convert/conversions.js"); var route = __webpack_require__(/*! ./route */ "./node_modules/color-convert/route.js"); var convert = {}; var models = Object.keys(conversions); function wrapRaw(fn) { var wrappedFn = function (args) { if (args === undefined || args === null) { return args; } if (arguments.length > 1) { args = Array.prototype.slice.call(arguments); } return fn(args); }; // preserve .conversion property if there is one if ('conversion' in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } function wrapRounded(fn) { var wrappedFn = function (args) { if (args === undefined || args === null) { return args; } if (arguments.length > 1) { args = Array.prototype.slice.call(arguments); } var result = fn(args); // we're assuming the result is an array here. // see notice in conversions.js; don't use box types // in conversion functions. if (typeof result === 'object') { for (var len = result.length, i = 0; i < len; i++) { result[i] = Math.round(result[i]); } } return result; }; // preserve .conversion property if there is one if ('conversion' in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } models.forEach(function (fromModel) { convert[fromModel] = {}; Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); var routes = route(fromModel); var routeModels = Object.keys(routes); routeModels.forEach(function (toModel) { var fn = routes[toModel]; convert[fromModel][toModel] = wrapRounded(fn); convert[fromModel][toModel].raw = wrapRaw(fn); }); }); module.exports = convert; /***/ }), /***/ "./node_modules/color-convert/route.js": /*!*********************************************!*\ !*** ./node_modules/color-convert/route.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var conversions = __webpack_require__(/*! ./conversions */ "./node_modules/color-convert/conversions.js"); /* this function routes a model to all other models. all functions that are routed have a property `.conversion` attached to the returned synthetic function. This property is an array of strings, each with the steps in between the 'from' and 'to' color models (inclusive). conversions that are not possible simply are not included. */ function buildGraph() { var graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3 var models = Object.keys(conversions); for (var len = models.length, i = 0; i < len; i++) { graph[models[i]] = { // http://jsperf.com/1-vs-infinity // micro-opt, but this is simple. distance: -1, parent: null }; } return graph; } // https://en.wikipedia.org/wiki/Breadth-first_search function deriveBFS(fromModel) { var graph = buildGraph(); var queue = [fromModel]; // unshift -> queue -> pop graph[fromModel].distance = 0; while (queue.length) { var current = queue.pop(); var adjacents = Object.keys(conversions[current]); for (var len = adjacents.length, i = 0; i < len; i++) { var adjacent = adjacents[i]; var node = graph[adjacent]; if (node.distance === -1) { node.distance = graph[current].distance + 1; node.parent = current; queue.unshift(adjacent); } } } return graph; } function link(from, to) { return function (args) { return to(from(args)); }; } function wrapConversion(toModel, graph) { var path = [graph[toModel].parent, toModel]; var fn = conversions[graph[toModel].parent][toModel]; var cur = graph[toModel].parent; while (graph[cur].parent) { path.unshift(graph[cur].parent); fn = link(conversions[graph[cur].parent][cur], fn); cur = graph[cur].parent; } fn.conversion = path; return fn; } module.exports = function (fromModel) { var graph = deriveBFS(fromModel); var conversion = {}; var models = Object.keys(graph); for (var len = models.length, i = 0; i < len; i++) { var toModel = models[i]; var node = graph[toModel]; if (node.parent === null) { // no possible conversion, or this node is the source model. continue; } conversion[toModel] = wrapConversion(toModel, graph); } return conversion; }; /***/ }), /***/ "./node_modules/color-name/index.js": /*!******************************************!*\ !*** ./node_modules/color-name/index.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], "aqua": [0, 255, 255], "aquamarine": [127, 255, 212], "azure": [240, 255, 255], "beige": [245, 245, 220], "bisque": [255, 228, 196], "black": [0, 0, 0], "blanchedalmond": [255, 235, 205], "blue": [0, 0, 255], "blueviolet": [138, 43, 226], "brown": [165, 42, 42], "burlywood": [222, 184, 135], "cadetblue": [95, 158, 160], "chartreuse": [127, 255, 0], "chocolate": [210, 105, 30], "coral": [255, 127, 80], "cornflowerblue": [100, 149, 237], "cornsilk": [255, 248, 220], "crimson": [220, 20, 60], "cyan": [0, 255, 255], "darkblue": [0, 0, 139], "darkcyan": [0, 139, 139], "darkgoldenrod": [184, 134, 11], "darkgray": [169, 169, 169], "darkgreen": [0, 100, 0], "darkgrey": [169, 169, 169], "darkkhaki": [189, 183, 107], "darkmagenta": [139, 0, 139], "darkolivegreen": [85, 107, 47], "darkorange": [255, 140, 0], "darkorchid": [153, 50, 204], "darkred": [139, 0, 0], "darksalmon": [233, 150, 122], "darkseagreen": [143, 188, 143], "darkslateblue": [72, 61, 139], "darkslategray": [47, 79, 79], "darkslategrey": [47, 79, 79], "darkturquoise": [0, 206, 209], "darkviolet": [148, 0, 211], "deeppink": [255, 20, 147], "deepskyblue": [0, 191, 255], "dimgray": [105, 105, 105], "dimgrey": [105, 105, 105], "dodgerblue": [30, 144, 255], "firebrick": [178, 34, 34], "floralwhite": [255, 250, 240], "forestgreen": [34, 139, 34], "fuchsia": [255, 0, 255], "gainsboro": [220, 220, 220], "ghostwhite": [248, 248, 255], "gold": [255, 215, 0], "goldenrod": [218, 165, 32], "gray": [128, 128, 128], "green": [0, 128, 0], "greenyellow": [173, 255, 47], "grey": [128, 128, 128], "honeydew": [240, 255, 240], "hotpink": [255, 105, 180], "indianred": [205, 92, 92], "indigo": [75, 0, 130], "ivory": [255, 255, 240], "khaki": [240, 230, 140], "lavender": [230, 230, 250], "lavenderblush": [255, 240, 245], "lawngreen": [124, 252, 0], "lemonchiffon": [255, 250, 205], "lightblue": [173, 216, 230], "lightcoral": [240, 128, 128], "lightcyan": [224, 255, 255], "lightgoldenrodyellow": [250, 250, 210], "lightgray": [211, 211, 211], "lightgreen": [144, 238, 144], "lightgrey": [211, 211, 211], "lightpink": [255, 182, 193], "lightsalmon": [255, 160, 122], "lightseagreen": [32, 178, 170], "lightskyblue": [135, 206, 250], "lightslategray": [119, 136, 153], "lightslategrey": [119, 136, 153], "lightsteelblue": [176, 196, 222], "lightyellow": [255, 255, 224], "lime": [0, 255, 0], "limegreen": [50, 205, 50], "linen": [250, 240, 230], "magenta": [255, 0, 255], "maroon": [128, 0, 0], "mediumaquamarine": [102, 205, 170], "mediumblue": [0, 0, 205], "mediumorchid": [186, 85, 211], "mediumpurple": [147, 112, 219], "mediumseagreen": [60, 179, 113], "mediumslateblue": [123, 104, 238], "mediumspringgreen": [0, 250, 154], "mediumturquoise": [72, 209, 204], "mediumvioletred": [199, 21, 133], "midnightblue": [25, 25, 112], "mintcream": [245, 255, 250], "mistyrose": [255, 228, 225], "moccasin": [255, 228, 181], "navajowhite": [255, 222, 173], "navy": [0, 0, 128], "oldlace": [253, 245, 230], "olive": [128, 128, 0], "olivedrab": [107, 142, 35], "orange": [255, 165, 0], "orangered": [255, 69, 0], "orchid": [218, 112, 214], "palegoldenrod": [238, 232, 170], "palegreen": [152, 251, 152], "paleturquoise": [175, 238, 238], "palevioletred": [219, 112, 147], "papayawhip": [255, 239, 213], "peachpuff": [255, 218, 185], "peru": [205, 133, 63], "pink": [255, 192, 203], "plum": [221, 160, 221], "powderblue": [176, 224, 230], "purple": [128, 0, 128], "rebeccapurple": [102, 51, 153], "red": [255, 0, 0], "rosybrown": [188, 143, 143], "royalblue": [65, 105, 225], "saddlebrown": [139, 69, 19], "salmon": [250, 128, 114], "sandybrown": [244, 164, 96], "seagreen": [46, 139, 87], "seashell": [255, 245, 238], "sienna": [160, 82, 45], "silver": [192, 192, 192], "skyblue": [135, 206, 235], "slateblue": [106, 90, 205], "slategray": [112, 128, 144], "slategrey": [112, 128, 144], "snow": [255, 250, 250], "springgreen": [0, 255, 127], "steelblue": [70, 130, 180], "tan": [210, 180, 140], "teal": [0, 128, 128], "thistle": [216, 191, 216], "tomato": [255, 99, 71], "turquoise": [64, 224, 208], "violet": [238, 130, 238], "wheat": [245, 222, 179], "white": [255, 255, 255], "whitesmoke": [245, 245, 245], "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; /***/ }), /***/ "./node_modules/color-string/index.js": /*!********************************************!*\ !*** ./node_modules/color-string/index.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ var colorNames = __webpack_require__(/*! color-name */ "./node_modules/color-name/index.js"); var swizzle = __webpack_require__(/*! simple-swizzle */ "./node_modules/simple-swizzle/index.js"); var reverseNames = {}; // create a list of reverse color names for (var name in colorNames) { if (colorNames.hasOwnProperty(name)) { reverseNames[colorNames[name]] = name; } } var cs = module.exports = { to: {}, get: {} }; cs.get = function (string) { var prefix = string.substring(0, 3).toLowerCase(); var val; var model; switch (prefix) { case 'hsl': val = cs.get.hsl(string); model = 'hsl'; break; case 'hwb': val = cs.get.hwb(string); model = 'hwb'; break; default: val = cs.get.rgb(string); model = 'rgb'; break; } if (!val) { return null; } return {model: model, value: val}; }; cs.get.rgb = function (string) { if (!string) { return null; } var abbr = /^#([a-f0-9]{3,4})$/i; var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i; var rgba = /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var keyword = /(\D+)/; var rgb = [0, 0, 0, 1]; var match; var i; var hexAlpha; if (match = string.match(hex)) { hexAlpha = match[2]; match = match[1]; for (i = 0; i < 3; i++) { // https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19 var i2 = i * 2; rgb[i] = parseInt(match.slice(i2, i2 + 2), 16); } if (hexAlpha) { rgb[3] = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100; } } else if (match = string.match(abbr)) { match = match[1]; hexAlpha = match[3]; for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i] + match[i], 16); } if (hexAlpha) { rgb[3] = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100; } } else if (match = string.match(rgba)) { for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i + 1], 0); } if (match[4]) { rgb[3] = parseFloat(match[4]); } } else if (match = string.match(per)) { for (i = 0; i < 3; i++) { rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55); } if (match[4]) { rgb[3] = parseFloat(match[4]); } } else if (match = string.match(keyword)) { if (match[1] === 'transparent') { return [0, 0, 0, 0]; } rgb = colorNames[match[1]]; if (!rgb) { return null; } rgb[3] = 1; return rgb; } else { return null; } for (i = 0; i < 3; i++) { rgb[i] = clamp(rgb[i], 0, 255); } rgb[3] = clamp(rgb[3], 0, 1); return rgb; }; cs.get.hsl = function (string) { if (!string) { return null; } var hsl = /^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var match = string.match(hsl); if (match) { var alpha = parseFloat(match[4]); var h = (parseFloat(match[1]) + 360) % 360; var s = clamp(parseFloat(match[2]), 0, 100); var l = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, s, l, a]; } return null; }; cs.get.hwb = function (string) { if (!string) { return null; } var hwb = /^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var match = string.match(hwb); if (match) { var alpha = parseFloat(match[4]); var h = ((parseFloat(match[1]) % 360) + 360) % 360; var w = clamp(parseFloat(match[2]), 0, 100); var b = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, w, b, a]; } return null; }; cs.to.hex = function () { var rgba = swizzle(arguments); return ( '#' + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? (hexDouble(Math.round(rgba[3] * 255))) : '') ); }; cs.to.rgb = function () { var rgba = swizzle(arguments); return rgba.length < 4 || rgba[3] === 1 ? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')' : 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')'; }; cs.to.rgb.percent = function () { var rgba = swizzle(arguments); var r = Math.round(rgba[0] / 255 * 100); var g = Math.round(rgba[1] / 255 * 100); var b = Math.round(rgba[2] / 255 * 100); return rgba.length < 4 || rgba[3] === 1 ? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)' : 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')'; }; cs.to.hsl = function () { var hsla = swizzle(arguments); return hsla.length < 4 || hsla[3] === 1 ? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)' : 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')'; }; // hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax // (hwb have alpha optional & 1 is default value) cs.to.hwb = function () { var hwba = swizzle(arguments); var a = ''; if (hwba.length >= 4 && hwba[3] !== 1) { a = ', ' + hwba[3]; } return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')'; }; cs.to.keyword = function (rgb) { return reverseNames[rgb.slice(0, 3)]; }; // helpers function clamp(num, min, max) { return Math.min(Math.max(min, num), max); } function hexDouble(num) { var str = num.toString(16).toUpperCase(); return (str.length < 2) ? '0' + str : str; } /***/ }), /***/ "./node_modules/color/index.js": /*!*************************************!*\ !*** ./node_modules/color/index.js ***! \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var colorString = __webpack_require__(/*! color-string */ "./node_modules/color-string/index.js"); var convert = __webpack_require__(/*! color-convert */ "./node_modules/color-convert/index.js"); var _slice = [].slice; var skippedModels = [ // to be honest, I don't really feel like keyword belongs in color convert, but eh. 'keyword', // gray conflicts with some method names, and has its own method defined. 'gray', // shouldn't really be in color-convert either... 'hex' ]; var hashedModelKeys = {}; Object.keys(convert).forEach(function (model) { hashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model; }); var limiters = {}; function Color(obj, model) { if (!(this instanceof Color)) { return new Color(obj, model); } if (model && model in skippedModels) { model = null; } if (model && !(model in convert)) { throw new Error('Unknown model: ' + model); } var i; var channels; if (typeof obj === 'undefined') { this.model = 'rgb'; this.color = [0, 0, 0]; this.valpha = 1; } else if (obj instanceof Color) { this.model = obj.model; this.color = obj.color.slice(); this.valpha = obj.valpha; } else if (typeof obj === 'string') { var result = colorString.get(obj); if (result === null) { throw new Error('Unable to parse color from string: ' + obj); } this.model = result.model; channels = convert[this.model].channels; this.color = result.value.slice(0, channels); this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1; } else if (obj.length) { this.model = model || 'rgb'; channels = convert[this.model].channels; var newArr = _slice.call(obj, 0, channels); this.color = zeroArray(newArr, channels); this.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1; } else if (typeof obj === 'number') { // this is always RGB - can be converted later on. obj &= 0xFFFFFF; this.model = 'rgb'; this.color = [ (obj >> 16) & 0xFF, (obj >> 8) & 0xFF, obj & 0xFF ]; this.valpha = 1; } else { this.valpha = 1; var keys = Object.keys(obj); if ('alpha' in obj) { keys.splice(keys.indexOf('alpha'), 1); this.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0; } var hashedKeys = keys.sort().join(''); if (!(hashedKeys in hashedModelKeys)) { throw new Error('Unable to parse color from object: ' + JSON.stringify(obj)); } this.model = hashedModelKeys[hashedKeys]; var labels = convert[this.model].labels; var color = []; for (i = 0; i < labels.length; i++) { color.push(obj[labels[i]]); } this.color = zeroArray(color); } // perform limitations (clamping, etc.) if (limiters[this.model]) { channels = convert[this.model].channels; for (i = 0; i < channels; i++) { var limit = limiters[this.model][i]; if (limit) { this.color[i] = limit(this.color[i]); } } } this.valpha = Math.max(0, Math.min(1, this.valpha)); if (Object.freeze) { Object.freeze(this); } } Color.prototype = { toString: function () { return this.string(); }, toJSON: function () { return this[this.model](); }, string: function (places) { var self = this.model in colorString.to ? this : this.rgb(); self = self.round(typeof places === 'number' ? places : 1); var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); return colorString.to[self.model](args); }, percentString: function (places) { var self = this.rgb().round(typeof places === 'number' ? places : 1); var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); return colorString.to.rgb.percent(args); }, array: function () { return this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha); }, object: function () { var result = {}; var channels = convert[this.model].channels; var labels = convert[this.model].labels; for (var i = 0; i < channels; i++) { result[labels[i]] = this.color[i]; } if (this.valpha !== 1) { result.alpha = this.valpha; } return result; }, unitArray: function () { var rgb = this.rgb().color; rgb[0] /= 255; rgb[1] /= 255; rgb[2] /= 255; if (this.valpha !== 1) { rgb.push(this.valpha); } return rgb; }, unitObject: function () { var rgb = this.rgb().object(); rgb.r /= 255; rgb.g /= 255; rgb.b /= 255; if (this.valpha !== 1) { rgb.alpha = this.valpha; } return rgb; }, round: function (places) { places = Math.max(places || 0, 0); return new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model); }, alpha: function (val) { if (arguments.length) { return new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model); } return this.valpha; }, // rgb red: getset('rgb', 0, maxfn(255)), green: getset('rgb', 1, maxfn(255)), blue: getset('rgb', 2, maxfn(255)), hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style saturationl: getset('hsl', 1, maxfn(100)), lightness: getset('hsl', 2, maxfn(100)), saturationv: getset('hsv', 1, maxfn(100)), value: getset('hsv', 2, maxfn(100)), chroma: getset('hcg', 1, maxfn(100)), gray: getset('hcg', 2, maxfn(100)), white: getset('hwb', 1, maxfn(100)), wblack: getset('hwb', 2, maxfn(100)), cyan: getset('cmyk', 0, maxfn(100)), magenta: getset('cmyk', 1, maxfn(100)), yellow: getset('cmyk', 2, maxfn(100)), black: getset('cmyk', 3, maxfn(100)), x: getset('xyz', 0, maxfn(100)), y: getset('xyz', 1, maxfn(100)), z: getset('xyz', 2, maxfn(100)), l: getset('lab', 0, maxfn(100)), a: getset('lab', 1), b: getset('lab', 2), keyword: function (val) { if (arguments.length) { return new Color(val); } return convert[this.model].keyword(this.color); }, hex: function (val) { if (arguments.length) { return new Color(val); } return colorString.to.hex(this.rgb().round().color); }, rgbNumber: function () { var rgb = this.rgb().color; return ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF); }, luminosity: function () { // http://www.w3.org/TR/WCAG20/#relativeluminancedef var rgb = this.rgb().color; var lum = []; for (var i = 0; i < rgb.length; i++) { var chan = rgb[i] / 255; lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4); } return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; }, contrast: function (color2) { // http://www.w3.org/TR/WCAG20/#contrast-ratiodef var lum1 = this.luminosity(); var lum2 = color2.luminosity(); if (lum1 > lum2) { return (lum1 + 0.05) / (lum2 + 0.05); } return (lum2 + 0.05) / (lum1 + 0.05); }, level: function (color2) { var contrastRatio = this.contrast(color2); if (contrastRatio >= 7.1) { return 'AAA'; } return (contrastRatio >= 4.5) ? 'AA' : ''; }, isDark: function () { // YIQ equation from http://24ways.org/2010/calculating-color-contrast var rgb = this.rgb().color; var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000; return yiq < 128; }, isLight: function () { return !this.isDark(); }, negate: function () { var rgb = this.rgb(); for (var i = 0; i < 3; i++) { rgb.color[i] = 255 - rgb.color[i]; } return rgb; }, lighten: function (ratio) { var hsl = this.hsl(); hsl.color[2] += hsl.color[2] * ratio; return hsl; }, darken: function (ratio) { var hsl = this.hsl(); hsl.color[2] -= hsl.color[2] * ratio; return hsl; }, saturate: function (ratio) { var hsl = this.hsl(); hsl.color[1] += hsl.color[1] * ratio; return hsl; }, desaturate: function (ratio) { var hsl = this.hsl(); hsl.color[1] -= hsl.color[1] * ratio; return hsl; }, whiten: function (ratio) { var hwb = this.hwb(); hwb.color[1] += hwb.color[1] * ratio; return hwb; }, blacken: function (ratio) { var hwb = this.hwb(); hwb.color[2] += hwb.color[2] * ratio; return hwb; }, grayscale: function () { // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale var rgb = this.rgb().color; var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; return Color.rgb(val, val, val); }, fade: function (ratio) { return this.alpha(this.valpha - (this.valpha * ratio)); }, opaquer: function (ratio) { return this.alpha(this.valpha + (this.valpha * ratio)); }, rotate: function (degrees) { var hsl = this.hsl(); var hue = hsl.color[0]; hue = (hue + degrees) % 360; hue = hue < 0 ? 360 + hue : hue; hsl.color[0] = hue; return hsl; }, mix: function (mixinColor, weight) { // ported from sass implementation in C // https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209 if (!mixinColor || !mixinColor.rgb) { throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor); } var color1 = mixinColor.rgb(); var color2 = this.rgb(); var p = weight === undefined ? 0.5 : weight; var w = 2 * p - 1; var a = color1.alpha() - color2.alpha(); var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0; var w2 = 1 - w1; return Color.rgb( w1 * color1.red() + w2 * color2.red(), w1 * color1.green() + w2 * color2.green(), w1 * color1.blue() + w2 * color2.blue(), color1.alpha() * p + color2.alpha() * (1 - p)); } }; // model conversion methods and static constructors Object.keys(convert).forEach(function (model) { if (skippedModels.indexOf(model) !== -1) { return; } var channels = convert[model].channels; // conversion methods Color.prototype[model] = function () { if (this.model === model) { return new Color(this); } if (arguments.length) { return new Color(arguments, model); } var newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha; return new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model); }; // 'static' construction methods Color[model] = function (color) { if (typeof color === 'number') { color = zeroArray(_slice.call(arguments), channels); } return new Color(color, model); }; }); function roundTo(num, places) { return Number(num.toFixed(places)); } function roundToPlace(places) { return function (num) { return roundTo(num, places); }; } function getset(model, channel, modifier) { model = Array.isArray(model) ? model : [model]; model.forEach(function (m) { (limiters[m] || (limiters[m] = []))[channel] = modifier; }); model = model[0]; return function (val) { var result; if (arguments.length) { if (modifier) { val = modifier(val); } result = this[model](); result.color[channel] = val; return result; } result = this[model]().color[channel]; if (modifier) { result = modifier(result); } return result; }; } function maxfn(max) { return function (v) { return Math.max(0, Math.min(max, v)); }; } function assertArray(val) { return Array.isArray(val) ? val : [val]; } function zeroArray(arr, length) { for (var i = 0; i < length; i++) { if (typeof arr[i] !== 'number') { arr[i] = 0; } } return arr; } module.exports = Color; /***/ }), /***/ "./node_modules/conic-gradient/conic-gradient.js": /*!*******************************************************!*\ !*** ./node_modules/conic-gradient/conic-gradient.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * CSS conic-gradient() polyfill * By Lea Verou — http://lea.verou.me * MIT license */ (function(){ var π = Math.PI; var τ = 2 * π; var ε = .00001; var deg = π/180; var dummy = document.createElement("div"); document.head.appendChild(dummy); var _ = self.ConicGradient = function(o) { var me = this; _.all.push(this); o = o || {}; this.canvas = document.createElement("canvas"); this.context = this.canvas.getContext("2d"); this.repeating = !!o.repeating; this.size = o.size || Math.max(innerWidth, innerHeight); this.canvas.width = this.canvas.height = this.size; var stops = o.stops; this.stops = (stops || "").split(/\s*,(?![^(]*\))\s*/); // commas that are not followed by a ) without a ( first this.from = 0; for (var i=0; i 0) { var first = this.stops[0].clone(); first.pos = 0; this.stops.unshift(first); } // Add dummy last stop or set first stop’s position to 100% if it doesn’t have one if (this.stops[this.stops.length - 1].pos === undefined) { this.stops[this.stops.length - 1].pos = 1; } else if (!this.repeating && this.stops[this.stops.length - 1].pos < 1) { var last = this.stops[this.stops.length - 1].clone(); last.pos = 1; this.stops.push(last); } this.stops.forEach(function(stop, i){ if (stop.pos === undefined) { // Evenly space color stops with no position for (var j=i+1; this[j]; j++) { if (this[j].pos !== undefined) { stop.pos = this[i-1].pos + (this[j].pos - this[i-1].pos)/(j-i+1); break; } } } else if (i > 0) { // Normalize color stops whose position is smaller than the position of the stop before them stop.pos = Math.max(stop.pos, this[i-1].pos); } }, this.stops); if (this.repeating) { // Repeat color stops until >= 1 var stops = this.stops.slice(); var lastStop = stops[stops.length-1]; var difference = lastStop.pos - stops[0].pos; for (var i=0; this.stops[this.stops.length-1].pos < 1 && i<10000; i++) { for (var j=0; j' + '' + ''; }, get png() { return this.canvas.toDataURL(); }, get r() { return Math.sqrt(2) * this.size / 2; }, // Paint the conical gradient on the canvas // Algorithm inspired from http://jsdo.it/akm2/yr9B paint: function() { var c = this.context; var radius = this.r; var x = this.size / 2; var stopIndex = 0; // The index of the current color var stop = this.stops[stopIndex], prevStop; var diff, t; // Transform coordinate system so that angles start from the top left, like in CSS c.translate(this.size/2, this.size/2); c.rotate(-90*deg); c.rotate(this.from*deg); c.translate(-this.size/2, -this.size/2); for (var i = 0; i < 360;) { if (i/360 + ε >= stop.pos) { // Switch color stop do { prevStop = stop; stopIndex++; stop = this.stops[stopIndex]; } while(stop && stop != prevStop && stop.pos === prevStop.pos); if (!stop) { break; } var sameColor = prevStop.color + "" === stop.color + "" && prevStop != stop; diff = prevStop.color.map(function(c, i){ return stop.color[i] - c; }); } t = (i/360 - prevStop.pos) / (stop.pos - prevStop.pos); var interpolated = sameColor? stop.color : diff.map(function(d,i){ var ret = d * t + prevStop.color[i]; return i < 3? ret & 255 : ret; }); // Draw a series of arcs, 1deg each c.fillStyle = 'rgba(' + interpolated.join(",") + ')'; c.beginPath(); c.moveTo(x, x); if (sameColor) { var θ = 360 * (stop.pos - prevStop.pos); } else { var θ = .5; } var beginArg = i*deg; beginArg = Math.min(360*deg, beginArg); // .02: To prevent empty blank line and corresponding moire // only non-alpha colors are cared now var endArg = beginArg + θ*deg; endArg = Math.min(360*deg, endArg + .02); c.arc(x, x, radius, beginArg, endArg); c.closePath(); c.fill(); i += θ; } } }; _.ColorStop = function(gradient, stop) { this.gradient = gradient; if (stop) { var parts = stop.match(/^(.+?)(?:\s+([\d.]+)(%|deg|turn|grad|rad)?)?(?:\s+([\d.]+)(%|deg|turn|grad|rad)?)?\s*$/); this.color = _.ColorStop.colorToRGBA(parts[1]); if (parts[2]) { var unit = parts[3]; if (unit == "%" || parts[2] === "0" && !unit) { this.pos = parts[2]/100; } else if (unit == "turn") { this.pos = +parts[2]; } else if (unit == "deg") { this.pos = parts[2] / 360; } else if (unit == "grad") { this.pos = parts[2] / 400; } else if (unit == "rad") { this.pos = parts[2] / τ; } } if (parts[4]) { this.next = new _.ColorStop(gradient, parts[1] + " " + parts[4] + parts[5]); } } } _.ColorStop.prototype = { clone: function() { var ret = new _.ColorStop(this.gradient); ret.color = this.color; ret.pos = this.pos; return ret; }, toString: function() { return "rgba(" + this.color.join(", ") + ") " + this.pos * 100 + "%"; } }; _.ColorStop.colorToRGBA = function(color) { if (!Array.isArray(color) && color.indexOf("from") == -1) { dummy.style.color = color; var rgba = getComputedStyle(dummy).color.match(/rgba?\(([\d.]+), ([\d.]+), ([\d.]+)(?:, ([\d.]+))?\)/); if (rgba) { rgba.shift(); rgba = rgba.map(function(a) { return +a }); rgba[3] = isNaN(rgba[3])? 1 : rgba[3]; } return rgba || [0,0,0,0]; } return color; }; })(); if (self.StyleFix) { // Test if conic gradients are supported first: (function(){ var dummy = document.createElement("p"); dummy.style.backgroundImage = "conic-gradient(white, black)"; dummy.style.backgroundImage = PrefixFree.prefix + "conic-gradient(white, black)"; if (!dummy.style.backgroundImage) { // Not supported, use polyfill StyleFix.register(function(css, raw) { if (css.indexOf("conic-gradient") > -1) { css = css.replace(/(?:repeating-)?conic-gradient\(\s*((?:\([^()]+\)|[^;()}])+?)\)/g, function(gradient, stops) { return new ConicGradient({ stops: stops, repeating: gradient.indexOf("repeating-") > -1 }); }); } return css; }); } })(); } /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/rc-slider/assets/index.css": /*!***************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/rc-slider/assets/index.css ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // Imports var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); exports = ___CSS_LOADER_API_IMPORT___(false); // Module exports.push([module.i, ".rc-slider {\n position: relative;\n height: 14px;\n padding: 5px 0;\n width: 100%;\n border-radius: 6px;\n -ms-touch-action: none;\n touch-action: none;\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-rail {\n position: absolute;\n width: 100%;\n background-color: #e9e9e9;\n height: 4px;\n border-radius: 6px;\n}\n.rc-slider-track {\n position: absolute;\n left: 0;\n height: 4px;\n border-radius: 6px;\n background-color: #abe2fb;\n}\n.rc-slider-handle {\n position: absolute;\n width: 14px;\n height: 14px;\n cursor: pointer;\n cursor: -webkit-grab;\n margin-top: -5px;\n cursor: grab;\n border-radius: 50%;\n border: solid 2px #96dbfa;\n background-color: #fff;\n -ms-touch-action: pan-x;\n touch-action: pan-x;\n}\n.rc-slider-handle:focus {\n border-color: #57c5f7;\n box-shadow: 0 0 0 5px #96dbfa;\n outline: none;\n}\n.rc-slider-handle-click-focused:focus {\n border-color: #96dbfa;\n box-shadow: unset;\n}\n.rc-slider-handle:hover {\n border-color: #57c5f7;\n}\n.rc-slider-handle:active {\n border-color: #57c5f7;\n box-shadow: 0 0 5px #57c5f7;\n cursor: -webkit-grabbing;\n cursor: grabbing;\n}\n.rc-slider-mark {\n position: absolute;\n top: 18px;\n left: 0;\n width: 100%;\n font-size: 12px;\n}\n.rc-slider-mark-text {\n position: absolute;\n display: inline-block;\n vertical-align: middle;\n text-align: center;\n cursor: pointer;\n color: #999;\n}\n.rc-slider-mark-text-active {\n color: #666;\n}\n.rc-slider-step {\n position: absolute;\n width: 100%;\n height: 4px;\n background: transparent;\n}\n.rc-slider-dot {\n position: absolute;\n bottom: -2px;\n margin-left: -4px;\n width: 8px;\n height: 8px;\n border: 2px solid #e9e9e9;\n background-color: #fff;\n cursor: pointer;\n border-radius: 50%;\n vertical-align: middle;\n}\n.rc-slider-dot-active {\n border-color: #96dbfa;\n}\n.rc-slider-dot-reverse {\n margin-left: 0;\n margin-right: -4px;\n}\n.rc-slider-disabled {\n background-color: #e9e9e9;\n}\n.rc-slider-disabled .rc-slider-track {\n background-color: #ccc;\n}\n.rc-slider-disabled .rc-slider-handle,\n.rc-slider-disabled .rc-slider-dot {\n border-color: #ccc;\n box-shadow: none;\n background-color: #fff;\n cursor: not-allowed;\n}\n.rc-slider-disabled .rc-slider-mark-text,\n.rc-slider-disabled .rc-slider-dot {\n cursor: not-allowed !important;\n}\n.rc-slider-vertical {\n width: 14px;\n height: 100%;\n padding: 0 5px;\n}\n.rc-slider-vertical .rc-slider-rail {\n height: 100%;\n width: 4px;\n}\n.rc-slider-vertical .rc-slider-track {\n left: 5px;\n bottom: 0;\n width: 4px;\n}\n.rc-slider-vertical .rc-slider-handle {\n margin-left: -5px;\n -ms-touch-action: pan-y;\n touch-action: pan-y;\n}\n.rc-slider-vertical .rc-slider-mark {\n top: 0;\n left: 18px;\n height: 100%;\n}\n.rc-slider-vertical .rc-slider-step {\n height: 100%;\n width: 4px;\n}\n.rc-slider-vertical .rc-slider-dot {\n left: 2px;\n margin-bottom: -4px;\n}\n.rc-slider-vertical .rc-slider-dot:first-child {\n margin-bottom: -4px;\n}\n.rc-slider-vertical .rc-slider-dot:last-child {\n margin-bottom: -4px;\n}\n.rc-slider-tooltip-zoom-down-enter,\n.rc-slider-tooltip-zoom-down-appear {\n animation-duration: .3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n}\n.rc-slider-tooltip-zoom-down-leave {\n animation-duration: .3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n}\n.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active,\n.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active {\n animation-name: rcSliderTooltipZoomDownIn;\n animation-play-state: running;\n}\n.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active {\n animation-name: rcSliderTooltipZoomDownOut;\n animation-play-state: running;\n}\n.rc-slider-tooltip-zoom-down-enter,\n.rc-slider-tooltip-zoom-down-appear {\n transform: scale(0, 0);\n animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);\n}\n.rc-slider-tooltip-zoom-down-leave {\n animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n}\n@keyframes rcSliderTooltipZoomDownIn {\n 0% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n 100% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n}\n@keyframes rcSliderTooltipZoomDownOut {\n 0% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n 100% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n}\n.rc-slider-tooltip {\n position: absolute;\n left: -9999px;\n top: -9999px;\n visibility: visible;\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-tooltip * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-tooltip-hidden {\n display: none;\n}\n.rc-slider-tooltip-placement-top {\n padding: 4px 0 8px 0;\n}\n.rc-slider-tooltip-inner {\n padding: 6px 2px;\n min-width: 24px;\n height: 24px;\n font-size: 12px;\n line-height: 1;\n color: #fff;\n text-align: center;\n text-decoration: none;\n background-color: #6c6c6c;\n border-radius: 6px;\n box-shadow: 0 0 4px #d9d9d9;\n}\n.rc-slider-tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow {\n bottom: 4px;\n left: 50%;\n margin-left: -4px;\n border-width: 4px 4px 0;\n border-top-color: #6c6c6c;\n}\n", ""]); // Exports module.exports = exports; /***/ }), /***/ "./node_modules/css-loader/dist/runtime/api.js": /*!*****************************************************!*\ !*** ./node_modules/css-loader/dist/runtime/api.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader // eslint-disable-next-line func-names module.exports = function (useSourceMap) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap); if (item[2]) { return "@media ".concat(item[2], " {").concat(content, "}"); } return content; }).join(''); }; // import a list of modules into the list // eslint-disable-next-line func-names list.i = function (modules, mediaQuery, dedupe) { if (typeof modules === 'string') { // eslint-disable-next-line no-param-reassign modules = [[null, modules, '']]; } var alreadyImportedModules = {}; if (dedupe) { for (var i = 0; i < this.length; i++) { // eslint-disable-next-line prefer-destructuring var id = this[i][0]; if (id != null) { alreadyImportedModules[id] = true; } } } for (var _i = 0; _i < modules.length; _i++) { var item = [].concat(modules[_i]); if (dedupe && alreadyImportedModules[item[0]]) { // eslint-disable-next-line no-continue continue; } if (mediaQuery) { if (!item[2]) { item[2] = mediaQuery; } else { item[2] = "".concat(mediaQuery, " and ").concat(item[2]); } } list.push(item); } }; return list; }; function cssWithMappingToString(item, useSourceMap) { var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring var cssMapping = item[3]; if (!cssMapping) { return content; } if (useSourceMap && typeof btoa === 'function') { var sourceMapping = toComment(cssMapping); var sourceURLs = cssMapping.sources.map(function (source) { return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */"); }); return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); } return [content].join('\n'); } // Adapted from convert-source-map (MIT) function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); return "/*# ".concat(data, " */"); } /***/ }), /***/ "./node_modules/deep-equal/index.js": /*!******************************************!*\ !*** ./node_modules/deep-equal/index.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var pSlice = Array.prototype.slice; var objectKeys = __webpack_require__(/*! ./lib/keys.js */ "./node_modules/deep-equal/lib/keys.js"); var isArguments = __webpack_require__(/*! ./lib/is_arguments.js */ "./node_modules/deep-equal/lib/is_arguments.js"); var deepEqual = module.exports = function (actual, expected, opts) { if (!opts) opts = {}; // 7.1. All identical values are equivalent, as determined by ===. if (actual === expected) { return true; } else if (actual instanceof Date && expected instanceof Date) { return actual.getTime() === expected.getTime(); // 7.3. Other pairs that do not both pass typeof value == 'object', // equivalence is determined by ==. } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') { return opts.strict ? actual === expected : actual == expected; // 7.4. For all other Object pairs, including Array objects, equivalence is // determined by having the same number of owned properties (as verified // with Object.prototype.hasOwnProperty.call), the same set of keys // (although not necessarily the same order), equivalent values for every // corresponding key, and an identical 'prototype' property. Note: this // accounts for both named and indexed properties on Arrays. } else { return objEquiv(actual, expected, opts); } } function isUndefinedOrNull(value) { return value === null || value === undefined; } function isBuffer (x) { if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false; if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { return false; } if (x.length > 0 && typeof x[0] !== 'number') return false; return true; } function objEquiv(a, b, opts) { var i, key; if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) return false; // an identical 'prototype' property. if (a.prototype !== b.prototype) return false; //~~~I've managed to break Object.keys through screwy arguments passing. // Converting to array solves the problem. if (isArguments(a)) { if (!isArguments(b)) { return false; } a = pSlice.call(a); b = pSlice.call(b); return deepEqual(a, b, opts); } if (isBuffer(a)) { if (!isBuffer(b)) { return false; } if (a.length !== b.length) return false; for (i = 0; i < a.length; i++) { if (a[i] !== b[i]) return false; } return true; } try { var ka = objectKeys(a), kb = objectKeys(b); } catch (e) {//happens when one is a string literal and the other isn't return false; } // having the same number of owned properties (keys incorporates // hasOwnProperty) if (ka.length != kb.length) return false; //the same set of keys (although not necessarily the same order), ka.sort(); kb.sort(); //~~~cheap key test for (i = ka.length - 1; i >= 0; i--) { if (ka[i] != kb[i]) return false; } //equivalent values for every corresponding key, and //~~~possibly expensive deep test for (i = ka.length - 1; i >= 0; i--) { key = ka[i]; if (!deepEqual(a[key], b[key], opts)) return false; } return typeof a === typeof b; } /***/ }), /***/ "./node_modules/deep-equal/lib/is_arguments.js": /*!*****************************************************!*\ !*** ./node_modules/deep-equal/lib/is_arguments.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { var supportsArgumentsClass = (function(){ return Object.prototype.toString.call(arguments) })() == '[object Arguments]'; exports = module.exports = supportsArgumentsClass ? supported : unsupported; exports.supported = supported; function supported(object) { return Object.prototype.toString.call(object) == '[object Arguments]'; }; exports.unsupported = unsupported; function unsupported(object){ return object && typeof object == 'object' && typeof object.length == 'number' && Object.prototype.hasOwnProperty.call(object, 'callee') && !Object.prototype.propertyIsEnumerable.call(object, 'callee') || false; }; /***/ }), /***/ "./node_modules/deep-equal/lib/keys.js": /*!*********************************************!*\ !*** ./node_modules/deep-equal/lib/keys.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { exports = module.exports = typeof Object.keys === 'function' ? Object.keys : shim; exports.shim = shim; function shim (obj) { var keys = []; for (var key in obj) keys.push(key); return keys; } /***/ }), /***/ "./node_modules/dom-align/dist-web/index.js": /*!**************************************************!*\ !*** ./node_modules/dom-align/dist-web/index.js ***! \**************************************************/ /*! exports provided: default, alignElement, alignPoint */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alignElement", function() { return alignElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alignPoint", function() { return alignPoint; }); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } var vendorPrefix; var jsCssMap = { Webkit: '-webkit-', Moz: '-moz-', // IE did it wrong again ... ms: '-ms-', O: '-o-' }; function getVendorPrefix() { if (vendorPrefix !== undefined) { return vendorPrefix; } vendorPrefix = ''; var style = document.createElement('p').style; var testProp = 'Transform'; for (var key in jsCssMap) { if (key + testProp in style) { vendorPrefix = key; } } return vendorPrefix; } function getTransitionName() { return getVendorPrefix() ? "".concat(getVendorPrefix(), "TransitionProperty") : 'transitionProperty'; } function getTransformName() { return getVendorPrefix() ? "".concat(getVendorPrefix(), "Transform") : 'transform'; } function setTransitionProperty(node, value) { var name = getTransitionName(); if (name) { node.style[name] = value; if (name !== 'transitionProperty') { node.style.transitionProperty = value; } } } function setTransform(node, value) { var name = getTransformName(); if (name) { node.style[name] = value; if (name !== 'transform') { node.style.transform = value; } } } function getTransitionProperty(node) { return node.style.transitionProperty || node.style[getTransitionName()]; } function getTransformXY(node) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var matrix = transform.replace(/[^0-9\-.,]/g, '').split(','); return { x: parseFloat(matrix[12] || matrix[4], 0), y: parseFloat(matrix[13] || matrix[5], 0) }; } return { x: 0, y: 0 }; } var matrix2d = /matrix\((.*)\)/; var matrix3d = /matrix3d\((.*)\)/; function setTransformXY(node, xy) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var arr; var match2d = transform.match(matrix2d); if (match2d) { match2d = match2d[1]; arr = match2d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[4] = xy.x; arr[5] = xy.y; setTransform(node, "matrix(".concat(arr.join(','), ")")); } else { var match3d = transform.match(matrix3d)[1]; arr = match3d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[12] = xy.x; arr[13] = xy.y; setTransform(node, "matrix3d(".concat(arr.join(','), ")")); } } else { setTransform(node, "translateX(".concat(xy.x, "px) translateY(").concat(xy.y, "px) translateZ(0)")); } } var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; var getComputedStyleX; // https://stackoverflow.com/a/3485654/3040605 function forceRelayout(elem) { var originalStyle = elem.style.display; elem.style.display = 'none'; elem.offsetHeight; // eslint-disable-line elem.style.display = originalStyle; } function css(el, name, v) { var value = v; if (_typeof(name) === 'object') { for (var i in name) { if (name.hasOwnProperty(i)) { css(el, i, name[i]); } } return undefined; } if (typeof value !== 'undefined') { if (typeof value === 'number') { value = "".concat(value, "px"); } el.style[name] = value; return undefined; } return getComputedStyleX(el, name); } function getClientPosition(elem) { var box; var x; var y; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin x = box.left; y = box.top; // In IE, most of the time, 2 extra pixels are added to the top and left // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and // IE6 standards mode, this border can be overridden by setting the // document element's border to zero -- thus, we cannot rely on the // offset always being 2 pixels. // In quirks mode, the offset can be determined by querying the body's // clientLeft/clientTop, but in standards mode, it is found by querying // the document element's clientLeft/clientTop. Since we already called // getClientBoundingRect we have already forced a reflow, so it is not // too expensive just to query them all. // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 // 窗口边框标准是设 documentElement ,quirks 时设置 body // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 // 标准 ie 下 docElem.clientTop 就是 border-top // ie7 html 即窗口边框改变不了。永远为 2 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function getScroll(w, top) { var ret = w["page".concat(top ? 'Y' : 'X', "Offset")]; var method = "scroll".concat(top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getScrollLeft(w) { return getScroll(w); } function getScrollTop(w) { return getScroll(w, true); } function getOffset(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScrollLeft(w); pos.top += getScrollTop(w); return pos; } /** * A crude way of determining if an object is a window * @member util */ function isWindow(obj) { // must use == for ie8 /* eslint eqeqeq:0 */ return obj !== null && obj !== undefined && obj == obj.window; } function getDocument(node) { if (isWindow(node)) { return node.document; } if (node.nodeType === 9) { return node; } return node.ownerDocument; } function _getComputedStyle(elem, name, cs) { var computedStyle = cs; var val = ''; var d = getDocument(elem); computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61 if (computedStyle) { val = computedStyle.getPropertyValue(name) || computedStyle[name]; } return val; } var _RE_NUM_NO_PX = new RegExp("^(".concat(RE_NUM, ")(?!px)[a-z%]+$"), 'i'); var RE_POS = /^(top|right|bottom|left)$/; var CURRENT_STYLE = 'currentStyle'; var RUNTIME_STYLE = 'runtimeStyle'; var LEFT = 'left'; var PX = 'px'; function _getComputedStyleIE(elem, name) { // currentStyle maybe null // http://msdn.microsoft.com/en-us/library/ms535231.aspx var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 // 在 ie 下不对,需要直接用 offset 方式 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // exclude left right for relativity if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { // Remember the original values var style = elem.style; var left = style[LEFT]; var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; ret = style.pixelLeft + PX; // Revert the changed values style[LEFT] = left; elem[RUNTIME_STYLE][LEFT] = rsLeft; } return ret === '' ? 'auto' : ret; } if (typeof window !== 'undefined') { getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; } function getOffsetDirection(dir, option) { if (dir === 'left') { return option.useCssRight ? 'right' : dir; } return option.useCssBottom ? 'bottom' : dir; } function oppositeOffsetDirection(dir) { if (dir === 'left') { return 'right'; } else if (dir === 'right') { return 'left'; } else if (dir === 'top') { return 'bottom'; } else if (dir === 'bottom') { return 'top'; } } // 设置 elem 相对 elem.ownerDocument 的坐标 function setLeftTop(elem, offset, option) { // set position first, in-case top/left are set even on static elem if (css(elem, 'position') === 'static') { elem.style.position = 'relative'; } var presetH = -999; var presetV = -999; var horizontalProperty = getOffsetDirection('left', option); var verticalProperty = getOffsetDirection('top', option); var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty); var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty); if (horizontalProperty !== 'left') { presetH = 999; } if (verticalProperty !== 'top') { presetV = 999; } var originalTransition = ''; var originalOffset = getOffset(elem); if ('left' in offset || 'top' in offset) { originalTransition = getTransitionProperty(elem) || ''; setTransitionProperty(elem, 'none'); } if ('left' in offset) { elem.style[oppositeHorizontalProperty] = ''; elem.style[horizontalProperty] = "".concat(presetH, "px"); } if ('top' in offset) { elem.style[oppositeVerticalProperty] = ''; elem.style[verticalProperty] = "".concat(presetV, "px"); } // force relayout forceRelayout(elem); var old = getOffset(elem); var originalStyle = {}; for (var key in offset) { if (offset.hasOwnProperty(key)) { var dir = getOffsetDirection(key, option); var preset = key === 'left' ? presetH : presetV; var off = originalOffset[key] - old[key]; if (dir === key) { originalStyle[dir] = preset + off; } else { originalStyle[dir] = preset - off; } } } css(elem, originalStyle); // force relayout forceRelayout(elem); if ('left' in offset || 'top' in offset) { setTransitionProperty(elem, originalTransition); } var ret = {}; for (var _key in offset) { if (offset.hasOwnProperty(_key)) { var _dir = getOffsetDirection(_key, option); var _off = offset[_key] - originalOffset[_key]; if (_key === _dir) { ret[_dir] = originalStyle[_dir] + _off; } else { ret[_dir] = originalStyle[_dir] - _off; } } } css(elem, ret); } function setTransform$1(elem, offset) { var originalOffset = getOffset(elem); var originalXY = getTransformXY(elem); var resultXY = { x: originalXY.x, y: originalXY.y }; if ('left' in offset) { resultXY.x = originalXY.x + offset.left - originalOffset.left; } if ('top' in offset) { resultXY.y = originalXY.y + offset.top - originalOffset.top; } setTransformXY(elem, resultXY); } function setOffset(elem, offset, option) { if (option.ignoreShake) { var oriOffset = getOffset(elem); var oLeft = oriOffset.left.toFixed(0); var oTop = oriOffset.top.toFixed(0); var tLeft = offset.left.toFixed(0); var tTop = offset.top.toFixed(0); if (oLeft === tLeft && oTop === tTop) { return; } } if (option.useCssRight || option.useCssBottom) { setLeftTop(elem, offset, option); } else if (option.useCssTransform && getTransformName() in document.body.style) { setTransform$1(elem, offset); } else { setLeftTop(elem, offset, option); } } function each(arr, fn) { for (var i = 0; i < arr.length; i++) { fn(arr[i]); } } function isBorderBoxFn(elem) { return getComputedStyleX(elem, 'boxSizing') === 'border-box'; } var BOX_MODELS = ['margin', 'border', 'padding']; var CONTENT_INDEX = -1; var PADDING_INDEX = 2; var BORDER_INDEX = 1; var MARGIN_INDEX = 0; function swap(elem, options, callback) { var old = {}; var style = elem.style; var name; // Remember the old values, and insert the new ones for (name in options) { if (options.hasOwnProperty(name)) { old[name] = style[name]; style[name] = options[name]; } } callback.call(elem); // Revert the old values for (name in options) { if (options.hasOwnProperty(name)) { style[name] = old[name]; } } } function getPBMWidth(elem, props, which) { var value = 0; var prop; var j; var i; for (j = 0; j < props.length; j++) { prop = props[j]; if (prop) { for (i = 0; i < which.length; i++) { var cssProp = void 0; if (prop === 'border') { cssProp = "".concat(prop).concat(which[i], "Width"); } else { cssProp = prop + which[i]; } value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; } } } return value; } var domUtils = { getParent: function getParent(element) { var parent = element; do { if (parent.nodeType === 11 && parent.host) { parent = parent.host; } else { parent = parent.parentNode; } } while (parent && parent.nodeType !== 1 && parent.nodeType !== 9); return parent; } }; each(['Width', 'Height'], function (name) { domUtils["doc".concat(name)] = function (refWin) { var d = refWin.document; return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight // ie standard mode : documentElement.scrollHeight> body.scrollHeight d.documentElement["scroll".concat(name)], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? d.body["scroll".concat(name)], domUtils["viewport".concat(name)](d)); }; domUtils["viewport".concat(name)] = function (win) { // pc browser includes scrollbar in window.innerWidth var prop = "client".concat(name); var doc = win.document; var body = doc.body; var documentElement = doc.documentElement; var documentElementProp = documentElement[prop]; // 标准模式取 documentElement // backcompat 取 body return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; }; }); /* 得到元素的大小信息 @param elem @param name @param {String} [extra] 'padding' : (css width) + padding 'border' : (css width) + padding + border 'margin' : (css width) + padding + border + margin */ function getWH(elem, name, ex) { var extra = ex; if (isWindow(elem)) { return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); } else if (elem.nodeType === 9) { return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); } var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; var borderBoxValue = name === 'width' ? elem.getBoundingClientRect().width : elem.getBoundingClientRect().height; var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); var cssBoxValue = 0; if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) { borderBoxValue = undefined; // Fall back to computed then un computed css if necessary cssBoxValue = getComputedStyleX(elem, name); if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) { cssBoxValue = elem.style[name] || 0; } // Normalize '', auto, and prepare for extra cssBoxValue = parseFloat(cssBoxValue) || 0; } if (extra === undefined) { extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; } var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; var val = borderBoxValue || cssBoxValue; if (extra === CONTENT_INDEX) { if (borderBoxValueOrIsBorderBox) { return val - getPBMWidth(elem, ['border', 'padding'], which); } return cssBoxValue; } else if (borderBoxValueOrIsBorderBox) { if (extra === BORDER_INDEX) { return val; } return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which) : getPBMWidth(elem, ['margin'], which)); } return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which); } var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; // fix #119 : https://github.com/kissyteam/kissy/issues/119 function getWHIgnoreDisplay() { for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) { args[_key2] = arguments[_key2]; } var val; var elem = args[0]; // in case elem is window // elem.offsetWidth === undefined if (elem.offsetWidth !== 0) { val = getWH.apply(undefined, args); } else { swap(elem, cssShow, function () { val = getWH.apply(undefined, args); }); } return val; } each(['width', 'height'], function (name) { var first = name.charAt(0).toUpperCase() + name.slice(1); domUtils["outer".concat(first)] = function (el, includeMargin) { return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); }; var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; domUtils[name] = function (elem, v) { var val = v; if (val !== undefined) { if (elem) { var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); if (isBorderBox) { val += getPBMWidth(elem, ['padding', 'border'], which); } return css(elem, name, val); } return undefined; } return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); }; }); function mix(to, from) { for (var i in from) { if (from.hasOwnProperty(i)) { to[i] = from[i]; } } return to; } var utils = { getWindow: function getWindow(node) { if (node && node.document && node.setTimeout) { return node; } var doc = node.ownerDocument || node; return doc.defaultView || doc.parentWindow; }, getDocument: getDocument, offset: function offset(el, value, option) { if (typeof value !== 'undefined') { setOffset(el, value, option || {}); } else { return getOffset(el); } }, isWindow: isWindow, each: each, css: css, clone: function clone(obj) { var i; var ret = {}; for (i in obj) { if (obj.hasOwnProperty(i)) { ret[i] = obj[i]; } } var overflow = obj.overflow; if (overflow) { for (i in obj) { if (obj.hasOwnProperty(i)) { ret.overflow[i] = obj.overflow[i]; } } } return ret; }, mix: mix, getWindowScrollLeft: function getWindowScrollLeft(w) { return getScrollLeft(w); }, getWindowScrollTop: function getWindowScrollTop(w) { return getScrollTop(w); }, merge: function merge() { var ret = {}; for (var i = 0; i < arguments.length; i++) { utils.mix(ret, i < 0 || arguments.length <= i ? undefined : arguments[i]); } return ret; }, viewportWidth: 0, viewportHeight: 0 }; mix(utils, domUtils); /** * 得到会导致元素显示不全的祖先元素 */ var getParent = utils.getParent; function getOffsetParent(element) { if (utils.isWindow(element) || element.nodeType === 9) { return null; } // ie 这个也不是完全可行 /*
元素 6 高 100px 宽 50px
*/ // element.offsetParent does the right thing in ie7 and below. Return parent with layout! // In other browsers it only includes elements with position absolute, relative or // fixed, not elements with overflow set to auto or scroll. // if (UA.ie && ieMode < 8) { // return element.offsetParent; // } // 统一的 offsetParent 方法 var doc = utils.getDocument(element); var body = doc.body; var parent; var positionStyle = utils.css(element, 'position'); var skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute'; if (!skipStatic) { return element.nodeName.toLowerCase() === 'html' ? null : getParent(element); } for (parent = getParent(element); parent && parent !== body && parent.nodeType !== 9; parent = getParent(parent)) { positionStyle = utils.css(parent, 'position'); if (positionStyle !== 'static') { return parent; } } return null; } var getParent$1 = utils.getParent; function isAncestorFixed(element) { if (utils.isWindow(element) || element.nodeType === 9) { return false; } var doc = utils.getDocument(element); var body = doc.body; var parent = null; for (parent = getParent$1(element); parent && parent !== body; parent = getParent$1(parent)) { var positionStyle = utils.css(parent, 'position'); if (positionStyle === 'fixed') { return true; } } return false; } /** * 获得元素的显示部分的区域 */ function getVisibleRectForElement(element) { var visibleRect = { left: 0, right: Infinity, top: 0, bottom: Infinity }; var el = getOffsetParent(element); var doc = utils.getDocument(element); var win = doc.defaultView || doc.parentWindow; var body = doc.body; var documentElement = doc.documentElement; // Determine the size of the visible rect by climbing the dom accounting for // all scrollable containers. while (el) { // clientWidth is zero for inline block elements in ie. if ((navigator.userAgent.indexOf('MSIE') === -1 || el.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire // viewport. In some browsers, el.offsetParent may be // document.documentElement, so check for that too. el !== body && el !== documentElement && utils.css(el, 'overflow') !== 'visible') { var pos = utils.offset(el); // add border pos.left += el.clientLeft; pos.top += el.clientTop; visibleRect.top = Math.max(visibleRect.top, pos.top); visibleRect.right = Math.min(visibleRect.right, // consider area without scrollBar pos.left + el.clientWidth); visibleRect.bottom = Math.min(visibleRect.bottom, pos.top + el.clientHeight); visibleRect.left = Math.max(visibleRect.left, pos.left); } else if (el === body || el === documentElement) { break; } el = getOffsetParent(el); } // Set element position to fixed // make sure absolute element itself don't affect it's visible area // https://github.com/ant-design/ant-design/issues/7601 var originalPosition = null; if (!utils.isWindow(element) && element.nodeType !== 9) { originalPosition = element.style.position; var position = utils.css(element, 'position'); if (position === 'absolute') { element.style.position = 'fixed'; } } var scrollX = utils.getWindowScrollLeft(win); var scrollY = utils.getWindowScrollTop(win); var viewportWidth = utils.viewportWidth(win); var viewportHeight = utils.viewportHeight(win); var documentWidth = documentElement.scrollWidth; var documentHeight = documentElement.scrollHeight; // scrollXXX on html is sync with body which means overflow: hidden on body gets wrong scrollXXX. // We should cut this ourself. var bodyStyle = window.getComputedStyle(body); if (bodyStyle.overflowX === 'hidden') { documentWidth = win.innerWidth; } if (bodyStyle.overflowY === 'hidden') { documentHeight = win.innerHeight; } // Reset element position after calculate the visible area if (element.style) { element.style.position = originalPosition; } if (isAncestorFixed(element)) { // Clip by viewport's size. visibleRect.left = Math.max(visibleRect.left, scrollX); visibleRect.top = Math.max(visibleRect.top, scrollY); visibleRect.right = Math.min(visibleRect.right, scrollX + viewportWidth); visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + viewportHeight); } else { // Clip by document's size. var maxVisibleWidth = Math.max(documentWidth, scrollX + viewportWidth); visibleRect.right = Math.min(visibleRect.right, maxVisibleWidth); var maxVisibleHeight = Math.max(documentHeight, scrollY + viewportHeight); visibleRect.bottom = Math.min(visibleRect.bottom, maxVisibleHeight); } return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null; } function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) { var pos = utils.clone(elFuturePos); var size = { width: elRegion.width, height: elRegion.height }; if (overflow.adjustX && pos.left < visibleRect.left) { pos.left = visibleRect.left; } // Left edge inside and right edge outside viewport, try to resize it. if (overflow.resizeWidth && pos.left >= visibleRect.left && pos.left + size.width > visibleRect.right) { size.width -= pos.left + size.width - visibleRect.right; } // Right edge outside viewport, try to move it. if (overflow.adjustX && pos.left + size.width > visibleRect.right) { // 保证左边界和可视区域左边界对齐 pos.left = Math.max(visibleRect.right - size.width, visibleRect.left); } // Top edge outside viewport, try to move it. if (overflow.adjustY && pos.top < visibleRect.top) { pos.top = visibleRect.top; } // Top edge inside and bottom edge outside viewport, try to resize it. if (overflow.resizeHeight && pos.top >= visibleRect.top && pos.top + size.height > visibleRect.bottom) { size.height -= pos.top + size.height - visibleRect.bottom; } // Bottom edge outside viewport, try to move it. if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) { // 保证上边界和可视区域上边界对齐 pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top); } return utils.mix(pos, size); } function getRegion(node) { var offset; var w; var h; if (!utils.isWindow(node) && node.nodeType !== 9) { offset = utils.offset(node); w = utils.outerWidth(node); h = utils.outerHeight(node); } else { var win = utils.getWindow(node); offset = { left: utils.getWindowScrollLeft(win), top: utils.getWindowScrollTop(win) }; w = utils.viewportWidth(win); h = utils.viewportHeight(win); } offset.width = w; offset.height = h; return offset; } /** * 获取 node 上的 align 对齐点 相对于页面的坐标 */ function getAlignOffset(region, align) { var V = align.charAt(0); var H = align.charAt(1); var w = region.width; var h = region.height; var x = region.left; var y = region.top; if (V === 'c') { y += h / 2; } else if (V === 'b') { y += h; } if (H === 'c') { x += w / 2; } else if (H === 'r') { x += w; } return { left: x, top: y }; } function getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) { var p1 = getAlignOffset(refNodeRegion, points[1]); var p2 = getAlignOffset(elRegion, points[0]); var diff = [p2.left - p1.left, p2.top - p1.top]; return { left: Math.round(elRegion.left - diff[0] + offset[0] - targetOffset[0]), top: Math.round(elRegion.top - diff[1] + offset[1] - targetOffset[1]) }; } /** * align dom node flexibly * @author yiminghe@gmail.com */ function isFailX(elFuturePos, elRegion, visibleRect) { return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right; } function isFailY(elFuturePos, elRegion, visibleRect) { return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom; } function isCompleteFailX(elFuturePos, elRegion, visibleRect) { return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left; } function isCompleteFailY(elFuturePos, elRegion, visibleRect) { return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top; } function flip(points, reg, map) { var ret = []; utils.each(points, function (p) { ret.push(p.replace(reg, function (m) { return map[m]; })); }); return ret; } function flipOffset(offset, index) { offset[index] = -offset[index]; return offset; } function convertOffset(str, offsetLen) { var n; if (/%$/.test(str)) { n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen; } else { n = parseInt(str, 10); } return n || 0; } function normalizeOffset(offset, el) { offset[0] = convertOffset(offset[0], el.width); offset[1] = convertOffset(offset[1], el.height); } /** * @param el * @param tgtRegion 参照节点所占的区域: { left, top, width, height } * @param align */ function doAlign(el, tgtRegion, align, isTgtRegionVisible) { var points = align.points; var offset = align.offset || [0, 0]; var targetOffset = align.targetOffset || [0, 0]; var overflow = align.overflow; var source = align.source || el; offset = [].concat(offset); targetOffset = [].concat(targetOffset); overflow = overflow || {}; var newOverflowCfg = {}; var fail = 0; // 当前节点可以被放置的显示区域 var visibleRect = getVisibleRectForElement(source); // 当前节点所占的区域, left/top/width/height var elRegion = getRegion(source); // 将 offset 转换成数值,支持百分比 normalizeOffset(offset, elRegion); normalizeOffset(targetOffset, tgtRegion); // 当前节点将要被放置的位置 var elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset); // 当前节点将要所处的区域 var newElRegion = utils.merge(elRegion, elFuturePos); // 如果可视区域不能完全放置当前节点时允许调整 if (visibleRect && (overflow.adjustX || overflow.adjustY) && isTgtRegionVisible) { if (overflow.adjustX) { // 如果横向不能放下 if (isFailX(elFuturePos, elRegion, visibleRect)) { // 对齐位置反下 var newPoints = flip(points, /[lr]/gi, { l: 'r', r: 'l' }); // 偏移量也反下 var newOffset = flipOffset(offset, 0); var newTargetOffset = flipOffset(targetOffset, 0); var newElFuturePos = getElFuturePos(elRegion, tgtRegion, newPoints, newOffset, newTargetOffset); if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) { fail = 1; points = newPoints; offset = newOffset; targetOffset = newTargetOffset; } } } if (overflow.adjustY) { // 如果纵向不能放下 if (isFailY(elFuturePos, elRegion, visibleRect)) { // 对齐位置反下 var _newPoints = flip(points, /[tb]/gi, { t: 'b', b: 't' }); // 偏移量也反下 var _newOffset = flipOffset(offset, 1); var _newTargetOffset = flipOffset(targetOffset, 1); var _newElFuturePos = getElFuturePos(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset); if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) { fail = 1; points = _newPoints; offset = _newOffset; targetOffset = _newTargetOffset; } } } // 如果失败,重新计算当前节点将要被放置的位置 if (fail) { elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset); utils.mix(newElRegion, elFuturePos); } var isStillFailX = isFailX(elFuturePos, elRegion, visibleRect); var isStillFailY = isFailY(elFuturePos, elRegion, visibleRect); // 检查反下后的位置是否可以放下了,如果仍然放不下: // 1. 复原修改过的定位参数 if (isStillFailX || isStillFailY) { points = align.points; offset = align.offset || [0, 0]; targetOffset = align.targetOffset || [0, 0]; } // 2. 只有指定了可以调整当前方向才调整 newOverflowCfg.adjustX = overflow.adjustX && isStillFailX; newOverflowCfg.adjustY = overflow.adjustY && isStillFailY; // 确实要调整,甚至可能会调整高度宽度 if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) { newElRegion = adjustForViewport(elFuturePos, elRegion, visibleRect, newOverflowCfg); } } // need judge to in case set fixed with in css on height auto element if (newElRegion.width !== elRegion.width) { utils.css(source, 'width', utils.width(source) + newElRegion.width - elRegion.width); } if (newElRegion.height !== elRegion.height) { utils.css(source, 'height', utils.height(source) + newElRegion.height - elRegion.height); } // https://github.com/kissyteam/kissy/issues/190 // 相对于屏幕位置没变,而 left/top 变了 // 例如
utils.offset(source, { left: newElRegion.left, top: newElRegion.top }, { useCssRight: align.useCssRight, useCssBottom: align.useCssBottom, useCssTransform: align.useCssTransform, ignoreShake: align.ignoreShake }); return { points: points, offset: offset, targetOffset: targetOffset, overflow: newOverflowCfg }; } /** * 2012-04-26 yiminghe@gmail.com * - 优化智能对齐算法 * - 慎用 resizeXX * * 2011-07-13 yiminghe@gmail.com note: * - 增加智能对齐,以及大小调整选项 **/ function isOutOfVisibleRect(target) { var visibleRect = getVisibleRectForElement(target); var targetRegion = getRegion(target); return !visibleRect || targetRegion.left + targetRegion.width <= visibleRect.left || targetRegion.top + targetRegion.height <= visibleRect.top || targetRegion.left >= visibleRect.right || targetRegion.top >= visibleRect.bottom; } function alignElement(el, refNode, align) { var target = align.target || refNode; var refNodeRegion = getRegion(target); var isTargetNotOutOfVisible = !isOutOfVisibleRect(target); return doAlign(el, refNodeRegion, align, isTargetNotOutOfVisible); } alignElement.__getOffsetParent = getOffsetParent; alignElement.__getVisibleRectForElement = getVisibleRectForElement; /** * `tgtPoint`: { pageX, pageY } or { clientX, clientY }. * If client position provided, will internal convert to page position. */ function alignPoint(el, tgtPoint, align) { var pageX; var pageY; var doc = utils.getDocument(el); var win = doc.defaultView || doc.parentWindow; var scrollX = utils.getWindowScrollLeft(win); var scrollY = utils.getWindowScrollTop(win); var viewportWidth = utils.viewportWidth(win); var viewportHeight = utils.viewportHeight(win); if ('pageX' in tgtPoint) { pageX = tgtPoint.pageX; } else { pageX = scrollX + tgtPoint.clientX; } if ('pageY' in tgtPoint) { pageY = tgtPoint.pageY; } else { pageY = scrollY + tgtPoint.clientY; } var tgtRegion = { left: pageX, top: pageY, width: 0, height: 0 }; var pointInView = pageX >= 0 && pageX <= scrollX + viewportWidth && pageY >= 0 && pageY <= scrollY + viewportHeight; // Provide default target point var points = [align.points[0], 'cc']; return doAlign(el, tgtRegion, _objectSpread2({}, align, { points: points }), pointInView); } /* harmony default export */ __webpack_exports__["default"] = (alignElement); //# sourceMappingURL=index.js.map /***/ }), /***/ "./node_modules/is-arrayish/index.js": /*!*******************************************!*\ !*** ./node_modules/is-arrayish/index.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function isArrayish(obj) { if (!obj || typeof obj === 'string') { return false; } return obj instanceof Array || Array.isArray(obj) || (obj.length >= 0 && (obj.splice instanceof Function || (Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String'))); }; /***/ }), /***/ "./node_modules/is-what/dist/index.esm.js": /*!************************************************!*\ !*** ./node_modules/is-what/dist/index.esm.js ***! \************************************************/ /*! exports provided: getType, isUndefined, isNull, isPlainObject, isObject, isAnyObject, isObjectLike, isFunction, isArray, isString, isFullString, isEmptyString, isNumber, isBoolean, isRegExp, isDate, isSymbol, isPrimitive, isType */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getType", function() { return getType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUndefined", function() { return isUndefined; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNull", function() { return isNull; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlainObject", function() { return isPlainObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isAnyObject", function() { return isAnyObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObjectLike", function() { return isObjectLike; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isString", function() { return isString; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFullString", function() { return isFullString; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmptyString", function() { return isEmptyString; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumber", function() { return isNumber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBoolean", function() { return isBoolean; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRegExp", function() { return isRegExp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSymbol", function() { return isSymbol; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPrimitive", function() { return isPrimitive; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isType", function() { return isType; }); /** * Returns the object type of the given payload * * @param {*} payload * @returns {string} */ function getType(payload) { return Object.prototype.toString.call(payload).slice(8, -1); } /** * Returns whether the payload is undefined * * @param {*} payload * @returns {payload is undefined} */ function isUndefined(payload) { return getType(payload) === 'Undefined'; } /** * Returns whether the payload is null * * @param {*} payload * @returns {payload is null} */ function isNull(payload) { return getType(payload) === 'Null'; } /** * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes) * * @param {*} payload * @returns {payload is {[key: string]: any}} */ function isPlainObject(payload) { if (getType(payload) !== 'Object') return false; return (payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype); } /** * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes) * * @param {*} payload * @returns {payload is {[key: string]: any}} */ function isObject(payload) { return isPlainObject(payload); } /** * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes) * * @param {*} payload * @returns {payload is {[key: string]: any}} */ function isAnyObject(payload) { return getType(payload) === 'Object'; } /** * Returns whether the payload is an object like a type passed in < > * * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop. * * @template T this must be passed in < > * @param {*} payload * @returns {payload is T} */ function isObjectLike(payload) { return isAnyObject(payload); } /** * Returns whether the payload is a function * * @param {*} payload * @returns {payload is Function} */ function isFunction(payload) { return getType(payload) === 'Function'; } /** * Returns whether the payload is an array * * @param {*} payload * @returns {payload is undefined} */ function isArray(payload) { return getType(payload) === 'Array'; } /** * Returns whether the payload is a string * * @param {*} payload * @returns {payload is string} */ function isString(payload) { return getType(payload) === 'String'; } /** * Returns whether the payload is a string, BUT returns false for '' * * @param {*} payload * @returns {payload is string} */ function isFullString(payload) { return isString(payload) && payload !== ''; } /** * Returns whether the payload is '' * * @param {*} payload * @returns {payload is string} */ function isEmptyString(payload) { return payload === ''; } /** * Returns whether the payload is a number * * This will return false for NaN * * @param {*} payload * @returns {payload is number} */ function isNumber(payload) { return (getType(payload) === 'Number' && !isNaN(payload)); } /** * Returns whether the payload is a boolean * * @param {*} payload * @returns {payload is boolean} */ function isBoolean(payload) { return getType(payload) === 'Boolean'; } /** * Returns whether the payload is a regular expression * * @param {*} payload * @returns {payload is RegExp} */ function isRegExp(payload) { return getType(payload) === 'RegExp'; } /** * Returns whether the payload is a date, and that the date is Valid * * @param {*} payload * @returns {payload is Date} */ function isDate(payload) { return (getType(payload) === 'Date' && !isNaN(payload)); } /** * Returns whether the payload is a Symbol * * @param {*} payload * @returns {payload is symbol} */ function isSymbol(payload) { return (getType(payload) === 'Symbol'); } /** * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol) * * @param {*} payload * @returns {(payload is boolean | null | undefined | number | string | symbol)} */ function isPrimitive(payload) { return (isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload)); } /** * Does a generic check to check that the given payload is of a given type. * In cases like Number, it will return true for NaN as NaN is a Number (thanks javascript!); * It will, however, differentiate between object and null * * @template T * @param {*} payload * @param {T} type * @throws {TypeError} Will throw type error if type is an invalid type * @returns {payload is T} */ function isType(payload, type) { if (!(type instanceof Function)) { throw new TypeError('Type must be a function'); } if (!type.hasOwnProperty('prototype')) { throw new TypeError('Type is not a class'); } // Classes usually have names (as functions usually have names) var name = type.name; return (getType(payload) === name) || Boolean(payload && (payload.constructor === type)); } /***/ }), /***/ "./node_modules/memoize-one/dist/memoize-one.esm.js": /*!**********************************************************!*\ !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function areInputsEqual(newInputs, lastInputs) { if (newInputs.length !== lastInputs.length) { return false; } for (var i = 0; i < newInputs.length; i++) { if (newInputs[i] !== lastInputs[i]) { return false; } } return true; } function memoizeOne(resultFn, isEqual) { if (isEqual === void 0) { isEqual = areInputsEqual; } var lastThis; var lastArgs = []; var lastResult; var calledOnce = false; function memoized() { var newArgs = []; for (var _i = 0; _i < arguments.length; _i++) { newArgs[_i] = arguments[_i]; } if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) { return lastResult; } lastResult = resultFn.apply(this, newArgs); calledOnce = true; lastThis = this; lastArgs = newArgs; return lastResult; } return memoized; } /* harmony default export */ __webpack_exports__["default"] = (memoizeOne); /***/ }), /***/ "./node_modules/merge-anything/dist/index.esm.js": /*!*******************************************************!*\ !*** ./node_modules/merge-anything/dist/index.esm.js ***! \*******************************************************/ /*! exports provided: default, merge, concatArrays */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatArrays", function() { return concatArrays; }); /* harmony import */ var is_what__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-what */ "./node_modules/is-what/dist/index.esm.js"); function assignProp(carry, key, newVal, originalObject) { var propType = originalObject.propertyIsEnumerable(key) ? 'enumerable' : 'nonenumerable'; if (propType === 'enumerable') carry[key] = newVal; if (propType === 'nonenumerable') { Object.defineProperty(carry, key, { value: newVal, enumerable: false, writable: true, configurable: true }); } } function mergeRecursively(origin, newComer, extensions) { // work directly on newComer if its not an object if (!Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isPlainObject"])(newComer)) { // extend merge rules if (extensions && Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isArray"])(extensions)) { extensions.forEach(function (extend) { newComer = extend(origin, newComer); }); } return newComer; } // define newObject to merge all values upon var newObject = {}; if (Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isPlainObject"])(origin)) { var props_1 = Object.getOwnPropertyNames(origin); var symbols_1 = Object.getOwnPropertySymbols(origin); newObject = props_1.concat(symbols_1).reduce(function (carry, key) { // @ts-ignore var targetVal = origin[key]; if ((!Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isSymbol"])(key) && !Object.getOwnPropertyNames(newComer).includes(key)) || (Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isSymbol"])(key) && !Object.getOwnPropertySymbols(newComer).includes(key))) { assignProp(carry, key, targetVal, origin); } return carry; }, {}); } var props = Object.getOwnPropertyNames(newComer); var symbols = Object.getOwnPropertySymbols(newComer); var result = props.concat(symbols).reduce(function (carry, key) { // re-define the origin and newComer as targetVal and newVal var newVal = newComer[key]; var targetVal = (Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isPlainObject"])(origin)) // @ts-ignore ? origin[key] : undefined; // extend merge rules if (extensions && Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isArray"])(extensions)) { extensions.forEach(function (extend) { newVal = extend(targetVal, newVal); }); } // When newVal is an object do the merge recursively if (targetVal !== undefined && Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isPlainObject"])(newVal)) { newVal = mergeRecursively(targetVal, newVal, extensions); } assignProp(carry, key, newVal, newComer); return carry; }, newObject); return result; } /** * Merge anything recursively. * Objects get merged, special objects (classes etc.) are re-assigned "as is". * Basic types overwrite objects or other basic types. * * @param {(IConfig | any)} origin * @param {...any[]} newComers * @returns the result */ function merge(origin) { var newComers = []; for (var _i = 1; _i < arguments.length; _i++) { newComers[_i - 1] = arguments[_i]; } var extensions = null; var base = origin; if (Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isPlainObject"])(origin) && origin.extensions && Object.keys(origin).length === 1) { base = {}; extensions = origin.extensions; } return newComers.reduce(function (result, newComer) { return mergeRecursively(result, newComer, extensions); }, base); } function concatArrays(originVal, newVal) { if (Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isArray"])(originVal) && Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isArray"])(newVal)) { // concat logic return originVal.concat(newVal); } return newVal; // always return newVal as fallback!! } /* harmony default export */ __webpack_exports__["default"] = (merge); /***/ }), /***/ "./node_modules/nipplejs/dist/nipplejs.js": /*!************************************************!*\ !*** ./node_modules/nipplejs/dist/nipplejs.js ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { (function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports; 'use strict'; // Constants var isTouch = !!('ontouchstart' in window); var isPointer = window.PointerEvent ? true : false; var isMSPointer = window.MSPointerEvent ? true : false; var events = { touch: { start: 'touchstart', move: 'touchmove', end: 'touchend, touchcancel' }, mouse: { start: 'mousedown', move: 'mousemove', end: 'mouseup' }, pointer: { start: 'pointerdown', move: 'pointermove', end: 'pointerup, pointercancel' }, MSPointer: { start: 'MSPointerDown', move: 'MSPointerMove', end: 'MSPointerUp' } }; var toBind; var secondBind = {}; if (isPointer) { toBind = events.pointer; } else if (isMSPointer) { toBind = events.MSPointer; } else if (isTouch) { toBind = events.touch; secondBind = events.mouse; } else { toBind = events.mouse; } /////////////////////// /// UTILS /// /////////////////////// var u = {}; u.distance = function (p1, p2) { var dx = p2.x - p1.x; var dy = p2.y - p1.y; return Math.sqrt((dx * dx) + (dy * dy)); }; u.angle = function(p1, p2) { var dx = p2.x - p1.x; var dy = p2.y - p1.y; return u.degrees(Math.atan2(dy, dx)); }; u.findCoord = function(p, d, a) { var b = {x: 0, y: 0}; a = u.radians(a); b.x = p.x - d * Math.cos(a); b.y = p.y - d * Math.sin(a); return b; }; u.radians = function(a) { return a * (Math.PI / 180); }; u.degrees = function(a) { return a * (180 / Math.PI); }; u.bindEvt = function (el, arg, handler) { var types = arg.split(/[ ,]+/g); var type; for (var i = 0; i < types.length; i += 1) { type = types[i]; if (el.addEventListener) { el.addEventListener(type, handler, false); } else if (el.attachEvent) { el.attachEvent(type, handler); } } }; u.unbindEvt = function (el, arg, handler) { var types = arg.split(/[ ,]+/g); var type; for (var i = 0; i < types.length; i += 1) { type = types[i]; if (el.removeEventListener) { el.removeEventListener(type, handler); } else if (el.detachEvent) { el.detachEvent(type, handler); } } }; u.trigger = function (el, type, data) { var evt = new CustomEvent(type, data); el.dispatchEvent(evt); }; u.prepareEvent = function (evt) { evt.preventDefault(); return evt.type.match(/^touch/) ? evt.changedTouches : evt; }; u.getScroll = function () { var x = (window.pageXOffset !== undefined) ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body) .scrollLeft; var y = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body) .scrollTop; return { x: x, y: y }; }; u.applyPosition = function (el, pos) { if (pos.top || pos.right || pos.bottom || pos.left) { el.style.top = pos.top; el.style.right = pos.right; el.style.bottom = pos.bottom; el.style.left = pos.left; } else { el.style.left = pos.x + 'px'; el.style.top = pos.y + 'px'; } }; u.getTransitionStyle = function (property, values, time) { var obj = u.configStylePropertyObject(property); for (var i in obj) { if (obj.hasOwnProperty(i)) { if (typeof values === 'string') { obj[i] = values + ' ' + time; } else { var st = ''; for (var j = 0, max = values.length; j < max; j += 1) { st += values[j] + ' ' + time + ', '; } obj[i] = st.slice(0, -2); } } } return obj; }; u.getVendorStyle = function (property, value) { var obj = u.configStylePropertyObject(property); for (var i in obj) { if (obj.hasOwnProperty(i)) { obj[i] = value; } } return obj; }; u.configStylePropertyObject = function (prop) { var obj = {}; obj[prop] = ''; var vendors = ['webkit', 'Moz', 'o']; vendors.forEach(function (vendor) { obj[vendor + prop.charAt(0).toUpperCase() + prop.slice(1)] = ''; }); return obj; }; u.extend = function (objA, objB) { for (var i in objB) { if (objB.hasOwnProperty(i)) { objA[i] = objB[i]; } } return objA; }; // Overwrite only what's already present u.safeExtend = function (objA, objB) { var obj = {}; for (var i in objA) { if (objA.hasOwnProperty(i) && objB.hasOwnProperty(i)) { obj[i] = objB[i]; } else if (objA.hasOwnProperty(i)) { obj[i] = objA[i]; } } return obj; }; // Map for array or unique item. u.map = function (ar, fn) { if (ar.length) { for (var i = 0, max = ar.length; i < max; i += 1) { fn(ar[i]); } } else { fn(ar); } }; /////////////////////// /// SUPER CLASS /// /////////////////////// function Super () {}; // Basic event system. Super.prototype.on = function (arg, cb) { var self = this; var types = arg.split(/[ ,]+/g); var type; self._handlers_ = self._handlers_ || {}; for (var i = 0; i < types.length; i += 1) { type = types[i]; self._handlers_[type] = self._handlers_[type] || []; self._handlers_[type].push(cb); } return self; }; Super.prototype.off = function (type, cb) { var self = this; self._handlers_ = self._handlers_ || {}; if (type === undefined) { self._handlers_ = {}; } else if (cb === undefined) { self._handlers_[type] = null; } else if (self._handlers_[type] && self._handlers_[type].indexOf(cb) >= 0) { self._handlers_[type].splice(self._handlers_[type].indexOf(cb), 1); } return self; }; Super.prototype.trigger = function (arg, data) { var self = this; var types = arg.split(/[ ,]+/g); var type; self._handlers_ = self._handlers_ || {}; for (var i = 0; i < types.length; i += 1) { type = types[i]; if (self._handlers_[type] && self._handlers_[type].length) { self._handlers_[type].forEach(function (handler) { handler.call(self, { type: type, target: self }, data); }); } } }; // Configuration Super.prototype.config = function (options) { var self = this; self.options = self.defaults || {}; if (options) { self.options = u.safeExtend(self.options, options); } }; // Bind internal events. Super.prototype.bindEvt = function (el, type) { var self = this; self._domHandlers_ = self._domHandlers_ || {}; self._domHandlers_[type] = function () { if (typeof self['on' + type] === 'function') { self['on' + type].apply(self, arguments); } else { console.warn('[WARNING] : Missing "on' + type + '" handler.'); } }; u.bindEvt(el, toBind[type], self._domHandlers_[type]); if (secondBind[type]) { // Support for both touch and mouse at the same time. u.bindEvt(el, secondBind[type], self._domHandlers_[type]); } return self; }; // Unbind dom events. Super.prototype.unbindEvt = function (el, type) { var self = this; self._domHandlers_ = self._domHandlers_ || {}; u.unbindEvt(el, toBind[type], self._domHandlers_[type]); if (secondBind[type]) { // Support for both touch and mouse at the same time. u.unbindEvt(el, secondBind[type], self._domHandlers_[type]); } delete self._domHandlers_[type]; return this; }; /////////////////////// /// THE NIPPLE /// /////////////////////// function Nipple (collection, options) { this.identifier = options.identifier; this.position = options.position; this.frontPosition = options.frontPosition; this.collection = collection; // Defaults this.defaults = { size: 100, threshold: 0.1, color: 'white', fadeTime: 250, dataOnly: false, restJoystick: true, restOpacity: 0.5, mode: 'dynamic', zone: document.body, lockX: false, lockY: false }; this.config(options); // Overwrites if (this.options.mode === 'dynamic') { this.options.restOpacity = 0; } this.id = Nipple.id; Nipple.id += 1; this.buildEl() .stylize(); // Nipple's API. this.instance = { el: this.ui.el, on: this.on.bind(this), off: this.off.bind(this), show: this.show.bind(this), hide: this.hide.bind(this), add: this.addToDom.bind(this), remove: this.removeFromDom.bind(this), destroy: this.destroy.bind(this), resetDirection: this.resetDirection.bind(this), computeDirection: this.computeDirection.bind(this), trigger: this.trigger.bind(this), position: this.position, frontPosition: this.frontPosition, ui: this.ui, identifier: this.identifier, id: this.id, options: this.options }; return this.instance; }; Nipple.prototype = new Super(); Nipple.constructor = Nipple; Nipple.id = 0; // Build the dom element of the Nipple instance. Nipple.prototype.buildEl = function (options) { this.ui = {}; if (this.options.dataOnly) { return this; } this.ui.el = document.createElement('div'); this.ui.back = document.createElement('div'); this.ui.front = document.createElement('div'); this.ui.el.className = 'nipple collection_' + this.collection.id; this.ui.back.className = 'back'; this.ui.front.className = 'front'; this.ui.el.setAttribute('id', 'nipple_' + this.collection.id + '_' + this.id); this.ui.el.appendChild(this.ui.back); this.ui.el.appendChild(this.ui.front); return this; }; // Apply CSS to the Nipple instance. Nipple.prototype.stylize = function () { if (this.options.dataOnly) { return this; } var animTime = this.options.fadeTime + 'ms'; var borderStyle = u.getVendorStyle('borderRadius', '50%'); var transitStyle = u.getTransitionStyle('transition', 'opacity', animTime); var styles = {}; styles.el = { position: 'absolute', opacity: this.options.restOpacity, display: 'block', 'zIndex': 999 }; styles.back = { position: 'absolute', display: 'block', width: this.options.size + 'px', height: this.options.size + 'px', marginLeft: -this.options.size / 2 + 'px', marginTop: -this.options.size / 2 + 'px', background: this.options.color, 'opacity': '.5' }; styles.front = { width: this.options.size / 2 + 'px', height: this.options.size / 2 + 'px', position: 'absolute', display: 'block', marginLeft: -this.options.size / 4 + 'px', marginTop: -this.options.size / 4 + 'px', background: this.options.color, 'opacity': '.5' }; u.extend(styles.el, transitStyle); u.extend(styles.back, borderStyle); u.extend(styles.front, borderStyle); this.applyStyles(styles); return this; }; Nipple.prototype.applyStyles = function (styles) { // Apply styles for (var i in this.ui) { if (this.ui.hasOwnProperty(i)) { for (var j in styles[i]) { this.ui[i].style[j] = styles[i][j]; } } } return this; }; // Inject the Nipple instance into DOM. Nipple.prototype.addToDom = function () { // We're not adding it if we're dataOnly or already in dom. if (this.options.dataOnly || document.body.contains(this.ui.el)) { return this; } this.options.zone.appendChild(this.ui.el); return this; }; // Remove the Nipple instance from DOM. Nipple.prototype.removeFromDom = function () { if (this.options.dataOnly || !document.body.contains(this.ui.el)) { return this; } this.options.zone.removeChild(this.ui.el); return this; }; // Entirely destroy this nipple Nipple.prototype.destroy = function () { clearTimeout(this.removeTimeout); clearTimeout(this.showTimeout); clearTimeout(this.restTimeout); this.trigger('destroyed', this.instance); this.removeFromDom(); this.off(); }; // Fade in the Nipple instance. Nipple.prototype.show = function (cb) { var self = this; if (self.options.dataOnly) { return self; } clearTimeout(self.removeTimeout); clearTimeout(self.showTimeout); clearTimeout(self.restTimeout); self.addToDom(); self.restCallback(); setTimeout(function () { self.ui.el.style.opacity = 1; }, 0); self.showTimeout = setTimeout(function () { self.trigger('shown', self.instance); if (typeof cb === 'function') { cb.call(this); } }, self.options.fadeTime); return self; }; // Fade out the Nipple instance. Nipple.prototype.hide = function (cb) { var self = this; if (self.options.dataOnly) { return self; } self.ui.el.style.opacity = self.options.restOpacity; clearTimeout(self.removeTimeout); clearTimeout(self.showTimeout); clearTimeout(self.restTimeout); self.removeTimeout = setTimeout( function () { var display = self.options.mode === 'dynamic' ? 'none' : 'block'; self.ui.el.style.display = display; if (typeof cb === 'function') { cb.call(self); } self.trigger('hidden', self.instance); }, self.options.fadeTime ); if (self.options.restJoystick) { self.restPosition(); } return self; }; Nipple.prototype.restPosition = function (cb) { var self = this; self.frontPosition = { x: 0, y: 0 }; var animTime = self.options.fadeTime + 'ms'; var transitStyle = {}; transitStyle.front = u.getTransitionStyle('transition', ['top', 'left'], animTime); var styles = {front: {}}; styles.front = { left: self.frontPosition.x + 'px', top: self.frontPosition.y + 'px' }; self.applyStyles(transitStyle); self.applyStyles(styles); self.restTimeout = setTimeout( function () { if (typeof cb === 'function') { cb.call(self); } self.restCallback(); }, self.options.fadeTime ); }; Nipple.prototype.restCallback = function () { var self = this; var transitStyle = {}; transitStyle.front = u.getTransitionStyle('transition', 'none', ''); self.applyStyles(transitStyle); self.trigger('rested', self.instance); }; Nipple.prototype.resetDirection = function () { // Fully rebuild the object to let the iteration possible. this.direction = { x: false, y: false, angle: false }; }; Nipple.prototype.computeDirection = function (obj) { var rAngle = obj.angle.radian; var angle45 = Math.PI / 4; var angle90 = Math.PI / 2; var direction, directionX, directionY; // Angular direction // \ UP / // \ / // LEFT RIGHT // / \ // /DOWN \ // if ( rAngle > angle45 && rAngle < (angle45 * 3) && !obj.lockX ) { direction = 'up'; } else if ( rAngle > -angle45 && rAngle <= angle45 && !obj.lockY ) { direction = 'left'; } else if ( rAngle > (-angle45 * 3) && rAngle <= -angle45 && !obj.lockX ) { direction = 'down'; } else if (!obj.lockY) { direction = 'right'; } // Plain direction // UP | // _______ | RIGHT // LEFT | // DOWN | if (!obj.lockY) { if (rAngle > -angle90 && rAngle < angle90) { directionX = 'left'; } else { directionX = 'right'; } } if (!obj.lockX) { if (rAngle > 0) { directionY = 'up'; } else { directionY = 'down'; } } if (obj.force > this.options.threshold) { var oldDirection = {}; for (var i in this.direction) { if (this.direction.hasOwnProperty(i)) { oldDirection[i] = this.direction[i]; } } var same = {}; this.direction = { x: directionX, y: directionY, angle: direction }; obj.direction = this.direction; for (var i in oldDirection) { if (oldDirection[i] === this.direction[i]) { same[i] = true; } } // If all 3 directions are the same, we don't trigger anything. if (same.x && same.y && same.angle) { return obj; } if (!same.x || !same.y) { this.trigger('plain', obj); } if (!same.x) { this.trigger('plain:' + directionX, obj); } if (!same.y) { this.trigger('plain:' + directionY, obj); } if (!same.angle) { this.trigger('dir dir:' + direction, obj); } } return obj; }; /* global Nipple, Super */ /////////////////////////// /// THE COLLECTION /// /////////////////////////// function Collection (manager, options) { var self = this; self.nipples = []; self.idles = []; self.actives = []; self.ids = []; self.pressureIntervals = {}; self.manager = manager; self.id = Collection.id; Collection.id += 1; // Defaults self.defaults = { zone: document.body, multitouch: false, maxNumberOfNipples: 10, mode: 'dynamic', position: {top: 0, left: 0}, catchDistance: 200, size: 100, threshold: 0.1, color: 'white', fadeTime: 250, dataOnly: false, restJoystick: true, restOpacity: 0.5, lockX: false, lockY: false }; self.config(options); // Overwrites if (self.options.mode === 'static' || self.options.mode === 'semi') { self.options.multitouch = false; } if (!self.options.multitouch) { self.options.maxNumberOfNipples = 1; } self.updateBox(); self.prepareNipples(); self.bindings(); self.begin(); return self.nipples; } Collection.prototype = new Super(); Collection.constructor = Collection; Collection.id = 0; Collection.prototype.prepareNipples = function () { var self = this; var nips = self.nipples; // Public API Preparation. nips.on = self.on.bind(self); nips.off = self.off.bind(self); nips.options = self.options; nips.destroy = self.destroy.bind(self); nips.ids = self.ids; nips.id = self.id; nips.processOnMove = self.processOnMove.bind(self); nips.processOnEnd = self.processOnEnd.bind(self); nips.get = function (id) { if (id === undefined) { return nips[0]; } for (var i = 0, max = nips.length; i < max; i += 1) { if (nips[i].identifier === id) { return nips[i]; } } return false; }; }; Collection.prototype.bindings = function () { var self = this; // Touch start event. self.bindEvt(self.options.zone, 'start'); // Avoid native touch actions (scroll, zoom etc...) on the zone. self.options.zone.style.touchAction = 'none'; self.options.zone.style.msTouchAction = 'none'; }; Collection.prototype.begin = function () { var self = this; var opts = self.options; // We place our static nipple // if needed. if (opts.mode === 'static') { var nipple = self.createNipple( opts.position, self.manager.getIdentifier() ); // Add it to the dom. nipple.add(); // Store it in idles. self.idles.push(nipple); } }; // Nipple Factory Collection.prototype.createNipple = function (position, identifier) { var self = this; var scroll = u.getScroll(); var toPutOn = {}; var opts = self.options; if (position.x && position.y) { toPutOn = { x: position.x - (scroll.x + self.box.left), y: position.y - (scroll.y + self.box.top) }; } else if ( position.top || position.right || position.bottom || position.left ) { // We need to compute the position X / Y of the joystick. var dumb = document.createElement('DIV'); dumb.style.display = 'hidden'; dumb.style.top = position.top; dumb.style.right = position.right; dumb.style.bottom = position.bottom; dumb.style.left = position.left; dumb.style.position = 'absolute'; opts.zone.appendChild(dumb); var dumbBox = dumb.getBoundingClientRect(); opts.zone.removeChild(dumb); toPutOn = position; position = { x: dumbBox.left + scroll.x, y: dumbBox.top + scroll.y }; } var nipple = new Nipple(self, { color: opts.color, size: opts.size, threshold: opts.threshold, fadeTime: opts.fadeTime, dataOnly: opts.dataOnly, restJoystick: opts.restJoystick, restOpacity: opts.restOpacity, mode: opts.mode, identifier: identifier, position: position, zone: opts.zone, frontPosition: { x: 0, y: 0 } }); if (!opts.dataOnly) { u.applyPosition(nipple.ui.el, toPutOn); u.applyPosition(nipple.ui.front, nipple.frontPosition); } self.nipples.push(nipple); self.trigger('added ' + nipple.identifier + ':added', nipple); self.manager.trigger('added ' + nipple.identifier + ':added', nipple); self.bindNipple(nipple); return nipple; }; Collection.prototype.updateBox = function () { var self = this; self.box = self.options.zone.getBoundingClientRect(); }; Collection.prototype.bindNipple = function (nipple) { var self = this; var type; // Bubble up identified events. var handler = function (evt, data) { // Identify the event type with the nipple's id. type = evt.type + ' ' + data.id + ':' + evt.type; self.trigger(type, data); }; // When it gets destroyed. nipple.on('destroyed', self.onDestroyed.bind(self)); // Other events that will get bubbled up. nipple.on('shown hidden rested dir plain', handler); nipple.on('dir:up dir:right dir:down dir:left', handler); nipple.on('plain:up plain:right plain:down plain:left', handler); }; Collection.prototype.pressureFn = function (touch, nipple, identifier) { var self = this; var previousPressure = 0; clearInterval(self.pressureIntervals[identifier]); // Create an interval that will read the pressure every 100ms self.pressureIntervals[identifier] = setInterval(function () { var pressure = touch.force || touch.pressure || touch.webkitForce || 0; if (pressure !== previousPressure) { nipple.trigger('pressure', pressure); self.trigger('pressure ' + nipple.identifier + ':pressure', pressure); previousPressure = pressure; } }.bind(self), 100); }; Collection.prototype.onstart = function (evt) { var self = this; var opts = self.options; evt = u.prepareEvent(evt); // Update the box position self.updateBox(); var process = function (touch) { // If we can create new nipples // meaning we don't have more active nipples than we should. if (self.actives.length < opts.maxNumberOfNipples) { self.processOnStart(touch); } }; u.map(evt, process); // We ask upstream to bind the document // on 'move' and 'end' self.manager.bindDocument(); return false; }; Collection.prototype.processOnStart = function (evt) { var self = this; var opts = self.options; var indexInIdles; var identifier = self.manager.getIdentifier(evt); var pressure = evt.force || evt.pressure || evt.webkitForce || 0; var position = { x: evt.pageX, y: evt.pageY }; var nipple = self.getOrCreate(identifier, position); // Update its touch identifier if (nipple.identifier !== identifier) { self.manager.removeIdentifier(nipple.identifier); } nipple.identifier = identifier; var process = function (nip) { // Trigger the start. nip.trigger('start', nip); self.trigger('start ' + nip.id + ':start', nip); nip.show(); if (pressure > 0) { self.pressureFn(evt, nip, nip.identifier); } // Trigger the first move event. self.processOnMove(evt); }; // Transfer it from idles to actives. if ((indexInIdles = self.idles.indexOf(nipple)) >= 0) { self.idles.splice(indexInIdles, 1); } // Store the nipple in the actives array self.actives.push(nipple); self.ids.push(nipple.identifier); if (opts.mode !== 'semi') { process(nipple); } else { // In semi we check the distance of the touch // to decide if we have to reset the nipple var distance = u.distance(position, nipple.position); if (distance <= opts.catchDistance) { process(nipple); } else { nipple.destroy(); self.processOnStart(evt); return; } } return nipple; }; Collection.prototype.getOrCreate = function (identifier, position) { var self = this; var opts = self.options; var nipple; // If we're in static or semi, we might already have an active. if (/(semi|static)/.test(opts.mode)) { // Get the active one. // TODO: Multi-touche for semi and static will start here. // Return the nearest one. nipple = self.idles[0]; if (nipple) { self.idles.splice(0, 1); return nipple; } if (opts.mode === 'semi') { // If we're in semi mode, we need to create one. return self.createNipple(position, identifier); } console.warn('Coudln\'t find the needed nipple.'); return false; } // In dynamic, we create a new one. nipple = self.createNipple(position, identifier); return nipple; }; Collection.prototype.processOnMove = function (evt) { var self = this; var opts = self.options; var identifier = self.manager.getIdentifier(evt); var nipple = self.nipples.get(identifier); if (!nipple) { // This is here just for safety. // It shouldn't happen. console.error('Found zombie joystick with ID ' + identifier); self.manager.removeIdentifier(identifier); return; } nipple.identifier = identifier; var size = nipple.options.size / 2; var pos = { x: evt.pageX, y: evt.pageY }; var dist = u.distance(pos, nipple.position); var angle = u.angle(pos, nipple.position); var rAngle = u.radians(angle); var force = dist / size; // If distance is bigger than nipple's size // we clamp the position. if (dist > size) { dist = size; pos = u.findCoord(nipple.position, dist, angle); } var xPosition = pos.x - nipple.position.x var yPosition = pos.y - nipple.position.y if (opts.lockX){ yPosition = 0 } if (opts.lockY) { xPosition = 0 } nipple.frontPosition = { x: xPosition, y: yPosition }; if (!opts.dataOnly) { u.applyPosition(nipple.ui.front, nipple.frontPosition); } // Prepare event's datas. var toSend = { identifier: nipple.identifier, position: pos, force: force, pressure: evt.force || evt.pressure || evt.webkitForce || 0, distance: dist, angle: { radian: rAngle, degree: angle }, instance: nipple, lockX: opts.lockX, lockY: opts.lockY }; // Compute the direction's datas. toSend = nipple.computeDirection(toSend); // Offset angles to follow units circle. toSend.angle = { radian: u.radians(180 - angle), degree: 180 - angle }; // Send everything to everyone. nipple.trigger('move', toSend); self.trigger('move ' + nipple.id + ':move', toSend); }; Collection.prototype.processOnEnd = function (evt) { var self = this; var opts = self.options; var identifier = self.manager.getIdentifier(evt); var nipple = self.nipples.get(identifier); var removedIdentifier = self.manager.removeIdentifier(nipple.identifier); if (!nipple) { return; } if (!opts.dataOnly) { nipple.hide(function () { if (opts.mode === 'dynamic') { nipple.trigger('removed', nipple); self.trigger('removed ' + nipple.id + ':removed', nipple); self.manager .trigger('removed ' + nipple.id + ':removed', nipple); nipple.destroy(); } }); } // Clear the pressure interval reader clearInterval(self.pressureIntervals[nipple.identifier]); // Reset the direciton of the nipple, to be able to trigger a new direction // on start. nipple.resetDirection(); nipple.trigger('end', nipple); self.trigger('end ' + nipple.id + ':end', nipple); // Remove identifier from our bank. if (self.ids.indexOf(nipple.identifier) >= 0) { self.ids.splice(self.ids.indexOf(nipple.identifier), 1); } // Clean our actives array. if (self.actives.indexOf(nipple) >= 0) { self.actives.splice(self.actives.indexOf(nipple), 1); } if (/(semi|static)/.test(opts.mode)) { // Transfer nipple from actives to idles // if we're in semi or static mode. self.idles.push(nipple); } else if (self.nipples.indexOf(nipple) >= 0) { // Only if we're not in semi or static mode // we can remove the instance. self.nipples.splice(self.nipples.indexOf(nipple), 1); } // We unbind move and end. self.manager.unbindDocument(); // We add back the identifier of the idle nipple; if (/(semi|static)/.test(opts.mode)) { self.manager.ids[removedIdentifier.id] = removedIdentifier.identifier; } }; // Remove destroyed nipple from the lists Collection.prototype.onDestroyed = function(evt, nipple) { var self = this; if (self.nipples.indexOf(nipple) >= 0) { self.nipples.splice(self.nipples.indexOf(nipple), 1); } if (self.actives.indexOf(nipple) >= 0) { self.actives.splice(self.actives.indexOf(nipple), 1); } if (self.idles.indexOf(nipple) >= 0) { self.idles.splice(self.idles.indexOf(nipple), 1); } if (self.ids.indexOf(nipple.identifier) >= 0) { self.ids.splice(self.ids.indexOf(nipple.identifier), 1); } // Remove the identifier from our bank self.manager.removeIdentifier(nipple.identifier); // We unbind move and end. self.manager.unbindDocument(); }; // Cleanly destroy the manager Collection.prototype.destroy = function () { var self = this; self.unbindEvt(self.options.zone, 'start'); // Destroy nipples. self.nipples.forEach(function(nipple) { nipple.destroy(); }); // Clean 3DTouch intervals. for (var i in self.pressureIntervals) { if (self.pressureIntervals.hasOwnProperty(i)) { clearInterval(self.pressureIntervals[i]); } } // Notify the manager passing the instance self.trigger('destroyed', self.nipples); // We unbind move and end. self.manager.unbindDocument(); // Unbind everything. self.off(); }; /* global u, Super, Collection */ /////////////////////// /// MANAGER /// /////////////////////// function Manager (options) { var self = this; self.ids = {}; self.index = 0; self.collections = []; self.config(options); self.prepareCollections(); // Listen for resize, to reposition every joysticks var resizeTimer; u.bindEvt(window, 'resize', function (evt) { clearTimeout(resizeTimer); resizeTimer = setTimeout(function () { var pos; var scroll = u.getScroll(); self.collections.forEach(function (collection) { collection.forEach(function (nipple) { pos = nipple.el.getBoundingClientRect(); nipple.position = { x: scroll.x + pos.left, y: scroll.y + pos.top }; }); }); }, 100); }); return self.collections; }; Manager.prototype = new Super(); Manager.constructor = Manager; Manager.prototype.prepareCollections = function () { var self = this; // Public API Preparation. self.collections.create = self.create.bind(self); // Listen to anything self.collections.on = self.on.bind(self); // Unbind general events self.collections.off = self.off.bind(self); // Destroy everything self.collections.destroy = self.destroy.bind(self); // Get any nipple self.collections.get = function (id) { var nipple; self.collections.every(function (collection) { if (nipple = collection.get(id)) { return false; } return true; }); return nipple; }; }; Manager.prototype.create = function (options) { return this.createCollection(options); }; // Collection Factory Manager.prototype.createCollection = function (options) { var self = this; var collection = new Collection(self, options); self.bindCollection(collection); self.collections.push(collection); return collection; }; Manager.prototype.bindCollection = function (collection) { var self = this; var type; // Bubble up identified events. var handler = function (evt, data) { // Identify the event type with the nipple's identifier. type = evt.type + ' ' + data.id + ':' + evt.type; self.trigger(type, data); }; // When it gets destroyed we clean. collection.on('destroyed', self.onDestroyed.bind(self)); // Other events that will get bubbled up. collection.on('shown hidden rested dir plain', handler); collection.on('dir:up dir:right dir:down dir:left', handler); collection.on('plain:up plain:right plain:down plain:left', handler); }; Manager.prototype.bindDocument = function () { var self = this; // Bind only if not already binded if (!self.binded) { self.bindEvt(document, 'move') .bindEvt(document, 'end'); self.binded = true; } }; Manager.prototype.unbindDocument = function (force) { var self = this; // If there are no touch left // unbind the document. if (!Object.keys(self.ids).length || force === true) { self.unbindEvt(document, 'move') .unbindEvt(document, 'end'); self.binded = false; } }; Manager.prototype.getIdentifier = function (evt) { var id; // If no event, simple increment if (!evt) { id = this.index; } else { // Extract identifier from event object. // Unavailable in mouse events so replaced by latest increment. id = evt.identifier === undefined ? evt.pointerId : evt.identifier; if (id === undefined) { id = this.latest || 0; } } if (this.ids[id] === undefined) { this.ids[id] = this.index; this.index += 1; } // Keep the latest id used in case we're using an unidentified mouseEvent this.latest = id; return this.ids[id]; }; Manager.prototype.removeIdentifier = function (identifier) { var removed = {}; for (var id in this.ids) { if (this.ids[id] === identifier) { removed.id = id; removed.identifier = this.ids[id]; delete this.ids[id]; break; } } return removed; }; Manager.prototype.onmove = function (evt) { var self = this; self.onAny('move', evt); return false; }; Manager.prototype.onend = function (evt) { var self = this; self.onAny('end', evt); return false; }; Manager.prototype.oncancel = function (evt) { var self = this; self.onAny('end', evt); return false; }; Manager.prototype.onAny = function (which, evt) { var self = this; var id; var processFn = 'processOn' + which.charAt(0).toUpperCase() + which.slice(1); evt = u.prepareEvent(evt); var processColl = function (e, id, coll) { if (coll.ids.indexOf(id) >= 0) { coll[processFn](e); // Mark the event to avoid cleaning it later. e._found_ = true; } }; var processEvt = function (e) { id = self.getIdentifier(e); u.map(self.collections, processColl.bind(null, e, id)); // If the event isn't handled by any collection, // we need to clean its identifier. if (!e._found_) { self.removeIdentifier(id); } }; u.map(evt, processEvt); return false; }; // Cleanly destroy the manager Manager.prototype.destroy = function () { var self = this; self.unbindDocument(true); self.ids = {}; self.index = 0; self.collections.forEach(function(collection) { collection.destroy(); }); self.off(); }; // When a collection gets destroyed // we clean behind. Manager.prototype.onDestroyed = function (evt, coll) { var self = this; if (self.collections.indexOf(coll) < 0) { return false; } self.collections.splice(self.collections.indexOf(coll), 1); }; var factory = new Manager(); return { create: function (options) { return factory.create(options); }, factory: factory }; }); /***/ }), /***/ "./node_modules/object-assign/index.js": /*!*********************************************!*\ !*** ./node_modules/object-assign/index.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* object-assign (c) Sindre Sorhus @license MIT */ /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } module.exports = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; /***/ }), /***/ "./node_modules/performance-now/lib/performance-now.js": /*!*************************************************************!*\ !*** ./node_modules/performance-now/lib/performance-now.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.12.2 (function() { var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; if ((typeof performance !== "undefined" && performance !== null) && performance.now) { module.exports = function() { return performance.now(); }; } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { module.exports = function() { return (getNanoSeconds() - nodeLoadTime) / 1e6; }; hrtime = process.hrtime; getNanoSeconds = function() { var hr; hr = hrtime(); return hr[0] * 1e9 + hr[1]; }; moduleLoadTime = getNanoSeconds(); upTime = process.uptime() * 1e9; nodeLoadTime = moduleLoadTime - upTime; } else if (Date.now) { module.exports = function() { return Date.now() - loadTime; }; loadTime = Date.now(); } else { module.exports = function() { return new Date().getTime() - loadTime; }; loadTime = new Date().getTime(); } }).call(this); //# sourceMappingURL=performance-now.js.map /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"))) /***/ }), /***/ "./node_modules/process/browser.js": /*!*****************************************!*\ !*** ./node_modules/process/browser.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /***/ "./node_modules/raf/index.js": /*!***********************************!*\ !*** ./node_modules/raf/index.js ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(/*! performance-now */ "./node_modules/performance-now/lib/performance-now.js") , root = typeof window === 'undefined' ? global : window , vendors = ['moz', 'webkit'] , suffix = 'AnimationFrame' , raf = root['request' + suffix] , caf = root['cancel' + suffix] || root['cancelRequest' + suffix] for(var i = 0; !raf && i < vendors.length; i++) { raf = root[vendors[i] + 'Request' + suffix] caf = root[vendors[i] + 'Cancel' + suffix] || root[vendors[i] + 'CancelRequest' + suffix] } // Some versions of FF have rAF but not cAF if(!raf || !caf) { var last = 0 , id = 0 , queue = [] , frameDuration = 1000 / 60 raf = function(callback) { if(queue.length === 0) { var _now = now() , next = Math.max(0, frameDuration - (_now - last)) last = next + _now setTimeout(function() { var cp = queue.slice(0) // Clear queue here to prevent // callbacks from appending listeners // to the current frame's queue queue.length = 0 for(var i = 0; i < cp.length; i++) { if(!cp[i].cancelled) { try{ cp[i].callback(last) } catch(e) { setTimeout(function() { throw e }, 0) } } } }, Math.round(next)) } queue.push({ handle: ++id, callback: callback, cancelled: false }) return id } caf = function(handle) { for(var i = 0; i < queue.length; i++) { if(queue[i].handle === handle) { queue[i].cancelled = true } } } } module.exports = function(fn) { // Wrap in a new function to prevent // `cancel` potentially being assigned // to the native rAF function return raf.call(root, fn) } module.exports.cancel = function() { caf.apply(root, arguments) } module.exports.polyfill = function(object) { if (!object) { object = root; } object.requestAnimationFrame = raf object.cancelAnimationFrame = caf } /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), /***/ "./node_modules/ramda/es/F.js": /*!************************************!*\ !*** ./node_modules/ramda/es/F.js ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _always__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./always */ "./node_modules/ramda/es/always.js"); /** * A function that always returns `false`. Any passed in parameters are ignored. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig * -> Boolean * @param {*} * @return {Boolean} * @see R.always, R.T * @example * * R.F(); //=> false */ var F = /*#__PURE__*/Object(_always__WEBPACK_IMPORTED_MODULE_0__["default"])(false); /* harmony default export */ __webpack_exports__["default"] = (F); /***/ }), /***/ "./node_modules/ramda/es/T.js": /*!************************************!*\ !*** ./node_modules/ramda/es/T.js ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _always__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./always */ "./node_modules/ramda/es/always.js"); /** * A function that always returns `true`. Any passed in parameters are ignored. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig * -> Boolean * @param {*} * @return {Boolean} * @see R.always, R.F * @example * * R.T(); //=> true */ var T = /*#__PURE__*/Object(_always__WEBPACK_IMPORTED_MODULE_0__["default"])(true); /* harmony default export */ __webpack_exports__["default"] = (T); /***/ }), /***/ "./node_modules/ramda/es/__.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/__.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * A special placeholder value used to specify "gaps" within curried functions, * allowing partial application of any combination of arguments, regardless of * their positions. * * If `g` is a curried ternary function and `_` is `R.__`, the following are * equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2, _)(1, 3)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * @constant * @memberOf R * @since v0.6.0 * @category Function * @example * * var greet = R.replace('{name}', R.__, 'Hello, {name}!'); * greet('Alice'); //=> 'Hello, Alice!' */ /* harmony default export */ __webpack_exports__["default"] = ({ '@@functional/placeholder': true }); /***/ }), /***/ "./node_modules/ramda/es/add.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/add.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Adds two values. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a * @param {Number} b * @return {Number} * @see R.subtract * @example * * R.add(2, 3); //=> 5 * R.add(7)(10); //=> 17 */ var add = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function add(a, b) { return Number(a) + Number(b); }); /* harmony default export */ __webpack_exports__["default"] = (add); /***/ }), /***/ "./node_modules/ramda/es/addIndex.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/addIndex.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Creates a new list iteration function from an existing one by adding two new * parameters to its callback function: the current index, and the entire list. * * This would turn, for instance, [`R.map`](#map) function into one that * more closely resembles `Array.prototype.map`. Note that this will only work * for functions in which the iteration callback function is the first * parameter, and where the list is the last parameter. (This latter might be * unimportant if the list parameter is not used.) * * @func * @memberOf R * @since v0.15.0 * @category Function * @category List * @sig ((a ... -> b) ... -> [a] -> *) -> (a ..., Int, [a] -> b) ... -> [a] -> *) * @param {Function} fn A list iteration function that does not pass index or list to its callback * @return {Function} An altered list iteration function that passes (item, index, list) to its callback * @example * * var mapIndexed = R.addIndex(R.map); * mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']); * //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r'] */ var addIndex = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])(function addIndex(fn) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_2__["default"])(fn.length, function () { var idx = 0; var origFn = arguments[0]; var list = arguments[arguments.length - 1]; var args = Array.prototype.slice.call(arguments, 0); args[0] = function () { var result = origFn.apply(this, Object(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments, [idx, list])); idx += 1; return result; }; return fn.apply(this, args); }); }); /* harmony default export */ __webpack_exports__["default"] = (addIndex); /***/ }), /***/ "./node_modules/ramda/es/adjust.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/adjust.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Applies a function to the value at the given index of an array, returning a * new copy of the array with the element at the given index replaced with the * result of the function application. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig (a -> a) -> Number -> [a] -> [a] * @param {Function} fn The function to apply. * @param {Number} idx The index. * @param {Array|Arguments} list An array-like object whose value * at the supplied index will be replaced. * @return {Array} A copy of the supplied array-like object with * the element at index `idx` replaced with the value * returned by applying `fn` to the existing element. * @see R.update * @example * * R.adjust(R.add(10), 1, [1, 2, 3]); //=> [1, 12, 3] * R.adjust(R.add(10))(1)([1, 2, 3]); //=> [1, 12, 3] * @symb R.adjust(f, -1, [a, b]) = [a, f(b)] * @symb R.adjust(f, 0, [a, b]) = [f(a), b] */ var adjust = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_1__["default"])(function adjust(fn, idx, list) { if (idx >= list.length || idx < -list.length) { return list; } var start = idx < 0 ? list.length : 0; var _idx = start + idx; var _list = Object(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])(list); _list[_idx] = fn(list[_idx]); return _list; }); /* harmony default export */ __webpack_exports__["default"] = (adjust); /***/ }), /***/ "./node_modules/ramda/es/all.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/all.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xall__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xall */ "./node_modules/ramda/es/internal/_xall.js"); /** * Returns `true` if all elements of the list match the predicate, `false` if * there are any that don't. * * Dispatches to the `all` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> Boolean * @param {Function} fn The predicate function. * @param {Array} list The array to consider. * @return {Boolean} `true` if the predicate is satisfied by every element, `false` * otherwise. * @see R.any, R.none, R.transduce * @example * * var equals3 = R.equals(3); * R.all(equals3)([3, 3, 3, 3]); //=> true * R.all(equals3)([3, 3, 1, 3]); //=> false */ var all = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['all'], _internal_xall__WEBPACK_IMPORTED_MODULE_2__["default"], function all(fn, list) { var idx = 0; while (idx < list.length) { if (!fn(list[idx])) { return false; } idx += 1; } return true; })); /* harmony default export */ __webpack_exports__["default"] = (all); /***/ }), /***/ "./node_modules/ramda/es/allPass.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/allPass.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./max */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _pluck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pluck */ "./node_modules/ramda/es/pluck.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /** * Takes a list of predicates and returns a predicate that returns true for a * given list of arguments if every one of the provided predicates is satisfied * by those arguments. * * The function returned is a curried function whose arity matches that of the * highest-arity predicate. * * @func * @memberOf R * @since v0.9.0 * @category Logic * @sig [(*... -> Boolean)] -> (*... -> Boolean) * @param {Array} predicates An array of predicates to check * @return {Function} The combined predicate * @see R.anyPass * @example * * var isQueen = R.propEq('rank', 'Q'); * var isSpade = R.propEq('suit', '♠︎'); * var isQueenOfSpades = R.allPass([isQueen, isSpade]); * * isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false * isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true */ var allPass = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function allPass(preds) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_reduce__WEBPACK_IMPORTED_MODULE_4__["default"])(_max__WEBPACK_IMPORTED_MODULE_2__["default"], 0, Object(_pluck__WEBPACK_IMPORTED_MODULE_3__["default"])('length', preds)), function () { var idx = 0; var len = preds.length; while (idx < len) { if (!preds[idx].apply(this, arguments)) { return false; } idx += 1; } return true; }); }); /* harmony default export */ __webpack_exports__["default"] = (allPass); /***/ }), /***/ "./node_modules/ramda/es/always.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/always.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Returns a function that always returns the given value. Note that for * non-primitives the value returned is a reference to the original value. * * This function is known as `const`, `constant`, or `K` (for K combinator) in * other languages and libraries. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig a -> (* -> a) * @param {*} val The value to wrap in a function * @return {Function} A Function :: * -> val. * @example * * var t = R.always('Tee'); * t(); //=> 'Tee' */ var always = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function always(val) { return function () { return val; }; }); /* harmony default export */ __webpack_exports__["default"] = (always); /***/ }), /***/ "./node_modules/ramda/es/and.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/and.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if both arguments are `true`; `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig a -> b -> a | b * @param {Any} a * @param {Any} b * @return {Any} the first argument if it is falsy, otherwise the second argument. * @see R.both * @example * * R.and(true, true); //=> true * R.and(true, false); //=> false * R.and(false, true); //=> false * R.and(false, false); //=> false */ var and = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function and(a, b) { return a && b; }); /* harmony default export */ __webpack_exports__["default"] = (and); /***/ }), /***/ "./node_modules/ramda/es/any.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/any.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xany__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xany */ "./node_modules/ramda/es/internal/_xany.js"); /** * Returns `true` if at least one of elements of the list match the predicate, * `false` otherwise. * * Dispatches to the `any` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> Boolean * @param {Function} fn The predicate function. * @param {Array} list The array to consider. * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false` * otherwise. * @see R.all, R.none, R.transduce * @example * * var lessThan0 = R.flip(R.lt)(0); * var lessThan2 = R.flip(R.lt)(2); * R.any(lessThan0)([1, 2]); //=> false * R.any(lessThan2)([1, 2]); //=> true */ var any = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['any'], _internal_xany__WEBPACK_IMPORTED_MODULE_2__["default"], function any(fn, list) { var idx = 0; while (idx < list.length) { if (fn(list[idx])) { return true; } idx += 1; } return false; })); /* harmony default export */ __webpack_exports__["default"] = (any); /***/ }), /***/ "./node_modules/ramda/es/anyPass.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/anyPass.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./max */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _pluck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pluck */ "./node_modules/ramda/es/pluck.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /** * Takes a list of predicates and returns a predicate that returns true for a * given list of arguments if at least one of the provided predicates is * satisfied by those arguments. * * The function returned is a curried function whose arity matches that of the * highest-arity predicate. * * @func * @memberOf R * @since v0.9.0 * @category Logic * @sig [(*... -> Boolean)] -> (*... -> Boolean) * @param {Array} predicates An array of predicates to check * @return {Function} The combined predicate * @see R.allPass * @example * * var isClub = R.propEq('suit', '♣'); * var isSpade = R.propEq('suit', '♠'); * var isBlackCard = R.anyPass([isClub, isSpade]); * * isBlackCard({rank: '10', suit: '♣'}); //=> true * isBlackCard({rank: 'Q', suit: '♠'}); //=> true * isBlackCard({rank: 'Q', suit: '♦'}); //=> false */ var anyPass = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function anyPass(preds) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_reduce__WEBPACK_IMPORTED_MODULE_4__["default"])(_max__WEBPACK_IMPORTED_MODULE_2__["default"], 0, Object(_pluck__WEBPACK_IMPORTED_MODULE_3__["default"])('length', preds)), function () { var idx = 0; var len = preds.length; while (idx < len) { if (preds[idx].apply(this, arguments)) { return true; } idx += 1; } return false; }); }); /* harmony default export */ __webpack_exports__["default"] = (anyPass); /***/ }), /***/ "./node_modules/ramda/es/ap.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/ap.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /** * ap applies a list of functions to a list of values. * * Dispatches to the `ap` method of the second argument, if present. Also * treats curried functions as applicatives. * * @func * @memberOf R * @since v0.3.0 * @category Function * @sig [a -> b] -> [a] -> [b] * @sig Apply f => f (a -> b) -> f a -> f b * @sig (a -> b -> c) -> (a -> b) -> (a -> c) * @param {*} applyF * @param {*} applyX * @return {*} * @example * * R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6] * R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> ["tasty pizza", "tasty salad", "PIZZA", "SALAD"] * * // R.ap can also be used as S combinator * // when only two functions are passed * R.ap(R.concat, R.toUpper)('Ramda') //=> 'RamdaRAMDA' * @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)] */ var ap = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function ap(applyF, applyX) { return typeof applyX['fantasy-land/ap'] === 'function' ? applyX['fantasy-land/ap'](applyF) : typeof applyF.ap === 'function' ? applyF.ap(applyX) : typeof applyF === 'function' ? function (x) { return applyF(x)(applyX(x)); } : // else Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_2__["default"])(function (acc, f) { return Object(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])(acc, Object(_map__WEBPACK_IMPORTED_MODULE_3__["default"])(f, applyX)); }, [], applyF); }); /* harmony default export */ __webpack_exports__["default"] = (ap); /***/ }), /***/ "./node_modules/ramda/es/aperture.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/aperture.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_aperture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_aperture */ "./node_modules/ramda/es/internal/_aperture.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xaperture__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xaperture */ "./node_modules/ramda/es/internal/_xaperture.js"); /** * Returns a new list, composed of n-tuples of consecutive elements. If `n` is * greater than the length of the list, an empty list is returned. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig Number -> [a] -> [[a]] * @param {Number} n The size of the tuples to create * @param {Array} list The list to split into `n`-length tuples * @return {Array} The resulting list of `n`-length tuples * @see R.transduce * @example * * R.aperture(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [2, 3], [3, 4], [4, 5]] * R.aperture(3, [1, 2, 3, 4, 5]); //=> [[1, 2, 3], [2, 3, 4], [3, 4, 5]] * R.aperture(7, [1, 2, 3, 4, 5]); //=> [] */ var aperture = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_2__["default"])([], _internal_xaperture__WEBPACK_IMPORTED_MODULE_3__["default"], _internal_aperture__WEBPACK_IMPORTED_MODULE_0__["default"])); /* harmony default export */ __webpack_exports__["default"] = (aperture); /***/ }), /***/ "./node_modules/ramda/es/append.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/append.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a new list containing the contents of the given list, followed by * the given element. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> [a] * @param {*} el The element to add to the end of the new list. * @param {Array} list The list of elements to add a new item to. * list. * @return {Array} A new list containing the elements of the old list followed by `el`. * @see R.prepend * @example * * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests'] * R.append('tests', []); //=> ['tests'] * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']] */ var append = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function append(el, list) { return Object(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])(list, [el]); }); /* harmony default export */ __webpack_exports__["default"] = (append); /***/ }), /***/ "./node_modules/ramda/es/apply.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/apply.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Applies function `fn` to the argument list `args`. This is useful for * creating a fixed-arity function from a variadic function. `fn` should be a * bound function if context is significant. * * @func * @memberOf R * @since v0.7.0 * @category Function * @sig (*... -> a) -> [*] -> a * @param {Function} fn The function which will be called with `args` * @param {Array} args The arguments to call `fn` with * @return {*} result The result, equivalent to `fn(...args)` * @see R.call, R.unapply * @example * * var nums = [1, 2, 3, -99, 42, 6, 7]; * R.apply(Math.max, nums); //=> 42 * @symb R.apply(f, [a, b, c]) = f(a, b, c) */ var apply = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function apply(fn, args) { return fn.apply(this, args); }); /* harmony default export */ __webpack_exports__["default"] = (apply); /***/ }), /***/ "./node_modules/ramda/es/applySpec.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/applySpec.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _apply__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./apply */ "./node_modules/ramda/es/apply.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./max */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _pluck__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pluck */ "./node_modules/ramda/es/pluck.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./values */ "./node_modules/ramda/es/values.js"); /** * Given a spec object recursively mapping properties to functions, creates a * function producing an object of the same structure, by mapping each property * to the result of calling its associated function with the supplied arguments. * * @func * @memberOf R * @since v0.20.0 * @category Function * @sig {k: ((a, b, ..., m) -> v)} -> ((a, b, ..., m) -> {k: v}) * @param {Object} spec an object recursively mapping properties to functions for * producing the values for these properties. * @return {Function} A function that returns an object of the same structure * as `spec', with each property set to the value returned by calling its * associated function with the supplied arguments. * @see R.converge, R.juxt * @example * * var getMetrics = R.applySpec({ * sum: R.add, * nested: { mul: R.multiply } * }); * getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } } * @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } } */ var applySpec = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function applySpec(spec) { spec = Object(_map__WEBPACK_IMPORTED_MODULE_3__["default"])(function (v) { return typeof v == 'function' ? v : applySpec(v); }, spec); return Object(_curryN__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_reduce__WEBPACK_IMPORTED_MODULE_6__["default"])(_max__WEBPACK_IMPORTED_MODULE_4__["default"], 0, Object(_pluck__WEBPACK_IMPORTED_MODULE_5__["default"])('length', Object(_values__WEBPACK_IMPORTED_MODULE_7__["default"])(spec))), function () { var args = arguments; return Object(_map__WEBPACK_IMPORTED_MODULE_3__["default"])(function (f) { return Object(_apply__WEBPACK_IMPORTED_MODULE_1__["default"])(f, args); }, spec); }); }); /* harmony default export */ __webpack_exports__["default"] = (applySpec); /***/ }), /***/ "./node_modules/ramda/es/applyTo.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/applyTo.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Takes a value and applies a function to it. * * This function is also known as the `thrush` combinator. * * @func * @memberOf R * @since v0.25.0 * @category Function * @sig a -> (a -> b) -> b * @param {*} x The value * @param {Function} f The function to apply * @return {*} The result of applying `f` to `x` * @example * * var t42 = R.applyTo(42); * t42(R.identity); //=> 42 * t42(R.add(1)); //=> 43 */ var applyTo = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function applyTo(x, f) { return f(x); }); /* harmony default export */ __webpack_exports__["default"] = (applyTo); /***/ }), /***/ "./node_modules/ramda/es/ascend.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/ascend.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Makes an ascending comparator function out of a function that returns a value * that can be compared with `<` and `>`. * * @func * @memberOf R * @since v0.23.0 * @category Function * @sig Ord b => (a -> b) -> a -> a -> Number * @param {Function} fn A function of arity one that returns a value that can be compared * @param {*} a The first item to be compared. * @param {*} b The second item to be compared. * @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0` * @see R.descend * @example * * var byAge = R.ascend(R.prop('age')); * var people = [ * // ... * ]; * var peopleByYoungestFirst = R.sort(byAge, people); */ var ascend = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function ascend(fn, a, b) { var aa = fn(a); var bb = fn(b); return aa < bb ? -1 : aa > bb ? 1 : 0; }); /* harmony default export */ __webpack_exports__["default"] = (ascend); /***/ }), /***/ "./node_modules/ramda/es/assoc.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/assoc.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Makes a shallow clone of an object, setting or overriding the specified * property with the given value. Note that this copies and flattens prototype * properties onto the new object as well. All non-primitive properties are * copied by reference. * * @func * @memberOf R * @since v0.8.0 * @category Object * @sig String -> a -> {k: v} -> {k: v} * @param {String} prop The property name to set * @param {*} val The new value * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original except for the changed property. * @see R.dissoc * @example * * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3} */ var assoc = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function assoc(prop, val, obj) { var result = {}; for (var p in obj) { result[p] = obj[p]; } result[prop] = val; return result; }); /* harmony default export */ __webpack_exports__["default"] = (assoc); /***/ }), /***/ "./node_modules/ramda/es/assocPath.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/assocPath.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _internal_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _internal_isInteger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isInteger */ "./node_modules/ramda/es/internal/_isInteger.js"); /* harmony import */ var _assoc__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./assoc */ "./node_modules/ramda/es/assoc.js"); /* harmony import */ var _isNil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./isNil */ "./node_modules/ramda/es/isNil.js"); /** * Makes a shallow clone of an object, setting or overriding the nodes required * to create the given path, and placing the specific value at the tail end of * that path. Note that this copies and flattens prototype properties onto the * new object as well. All non-primitive properties are copied by reference. * * @func * @memberOf R * @since v0.8.0 * @category Object * @typedefn Idx = String | Int * @sig [Idx] -> a -> {a} -> {a} * @param {Array} path the path to set * @param {*} val The new value * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original except along the specified path. * @see R.dissocPath * @example * * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} * * // Any missing or non-object keys in path will be overridden * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}} */ var assocPath = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function assocPath(path, val, obj) { if (path.length === 0) { return val; } var idx = path[0]; if (path.length > 1) { var nextObj = !Object(_isNil__WEBPACK_IMPORTED_MODULE_5__["default"])(obj) && Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(idx, obj) ? obj[idx] : Object(_internal_isInteger__WEBPACK_IMPORTED_MODULE_3__["default"])(path[1]) ? [] : {}; val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); } if (Object(_internal_isInteger__WEBPACK_IMPORTED_MODULE_3__["default"])(idx) && Object(_internal_isArray__WEBPACK_IMPORTED_MODULE_2__["default"])(obj)) { var arr = [].concat(obj); arr[idx] = val; return arr; } else { return Object(_assoc__WEBPACK_IMPORTED_MODULE_4__["default"])(idx, val, obj); } }); /* harmony default export */ __webpack_exports__["default"] = (assocPath); /***/ }), /***/ "./node_modules/ramda/es/binary.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/binary.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _nAry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nAry */ "./node_modules/ramda/es/nAry.js"); /** * Wraps a function of any arity (including nullary) in a function that accepts * exactly 2 parameters. Any extraneous parameters will not be passed to the * supplied function. * * @func * @memberOf R * @since v0.2.0 * @category Function * @sig (* -> c) -> (a, b -> c) * @param {Function} fn The function to wrap. * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of * arity 2. * @see R.nAry, R.unary * @example * * var takesThreeArgs = function(a, b, c) { * return [a, b, c]; * }; * takesThreeArgs.length; //=> 3 * takesThreeArgs(1, 2, 3); //=> [1, 2, 3] * * var takesTwoArgs = R.binary(takesThreeArgs); * takesTwoArgs.length; //=> 2 * // Only 2 arguments are passed to the wrapped function * takesTwoArgs(1, 2, 3); //=> [1, 2, undefined] * @symb R.binary(f)(a, b, c) = f(a, b) */ var binary = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function binary(fn) { return Object(_nAry__WEBPACK_IMPORTED_MODULE_1__["default"])(2, fn); }); /* harmony default export */ __webpack_exports__["default"] = (binary); /***/ }), /***/ "./node_modules/ramda/es/bind.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/bind.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a function that is bound to a context. * Note: `R.bind` does not provide the additional argument-binding capabilities of * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). * * @func * @memberOf R * @since v0.6.0 * @category Function * @category Object * @sig (* -> *) -> {*} -> (* -> *) * @param {Function} fn The function to bind to context * @param {Object} thisObj The context to bind `fn` to * @return {Function} A function that will execute in the context of `thisObj`. * @see R.partial * @example * * var log = R.bind(console.log, console); * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3} * // logs {a: 2} * @symb R.bind(f, o)(a, b) = f.call(o, a, b) */ var bind = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function bind(fn, thisObj) { return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(fn.length, function () { return fn.apply(thisObj, arguments); }); }); /* harmony default export */ __webpack_exports__["default"] = (bind); /***/ }), /***/ "./node_modules/ramda/es/both.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/both.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isFunction */ "./node_modules/ramda/es/internal/_isFunction.js"); /* harmony import */ var _and__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./and */ "./node_modules/ramda/es/and.js"); /* harmony import */ var _lift__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lift */ "./node_modules/ramda/es/lift.js"); /** * A function which calls the two provided functions and returns the `&&` * of the results. * It returns the result of the first function if it is false-y and the result * of the second function otherwise. Note that this is short-circuited, * meaning that the second function will not be invoked if the first returns a * false-y value. * * In addition to functions, `R.both` also accepts any fantasy-land compatible * applicative functor. * * @func * @memberOf R * @since v0.12.0 * @category Logic * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) * @param {Function} f A predicate * @param {Function} g Another predicate * @return {Function} a function that applies its arguments to `f` and `g` and `&&`s their outputs together. * @see R.and * @example * * var gt10 = R.gt(R.__, 10) * var lt20 = R.lt(R.__, 20) * var f = R.both(gt10, lt20); * f(15); //=> true * f(30); //=> false */ var both = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function both(f, g) { return Object(_internal_isFunction__WEBPACK_IMPORTED_MODULE_1__["default"])(f) ? function _both() { return f.apply(this, arguments) && g.apply(this, arguments); } : Object(_lift__WEBPACK_IMPORTED_MODULE_3__["default"])(_and__WEBPACK_IMPORTED_MODULE_2__["default"])(f, g); }); /* harmony default export */ __webpack_exports__["default"] = (both); /***/ }), /***/ "./node_modules/ramda/es/call.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/call.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curry */ "./node_modules/ramda/es/curry.js"); /** * Returns the result of calling its first argument with the remaining * arguments. This is occasionally useful as a converging function for * [`R.converge`](#converge): the first branch can produce a function while the * remaining branches produce values to be passed to that function as its * arguments. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig (*... -> a),*... -> a * @param {Function} fn The function to apply to the remaining arguments. * @param {...*} args Any number of positional arguments. * @return {*} * @see R.apply * @example * * R.call(R.add, 1, 2); //=> 3 * * var indentN = R.pipe(R.repeat(' '), * R.join(''), * R.replace(/^(?!$)/gm)); * * var format = R.converge(R.call, [ * R.pipe(R.prop('indent'), indentN), * R.prop('value') * ]); * * format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n' * @symb R.call(f, a, b) = f(a, b) */ var call = /*#__PURE__*/Object(_curry__WEBPACK_IMPORTED_MODULE_0__["default"])(function call(fn) { return fn.apply(this, Array.prototype.slice.call(arguments, 1)); }); /* harmony default export */ __webpack_exports__["default"] = (call); /***/ }), /***/ "./node_modules/ramda/es/chain.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/chain.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_makeFlat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_makeFlat */ "./node_modules/ramda/es/internal/_makeFlat.js"); /* harmony import */ var _internal_xchain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xchain */ "./node_modules/ramda/es/internal/_xchain.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /** * `chain` maps a function over a list and concatenates the results. `chain` * is also known as `flatMap` in some libraries * * Dispatches to the `chain` method of the second argument, if present, * according to the [FantasyLand Chain spec](https://github.com/fantasyland/fantasy-land#chain). * * @func * @memberOf R * @since v0.3.0 * @category List * @sig Chain m => (a -> m b) -> m a -> m b * @param {Function} fn The function to map with * @param {Array} list The list to map over * @return {Array} The result of flat-mapping `list` with `fn` * @example * * var duplicate = n => [n, n]; * R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3] * * R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1] */ var chain = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['fantasy-land/chain', 'chain'], _internal_xchain__WEBPACK_IMPORTED_MODULE_3__["default"], function chain(fn, monad) { if (typeof monad === 'function') { return function (x) { return fn(monad(x))(x); }; } return Object(_internal_makeFlat__WEBPACK_IMPORTED_MODULE_2__["default"])(false)(Object(_map__WEBPACK_IMPORTED_MODULE_4__["default"])(fn, monad)); })); /* harmony default export */ __webpack_exports__["default"] = (chain); /***/ }), /***/ "./node_modules/ramda/es/clamp.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/clamp.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Restricts a number to be within a range. * * Also works for other ordered types such as Strings and Dates. * * @func * @memberOf R * @since v0.20.0 * @category Relation * @sig Ord a => a -> a -> a -> a * @param {Number} minimum The lower limit of the clamp (inclusive) * @param {Number} maximum The upper limit of the clamp (inclusive) * @param {Number} value Value to be clamped * @return {Number} Returns `minimum` when `val < minimum`, `maximum` when `val > maximum`, returns `val` otherwise * @example * * R.clamp(1, 10, -5) // => 1 * R.clamp(1, 10, 15) // => 10 * R.clamp(1, 10, 4) // => 4 */ var clamp = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function clamp(min, max, value) { if (min > max) { throw new Error('min must not be greater than max in clamp(min, max, value)'); } return value < min ? min : value > max ? max : value; }); /* harmony default export */ __webpack_exports__["default"] = (clamp); /***/ }), /***/ "./node_modules/ramda/es/clone.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/clone.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_clone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_clone */ "./node_modules/ramda/es/internal/_clone.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Creates a deep copy of the value which may contain (nested) `Array`s and * `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are * assigned by reference rather than copied * * Dispatches to a `clone` method if present. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {*} -> {*} * @param {*} value The object or array to clone * @return {*} A deeply cloned copy of `val` * @example * * var objects = [{}, {}, {}]; * var objectsClone = R.clone(objects); * objects === objectsClone; //=> false * objects[0] === objectsClone[0]; //=> false */ var clone = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])(function clone(value) { return value != null && typeof value.clone === 'function' ? value.clone() : Object(_internal_clone__WEBPACK_IMPORTED_MODULE_0__["default"])(value, [], [], true); }); /* harmony default export */ __webpack_exports__["default"] = (clone); /***/ }), /***/ "./node_modules/ramda/es/comparator.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/comparator.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Makes a comparator function out of a function that reports whether the first * element is less than the second. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((a, b) -> Boolean) -> ((a, b) -> Number) * @param {Function} pred A predicate function of arity two which will return `true` if the first argument * is less than the second, `false` otherwise * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0` * @example * * var byAge = R.comparator((a, b) => a.age < b.age); * var people = [ * // ... * ]; * var peopleByIncreasingAge = R.sort(byAge, people); */ var comparator = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function comparator(pred) { return function (a, b) { return pred(a, b) ? -1 : pred(b, a) ? 1 : 0; }; }); /* harmony default export */ __webpack_exports__["default"] = (comparator); /***/ }), /***/ "./node_modules/ramda/es/complement.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/complement.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lift */ "./node_modules/ramda/es/lift.js"); /* harmony import */ var _not__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./not */ "./node_modules/ramda/es/not.js"); /** * Takes a function `f` and returns a function `g` such that if called with the same arguments * when `f` returns a "truthy" value, `g` returns `false` and when `f` returns a "falsy" value `g` returns `true`. * * `R.complement` may be applied to any functor * * @func * @memberOf R * @since v0.12.0 * @category Logic * @sig (*... -> *) -> (*... -> Boolean) * @param {Function} f * @return {Function} * @see R.not * @example * * var isNotNil = R.complement(R.isNil); * isNil(null); //=> true * isNotNil(null); //=> false * isNil(7); //=> false * isNotNil(7); //=> true */ var complement = /*#__PURE__*/Object(_lift__WEBPACK_IMPORTED_MODULE_0__["default"])(_not__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (complement); /***/ }), /***/ "./node_modules/ramda/es/compose.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/compose.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return compose; }); /* harmony import */ var _pipe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pipe */ "./node_modules/ramda/es/pipe.js"); /* harmony import */ var _reverse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reverse */ "./node_modules/ramda/es/reverse.js"); /** * Performs right-to-left function composition. The rightmost function may have * any arity; the remaining functions must be unary. * * **Note:** The result of compose is not automatically curried. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z) * @param {...Function} ...functions The functions to compose * @return {Function} * @see R.pipe * @example * * var classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName * var yellGreeting = R.compose(R.toUpper, classyGreeting); * yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND" * * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7 * * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b))) */ function compose() { if (arguments.length === 0) { throw new Error('compose requires at least one argument'); } return _pipe__WEBPACK_IMPORTED_MODULE_0__["default"].apply(this, Object(_reverse__WEBPACK_IMPORTED_MODULE_1__["default"])(arguments)); } /***/ }), /***/ "./node_modules/ramda/es/composeK.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/composeK.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return composeK; }); /* harmony import */ var _chain__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chain */ "./node_modules/ramda/es/chain.js"); /* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compose */ "./node_modules/ramda/es/compose.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /** * Returns the right-to-left Kleisli composition of the provided functions, * each of which must return a value of a type supported by [`chain`](#chain). * * `R.composeK(h, g, f)` is equivalent to `R.compose(R.chain(h), R.chain(g), f)`. * * @func * @memberOf R * @since v0.16.0 * @category Function * @sig Chain m => ((y -> m z), (x -> m y), ..., (a -> m b)) -> (a -> m z) * @param {...Function} ...functions The functions to compose * @return {Function} * @see R.pipeK * @example * * // get :: String -> Object -> Maybe * * var get = R.curry((propName, obj) => Maybe(obj[propName])) * * // getStateCode :: Maybe String -> Maybe String * var getStateCode = R.composeK( * R.compose(Maybe.of, R.toUpper), * get('state'), * get('address'), * get('user'), * ); * getStateCode({"user":{"address":{"state":"ny"}}}); //=> Maybe.Just("NY") * getStateCode({}); //=> Maybe.Nothing() * @symb R.composeK(f, g, h)(a) = R.chain(f, R.chain(g, h(a))) */ function composeK() { if (arguments.length === 0) { throw new Error('composeK requires at least one argument'); } var init = Array.prototype.slice.call(arguments); var last = init.pop(); return Object(_compose__WEBPACK_IMPORTED_MODULE_1__["default"])(_compose__WEBPACK_IMPORTED_MODULE_1__["default"].apply(this, Object(_map__WEBPACK_IMPORTED_MODULE_2__["default"])(_chain__WEBPACK_IMPORTED_MODULE_0__["default"], init)), last); } /***/ }), /***/ "./node_modules/ramda/es/composeP.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/composeP.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return composeP; }); /* harmony import */ var _pipeP__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pipeP */ "./node_modules/ramda/es/pipeP.js"); /* harmony import */ var _reverse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reverse */ "./node_modules/ramda/es/reverse.js"); /** * Performs right-to-left composition of one or more Promise-returning * functions. The rightmost function may have any arity; the remaining * functions must be unary. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((y -> Promise z), (x -> Promise y), ..., (a -> Promise b)) -> (a -> Promise z) * @param {...Function} functions The functions to compose * @return {Function} * @see R.pipeP * @example * * var db = { * users: { * JOE: { * name: 'Joe', * followers: ['STEVE', 'SUZY'] * } * } * } * * // We'll pretend to do a db lookup which returns a promise * var lookupUser = (userId) => Promise.resolve(db.users[userId]) * var lookupFollowers = (user) => Promise.resolve(user.followers) * lookupUser('JOE').then(lookupFollowers) * * // followersForUser :: String -> Promise [UserId] * var followersForUser = R.composeP(lookupFollowers, lookupUser); * followersForUser('JOE').then(followers => console.log('Followers:', followers)) * // Followers: ["STEVE","SUZY"] */ function composeP() { if (arguments.length === 0) { throw new Error('composeP requires at least one argument'); } return _pipeP__WEBPACK_IMPORTED_MODULE_0__["default"].apply(this, Object(_reverse__WEBPACK_IMPORTED_MODULE_1__["default"])(arguments)); } /***/ }), /***/ "./node_modules/ramda/es/concat.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/concat.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _internal_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isFunction */ "./node_modules/ramda/es/internal/_isFunction.js"); /* harmony import */ var _internal_isString__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isString */ "./node_modules/ramda/es/internal/_isString.js"); /* harmony import */ var _toString__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./toString */ "./node_modules/ramda/es/toString.js"); /** * Returns the result of concatenating the given lists or strings. * * Note: `R.concat` expects both arguments to be of the same type, * unlike the native `Array.prototype.concat` method. It will throw * an error if you `concat` an Array with a non-Array value. * * Dispatches to the `concat` method of the first argument, if present. * Can also concatenate two members of a [fantasy-land * compatible semigroup](https://github.com/fantasyland/fantasy-land#semigroup). * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] -> [a] * @sig String -> String -> String * @param {Array|String} firstList The first list * @param {Array|String} secondList The second list * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of * `secondList`. * * @example * * R.concat('ABC', 'DEF'); // 'ABCDEF' * R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] * R.concat([], []); //=> [] */ var concat = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function concat(a, b) { if (Object(_internal_isArray__WEBPACK_IMPORTED_MODULE_1__["default"])(a)) { if (Object(_internal_isArray__WEBPACK_IMPORTED_MODULE_1__["default"])(b)) { return a.concat(b); } throw new TypeError(Object(_toString__WEBPACK_IMPORTED_MODULE_4__["default"])(b) + ' is not an array'); } if (Object(_internal_isString__WEBPACK_IMPORTED_MODULE_3__["default"])(a)) { if (Object(_internal_isString__WEBPACK_IMPORTED_MODULE_3__["default"])(b)) { return a + b; } throw new TypeError(Object(_toString__WEBPACK_IMPORTED_MODULE_4__["default"])(b) + ' is not a string'); } if (a != null && Object(_internal_isFunction__WEBPACK_IMPORTED_MODULE_2__["default"])(a['fantasy-land/concat'])) { return a['fantasy-land/concat'](b); } if (a != null && Object(_internal_isFunction__WEBPACK_IMPORTED_MODULE_2__["default"])(a.concat)) { return a.concat(b); } throw new TypeError(Object(_toString__WEBPACK_IMPORTED_MODULE_4__["default"])(a) + ' does not have a method named "concat" or "fantasy-land/concat"'); }); /* harmony default export */ __webpack_exports__["default"] = (concat); /***/ }), /***/ "./node_modules/ramda/es/cond.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/cond.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./max */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /** * Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic. * `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments * to `fn` are applied to each of the predicates in turn until one returns a * "truthy" value, at which point `fn` returns the result of applying its * arguments to the corresponding transformer. If none of the predicates * matches, `fn` returns undefined. * * @func * @memberOf R * @since v0.6.0 * @category Logic * @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *) * @param {Array} pairs A list of [predicate, transformer] * @return {Function} * @example * * var fn = R.cond([ * [R.equals(0), R.always('water freezes at 0°C')], * [R.equals(100), R.always('water boils at 100°C')], * [R.T, temp => 'nothing special happens at ' + temp + '°C'] * ]); * fn(0); //=> 'water freezes at 0°C' * fn(50); //=> 'nothing special happens at 50°C' * fn(100); //=> 'water boils at 100°C' */ var cond = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])(function cond(pairs) { var arity = Object(_reduce__WEBPACK_IMPORTED_MODULE_4__["default"])(_max__WEBPACK_IMPORTED_MODULE_3__["default"], 0, Object(_map__WEBPACK_IMPORTED_MODULE_2__["default"])(function (pair) { return pair[0].length; }, pairs)); return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(arity, function () { var idx = 0; while (idx < pairs.length) { if (pairs[idx][0].apply(this, arguments)) { return pairs[idx][1].apply(this, arguments); } idx += 1; } }); }); /* harmony default export */ __webpack_exports__["default"] = (cond); /***/ }), /***/ "./node_modules/ramda/es/construct.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/construct.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _constructN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructN */ "./node_modules/ramda/es/constructN.js"); /** * Wraps a constructor function inside a curried function that can be called * with the same arguments and returns the same type. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (* -> {*}) -> (* -> {*}) * @param {Function} fn The constructor function to wrap. * @return {Function} A wrapped, curried constructor function. * @see R.invoker * @example * * // Constructor function * function Animal(kind) { * this.kind = kind; * }; * Animal.prototype.sighting = function() { * return "It's a " + this.kind + "!"; * } * * var AnimalConstructor = R.construct(Animal) * * // Notice we no longer need the 'new' keyword: * AnimalConstructor('Pig'); //=> {"kind": "Pig", "sighting": function (){...}}; * * var animalTypes = ["Lion", "Tiger", "Bear"]; * var animalSighting = R.invoker(0, 'sighting'); * var sightNewAnimal = R.compose(animalSighting, AnimalConstructor); * R.map(sightNewAnimal, animalTypes); //=> ["It's a Lion!", "It's a Tiger!", "It's a Bear!"] */ var construct = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function construct(Fn) { return Object(_constructN__WEBPACK_IMPORTED_MODULE_1__["default"])(Fn.length, Fn); }); /* harmony default export */ __webpack_exports__["default"] = (construct); /***/ }), /***/ "./node_modules/ramda/es/constructN.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/constructN.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _curry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curry */ "./node_modules/ramda/es/curry.js"); /* harmony import */ var _nAry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nAry */ "./node_modules/ramda/es/nAry.js"); /** * Wraps a constructor function inside a curried function that can be called * with the same arguments and returns the same type. The arity of the function * returned is specified to allow using variadic constructor functions. * * @func * @memberOf R * @since v0.4.0 * @category Function * @sig Number -> (* -> {*}) -> (* -> {*}) * @param {Number} n The arity of the constructor function. * @param {Function} Fn The constructor function to wrap. * @return {Function} A wrapped, curried constructor function. * @example * * // Variadic Constructor function * function Salad() { * this.ingredients = arguments; * } * * Salad.prototype.recipe = function() { * var instructions = R.map(ingredient => 'Add a dollop of ' + ingredient, this.ingredients); * return R.join('\n', instructions); * }; * * var ThreeLayerSalad = R.constructN(3, Salad); * * // Notice we no longer need the 'new' keyword, and the constructor is curried for 3 arguments. * var salad = ThreeLayerSalad('Mayonnaise')('Potato Chips')('Ketchup'); * * console.log(salad.recipe()); * // Add a dollop of Mayonnaise * // Add a dollop of Potato Chips * // Add a dollop of Ketchup */ var constructN = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function constructN(n, Fn) { if (n > 10) { throw new Error('Constructor with greater than ten arguments'); } if (n === 0) { return function () { return new Fn(); }; } return Object(_curry__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_nAry__WEBPACK_IMPORTED_MODULE_2__["default"])(n, function ($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) { switch (arguments.length) { case 1: return new Fn($0); case 2: return new Fn($0, $1); case 3: return new Fn($0, $1, $2); case 4: return new Fn($0, $1, $2, $3); case 5: return new Fn($0, $1, $2, $3, $4); case 6: return new Fn($0, $1, $2, $3, $4, $5); case 7: return new Fn($0, $1, $2, $3, $4, $5, $6); case 8: return new Fn($0, $1, $2, $3, $4, $5, $6, $7); case 9: return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8); case 10: return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8, $9); } })); }); /* harmony default export */ __webpack_exports__["default"] = (constructN); /***/ }), /***/ "./node_modules/ramda/es/contains.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/contains.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_contains */ "./node_modules/ramda/es/internal/_contains.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the specified value is equal, in [`R.equals`](#equals) * terms, to at least one element of the given list; `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> Boolean * @param {Object} a The item to compare against. * @param {Array} list The array to consider. * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise. * @see R.any * @example * * R.contains(3, [1, 2, 3]); //=> true * R.contains(4, [1, 2, 3]); //=> false * R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true * R.contains([42], [[42]]); //=> true */ var contains = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(_internal_contains__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (contains); /***/ }), /***/ "./node_modules/ramda/es/converge.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/converge.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_map */ "./node_modules/ramda/es/internal/_map.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./max */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _pluck__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pluck */ "./node_modules/ramda/es/pluck.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /** * Accepts a converging function and a list of branching functions and returns * a new function. When invoked, this new function is applied to some * arguments, each branching function is applied to those same arguments. The * results of each branching function are passed as arguments to the converging * function to produce the return value. * * @func * @memberOf R * @since v0.4.2 * @category Function * @sig ((x1, x2, ...) -> z) -> [((a, b, ...) -> x1), ((a, b, ...) -> x2), ...] -> (a -> b -> ... -> z) * @param {Function} after A function. `after` will be invoked with the return values of * `fn1` and `fn2` as its arguments. * @param {Array} functions A list of functions. * @return {Function} A new function. * @see R.useWith * @example * * var average = R.converge(R.divide, [R.sum, R.length]) * average([1, 2, 3, 4, 5, 6, 7]) //=> 4 * * var strangeConcat = R.converge(R.concat, [R.toUpper, R.toLower]) * strangeConcat("Yodel") //=> "YODELyodel" * * @symb R.converge(f, [g, h])(a, b) = f(g(a, b), h(a, b)) */ var converge = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function converge(after, fns) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_reduce__WEBPACK_IMPORTED_MODULE_5__["default"])(_max__WEBPACK_IMPORTED_MODULE_3__["default"], 0, Object(_pluck__WEBPACK_IMPORTED_MODULE_4__["default"])('length', fns)), function () { var args = arguments; var context = this; return after.apply(context, Object(_internal_map__WEBPACK_IMPORTED_MODULE_1__["default"])(function (fn) { return fn.apply(context, args); }, fns)); }); }); /* harmony default export */ __webpack_exports__["default"] = (converge); /***/ }), /***/ "./node_modules/ramda/es/countBy.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/countBy.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _reduceBy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduceBy */ "./node_modules/ramda/es/reduceBy.js"); /** * Counts the elements of a list according to how many match each value of a * key generated by the supplied function. Returns an object mapping the keys * produced by `fn` to the number of occurrences in the list. Note that all * keys are coerced to strings because of how JavaScript objects work. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig (a -> String) -> [a] -> {*} * @param {Function} fn The function used to map values to keys. * @param {Array} list The list to count elements from. * @return {Object} An object mapping keys to number of occurrences in the list. * @example * * var numbers = [1.0, 1.1, 1.2, 2.0, 3.0, 2.2]; * R.countBy(Math.floor)(numbers); //=> {'1': 3, '2': 2, '3': 1} * * var letters = ['a', 'b', 'A', 'a', 'B', 'c']; * R.countBy(R.toLower)(letters); //=> {'a': 3, 'b': 2, 'c': 1} */ var countBy = /*#__PURE__*/Object(_reduceBy__WEBPACK_IMPORTED_MODULE_0__["default"])(function (acc, elem) { return acc + 1; }, 0); /* harmony default export */ __webpack_exports__["default"] = (countBy); /***/ }), /***/ "./node_modules/ramda/es/curry.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/curry.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Returns a curried equivalent of the provided function. The curried function * has two unusual capabilities. First, its arguments needn't be provided one * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the * following are equivalent: * * - `g(1)(2)(3)` * - `g(1)(2, 3)` * - `g(1, 2)(3)` * - `g(1, 2, 3)` * * Secondly, the special placeholder value [`R.__`](#__) may be used to specify * "gaps", allowing partial application of any combination of arguments, * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), * the following are equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (* -> a) -> (* -> a) * @param {Function} fn The function to curry. * @return {Function} A new, curried function. * @see R.curryN * @example * * var addFourNumbers = (a, b, c, d) => a + b + c + d; * * var curriedAddFourNumbers = R.curry(addFourNumbers); * var f = curriedAddFourNumbers(1, 2); * var g = f(3); * g(4); //=> 10 */ var curry = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function curry(fn) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(fn.length, fn); }); /* harmony default export */ __webpack_exports__["default"] = (curry); /***/ }), /***/ "./node_modules/ramda/es/curryN.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/curryN.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_curryN__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_curryN */ "./node_modules/ramda/es/internal/_curryN.js"); /** * Returns a curried equivalent of the provided function, with the specified * arity. The curried function has two unusual capabilities. First, its * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the * following are equivalent: * * - `g(1)(2)(3)` * - `g(1)(2, 3)` * - `g(1, 2)(3)` * - `g(1, 2, 3)` * * Secondly, the special placeholder value [`R.__`](#__) may be used to specify * "gaps", allowing partial application of any combination of arguments, * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), * the following are equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * @func * @memberOf R * @since v0.5.0 * @category Function * @sig Number -> (* -> a) -> (* -> a) * @param {Number} length The arity for the returned function. * @param {Function} fn The function to curry. * @return {Function} A new, curried function. * @see R.curry * @example * * var sumArgs = (...args) => R.sum(args); * * var curriedAddFourNumbers = R.curryN(4, sumArgs); * var f = curriedAddFourNumbers(1, 2); * var g = f(3); * g(4); //=> 10 */ var curryN = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_2__["default"])(function curryN(length, fn) { if (length === 1) { return Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])(fn); } return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(length, Object(_internal_curryN__WEBPACK_IMPORTED_MODULE_3__["default"])(length, [], fn)); }); /* harmony default export */ __webpack_exports__["default"] = (curryN); /***/ }), /***/ "./node_modules/ramda/es/dec.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/dec.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _add__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add */ "./node_modules/ramda/es/add.js"); /** * Decrements its argument. * * @func * @memberOf R * @since v0.9.0 * @category Math * @sig Number -> Number * @param {Number} n * @return {Number} n - 1 * @see R.inc * @example * * R.dec(42); //=> 41 */ var dec = /*#__PURE__*/Object(_add__WEBPACK_IMPORTED_MODULE_0__["default"])(-1); /* harmony default export */ __webpack_exports__["default"] = (dec); /***/ }), /***/ "./node_modules/ramda/es/defaultTo.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/defaultTo.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns the second argument if it is not `null`, `undefined` or `NaN`; * otherwise the first argument is returned. * * @func * @memberOf R * @since v0.10.0 * @category Logic * @sig a -> b -> a | b * @param {a} default The default value. * @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`. * @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value * @example * * var defaultTo42 = R.defaultTo(42); * * defaultTo42(null); //=> 42 * defaultTo42(undefined); //=> 42 * defaultTo42('Ramda'); //=> 'Ramda' * // parseInt('string') results in NaN * defaultTo42(parseInt('string')); //=> 42 */ var defaultTo = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function defaultTo(d, v) { return v == null || v !== v ? d : v; }); /* harmony default export */ __webpack_exports__["default"] = (defaultTo); /***/ }), /***/ "./node_modules/ramda/es/descend.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/descend.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Makes a descending comparator function out of a function that returns a value * that can be compared with `<` and `>`. * * @func * @memberOf R * @since v0.23.0 * @category Function * @sig Ord b => (a -> b) -> a -> a -> Number * @param {Function} fn A function of arity one that returns a value that can be compared * @param {*} a The first item to be compared. * @param {*} b The second item to be compared. * @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0` * @see R.ascend * @example * * var byAge = R.descend(R.prop('age')); * var people = [ * // ... * ]; * var peopleByOldestFirst = R.sort(byAge, people); */ var descend = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function descend(fn, a, b) { var aa = fn(a); var bb = fn(b); return aa > bb ? -1 : aa < bb ? 1 : 0; }); /* harmony default export */ __webpack_exports__["default"] = (descend); /***/ }), /***/ "./node_modules/ramda/es/difference.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/difference.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_contains */ "./node_modules/ramda/es/internal/_contains.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Finds the set (i.e. no duplicates) of all elements in the first list not * contained in the second list. Objects and Arrays are compared in terms of * value equality, not reference equality. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` that are not in `list2`. * @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without * @example * * R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2] * R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5] * R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}] */ var difference = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function difference(first, second) { var out = []; var idx = 0; var firstLen = first.length; while (idx < firstLen) { if (!Object(_internal_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(first[idx], second) && !Object(_internal_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(first[idx], out)) { out[out.length] = first[idx]; } idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (difference); /***/ }), /***/ "./node_modules/ramda/es/differenceWith.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/differenceWith.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_containsWith__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_containsWith */ "./node_modules/ramda/es/internal/_containsWith.js"); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Finds the set (i.e. no duplicates) of all elements in the first list not * contained in the second list. Duplication is determined according to the * value returned by applying the supplied predicate to two list elements. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` that are not in `list2`. * @see R.difference, R.symmetricDifference, R.symmetricDifferenceWith * @example * * var cmp = (x, y) => x.a === y.a; * var l1 = [{a: 1}, {a: 2}, {a: 3}]; * var l2 = [{a: 3}, {a: 4}]; * R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}] */ var differenceWith = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_1__["default"])(function differenceWith(pred, first, second) { var out = []; var idx = 0; var firstLen = first.length; while (idx < firstLen) { if (!Object(_internal_containsWith__WEBPACK_IMPORTED_MODULE_0__["default"])(pred, first[idx], second) && !Object(_internal_containsWith__WEBPACK_IMPORTED_MODULE_0__["default"])(pred, first[idx], out)) { out.push(first[idx]); } idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (differenceWith); /***/ }), /***/ "./node_modules/ramda/es/dissoc.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/dissoc.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a new object that does not contain a `prop` property. * * @func * @memberOf R * @since v0.10.0 * @category Object * @sig String -> {k: v} -> {k: v} * @param {String} prop The name of the property to dissociate * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original but without the specified property * @see R.assoc * @example * * R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3} */ var dissoc = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function dissoc(prop, obj) { var result = {}; for (var p in obj) { result[p] = obj[p]; } delete result[prop]; return result; }); /* harmony default export */ __webpack_exports__["default"] = (dissoc); /***/ }), /***/ "./node_modules/ramda/es/dissocPath.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/dissocPath.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isInteger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isInteger */ "./node_modules/ramda/es/internal/_isInteger.js"); /* harmony import */ var _assoc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./assoc */ "./node_modules/ramda/es/assoc.js"); /* harmony import */ var _dissoc__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dissoc */ "./node_modules/ramda/es/dissoc.js"); /* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./remove */ "./node_modules/ramda/es/remove.js"); /* harmony import */ var _update__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./update */ "./node_modules/ramda/es/update.js"); /** * Makes a shallow clone of an object, omitting the property at the given path. * Note that this copies and flattens prototype properties onto the new object * as well. All non-primitive properties are copied by reference. * * @func * @memberOf R * @since v0.11.0 * @category Object * @typedefn Idx = String | Int * @sig [Idx] -> {k: v} -> {k: v} * @param {Array} path The path to the value to omit * @param {Object} obj The object to clone * @return {Object} A new object without the property at path * @see R.assocPath * @example * * R.dissocPath(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}} */ var dissocPath = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function dissocPath(path, obj) { switch (path.length) { case 0: return obj; case 1: return Object(_internal_isInteger__WEBPACK_IMPORTED_MODULE_1__["default"])(path[0]) ? Object(_remove__WEBPACK_IMPORTED_MODULE_4__["default"])(path[0], 1, obj) : Object(_dissoc__WEBPACK_IMPORTED_MODULE_3__["default"])(path[0], obj); default: var head = path[0]; var tail = Array.prototype.slice.call(path, 1); if (obj[head] == null) { return obj; } else if (Object(_internal_isInteger__WEBPACK_IMPORTED_MODULE_1__["default"])(path[0])) { return Object(_update__WEBPACK_IMPORTED_MODULE_5__["default"])(head, dissocPath(tail, obj[head]), obj); } else { return Object(_assoc__WEBPACK_IMPORTED_MODULE_2__["default"])(head, dissocPath(tail, obj[head]), obj); } } }); /* harmony default export */ __webpack_exports__["default"] = (dissocPath); /***/ }), /***/ "./node_modules/ramda/es/divide.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/divide.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Divides two numbers. Equivalent to `a / b`. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a The first value. * @param {Number} b The second value. * @return {Number} The result of `a / b`. * @see R.multiply * @example * * R.divide(71, 100); //=> 0.71 * * var half = R.divide(R.__, 2); * half(42); //=> 21 * * var reciprocal = R.divide(1); * reciprocal(4); //=> 0.25 */ var divide = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function divide(a, b) { return a / b; }); /* harmony default export */ __webpack_exports__["default"] = (divide); /***/ }), /***/ "./node_modules/ramda/es/drop.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/drop.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xdrop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdrop */ "./node_modules/ramda/es/internal/_xdrop.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns all but the first `n` elements of the given list, string, or * transducer/transformer (or object with a `drop` method). * * Dispatches to the `drop` method of the second argument, if present. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n * @param {*} list * @return {*} A copy of list without the first `n` elements * @see R.take, R.transduce, R.dropLast, R.dropWhile * @example * * R.drop(1, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] * R.drop(2, ['foo', 'bar', 'baz']); //=> ['baz'] * R.drop(3, ['foo', 'bar', 'baz']); //=> [] * R.drop(4, ['foo', 'bar', 'baz']); //=> [] * R.drop(3, 'ramda'); //=> 'da' */ var drop = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['drop'], _internal_xdrop__WEBPACK_IMPORTED_MODULE_2__["default"], function drop(n, xs) { return Object(_slice__WEBPACK_IMPORTED_MODULE_3__["default"])(Math.max(0, n), Infinity, xs); })); /* harmony default export */ __webpack_exports__["default"] = (drop); /***/ }), /***/ "./node_modules/ramda/es/dropLast.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/dropLast.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_dropLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dropLast */ "./node_modules/ramda/es/internal/_dropLast.js"); /* harmony import */ var _internal_xdropLast__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xdropLast */ "./node_modules/ramda/es/internal/_xdropLast.js"); /** * Returns a list containing all but the last `n` elements of the given `list`. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n The number of elements of `list` to skip. * @param {Array} list The list of elements to consider. * @return {Array} A copy of the list with only the first `list.length - n` elements * @see R.takeLast, R.drop, R.dropWhile, R.dropLastWhile * @example * * R.dropLast(1, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] * R.dropLast(2, ['foo', 'bar', 'baz']); //=> ['foo'] * R.dropLast(3, ['foo', 'bar', 'baz']); //=> [] * R.dropLast(4, ['foo', 'bar', 'baz']); //=> [] * R.dropLast(3, 'ramda'); //=> 'ra' */ var dropLast = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xdropLast__WEBPACK_IMPORTED_MODULE_3__["default"], _internal_dropLast__WEBPACK_IMPORTED_MODULE_2__["default"])); /* harmony default export */ __webpack_exports__["default"] = (dropLast); /***/ }), /***/ "./node_modules/ramda/es/dropLastWhile.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/dropLastWhile.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_dropLastWhile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dropLastWhile */ "./node_modules/ramda/es/internal/_dropLastWhile.js"); /* harmony import */ var _internal_xdropLastWhile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xdropLastWhile */ "./node_modules/ramda/es/internal/_xdropLastWhile.js"); /** * Returns a new list excluding all the tailing elements of a given list which * satisfy the supplied predicate function. It passes each value from the right * to the supplied predicate function, skipping elements until the predicate * function returns a `falsy` value. The predicate function is applied to one argument: * *(value)*. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} predicate The function to be called on each element * @param {Array} xs The collection to iterate over. * @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`. * @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile * @example * * var lteThree = x => x <= 3; * * R.dropLastWhile(lteThree, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3, 4] * * R.dropLastWhile(x => x !== 'd' , 'Ramda'); //=> 'Ramd' */ var dropLastWhile = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xdropLastWhile__WEBPACK_IMPORTED_MODULE_3__["default"], _internal_dropLastWhile__WEBPACK_IMPORTED_MODULE_2__["default"])); /* harmony default export */ __webpack_exports__["default"] = (dropLastWhile); /***/ }), /***/ "./node_modules/ramda/es/dropRepeats.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/dropRepeats.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xdropRepeatsWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdropRepeatsWith */ "./node_modules/ramda/es/internal/_xdropRepeatsWith.js"); /* harmony import */ var _dropRepeatsWith__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dropRepeatsWith */ "./node_modules/ramda/es/dropRepeatsWith.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /** * Returns a new list without any consecutively repeating elements. * [`R.equals`](#equals) is used to determine equality. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig [a] -> [a] * @param {Array} list The array to consider. * @return {Array} `list` without repeating elements. * @see R.transduce * @example * * R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2] */ var dropRepeats = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], /*#__PURE__*/Object(_internal_xdropRepeatsWith__WEBPACK_IMPORTED_MODULE_2__["default"])(_equals__WEBPACK_IMPORTED_MODULE_4__["default"]), /*#__PURE__*/Object(_dropRepeatsWith__WEBPACK_IMPORTED_MODULE_3__["default"])(_equals__WEBPACK_IMPORTED_MODULE_4__["default"]))); /* harmony default export */ __webpack_exports__["default"] = (dropRepeats); /***/ }), /***/ "./node_modules/ramda/es/dropRepeatsWith.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/dropRepeatsWith.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xdropRepeatsWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdropRepeatsWith */ "./node_modules/ramda/es/internal/_xdropRepeatsWith.js"); /* harmony import */ var _last__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./last */ "./node_modules/ramda/es/last.js"); /** * Returns a new list without any consecutively repeating elements. Equality is * determined by applying the supplied predicate to each pair of consecutive elements. The * first element in a series of equal elements will be preserved. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig ((a, a) -> Boolean) -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list The array to consider. * @return {Array} `list` without repeating elements. * @see R.transduce * @example * * var l = [1, -1, 1, 3, 4, -4, -4, -5, 5, 3, 3]; * R.dropRepeatsWith(R.eqBy(Math.abs), l); //=> [1, 3, 4, -5, 3] */ var dropRepeatsWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xdropRepeatsWith__WEBPACK_IMPORTED_MODULE_2__["default"], function dropRepeatsWith(pred, list) { var result = []; var idx = 1; var len = list.length; if (len !== 0) { result[0] = list[0]; while (idx < len) { if (!pred(Object(_last__WEBPACK_IMPORTED_MODULE_3__["default"])(result), list[idx])) { result[result.length] = list[idx]; } idx += 1; } } return result; })); /* harmony default export */ __webpack_exports__["default"] = (dropRepeatsWith); /***/ }), /***/ "./node_modules/ramda/es/dropWhile.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/dropWhile.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xdropWhile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdropWhile */ "./node_modules/ramda/es/internal/_xdropWhile.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns a new list excluding the leading elements of a given list which * satisfy the supplied predicate function. It passes each value to the supplied * predicate function, skipping elements while the predicate function returns * `true`. The predicate function is applied to one argument: *(value)*. * * Dispatches to the `dropWhile` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.9.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} fn The function called per iteration. * @param {Array} xs The collection to iterate over. * @return {Array} A new array. * @see R.takeWhile, R.transduce, R.addIndex * @example * * var lteTwo = x => x <= 2; * * R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1] * * R.dropWhile(x => x !== 'd' , 'Ramda'); //=> 'da' */ var dropWhile = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['dropWhile'], _internal_xdropWhile__WEBPACK_IMPORTED_MODULE_2__["default"], function dropWhile(pred, xs) { var idx = 0; var len = xs.length; while (idx < len && pred(xs[idx])) { idx += 1; } return Object(_slice__WEBPACK_IMPORTED_MODULE_3__["default"])(idx, Infinity, xs); })); /* harmony default export */ __webpack_exports__["default"] = (dropWhile); /***/ }), /***/ "./node_modules/ramda/es/either.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/either.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isFunction */ "./node_modules/ramda/es/internal/_isFunction.js"); /* harmony import */ var _lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lift */ "./node_modules/ramda/es/lift.js"); /* harmony import */ var _or__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./or */ "./node_modules/ramda/es/or.js"); /** * A function wrapping calls to the two functions in an `||` operation, * returning the result of the first function if it is truth-y and the result * of the second function otherwise. Note that this is short-circuited, * meaning that the second function will not be invoked if the first returns a * truth-y value. * * In addition to functions, `R.either` also accepts any fantasy-land compatible * applicative functor. * * @func * @memberOf R * @since v0.12.0 * @category Logic * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) * @param {Function} f a predicate * @param {Function} g another predicate * @return {Function} a function that applies its arguments to `f` and `g` and `||`s their outputs together. * @see R.or * @example * * var gt10 = x => x > 10; * var even = x => x % 2 === 0; * var f = R.either(gt10, even); * f(101); //=> true * f(8); //=> true */ var either = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function either(f, g) { return Object(_internal_isFunction__WEBPACK_IMPORTED_MODULE_1__["default"])(f) ? function _either() { return f.apply(this, arguments) || g.apply(this, arguments); } : Object(_lift__WEBPACK_IMPORTED_MODULE_2__["default"])(_or__WEBPACK_IMPORTED_MODULE_3__["default"])(f, g); }); /* harmony default export */ __webpack_exports__["default"] = (either); /***/ }), /***/ "./node_modules/ramda/es/empty.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/empty.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_isArguments__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArguments */ "./node_modules/ramda/es/internal/_isArguments.js"); /* harmony import */ var _internal_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _internal_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isObject */ "./node_modules/ramda/es/internal/_isObject.js"); /* harmony import */ var _internal_isString__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_isString */ "./node_modules/ramda/es/internal/_isString.js"); /** * Returns the empty value of its argument's type. Ramda defines the empty * value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other * types are supported if they define `.empty`, * `.prototype.empty` or implement the * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid). * * Dispatches to the `empty` method of the first argument, if present. * * @func * @memberOf R * @since v0.3.0 * @category Function * @sig a -> a * @param {*} x * @return {*} * @example * * R.empty(Just(42)); //=> Nothing() * R.empty([1, 2, 3]); //=> [] * R.empty('unicorns'); //=> '' * R.empty({x: 1, y: 2}); //=> {} */ var empty = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function empty(x) { return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : Object(_internal_isArray__WEBPACK_IMPORTED_MODULE_2__["default"])(x) ? [] : Object(_internal_isString__WEBPACK_IMPORTED_MODULE_4__["default"])(x) ? '' : Object(_internal_isObject__WEBPACK_IMPORTED_MODULE_3__["default"])(x) ? {} : Object(_internal_isArguments__WEBPACK_IMPORTED_MODULE_1__["default"])(x) ? function () { return arguments; }() : // else void 0; }); /* harmony default export */ __webpack_exports__["default"] = (empty); /***/ }), /***/ "./node_modules/ramda/es/endsWith.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/endsWith.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./takeLast */ "./node_modules/ramda/es/takeLast.js"); /** * Checks if a list ends with the provided values * * @func * @memberOf R * @since v0.24.0 * @category List * @sig [a] -> Boolean * @sig String -> Boolean * @param {*} suffix * @param {*} list * @return {Boolean} * @example * * R.endsWith('c', 'abc') //=> true * R.endsWith('b', 'abc') //=> false * R.endsWith(['c'], ['a', 'b', 'c']) //=> true * R.endsWith(['b'], ['a', 'b', 'c']) //=> false */ var endsWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function (suffix, list) { return Object(_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_takeLast__WEBPACK_IMPORTED_MODULE_2__["default"])(suffix.length, list), suffix); }); /* harmony default export */ __webpack_exports__["default"] = (endsWith); /***/ }), /***/ "./node_modules/ramda/es/eqBy.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/eqBy.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /** * Takes a function and two values in its domain and returns `true` if the * values map to the same value in the codomain; `false` otherwise. * * @func * @memberOf R * @since v0.18.0 * @category Relation * @sig (a -> b) -> a -> a -> Boolean * @param {Function} f * @param {*} x * @param {*} y * @return {Boolean} * @example * * R.eqBy(Math.abs, 5, -5); //=> true */ var eqBy = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function eqBy(f, x, y) { return Object(_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(f(x), f(y)); }); /* harmony default export */ __webpack_exports__["default"] = (eqBy); /***/ }), /***/ "./node_modules/ramda/es/eqProps.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/eqProps.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /** * Reports whether two objects have the same value, in [`R.equals`](#equals) * terms, for the specified property. Useful as a curried predicate. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig k -> {k: v} -> {k: v} -> Boolean * @param {String} prop The name of the property to compare * @param {Object} obj1 * @param {Object} obj2 * @return {Boolean} * * @example * * var o1 = { a: 1, b: 2, c: 3, d: 4 }; * var o2 = { a: 10, b: 20, c: 3, d: 40 }; * R.eqProps('a', o1, o2); //=> false * R.eqProps('c', o1, o2); //=> true */ var eqProps = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function eqProps(prop, obj1, obj2) { return Object(_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(obj1[prop], obj2[prop]); }); /* harmony default export */ __webpack_exports__["default"] = (eqProps); /***/ }), /***/ "./node_modules/ramda/es/equals.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/equals.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_equals */ "./node_modules/ramda/es/internal/_equals.js"); /** * Returns `true` if its arguments are equivalent, `false` otherwise. Handles * cyclical data structures. * * Dispatches symmetrically to the `equals` methods of both arguments, if * present. * * @func * @memberOf R * @since v0.15.0 * @category Relation * @sig a -> b -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @example * * R.equals(1, 1); //=> true * R.equals(1, '1'); //=> false * R.equals([1, 2, 3], [1, 2, 3]); //=> true * * var a = {}; a.v = a; * var b = {}; b.v = b; * R.equals(a, b); //=> true */ var equals = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function equals(a, b) { return Object(_internal_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(a, b, [], []); }); /* harmony default export */ __webpack_exports__["default"] = (equals); /***/ }), /***/ "./node_modules/ramda/es/evolve.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/evolve.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new object by recursively evolving a shallow copy of `object`, * according to the `transformation` functions. All non-primitive properties * are copied by reference. * * A `transformation` function will not be invoked if its corresponding key * does not exist in the evolved object. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig {k: (v -> v)} -> {k: v} -> {k: v} * @param {Object} transformations The object specifying transformation functions to apply * to the object. * @param {Object} object The object to be transformed. * @return {Object} The transformed object. * @example * * var tomato = {firstName: ' Tomato ', data: {elapsed: 100, remaining: 1400}, id:123}; * var transformations = { * firstName: R.trim, * lastName: R.trim, // Will not get invoked. * data: {elapsed: R.add(1), remaining: R.add(-1)} * }; * R.evolve(transformations, tomato); //=> {firstName: 'Tomato', data: {elapsed: 101, remaining: 1399}, id:123} */ var evolve = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function evolve(transformations, object) { var result = {}; var transformation, key, type; for (key in object) { transformation = transformations[key]; type = typeof transformation; result[key] = type === 'function' ? transformation(object[key]) : transformation && type === 'object' ? evolve(transformation, object[key]) : object[key]; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (evolve); /***/ }), /***/ "./node_modules/ramda/es/filter.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/filter.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_filter */ "./node_modules/ramda/es/internal/_filter.js"); /* harmony import */ var _internal_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isObject */ "./node_modules/ramda/es/internal/_isObject.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _internal_xfilter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internal/_xfilter */ "./node_modules/ramda/es/internal/_xfilter.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * Takes a predicate and a `Filterable`, and returns a new filterable of the * same type containing the members of the given filterable which satisfy the * given predicate. Filterable objects include plain objects or any object * that has a filter method such as `Array`. * * Dispatches to the `filter` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Filterable f => (a -> Boolean) -> f a -> f a * @param {Function} pred * @param {Array} filterable * @return {Array} Filterable * @see R.reject, R.transduce, R.addIndex * @example * * var isEven = n => n % 2 === 0; * * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4] * * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} */ var filter = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['filter'], _internal_xfilter__WEBPACK_IMPORTED_MODULE_5__["default"], function (pred, filterable) { return Object(_internal_isObject__WEBPACK_IMPORTED_MODULE_3__["default"])(filterable) ? Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_4__["default"])(function (acc, key) { if (pred(filterable[key])) { acc[key] = filterable[key]; } return acc; }, {}, Object(_keys__WEBPACK_IMPORTED_MODULE_6__["default"])(filterable)) : // else Object(_internal_filter__WEBPACK_IMPORTED_MODULE_2__["default"])(pred, filterable); })); /* harmony default export */ __webpack_exports__["default"] = (filter); /***/ }), /***/ "./node_modules/ramda/es/find.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/find.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xfind__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfind */ "./node_modules/ramda/es/internal/_xfind.js"); /** * Returns the first element of the list which matches the predicate, or * `undefined` if no element matches. * * Dispatches to the `find` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> a | undefined * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Object} The element found, or `undefined`. * @see R.transduce * @example * * var xs = [{a: 1}, {a: 2}, {a: 3}]; * R.find(R.propEq('a', 2))(xs); //=> {a: 2} * R.find(R.propEq('a', 4))(xs); //=> undefined */ var find = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['find'], _internal_xfind__WEBPACK_IMPORTED_MODULE_2__["default"], function find(fn, list) { var idx = 0; var len = list.length; while (idx < len) { if (fn(list[idx])) { return list[idx]; } idx += 1; } })); /* harmony default export */ __webpack_exports__["default"] = (find); /***/ }), /***/ "./node_modules/ramda/es/findIndex.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/findIndex.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xfindIndex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfindIndex */ "./node_modules/ramda/es/internal/_xfindIndex.js"); /** * Returns the index of the first element of the list which matches the * predicate, or `-1` if no element matches. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> Boolean) -> [a] -> Number * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Number} The index of the element found, or `-1`. * @see R.transduce * @example * * var xs = [{a: 1}, {a: 2}, {a: 3}]; * R.findIndex(R.propEq('a', 2))(xs); //=> 1 * R.findIndex(R.propEq('a', 4))(xs); //=> -1 */ var findIndex = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xfindIndex__WEBPACK_IMPORTED_MODULE_2__["default"], function findIndex(fn, list) { var idx = 0; var len = list.length; while (idx < len) { if (fn(list[idx])) { return idx; } idx += 1; } return -1; })); /* harmony default export */ __webpack_exports__["default"] = (findIndex); /***/ }), /***/ "./node_modules/ramda/es/findLast.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/findLast.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xfindLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfindLast */ "./node_modules/ramda/es/internal/_xfindLast.js"); /** * Returns the last element of the list which matches the predicate, or * `undefined` if no element matches. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> Boolean) -> [a] -> a | undefined * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Object} The element found, or `undefined`. * @see R.transduce * @example * * var xs = [{a: 1, b: 0}, {a:1, b: 1}]; * R.findLast(R.propEq('a', 1))(xs); //=> {a: 1, b: 1} * R.findLast(R.propEq('a', 4))(xs); //=> undefined */ var findLast = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xfindLast__WEBPACK_IMPORTED_MODULE_2__["default"], function findLast(fn, list) { var idx = list.length - 1; while (idx >= 0) { if (fn(list[idx])) { return list[idx]; } idx -= 1; } })); /* harmony default export */ __webpack_exports__["default"] = (findLast); /***/ }), /***/ "./node_modules/ramda/es/findLastIndex.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/findLastIndex.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xfindLastIndex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfindLastIndex */ "./node_modules/ramda/es/internal/_xfindLastIndex.js"); /** * Returns the index of the last element of the list which matches the * predicate, or `-1` if no element matches. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> Boolean) -> [a] -> Number * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Number} The index of the element found, or `-1`. * @see R.transduce * @example * * var xs = [{a: 1, b: 0}, {a:1, b: 1}]; * R.findLastIndex(R.propEq('a', 1))(xs); //=> 1 * R.findLastIndex(R.propEq('a', 4))(xs); //=> -1 */ var findLastIndex = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xfindLastIndex__WEBPACK_IMPORTED_MODULE_2__["default"], function findLastIndex(fn, list) { var idx = list.length - 1; while (idx >= 0) { if (fn(list[idx])) { return idx; } idx -= 1; } return -1; })); /* harmony default export */ __webpack_exports__["default"] = (findLastIndex); /***/ }), /***/ "./node_modules/ramda/es/flatten.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/flatten.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_makeFlat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_makeFlat */ "./node_modules/ramda/es/internal/_makeFlat.js"); /** * Returns a new list by pulling every item out of it (and all its sub-arrays) * and putting them in a new array, depth-first. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [b] * @param {Array} list The array to consider. * @return {Array} The flattened list. * @see R.unnest * @example * * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]); * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] */ var flatten = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_makeFlat__WEBPACK_IMPORTED_MODULE_1__["default"])(true)); /* harmony default export */ __webpack_exports__["default"] = (flatten); /***/ }), /***/ "./node_modules/ramda/es/flip.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/flip.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Returns a new function much like the supplied one, except that the first two * arguments' order is reversed. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z) * @param {Function} fn The function to invoke with its first two parameters reversed. * @return {*} The result of invoking `fn` with its first two parameters' order reversed. * @example * * var mergeThree = (a, b, c) => [].concat(a, b, c); * * mergeThree(1, 2, 3); //=> [1, 2, 3] * * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3] * @symb R.flip(f)(a, b, c) = f(b, a, c) */ var flip = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function flip(fn) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(fn.length, function (a, b) { var args = Array.prototype.slice.call(arguments, 0); args[0] = b; args[1] = a; return fn.apply(this, args); }); }); /* harmony default export */ __webpack_exports__["default"] = (flip); /***/ }), /***/ "./node_modules/ramda/es/forEach.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/forEach.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Iterate over an input `list`, calling a provided function `fn` for each * element in the list. * * `fn` receives one argument: *(value)*. * * Note: `R.forEach` does not skip deleted or unassigned indices (sparse * arrays), unlike the native `Array.prototype.forEach` method. For more * details on this behavior, see: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description * * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns * the original array. In some libraries this function is named `each`. * * Dispatches to the `forEach` method of the second argument, if present. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> *) -> [a] -> [a] * @param {Function} fn The function to invoke. Receives one argument, `value`. * @param {Array} list The list to iterate over. * @return {Array} The original list. * @see R.addIndex * @example * * var printXPlusFive = x => console.log(x + 5); * R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3] * // logs 6 * // logs 7 * // logs 8 * @symb R.forEach(f, [a, b, c]) = [a, b, c] */ var forEach = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__["default"])('forEach', function forEach(fn, list) { var len = list.length; var idx = 0; while (idx < len) { fn(list[idx]); idx += 1; } return list; })); /* harmony default export */ __webpack_exports__["default"] = (forEach); /***/ }), /***/ "./node_modules/ramda/es/forEachObjIndexed.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/forEachObjIndexed.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * Iterate over an input `object`, calling a provided function `fn` for each * key and value in the object. * * `fn` receives three argument: *(value, key, obj)*. * * @func * @memberOf R * @since v0.23.0 * @category Object * @sig ((a, String, StrMap a) -> Any) -> StrMap a -> StrMap a * @param {Function} fn The function to invoke. Receives three argument, `value`, `key`, `obj`. * @param {Object} obj The object to iterate over. * @return {Object} The original object. * @example * * var printKeyConcatValue = (value, key) => console.log(key + ':' + value); * R.forEachObjIndexed(printKeyConcatValue, {x: 1, y: 2}); //=> {x: 1, y: 2} * // logs x:1 * // logs y:2 * @symb R.forEachObjIndexed(f, {x: a, y: b}) = {x: a, y: b} */ var forEachObjIndexed = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function forEachObjIndexed(fn, obj) { var keyList = Object(_keys__WEBPACK_IMPORTED_MODULE_1__["default"])(obj); var idx = 0; while (idx < keyList.length) { var key = keyList[idx]; fn(obj[key], key, obj); idx += 1; } return obj; }); /* harmony default export */ __webpack_exports__["default"] = (forEachObjIndexed); /***/ }), /***/ "./node_modules/ramda/es/fromPairs.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/fromPairs.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Creates a new object from a list key-value pairs. If a key appears in * multiple pairs, the rightmost pair is included in the object. * * @func * @memberOf R * @since v0.3.0 * @category List * @sig [[k,v]] -> {k: v} * @param {Array} pairs An array of two-element arrays that will be the keys and values of the output object. * @return {Object} The object made by pairing up `keys` and `values`. * @see R.toPairs, R.pair * @example * * R.fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3} */ var fromPairs = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function fromPairs(pairs) { var result = {}; var idx = 0; while (idx < pairs.length) { result[pairs[idx][0]] = pairs[idx][1]; idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (fromPairs); /***/ }), /***/ "./node_modules/ramda/es/groupBy.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/groupBy.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduceBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reduceBy */ "./node_modules/ramda/es/reduceBy.js"); /** * Splits a list into sub-lists stored in an object, based on the result of * calling a String-returning function on each element, and grouping the * results according to values returned. * * Dispatches to the `groupBy` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> String) -> [a] -> {String: [a]} * @param {Function} fn Function :: a -> String * @param {Array} list The array to group * @return {Object} An object with the output of `fn` for keys, mapped to arrays of elements * that produced that key when passed to `fn`. * @see R.transduce * @example * * var byGrade = R.groupBy(function(student) { * var score = student.score; * return score < 65 ? 'F' : * score < 70 ? 'D' : * score < 80 ? 'C' : * score < 90 ? 'B' : 'A'; * }); * var students = [{name: 'Abby', score: 84}, * {name: 'Eddy', score: 58}, * // ... * {name: 'Jack', score: 69}]; * byGrade(students); * // { * // 'A': [{name: 'Dianne', score: 99}], * // 'B': [{name: 'Abby', score: 84}] * // // ..., * // 'F': [{name: 'Eddy', score: 58}] * // } */ var groupBy = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__["default"])('groupBy', /*#__PURE__*/Object(_reduceBy__WEBPACK_IMPORTED_MODULE_2__["default"])(function (acc, item) { if (acc == null) { acc = []; } acc.push(item); return acc; }, null))); /* harmony default export */ __webpack_exports__["default"] = (groupBy); /***/ }), /***/ "./node_modules/ramda/es/groupWith.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/groupWith.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Takes a list and returns a list of lists where each sublist's elements are * all satisfied pairwise comparison according to the provided function. * Only adjacent elements are passed to the comparison function. * * @func * @memberOf R * @since v0.21.0 * @category List * @sig ((a, a) → Boolean) → [a] → [[a]] * @param {Function} fn Function for determining whether two given (adjacent) * elements should be in the same group * @param {Array} list The array to group. Also accepts a string, which will be * treated as a list of characters. * @return {List} A list that contains sublists of elements, * whose concatenations are equal to the original list. * @example * * R.groupWith(R.equals, [0, 1, 1, 2, 3, 5, 8, 13, 21]) * //=> [[0], [1, 1], [2], [3], [5], [8], [13], [21]] * * R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21]) * //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]] * * R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21]) * //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]] * * R.groupWith(R.eqBy(isVowel), 'aestiou') * //=> ['ae', 'st', 'iou'] */ var groupWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function (fn, list) { var res = []; var idx = 0; var len = list.length; while (idx < len) { var nextidx = idx + 1; while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) { nextidx += 1; } res.push(list.slice(idx, nextidx)); idx = nextidx; } return res; }); /* harmony default export */ __webpack_exports__["default"] = (groupWith); /***/ }), /***/ "./node_modules/ramda/es/gt.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/gt.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the first argument is greater than the second; `false` * otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @see R.lt * @example * * R.gt(2, 1); //=> true * R.gt(2, 2); //=> false * R.gt(2, 3); //=> false * R.gt('a', 'z'); //=> false * R.gt('z', 'a'); //=> true */ var gt = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function gt(a, b) { return a > b; }); /* harmony default export */ __webpack_exports__["default"] = (gt); /***/ }), /***/ "./node_modules/ramda/es/gte.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/gte.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the first argument is greater than or equal to the second; * `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {Number} a * @param {Number} b * @return {Boolean} * @see R.lte * @example * * R.gte(2, 1); //=> true * R.gte(2, 2); //=> true * R.gte(2, 3); //=> false * R.gte('a', 'z'); //=> false * R.gte('z', 'a'); //=> true */ var gte = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function gte(a, b) { return a >= b; }); /* harmony default export */ __webpack_exports__["default"] = (gte); /***/ }), /***/ "./node_modules/ramda/es/has.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/has.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /** * Returns whether or not an object has an own property with the specified name * * @func * @memberOf R * @since v0.7.0 * @category Object * @sig s -> {s: x} -> Boolean * @param {String} prop The name of the property to check for. * @param {Object} obj The object to query. * @return {Boolean} Whether the property exists. * @example * * var hasName = R.has('name'); * hasName({name: 'alice'}); //=> true * hasName({name: 'bob'}); //=> true * hasName({}); //=> false * * var point = {x: 0, y: 0}; * var pointHas = R.has(R.__, point); * pointHas('x'); //=> true * pointHas('y'); //=> true * pointHas('z'); //=> false */ var has = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (has); /***/ }), /***/ "./node_modules/ramda/es/hasIn.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/hasIn.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns whether or not an object or its prototype chain has a property with * the specified name * * @func * @memberOf R * @since v0.7.0 * @category Object * @sig s -> {s: x} -> Boolean * @param {String} prop The name of the property to check for. * @param {Object} obj The object to query. * @return {Boolean} Whether the property exists. * @example * * function Rectangle(width, height) { * this.width = width; * this.height = height; * } * Rectangle.prototype.area = function() { * return this.width * this.height; * }; * * var square = new Rectangle(2, 2); * R.hasIn('width', square); //=> true * R.hasIn('area', square); //=> true */ var hasIn = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function hasIn(prop, obj) { return prop in obj; }); /* harmony default export */ __webpack_exports__["default"] = (hasIn); /***/ }), /***/ "./node_modules/ramda/es/head.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/head.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _nth__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nth */ "./node_modules/ramda/es/nth.js"); /** * Returns the first element of the given list or string. In some libraries * this function is named `first`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> a | Undefined * @sig String -> String * @param {Array|String} list * @return {*} * @see R.tail, R.init, R.last * @example * * R.head(['fi', 'fo', 'fum']); //=> 'fi' * R.head([]); //=> undefined * * R.head('abc'); //=> 'a' * R.head(''); //=> '' */ var head = /*#__PURE__*/Object(_nth__WEBPACK_IMPORTED_MODULE_0__["default"])(0); /* harmony default export */ __webpack_exports__["default"] = (head); /***/ }), /***/ "./node_modules/ramda/es/identical.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/identical.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns true if its arguments are identical, false otherwise. Values are * identical if they reference the same memory. `NaN` is identical to `NaN`; * `0` and `-0` are not identical. * * @func * @memberOf R * @since v0.15.0 * @category Relation * @sig a -> a -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @example * * var o = {}; * R.identical(o, o); //=> true * R.identical(1, 1); //=> true * R.identical(1, '1'); //=> false * R.identical([], []); //=> false * R.identical(0, -0); //=> false * R.identical(NaN, NaN); //=> true */ var identical = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function identical(a, b) { // SameValue algorithm if (a === b) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return a !== 0 || 1 / a === 1 / b; } else { // Step 6.a: NaN == NaN return a !== a && b !== b; } }); /* harmony default export */ __webpack_exports__["default"] = (identical); /***/ }), /***/ "./node_modules/ramda/es/identity.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/identity.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_identity */ "./node_modules/ramda/es/internal/_identity.js"); /** * A function that does nothing but return the parameter supplied to it. Good * as a default or placeholder function. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig a -> a * @param {*} x The value to return. * @return {*} The input value, `x`. * @example * * R.identity(1); //=> 1 * * var obj = {}; * R.identity(obj) === obj; //=> true * @symb R.identity(a) = a */ var identity = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(_internal_identity__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (identity); /***/ }), /***/ "./node_modules/ramda/es/ifElse.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/ifElse.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Creates a function that will process either the `onTrue` or the `onFalse` * function depending upon the result of the `condition` predicate. * * @func * @memberOf R * @since v0.8.0 * @category Logic * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *) * @param {Function} condition A predicate function * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value. * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value. * @return {Function} A new unary function that will process either the `onTrue` or the `onFalse` * function depending upon the result of the `condition` predicate. * @see R.unless, R.when * @example * * var incCount = R.ifElse( * R.has('count'), * R.over(R.lensProp('count'), R.inc), * R.assoc('count', 1) * ); * incCount({}); //=> { count: 1 } * incCount({ count: 1 }); //=> { count: 2 } */ var ifElse = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function ifElse(condition, onTrue, onFalse) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() { return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments); }); }); /* harmony default export */ __webpack_exports__["default"] = (ifElse); /***/ }), /***/ "./node_modules/ramda/es/inc.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/inc.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _add__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add */ "./node_modules/ramda/es/add.js"); /** * Increments its argument. * * @func * @memberOf R * @since v0.9.0 * @category Math * @sig Number -> Number * @param {Number} n * @return {Number} n + 1 * @see R.dec * @example * * R.inc(42); //=> 43 */ var inc = /*#__PURE__*/Object(_add__WEBPACK_IMPORTED_MODULE_0__["default"])(1); /* harmony default export */ __webpack_exports__["default"] = (inc); /***/ }), /***/ "./node_modules/ramda/es/index.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/index.js ***! \****************************************/ /*! exports provided: F, T, __, add, addIndex, adjust, all, allPass, always, and, any, anyPass, ap, aperture, append, apply, applySpec, applyTo, ascend, assoc, assocPath, binary, bind, both, call, chain, clamp, clone, comparator, complement, compose, composeK, composeP, concat, cond, construct, constructN, contains, converge, countBy, curry, curryN, dec, defaultTo, descend, difference, differenceWith, dissoc, dissocPath, divide, drop, dropLast, dropLastWhile, dropRepeats, dropRepeatsWith, dropWhile, either, empty, endsWith, eqBy, eqProps, equals, evolve, filter, find, findIndex, findLast, findLastIndex, flatten, flip, forEach, forEachObjIndexed, fromPairs, groupBy, groupWith, gt, gte, has, hasIn, head, identical, identity, ifElse, inc, indexBy, indexOf, init, innerJoin, insert, insertAll, intersection, intersperse, into, invert, invertObj, invoker, is, isEmpty, isNil, join, juxt, keys, keysIn, last, lastIndexOf, length, lens, lensIndex, lensPath, lensProp, lift, liftN, lt, lte, map, mapAccum, mapAccumRight, mapObjIndexed, match, mathMod, max, maxBy, mean, median, memoize, memoizeWith, merge, mergeAll, mergeDeepLeft, mergeDeepRight, mergeDeepWith, mergeDeepWithKey, mergeWith, mergeWithKey, min, minBy, modulo, multiply, nAry, negate, none, not, nth, nthArg, o, objOf, of, omit, once, or, over, pair, partial, partialRight, partition, path, pathEq, pathOr, pathSatisfies, pick, pickAll, pickBy, pipe, pipeK, pipeP, pluck, prepend, product, project, prop, propEq, propIs, propOr, propSatisfies, props, range, reduce, reduceBy, reduceRight, reduceWhile, reduced, reject, remove, repeat, replace, reverse, scan, sequence, set, slice, sort, sortBy, sortWith, split, splitAt, splitEvery, splitWhen, startsWith, subtract, sum, symmetricDifference, symmetricDifferenceWith, tail, take, takeLast, takeLastWhile, takeWhile, tap, test, times, toLower, toPairs, toPairsIn, toString, toUpper, transduce, transpose, traverse, trim, tryCatch, type, unapply, unary, uncurryN, unfold, union, unionWith, uniq, uniqBy, uniqWith, unless, unnest, until, update, useWith, values, valuesIn, view, when, where, whereEq, without, xprod, zip, zipObj, zipWith */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _F__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./F */ "./node_modules/ramda/es/F.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "F", function() { return _F__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _T__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./T */ "./node_modules/ramda/es/T.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "T", function() { return _T__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./__ */ "./node_modules/ramda/es/__.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "__", function() { return ___WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _add__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./add */ "./node_modules/ramda/es/add.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "add", function() { return _add__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _addIndex__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./addIndex */ "./node_modules/ramda/es/addIndex.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addIndex", function() { return _addIndex__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _adjust__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./adjust */ "./node_modules/ramda/es/adjust.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "adjust", function() { return _adjust__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _all__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./all */ "./node_modules/ramda/es/all.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "all", function() { return _all__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _allPass__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./allPass */ "./node_modules/ramda/es/allPass.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "allPass", function() { return _allPass__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _always__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./always */ "./node_modules/ramda/es/always.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "always", function() { return _always__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _and__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./and */ "./node_modules/ramda/es/and.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "and", function() { return _and__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _any__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./any */ "./node_modules/ramda/es/any.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "any", function() { return _any__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _anyPass__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./anyPass */ "./node_modules/ramda/es/anyPass.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "anyPass", function() { return _anyPass__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _ap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ap */ "./node_modules/ramda/es/ap.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ap", function() { return _ap__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _aperture__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./aperture */ "./node_modules/ramda/es/aperture.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "aperture", function() { return _aperture__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _append__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./append */ "./node_modules/ramda/es/append.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "append", function() { return _append__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _apply__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./apply */ "./node_modules/ramda/es/apply.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "apply", function() { return _apply__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _applySpec__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./applySpec */ "./node_modules/ramda/es/applySpec.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "applySpec", function() { return _applySpec__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony import */ var _applyTo__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./applyTo */ "./node_modules/ramda/es/applyTo.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "applyTo", function() { return _applyTo__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony import */ var _ascend__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./ascend */ "./node_modules/ramda/es/ascend.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ascend", function() { return _ascend__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony import */ var _assoc__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./assoc */ "./node_modules/ramda/es/assoc.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "assoc", function() { return _assoc__WEBPACK_IMPORTED_MODULE_19__["default"]; }); /* harmony import */ var _assocPath__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./assocPath */ "./node_modules/ramda/es/assocPath.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "assocPath", function() { return _assocPath__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /* harmony import */ var _binary__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./binary */ "./node_modules/ramda/es/binary.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "binary", function() { return _binary__WEBPACK_IMPORTED_MODULE_21__["default"]; }); /* harmony import */ var _bind__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./bind */ "./node_modules/ramda/es/bind.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bind", function() { return _bind__WEBPACK_IMPORTED_MODULE_22__["default"]; }); /* harmony import */ var _both__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./both */ "./node_modules/ramda/es/both.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "both", function() { return _both__WEBPACK_IMPORTED_MODULE_23__["default"]; }); /* harmony import */ var _call__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./call */ "./node_modules/ramda/es/call.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "call", function() { return _call__WEBPACK_IMPORTED_MODULE_24__["default"]; }); /* harmony import */ var _chain__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./chain */ "./node_modules/ramda/es/chain.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chain", function() { return _chain__WEBPACK_IMPORTED_MODULE_25__["default"]; }); /* harmony import */ var _clamp__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./clamp */ "./node_modules/ramda/es/clamp.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clamp", function() { return _clamp__WEBPACK_IMPORTED_MODULE_26__["default"]; }); /* harmony import */ var _clone__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./clone */ "./node_modules/ramda/es/clone.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return _clone__WEBPACK_IMPORTED_MODULE_27__["default"]; }); /* harmony import */ var _comparator__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./comparator */ "./node_modules/ramda/es/comparator.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "comparator", function() { return _comparator__WEBPACK_IMPORTED_MODULE_28__["default"]; }); /* harmony import */ var _complement__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./complement */ "./node_modules/ramda/es/complement.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "complement", function() { return _complement__WEBPACK_IMPORTED_MODULE_29__["default"]; }); /* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./compose */ "./node_modules/ramda/es/compose.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return _compose__WEBPACK_IMPORTED_MODULE_30__["default"]; }); /* harmony import */ var _composeK__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./composeK */ "./node_modules/ramda/es/composeK.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "composeK", function() { return _composeK__WEBPACK_IMPORTED_MODULE_31__["default"]; }); /* harmony import */ var _composeP__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./composeP */ "./node_modules/ramda/es/composeP.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "composeP", function() { return _composeP__WEBPACK_IMPORTED_MODULE_32__["default"]; }); /* harmony import */ var _concat__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./concat */ "./node_modules/ramda/es/concat.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _concat__WEBPACK_IMPORTED_MODULE_33__["default"]; }); /* harmony import */ var _cond__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./cond */ "./node_modules/ramda/es/cond.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cond", function() { return _cond__WEBPACK_IMPORTED_MODULE_34__["default"]; }); /* harmony import */ var _construct__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./construct */ "./node_modules/ramda/es/construct.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "construct", function() { return _construct__WEBPACK_IMPORTED_MODULE_35__["default"]; }); /* harmony import */ var _constructN__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./constructN */ "./node_modules/ramda/es/constructN.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "constructN", function() { return _constructN__WEBPACK_IMPORTED_MODULE_36__["default"]; }); /* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./contains */ "./node_modules/ramda/es/contains.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contains", function() { return _contains__WEBPACK_IMPORTED_MODULE_37__["default"]; }); /* harmony import */ var _converge__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./converge */ "./node_modules/ramda/es/converge.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "converge", function() { return _converge__WEBPACK_IMPORTED_MODULE_38__["default"]; }); /* harmony import */ var _countBy__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./countBy */ "./node_modules/ramda/es/countBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "countBy", function() { return _countBy__WEBPACK_IMPORTED_MODULE_39__["default"]; }); /* harmony import */ var _curry__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./curry */ "./node_modules/ramda/es/curry.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curry", function() { return _curry__WEBPACK_IMPORTED_MODULE_40__["default"]; }); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curryN", function() { return _curryN__WEBPACK_IMPORTED_MODULE_41__["default"]; }); /* harmony import */ var _dec__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./dec */ "./node_modules/ramda/es/dec.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dec", function() { return _dec__WEBPACK_IMPORTED_MODULE_42__["default"]; }); /* harmony import */ var _defaultTo__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./defaultTo */ "./node_modules/ramda/es/defaultTo.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultTo", function() { return _defaultTo__WEBPACK_IMPORTED_MODULE_43__["default"]; }); /* harmony import */ var _descend__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./descend */ "./node_modules/ramda/es/descend.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "descend", function() { return _descend__WEBPACK_IMPORTED_MODULE_44__["default"]; }); /* harmony import */ var _difference__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./difference */ "./node_modules/ramda/es/difference.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return _difference__WEBPACK_IMPORTED_MODULE_45__["default"]; }); /* harmony import */ var _differenceWith__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./differenceWith */ "./node_modules/ramda/es/differenceWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceWith", function() { return _differenceWith__WEBPACK_IMPORTED_MODULE_46__["default"]; }); /* harmony import */ var _dissoc__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./dissoc */ "./node_modules/ramda/es/dissoc.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dissoc", function() { return _dissoc__WEBPACK_IMPORTED_MODULE_47__["default"]; }); /* harmony import */ var _dissocPath__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./dissocPath */ "./node_modules/ramda/es/dissocPath.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dissocPath", function() { return _dissocPath__WEBPACK_IMPORTED_MODULE_48__["default"]; }); /* harmony import */ var _divide__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./divide */ "./node_modules/ramda/es/divide.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "divide", function() { return _divide__WEBPACK_IMPORTED_MODULE_49__["default"]; }); /* harmony import */ var _drop__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./drop */ "./node_modules/ramda/es/drop.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drop", function() { return _drop__WEBPACK_IMPORTED_MODULE_50__["default"]; }); /* harmony import */ var _dropLast__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./dropLast */ "./node_modules/ramda/es/dropLast.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropLast", function() { return _dropLast__WEBPACK_IMPORTED_MODULE_51__["default"]; }); /* harmony import */ var _dropLastWhile__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./dropLastWhile */ "./node_modules/ramda/es/dropLastWhile.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropLastWhile", function() { return _dropLastWhile__WEBPACK_IMPORTED_MODULE_52__["default"]; }); /* harmony import */ var _dropRepeats__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./dropRepeats */ "./node_modules/ramda/es/dropRepeats.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropRepeats", function() { return _dropRepeats__WEBPACK_IMPORTED_MODULE_53__["default"]; }); /* harmony import */ var _dropRepeatsWith__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./dropRepeatsWith */ "./node_modules/ramda/es/dropRepeatsWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropRepeatsWith", function() { return _dropRepeatsWith__WEBPACK_IMPORTED_MODULE_54__["default"]; }); /* harmony import */ var _dropWhile__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./dropWhile */ "./node_modules/ramda/es/dropWhile.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropWhile", function() { return _dropWhile__WEBPACK_IMPORTED_MODULE_55__["default"]; }); /* harmony import */ var _either__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./either */ "./node_modules/ramda/es/either.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "either", function() { return _either__WEBPACK_IMPORTED_MODULE_56__["default"]; }); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./empty */ "./node_modules/ramda/es/empty.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _empty__WEBPACK_IMPORTED_MODULE_57__["default"]; }); /* harmony import */ var _endsWith__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./endsWith */ "./node_modules/ramda/es/endsWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endsWith", function() { return _endsWith__WEBPACK_IMPORTED_MODULE_58__["default"]; }); /* harmony import */ var _eqBy__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./eqBy */ "./node_modules/ramda/es/eqBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eqBy", function() { return _eqBy__WEBPACK_IMPORTED_MODULE_59__["default"]; }); /* harmony import */ var _eqProps__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./eqProps */ "./node_modules/ramda/es/eqProps.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eqProps", function() { return _eqProps__WEBPACK_IMPORTED_MODULE_60__["default"]; }); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return _equals__WEBPACK_IMPORTED_MODULE_61__["default"]; }); /* harmony import */ var _evolve__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./evolve */ "./node_modules/ramda/es/evolve.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "evolve", function() { return _evolve__WEBPACK_IMPORTED_MODULE_62__["default"]; }); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./filter */ "./node_modules/ramda/es/filter.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _filter__WEBPACK_IMPORTED_MODULE_63__["default"]; }); /* harmony import */ var _find__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./find */ "./node_modules/ramda/es/find.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _find__WEBPACK_IMPORTED_MODULE_64__["default"]; }); /* harmony import */ var _findIndex__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./findIndex */ "./node_modules/ramda/es/findIndex.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _findIndex__WEBPACK_IMPORTED_MODULE_65__["default"]; }); /* harmony import */ var _findLast__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./findLast */ "./node_modules/ramda/es/findLast.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findLast", function() { return _findLast__WEBPACK_IMPORTED_MODULE_66__["default"]; }); /* harmony import */ var _findLastIndex__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./findLastIndex */ "./node_modules/ramda/es/findLastIndex.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findLastIndex", function() { return _findLastIndex__WEBPACK_IMPORTED_MODULE_67__["default"]; }); /* harmony import */ var _flatten__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./flatten */ "./node_modules/ramda/es/flatten.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatten", function() { return _flatten__WEBPACK_IMPORTED_MODULE_68__["default"]; }); /* harmony import */ var _flip__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./flip */ "./node_modules/ramda/es/flip.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flip", function() { return _flip__WEBPACK_IMPORTED_MODULE_69__["default"]; }); /* harmony import */ var _forEach__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./forEach */ "./node_modules/ramda/es/forEach.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return _forEach__WEBPACK_IMPORTED_MODULE_70__["default"]; }); /* harmony import */ var _forEachObjIndexed__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./forEachObjIndexed */ "./node_modules/ramda/es/forEachObjIndexed.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forEachObjIndexed", function() { return _forEachObjIndexed__WEBPACK_IMPORTED_MODULE_71__["default"]; }); /* harmony import */ var _fromPairs__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./fromPairs */ "./node_modules/ramda/es/fromPairs.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromPairs", function() { return _fromPairs__WEBPACK_IMPORTED_MODULE_72__["default"]; }); /* harmony import */ var _groupBy__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./groupBy */ "./node_modules/ramda/es/groupBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _groupBy__WEBPACK_IMPORTED_MODULE_73__["default"]; }); /* harmony import */ var _groupWith__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./groupWith */ "./node_modules/ramda/es/groupWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupWith", function() { return _groupWith__WEBPACK_IMPORTED_MODULE_74__["default"]; }); /* harmony import */ var _gt__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./gt */ "./node_modules/ramda/es/gt.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gt", function() { return _gt__WEBPACK_IMPORTED_MODULE_75__["default"]; }); /* harmony import */ var _gte__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./gte */ "./node_modules/ramda/es/gte.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gte", function() { return _gte__WEBPACK_IMPORTED_MODULE_76__["default"]; }); /* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./has */ "./node_modules/ramda/es/has.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "has", function() { return _has__WEBPACK_IMPORTED_MODULE_77__["default"]; }); /* harmony import */ var _hasIn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./hasIn */ "./node_modules/ramda/es/hasIn.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hasIn", function() { return _hasIn__WEBPACK_IMPORTED_MODULE_78__["default"]; }); /* harmony import */ var _head__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./head */ "./node_modules/ramda/es/head.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "head", function() { return _head__WEBPACK_IMPORTED_MODULE_79__["default"]; }); /* harmony import */ var _identical__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./identical */ "./node_modules/ramda/es/identical.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identical", function() { return _identical__WEBPACK_IMPORTED_MODULE_80__["default"]; }); /* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./identity */ "./node_modules/ramda/es/identity.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _identity__WEBPACK_IMPORTED_MODULE_81__["default"]; }); /* harmony import */ var _ifElse__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./ifElse */ "./node_modules/ramda/es/ifElse.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ifElse", function() { return _ifElse__WEBPACK_IMPORTED_MODULE_82__["default"]; }); /* harmony import */ var _inc__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./inc */ "./node_modules/ramda/es/inc.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "inc", function() { return _inc__WEBPACK_IMPORTED_MODULE_83__["default"]; }); /* harmony import */ var _indexBy__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./indexBy */ "./node_modules/ramda/es/indexBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indexBy", function() { return _indexBy__WEBPACK_IMPORTED_MODULE_84__["default"]; }); /* harmony import */ var _indexOf__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./indexOf */ "./node_modules/ramda/es/indexOf.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indexOf", function() { return _indexOf__WEBPACK_IMPORTED_MODULE_85__["default"]; }); /* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./init */ "./node_modules/ramda/es/init.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "init", function() { return _init__WEBPACK_IMPORTED_MODULE_86__["default"]; }); /* harmony import */ var _innerJoin__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./innerJoin */ "./node_modules/ramda/es/innerJoin.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "innerJoin", function() { return _innerJoin__WEBPACK_IMPORTED_MODULE_87__["default"]; }); /* harmony import */ var _insert__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./insert */ "./node_modules/ramda/es/insert.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "insert", function() { return _insert__WEBPACK_IMPORTED_MODULE_88__["default"]; }); /* harmony import */ var _insertAll__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./insertAll */ "./node_modules/ramda/es/insertAll.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "insertAll", function() { return _insertAll__WEBPACK_IMPORTED_MODULE_89__["default"]; }); /* harmony import */ var _intersection__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./intersection */ "./node_modules/ramda/es/intersection.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "intersection", function() { return _intersection__WEBPACK_IMPORTED_MODULE_90__["default"]; }); /* harmony import */ var _intersperse__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./intersperse */ "./node_modules/ramda/es/intersperse.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "intersperse", function() { return _intersperse__WEBPACK_IMPORTED_MODULE_91__["default"]; }); /* harmony import */ var _into__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./into */ "./node_modules/ramda/es/into.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "into", function() { return _into__WEBPACK_IMPORTED_MODULE_92__["default"]; }); /* harmony import */ var _invert__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ./invert */ "./node_modules/ramda/es/invert.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "invert", function() { return _invert__WEBPACK_IMPORTED_MODULE_93__["default"]; }); /* harmony import */ var _invertObj__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ./invertObj */ "./node_modules/ramda/es/invertObj.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "invertObj", function() { return _invertObj__WEBPACK_IMPORTED_MODULE_94__["default"]; }); /* harmony import */ var _invoker__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ./invoker */ "./node_modules/ramda/es/invoker.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "invoker", function() { return _invoker__WEBPACK_IMPORTED_MODULE_95__["default"]; }); /* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ./is */ "./node_modules/ramda/es/is.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "is", function() { return _is__WEBPACK_IMPORTED_MODULE_96__["default"]; }); /* harmony import */ var _isEmpty__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ./isEmpty */ "./node_modules/ramda/es/isEmpty.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _isEmpty__WEBPACK_IMPORTED_MODULE_97__["default"]; }); /* harmony import */ var _isNil__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./isNil */ "./node_modules/ramda/es/isNil.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isNil", function() { return _isNil__WEBPACK_IMPORTED_MODULE_98__["default"]; }); /* harmony import */ var _join__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ./join */ "./node_modules/ramda/es/join.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "join", function() { return _join__WEBPACK_IMPORTED_MODULE_99__["default"]; }); /* harmony import */ var _juxt__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ./juxt */ "./node_modules/ramda/es/juxt.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "juxt", function() { return _juxt__WEBPACK_IMPORTED_MODULE_100__["default"]; }); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return _keys__WEBPACK_IMPORTED_MODULE_101__["default"]; }); /* harmony import */ var _keysIn__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./keysIn */ "./node_modules/ramda/es/keysIn.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keysIn", function() { return _keysIn__WEBPACK_IMPORTED_MODULE_102__["default"]; }); /* harmony import */ var _last__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./last */ "./node_modules/ramda/es/last.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _last__WEBPACK_IMPORTED_MODULE_103__["default"]; }); /* harmony import */ var _lastIndexOf__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./lastIndexOf */ "./node_modules/ramda/es/lastIndexOf.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lastIndexOf", function() { return _lastIndexOf__WEBPACK_IMPORTED_MODULE_104__["default"]; }); /* harmony import */ var _length__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./length */ "./node_modules/ramda/es/length.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "length", function() { return _length__WEBPACK_IMPORTED_MODULE_105__["default"]; }); /* harmony import */ var _lens__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./lens */ "./node_modules/ramda/es/lens.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lens", function() { return _lens__WEBPACK_IMPORTED_MODULE_106__["default"]; }); /* harmony import */ var _lensIndex__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./lensIndex */ "./node_modules/ramda/es/lensIndex.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lensIndex", function() { return _lensIndex__WEBPACK_IMPORTED_MODULE_107__["default"]; }); /* harmony import */ var _lensPath__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./lensPath */ "./node_modules/ramda/es/lensPath.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lensPath", function() { return _lensPath__WEBPACK_IMPORTED_MODULE_108__["default"]; }); /* harmony import */ var _lensProp__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(/*! ./lensProp */ "./node_modules/ramda/es/lensProp.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lensProp", function() { return _lensProp__WEBPACK_IMPORTED_MODULE_109__["default"]; }); /* harmony import */ var _lift__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(/*! ./lift */ "./node_modules/ramda/es/lift.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lift", function() { return _lift__WEBPACK_IMPORTED_MODULE_110__["default"]; }); /* harmony import */ var _liftN__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(/*! ./liftN */ "./node_modules/ramda/es/liftN.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "liftN", function() { return _liftN__WEBPACK_IMPORTED_MODULE_111__["default"]; }); /* harmony import */ var _lt__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(/*! ./lt */ "./node_modules/ramda/es/lt.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lt", function() { return _lt__WEBPACK_IMPORTED_MODULE_112__["default"]; }); /* harmony import */ var _lte__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(/*! ./lte */ "./node_modules/ramda/es/lte.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lte", function() { return _lte__WEBPACK_IMPORTED_MODULE_113__["default"]; }); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _map__WEBPACK_IMPORTED_MODULE_114__["default"]; }); /* harmony import */ var _mapAccum__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ./mapAccum */ "./node_modules/ramda/es/mapAccum.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapAccum", function() { return _mapAccum__WEBPACK_IMPORTED_MODULE_115__["default"]; }); /* harmony import */ var _mapAccumRight__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! ./mapAccumRight */ "./node_modules/ramda/es/mapAccumRight.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapAccumRight", function() { return _mapAccumRight__WEBPACK_IMPORTED_MODULE_116__["default"]; }); /* harmony import */ var _mapObjIndexed__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(/*! ./mapObjIndexed */ "./node_modules/ramda/es/mapObjIndexed.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapObjIndexed", function() { return _mapObjIndexed__WEBPACK_IMPORTED_MODULE_117__["default"]; }); /* harmony import */ var _match__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./match */ "./node_modules/ramda/es/match.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "match", function() { return _match__WEBPACK_IMPORTED_MODULE_118__["default"]; }); /* harmony import */ var _mathMod__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ./mathMod */ "./node_modules/ramda/es/mathMod.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mathMod", function() { return _mathMod__WEBPACK_IMPORTED_MODULE_119__["default"]; }); /* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ./max */ "./node_modules/ramda/es/max.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _max__WEBPACK_IMPORTED_MODULE_120__["default"]; }); /* harmony import */ var _maxBy__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(/*! ./maxBy */ "./node_modules/ramda/es/maxBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maxBy", function() { return _maxBy__WEBPACK_IMPORTED_MODULE_121__["default"]; }); /* harmony import */ var _mean__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(/*! ./mean */ "./node_modules/ramda/es/mean.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mean", function() { return _mean__WEBPACK_IMPORTED_MODULE_122__["default"]; }); /* harmony import */ var _median__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(/*! ./median */ "./node_modules/ramda/es/median.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "median", function() { return _median__WEBPACK_IMPORTED_MODULE_123__["default"]; }); /* harmony import */ var _memoize__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(/*! ./memoize */ "./node_modules/ramda/es/memoize.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "memoize", function() { return _memoize__WEBPACK_IMPORTED_MODULE_124__["default"]; }); /* harmony import */ var _memoizeWith__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(/*! ./memoizeWith */ "./node_modules/ramda/es/memoizeWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "memoizeWith", function() { return _memoizeWith__WEBPACK_IMPORTED_MODULE_125__["default"]; }); /* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(/*! ./merge */ "./node_modules/ramda/es/merge.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _merge__WEBPACK_IMPORTED_MODULE_126__["default"]; }); /* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(/*! ./mergeAll */ "./node_modules/ramda/es/mergeAll.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _mergeAll__WEBPACK_IMPORTED_MODULE_127__["default"]; }); /* harmony import */ var _mergeDeepLeft__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(/*! ./mergeDeepLeft */ "./node_modules/ramda/es/mergeDeepLeft.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeDeepLeft", function() { return _mergeDeepLeft__WEBPACK_IMPORTED_MODULE_128__["default"]; }); /* harmony import */ var _mergeDeepRight__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(/*! ./mergeDeepRight */ "./node_modules/ramda/es/mergeDeepRight.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeDeepRight", function() { return _mergeDeepRight__WEBPACK_IMPORTED_MODULE_129__["default"]; }); /* harmony import */ var _mergeDeepWith__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(/*! ./mergeDeepWith */ "./node_modules/ramda/es/mergeDeepWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeDeepWith", function() { return _mergeDeepWith__WEBPACK_IMPORTED_MODULE_130__["default"]; }); /* harmony import */ var _mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(/*! ./mergeDeepWithKey */ "./node_modules/ramda/es/mergeDeepWithKey.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeDeepWithKey", function() { return _mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_131__["default"]; }); /* harmony import */ var _mergeWith__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(/*! ./mergeWith */ "./node_modules/ramda/es/mergeWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeWith", function() { return _mergeWith__WEBPACK_IMPORTED_MODULE_132__["default"]; }); /* harmony import */ var _mergeWithKey__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(/*! ./mergeWithKey */ "./node_modules/ramda/es/mergeWithKey.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeWithKey", function() { return _mergeWithKey__WEBPACK_IMPORTED_MODULE_133__["default"]; }); /* harmony import */ var _min__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(/*! ./min */ "./node_modules/ramda/es/min.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _min__WEBPACK_IMPORTED_MODULE_134__["default"]; }); /* harmony import */ var _minBy__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(/*! ./minBy */ "./node_modules/ramda/es/minBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minBy", function() { return _minBy__WEBPACK_IMPORTED_MODULE_135__["default"]; }); /* harmony import */ var _modulo__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(/*! ./modulo */ "./node_modules/ramda/es/modulo.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "modulo", function() { return _modulo__WEBPACK_IMPORTED_MODULE_136__["default"]; }); /* harmony import */ var _multiply__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(/*! ./multiply */ "./node_modules/ramda/es/multiply.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multiply", function() { return _multiply__WEBPACK_IMPORTED_MODULE_137__["default"]; }); /* harmony import */ var _nAry__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(/*! ./nAry */ "./node_modules/ramda/es/nAry.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nAry", function() { return _nAry__WEBPACK_IMPORTED_MODULE_138__["default"]; }); /* harmony import */ var _negate__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(/*! ./negate */ "./node_modules/ramda/es/negate.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "negate", function() { return _negate__WEBPACK_IMPORTED_MODULE_139__["default"]; }); /* harmony import */ var _none__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(/*! ./none */ "./node_modules/ramda/es/none.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "none", function() { return _none__WEBPACK_IMPORTED_MODULE_140__["default"]; }); /* harmony import */ var _not__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(/*! ./not */ "./node_modules/ramda/es/not.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "not", function() { return _not__WEBPACK_IMPORTED_MODULE_141__["default"]; }); /* harmony import */ var _nth__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(/*! ./nth */ "./node_modules/ramda/es/nth.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nth", function() { return _nth__WEBPACK_IMPORTED_MODULE_142__["default"]; }); /* harmony import */ var _nthArg__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(/*! ./nthArg */ "./node_modules/ramda/es/nthArg.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nthArg", function() { return _nthArg__WEBPACK_IMPORTED_MODULE_143__["default"]; }); /* harmony import */ var _o__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(/*! ./o */ "./node_modules/ramda/es/o.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "o", function() { return _o__WEBPACK_IMPORTED_MODULE_144__["default"]; }); /* harmony import */ var _objOf__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(/*! ./objOf */ "./node_modules/ramda/es/objOf.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "objOf", function() { return _objOf__WEBPACK_IMPORTED_MODULE_145__["default"]; }); /* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(/*! ./of */ "./node_modules/ramda/es/of.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _of__WEBPACK_IMPORTED_MODULE_146__["default"]; }); /* harmony import */ var _omit__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(/*! ./omit */ "./node_modules/ramda/es/omit.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "omit", function() { return _omit__WEBPACK_IMPORTED_MODULE_147__["default"]; }); /* harmony import */ var _once__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(/*! ./once */ "./node_modules/ramda/es/once.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "once", function() { return _once__WEBPACK_IMPORTED_MODULE_148__["default"]; }); /* harmony import */ var _or__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(/*! ./or */ "./node_modules/ramda/es/or.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "or", function() { return _or__WEBPACK_IMPORTED_MODULE_149__["default"]; }); /* harmony import */ var _over__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(/*! ./over */ "./node_modules/ramda/es/over.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "over", function() { return _over__WEBPACK_IMPORTED_MODULE_150__["default"]; }); /* harmony import */ var _pair__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(/*! ./pair */ "./node_modules/ramda/es/pair.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pair", function() { return _pair__WEBPACK_IMPORTED_MODULE_151__["default"]; }); /* harmony import */ var _partial__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(/*! ./partial */ "./node_modules/ramda/es/partial.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partial", function() { return _partial__WEBPACK_IMPORTED_MODULE_152__["default"]; }); /* harmony import */ var _partialRight__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(/*! ./partialRight */ "./node_modules/ramda/es/partialRight.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partialRight", function() { return _partialRight__WEBPACK_IMPORTED_MODULE_153__["default"]; }); /* harmony import */ var _partition__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(/*! ./partition */ "./node_modules/ramda/es/partition.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _partition__WEBPACK_IMPORTED_MODULE_154__["default"]; }); /* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__(/*! ./path */ "./node_modules/ramda/es/path.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path", function() { return _path__WEBPACK_IMPORTED_MODULE_155__["default"]; }); /* harmony import */ var _pathEq__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__(/*! ./pathEq */ "./node_modules/ramda/es/pathEq.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pathEq", function() { return _pathEq__WEBPACK_IMPORTED_MODULE_156__["default"]; }); /* harmony import */ var _pathOr__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__(/*! ./pathOr */ "./node_modules/ramda/es/pathOr.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pathOr", function() { return _pathOr__WEBPACK_IMPORTED_MODULE_157__["default"]; }); /* harmony import */ var _pathSatisfies__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(/*! ./pathSatisfies */ "./node_modules/ramda/es/pathSatisfies.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pathSatisfies", function() { return _pathSatisfies__WEBPACK_IMPORTED_MODULE_158__["default"]; }); /* harmony import */ var _pick__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(/*! ./pick */ "./node_modules/ramda/es/pick.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pick", function() { return _pick__WEBPACK_IMPORTED_MODULE_159__["default"]; }); /* harmony import */ var _pickAll__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(/*! ./pickAll */ "./node_modules/ramda/es/pickAll.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pickAll", function() { return _pickAll__WEBPACK_IMPORTED_MODULE_160__["default"]; }); /* harmony import */ var _pickBy__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__(/*! ./pickBy */ "./node_modules/ramda/es/pickBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pickBy", function() { return _pickBy__WEBPACK_IMPORTED_MODULE_161__["default"]; }); /* harmony import */ var _pipe__WEBPACK_IMPORTED_MODULE_162__ = __webpack_require__(/*! ./pipe */ "./node_modules/ramda/es/pipe.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _pipe__WEBPACK_IMPORTED_MODULE_162__["default"]; }); /* harmony import */ var _pipeK__WEBPACK_IMPORTED_MODULE_163__ = __webpack_require__(/*! ./pipeK */ "./node_modules/ramda/es/pipeK.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipeK", function() { return _pipeK__WEBPACK_IMPORTED_MODULE_163__["default"]; }); /* harmony import */ var _pipeP__WEBPACK_IMPORTED_MODULE_164__ = __webpack_require__(/*! ./pipeP */ "./node_modules/ramda/es/pipeP.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipeP", function() { return _pipeP__WEBPACK_IMPORTED_MODULE_164__["default"]; }); /* harmony import */ var _pluck__WEBPACK_IMPORTED_MODULE_165__ = __webpack_require__(/*! ./pluck */ "./node_modules/ramda/es/pluck.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _pluck__WEBPACK_IMPORTED_MODULE_165__["default"]; }); /* harmony import */ var _prepend__WEBPACK_IMPORTED_MODULE_166__ = __webpack_require__(/*! ./prepend */ "./node_modules/ramda/es/prepend.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prepend", function() { return _prepend__WEBPACK_IMPORTED_MODULE_166__["default"]; }); /* harmony import */ var _product__WEBPACK_IMPORTED_MODULE_167__ = __webpack_require__(/*! ./product */ "./node_modules/ramda/es/product.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "product", function() { return _product__WEBPACK_IMPORTED_MODULE_167__["default"]; }); /* harmony import */ var _project__WEBPACK_IMPORTED_MODULE_168__ = __webpack_require__(/*! ./project */ "./node_modules/ramda/es/project.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "project", function() { return _project__WEBPACK_IMPORTED_MODULE_168__["default"]; }); /* harmony import */ var _prop__WEBPACK_IMPORTED_MODULE_169__ = __webpack_require__(/*! ./prop */ "./node_modules/ramda/es/prop.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prop", function() { return _prop__WEBPACK_IMPORTED_MODULE_169__["default"]; }); /* harmony import */ var _propEq__WEBPACK_IMPORTED_MODULE_170__ = __webpack_require__(/*! ./propEq */ "./node_modules/ramda/es/propEq.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "propEq", function() { return _propEq__WEBPACK_IMPORTED_MODULE_170__["default"]; }); /* harmony import */ var _propIs__WEBPACK_IMPORTED_MODULE_171__ = __webpack_require__(/*! ./propIs */ "./node_modules/ramda/es/propIs.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "propIs", function() { return _propIs__WEBPACK_IMPORTED_MODULE_171__["default"]; }); /* harmony import */ var _propOr__WEBPACK_IMPORTED_MODULE_172__ = __webpack_require__(/*! ./propOr */ "./node_modules/ramda/es/propOr.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "propOr", function() { return _propOr__WEBPACK_IMPORTED_MODULE_172__["default"]; }); /* harmony import */ var _propSatisfies__WEBPACK_IMPORTED_MODULE_173__ = __webpack_require__(/*! ./propSatisfies */ "./node_modules/ramda/es/propSatisfies.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "propSatisfies", function() { return _propSatisfies__WEBPACK_IMPORTED_MODULE_173__["default"]; }); /* harmony import */ var _props__WEBPACK_IMPORTED_MODULE_174__ = __webpack_require__(/*! ./props */ "./node_modules/ramda/es/props.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "props", function() { return _props__WEBPACK_IMPORTED_MODULE_174__["default"]; }); /* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_175__ = __webpack_require__(/*! ./range */ "./node_modules/ramda/es/range.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _range__WEBPACK_IMPORTED_MODULE_175__["default"]; }); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_176__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _reduce__WEBPACK_IMPORTED_MODULE_176__["default"]; }); /* harmony import */ var _reduceBy__WEBPACK_IMPORTED_MODULE_177__ = __webpack_require__(/*! ./reduceBy */ "./node_modules/ramda/es/reduceBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduceBy", function() { return _reduceBy__WEBPACK_IMPORTED_MODULE_177__["default"]; }); /* harmony import */ var _reduceRight__WEBPACK_IMPORTED_MODULE_178__ = __webpack_require__(/*! ./reduceRight */ "./node_modules/ramda/es/reduceRight.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduceRight", function() { return _reduceRight__WEBPACK_IMPORTED_MODULE_178__["default"]; }); /* harmony import */ var _reduceWhile__WEBPACK_IMPORTED_MODULE_179__ = __webpack_require__(/*! ./reduceWhile */ "./node_modules/ramda/es/reduceWhile.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduceWhile", function() { return _reduceWhile__WEBPACK_IMPORTED_MODULE_179__["default"]; }); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_180__ = __webpack_require__(/*! ./reduced */ "./node_modules/ramda/es/reduced.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduced", function() { return _reduced__WEBPACK_IMPORTED_MODULE_180__["default"]; }); /* harmony import */ var _reject__WEBPACK_IMPORTED_MODULE_181__ = __webpack_require__(/*! ./reject */ "./node_modules/ramda/es/reject.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reject", function() { return _reject__WEBPACK_IMPORTED_MODULE_181__["default"]; }); /* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_182__ = __webpack_require__(/*! ./remove */ "./node_modules/ramda/es/remove.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "remove", function() { return _remove__WEBPACK_IMPORTED_MODULE_182__["default"]; }); /* harmony import */ var _repeat__WEBPACK_IMPORTED_MODULE_183__ = __webpack_require__(/*! ./repeat */ "./node_modules/ramda/es/repeat.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _repeat__WEBPACK_IMPORTED_MODULE_183__["default"]; }); /* harmony import */ var _replace__WEBPACK_IMPORTED_MODULE_184__ = __webpack_require__(/*! ./replace */ "./node_modules/ramda/es/replace.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "replace", function() { return _replace__WEBPACK_IMPORTED_MODULE_184__["default"]; }); /* harmony import */ var _reverse__WEBPACK_IMPORTED_MODULE_185__ = __webpack_require__(/*! ./reverse */ "./node_modules/ramda/es/reverse.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reverse", function() { return _reverse__WEBPACK_IMPORTED_MODULE_185__["default"]; }); /* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_186__ = __webpack_require__(/*! ./scan */ "./node_modules/ramda/es/scan.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _scan__WEBPACK_IMPORTED_MODULE_186__["default"]; }); /* harmony import */ var _sequence__WEBPACK_IMPORTED_MODULE_187__ = __webpack_require__(/*! ./sequence */ "./node_modules/ramda/es/sequence.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequence", function() { return _sequence__WEBPACK_IMPORTED_MODULE_187__["default"]; }); /* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_188__ = __webpack_require__(/*! ./set */ "./node_modules/ramda/es/set.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "set", function() { return _set__WEBPACK_IMPORTED_MODULE_188__["default"]; }); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_189__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return _slice__WEBPACK_IMPORTED_MODULE_189__["default"]; }); /* harmony import */ var _sort__WEBPACK_IMPORTED_MODULE_190__ = __webpack_require__(/*! ./sort */ "./node_modules/ramda/es/sort.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sort", function() { return _sort__WEBPACK_IMPORTED_MODULE_190__["default"]; }); /* harmony import */ var _sortBy__WEBPACK_IMPORTED_MODULE_191__ = __webpack_require__(/*! ./sortBy */ "./node_modules/ramda/es/sortBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sortBy", function() { return _sortBy__WEBPACK_IMPORTED_MODULE_191__["default"]; }); /* harmony import */ var _sortWith__WEBPACK_IMPORTED_MODULE_192__ = __webpack_require__(/*! ./sortWith */ "./node_modules/ramda/es/sortWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sortWith", function() { return _sortWith__WEBPACK_IMPORTED_MODULE_192__["default"]; }); /* harmony import */ var _split__WEBPACK_IMPORTED_MODULE_193__ = __webpack_require__(/*! ./split */ "./node_modules/ramda/es/split.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "split", function() { return _split__WEBPACK_IMPORTED_MODULE_193__["default"]; }); /* harmony import */ var _splitAt__WEBPACK_IMPORTED_MODULE_194__ = __webpack_require__(/*! ./splitAt */ "./node_modules/ramda/es/splitAt.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "splitAt", function() { return _splitAt__WEBPACK_IMPORTED_MODULE_194__["default"]; }); /* harmony import */ var _splitEvery__WEBPACK_IMPORTED_MODULE_195__ = __webpack_require__(/*! ./splitEvery */ "./node_modules/ramda/es/splitEvery.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "splitEvery", function() { return _splitEvery__WEBPACK_IMPORTED_MODULE_195__["default"]; }); /* harmony import */ var _splitWhen__WEBPACK_IMPORTED_MODULE_196__ = __webpack_require__(/*! ./splitWhen */ "./node_modules/ramda/es/splitWhen.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "splitWhen", function() { return _splitWhen__WEBPACK_IMPORTED_MODULE_196__["default"]; }); /* harmony import */ var _startsWith__WEBPACK_IMPORTED_MODULE_197__ = __webpack_require__(/*! ./startsWith */ "./node_modules/ramda/es/startsWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startsWith", function() { return _startsWith__WEBPACK_IMPORTED_MODULE_197__["default"]; }); /* harmony import */ var _subtract__WEBPACK_IMPORTED_MODULE_198__ = __webpack_require__(/*! ./subtract */ "./node_modules/ramda/es/subtract.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subtract", function() { return _subtract__WEBPACK_IMPORTED_MODULE_198__["default"]; }); /* harmony import */ var _sum__WEBPACK_IMPORTED_MODULE_199__ = __webpack_require__(/*! ./sum */ "./node_modules/ramda/es/sum.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return _sum__WEBPACK_IMPORTED_MODULE_199__["default"]; }); /* harmony import */ var _symmetricDifference__WEBPACK_IMPORTED_MODULE_200__ = __webpack_require__(/*! ./symmetricDifference */ "./node_modules/ramda/es/symmetricDifference.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symmetricDifference", function() { return _symmetricDifference__WEBPACK_IMPORTED_MODULE_200__["default"]; }); /* harmony import */ var _symmetricDifferenceWith__WEBPACK_IMPORTED_MODULE_201__ = __webpack_require__(/*! ./symmetricDifferenceWith */ "./node_modules/ramda/es/symmetricDifferenceWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symmetricDifferenceWith", function() { return _symmetricDifferenceWith__WEBPACK_IMPORTED_MODULE_201__["default"]; }); /* harmony import */ var _tail__WEBPACK_IMPORTED_MODULE_202__ = __webpack_require__(/*! ./tail */ "./node_modules/ramda/es/tail.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tail", function() { return _tail__WEBPACK_IMPORTED_MODULE_202__["default"]; }); /* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_203__ = __webpack_require__(/*! ./take */ "./node_modules/ramda/es/take.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _take__WEBPACK_IMPORTED_MODULE_203__["default"]; }); /* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_204__ = __webpack_require__(/*! ./takeLast */ "./node_modules/ramda/es/takeLast.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _takeLast__WEBPACK_IMPORTED_MODULE_204__["default"]; }); /* harmony import */ var _takeLastWhile__WEBPACK_IMPORTED_MODULE_205__ = __webpack_require__(/*! ./takeLastWhile */ "./node_modules/ramda/es/takeLastWhile.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLastWhile", function() { return _takeLastWhile__WEBPACK_IMPORTED_MODULE_205__["default"]; }); /* harmony import */ var _takeWhile__WEBPACK_IMPORTED_MODULE_206__ = __webpack_require__(/*! ./takeWhile */ "./node_modules/ramda/es/takeWhile.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _takeWhile__WEBPACK_IMPORTED_MODULE_206__["default"]; }); /* harmony import */ var _tap__WEBPACK_IMPORTED_MODULE_207__ = __webpack_require__(/*! ./tap */ "./node_modules/ramda/es/tap.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _tap__WEBPACK_IMPORTED_MODULE_207__["default"]; }); /* harmony import */ var _test__WEBPACK_IMPORTED_MODULE_208__ = __webpack_require__(/*! ./test */ "./node_modules/ramda/es/test.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "test", function() { return _test__WEBPACK_IMPORTED_MODULE_208__["default"]; }); /* harmony import */ var _times__WEBPACK_IMPORTED_MODULE_209__ = __webpack_require__(/*! ./times */ "./node_modules/ramda/es/times.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "times", function() { return _times__WEBPACK_IMPORTED_MODULE_209__["default"]; }); /* harmony import */ var _toLower__WEBPACK_IMPORTED_MODULE_210__ = __webpack_require__(/*! ./toLower */ "./node_modules/ramda/es/toLower.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toLower", function() { return _toLower__WEBPACK_IMPORTED_MODULE_210__["default"]; }); /* harmony import */ var _toPairs__WEBPACK_IMPORTED_MODULE_211__ = __webpack_require__(/*! ./toPairs */ "./node_modules/ramda/es/toPairs.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toPairs", function() { return _toPairs__WEBPACK_IMPORTED_MODULE_211__["default"]; }); /* harmony import */ var _toPairsIn__WEBPACK_IMPORTED_MODULE_212__ = __webpack_require__(/*! ./toPairsIn */ "./node_modules/ramda/es/toPairsIn.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toPairsIn", function() { return _toPairsIn__WEBPACK_IMPORTED_MODULE_212__["default"]; }); /* harmony import */ var _toString__WEBPACK_IMPORTED_MODULE_213__ = __webpack_require__(/*! ./toString */ "./node_modules/ramda/es/toString.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toString", function() { return _toString__WEBPACK_IMPORTED_MODULE_213__["default"]; }); /* harmony import */ var _toUpper__WEBPACK_IMPORTED_MODULE_214__ = __webpack_require__(/*! ./toUpper */ "./node_modules/ramda/es/toUpper.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toUpper", function() { return _toUpper__WEBPACK_IMPORTED_MODULE_214__["default"]; }); /* harmony import */ var _transduce__WEBPACK_IMPORTED_MODULE_215__ = __webpack_require__(/*! ./transduce */ "./node_modules/ramda/es/transduce.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transduce", function() { return _transduce__WEBPACK_IMPORTED_MODULE_215__["default"]; }); /* harmony import */ var _transpose__WEBPACK_IMPORTED_MODULE_216__ = __webpack_require__(/*! ./transpose */ "./node_modules/ramda/es/transpose.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return _transpose__WEBPACK_IMPORTED_MODULE_216__["default"]; }); /* harmony import */ var _traverse__WEBPACK_IMPORTED_MODULE_217__ = __webpack_require__(/*! ./traverse */ "./node_modules/ramda/es/traverse.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "traverse", function() { return _traverse__WEBPACK_IMPORTED_MODULE_217__["default"]; }); /* harmony import */ var _trim__WEBPACK_IMPORTED_MODULE_218__ = __webpack_require__(/*! ./trim */ "./node_modules/ramda/es/trim.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "trim", function() { return _trim__WEBPACK_IMPORTED_MODULE_218__["default"]; }); /* harmony import */ var _tryCatch__WEBPACK_IMPORTED_MODULE_219__ = __webpack_require__(/*! ./tryCatch */ "./node_modules/ramda/es/tryCatch.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tryCatch", function() { return _tryCatch__WEBPACK_IMPORTED_MODULE_219__["default"]; }); /* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_220__ = __webpack_require__(/*! ./type */ "./node_modules/ramda/es/type.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "type", function() { return _type__WEBPACK_IMPORTED_MODULE_220__["default"]; }); /* harmony import */ var _unapply__WEBPACK_IMPORTED_MODULE_221__ = __webpack_require__(/*! ./unapply */ "./node_modules/ramda/es/unapply.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unapply", function() { return _unapply__WEBPACK_IMPORTED_MODULE_221__["default"]; }); /* harmony import */ var _unary__WEBPACK_IMPORTED_MODULE_222__ = __webpack_require__(/*! ./unary */ "./node_modules/ramda/es/unary.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unary", function() { return _unary__WEBPACK_IMPORTED_MODULE_222__["default"]; }); /* harmony import */ var _uncurryN__WEBPACK_IMPORTED_MODULE_223__ = __webpack_require__(/*! ./uncurryN */ "./node_modules/ramda/es/uncurryN.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uncurryN", function() { return _uncurryN__WEBPACK_IMPORTED_MODULE_223__["default"]; }); /* harmony import */ var _unfold__WEBPACK_IMPORTED_MODULE_224__ = __webpack_require__(/*! ./unfold */ "./node_modules/ramda/es/unfold.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unfold", function() { return _unfold__WEBPACK_IMPORTED_MODULE_224__["default"]; }); /* harmony import */ var _union__WEBPACK_IMPORTED_MODULE_225__ = __webpack_require__(/*! ./union */ "./node_modules/ramda/es/union.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "union", function() { return _union__WEBPACK_IMPORTED_MODULE_225__["default"]; }); /* harmony import */ var _unionWith__WEBPACK_IMPORTED_MODULE_226__ = __webpack_require__(/*! ./unionWith */ "./node_modules/ramda/es/unionWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unionWith", function() { return _unionWith__WEBPACK_IMPORTED_MODULE_226__["default"]; }); /* harmony import */ var _uniq__WEBPACK_IMPORTED_MODULE_227__ = __webpack_require__(/*! ./uniq */ "./node_modules/ramda/es/uniq.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uniq", function() { return _uniq__WEBPACK_IMPORTED_MODULE_227__["default"]; }); /* harmony import */ var _uniqBy__WEBPACK_IMPORTED_MODULE_228__ = __webpack_require__(/*! ./uniqBy */ "./node_modules/ramda/es/uniqBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uniqBy", function() { return _uniqBy__WEBPACK_IMPORTED_MODULE_228__["default"]; }); /* harmony import */ var _uniqWith__WEBPACK_IMPORTED_MODULE_229__ = __webpack_require__(/*! ./uniqWith */ "./node_modules/ramda/es/uniqWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uniqWith", function() { return _uniqWith__WEBPACK_IMPORTED_MODULE_229__["default"]; }); /* harmony import */ var _unless__WEBPACK_IMPORTED_MODULE_230__ = __webpack_require__(/*! ./unless */ "./node_modules/ramda/es/unless.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unless", function() { return _unless__WEBPACK_IMPORTED_MODULE_230__["default"]; }); /* harmony import */ var _unnest__WEBPACK_IMPORTED_MODULE_231__ = __webpack_require__(/*! ./unnest */ "./node_modules/ramda/es/unnest.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unnest", function() { return _unnest__WEBPACK_IMPORTED_MODULE_231__["default"]; }); /* harmony import */ var _until__WEBPACK_IMPORTED_MODULE_232__ = __webpack_require__(/*! ./until */ "./node_modules/ramda/es/until.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "until", function() { return _until__WEBPACK_IMPORTED_MODULE_232__["default"]; }); /* harmony import */ var _update__WEBPACK_IMPORTED_MODULE_233__ = __webpack_require__(/*! ./update */ "./node_modules/ramda/es/update.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "update", function() { return _update__WEBPACK_IMPORTED_MODULE_233__["default"]; }); /* harmony import */ var _useWith__WEBPACK_IMPORTED_MODULE_234__ = __webpack_require__(/*! ./useWith */ "./node_modules/ramda/es/useWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useWith", function() { return _useWith__WEBPACK_IMPORTED_MODULE_234__["default"]; }); /* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_235__ = __webpack_require__(/*! ./values */ "./node_modules/ramda/es/values.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "values", function() { return _values__WEBPACK_IMPORTED_MODULE_235__["default"]; }); /* harmony import */ var _valuesIn__WEBPACK_IMPORTED_MODULE_236__ = __webpack_require__(/*! ./valuesIn */ "./node_modules/ramda/es/valuesIn.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "valuesIn", function() { return _valuesIn__WEBPACK_IMPORTED_MODULE_236__["default"]; }); /* harmony import */ var _view__WEBPACK_IMPORTED_MODULE_237__ = __webpack_require__(/*! ./view */ "./node_modules/ramda/es/view.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "view", function() { return _view__WEBPACK_IMPORTED_MODULE_237__["default"]; }); /* harmony import */ var _when__WEBPACK_IMPORTED_MODULE_238__ = __webpack_require__(/*! ./when */ "./node_modules/ramda/es/when.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "when", function() { return _when__WEBPACK_IMPORTED_MODULE_238__["default"]; }); /* harmony import */ var _where__WEBPACK_IMPORTED_MODULE_239__ = __webpack_require__(/*! ./where */ "./node_modules/ramda/es/where.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "where", function() { return _where__WEBPACK_IMPORTED_MODULE_239__["default"]; }); /* harmony import */ var _whereEq__WEBPACK_IMPORTED_MODULE_240__ = __webpack_require__(/*! ./whereEq */ "./node_modules/ramda/es/whereEq.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "whereEq", function() { return _whereEq__WEBPACK_IMPORTED_MODULE_240__["default"]; }); /* harmony import */ var _without__WEBPACK_IMPORTED_MODULE_241__ = __webpack_require__(/*! ./without */ "./node_modules/ramda/es/without.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "without", function() { return _without__WEBPACK_IMPORTED_MODULE_241__["default"]; }); /* harmony import */ var _xprod__WEBPACK_IMPORTED_MODULE_242__ = __webpack_require__(/*! ./xprod */ "./node_modules/ramda/es/xprod.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "xprod", function() { return _xprod__WEBPACK_IMPORTED_MODULE_242__["default"]; }); /* harmony import */ var _zip__WEBPACK_IMPORTED_MODULE_243__ = __webpack_require__(/*! ./zip */ "./node_modules/ramda/es/zip.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _zip__WEBPACK_IMPORTED_MODULE_243__["default"]; }); /* harmony import */ var _zipObj__WEBPACK_IMPORTED_MODULE_244__ = __webpack_require__(/*! ./zipObj */ "./node_modules/ramda/es/zipObj.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipObj", function() { return _zipObj__WEBPACK_IMPORTED_MODULE_244__["default"]; }); /* harmony import */ var _zipWith__WEBPACK_IMPORTED_MODULE_245__ = __webpack_require__(/*! ./zipWith */ "./node_modules/ramda/es/zipWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipWith", function() { return _zipWith__WEBPACK_IMPORTED_MODULE_245__["default"]; }); /***/ }), /***/ "./node_modules/ramda/es/indexBy.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/indexBy.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _reduceBy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduceBy */ "./node_modules/ramda/es/reduceBy.js"); /** * Given a function that generates a key, turns a list of objects into an * object indexing the objects by the given key. Note that if multiple * objects generate the same value for the indexing key only the last value * will be included in the generated object. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig (a -> String) -> [{k: v}] -> {k: {k: v}} * @param {Function} fn Function :: a -> String * @param {Array} array The array of objects to index * @return {Object} An object indexing each array element by the given property. * @example * * var list = [{id: 'xyz', title: 'A'}, {id: 'abc', title: 'B'}]; * R.indexBy(R.prop('id'), list); * //=> {abc: {id: 'abc', title: 'B'}, xyz: {id: 'xyz', title: 'A'}} */ var indexBy = /*#__PURE__*/Object(_reduceBy__WEBPACK_IMPORTED_MODULE_0__["default"])(function (acc, elem) { return elem; }, null); /* harmony default export */ __webpack_exports__["default"] = (indexBy); /***/ }), /***/ "./node_modules/ramda/es/indexOf.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/indexOf.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_indexOf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_indexOf */ "./node_modules/ramda/es/internal/_indexOf.js"); /* harmony import */ var _internal_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /** * Returns the position of the first occurrence of an item in an array, or -1 * if the item is not included in the array. [`R.equals`](#equals) is used to * determine equality. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> Number * @param {*} target The item to find. * @param {Array} xs The array to search in. * @return {Number} the index of the target, or -1 if the target is not found. * @see R.lastIndexOf * @example * * R.indexOf(3, [1,2,3,4]); //=> 2 * R.indexOf(10, [1,2,3,4]); //=> -1 */ var indexOf = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function indexOf(target, xs) { return typeof xs.indexOf === 'function' && !Object(_internal_isArray__WEBPACK_IMPORTED_MODULE_2__["default"])(xs) ? xs.indexOf(target) : Object(_internal_indexOf__WEBPACK_IMPORTED_MODULE_1__["default"])(xs, target, 0); }); /* harmony default export */ __webpack_exports__["default"] = (indexOf); /***/ }), /***/ "./node_modules/ramda/es/init.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/init.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns all but the last element of the given list or string. * * @func * @memberOf R * @since v0.9.0 * @category List * @sig [a] -> [a] * @sig String -> String * @param {*} list * @return {*} * @see R.last, R.head, R.tail * @example * * R.init([1, 2, 3]); //=> [1, 2] * R.init([1, 2]); //=> [1] * R.init([1]); //=> [] * R.init([]); //=> [] * * R.init('abc'); //=> 'ab' * R.init('ab'); //=> 'a' * R.init('a'); //=> '' * R.init(''); //=> '' */ var init = /*#__PURE__*/Object(_slice__WEBPACK_IMPORTED_MODULE_0__["default"])(0, -1); /* harmony default export */ __webpack_exports__["default"] = (init); /***/ }), /***/ "./node_modules/ramda/es/innerJoin.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/innerJoin.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_containsWith__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_containsWith */ "./node_modules/ramda/es/internal/_containsWith.js"); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_filter */ "./node_modules/ramda/es/internal/_filter.js"); /** * Takes a predicate `pred`, a list `xs`, and a list `ys`, and returns a list * `xs'` comprising each of the elements of `xs` which is equal to one or more * elements of `ys` according to `pred`. * * `pred` must be a binary function expecting an element from each list. * * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should * not be significant, but since `xs'` is ordered the implementation guarantees * that its values are in the same order as they appear in `xs`. Duplicates are * not removed, so `xs'` may contain duplicates if `xs` contains duplicates. * * @func * @memberOf R * @since v0.24.0 * @category Relation * @sig ((a, b) -> Boolean) -> [a] -> [b] -> [a] * @param {Function} pred * @param {Array} xs * @param {Array} ys * @return {Array} * @see R.intersection * @example * * R.innerJoin( * (record, id) => record.id === id, * [{id: 824, name: 'Richie Furay'}, * {id: 956, name: 'Dewey Martin'}, * {id: 313, name: 'Bruce Palmer'}, * {id: 456, name: 'Stephen Stills'}, * {id: 177, name: 'Neil Young'}], * [177, 456, 999] * ); * //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}] */ var innerJoin = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_1__["default"])(function innerJoin(pred, xs, ys) { return Object(_internal_filter__WEBPACK_IMPORTED_MODULE_2__["default"])(function (x) { return Object(_internal_containsWith__WEBPACK_IMPORTED_MODULE_0__["default"])(pred, x, ys); }, xs); }); /* harmony default export */ __webpack_exports__["default"] = (innerJoin); /***/ }), /***/ "./node_modules/ramda/es/insert.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/insert.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Inserts the supplied element into the list, at the specified `index`. _Note that * this is not destructive_: it returns a copy of the list with the changes. * No lists have been harmed in the application of this function. * * @func * @memberOf R * @since v0.2.2 * @category List * @sig Number -> a -> [a] -> [a] * @param {Number} index The position to insert the element * @param {*} elt The element to insert into the Array * @param {Array} list The list to insert into * @return {Array} A new Array with `elt` inserted at `index`. * @example * * R.insert(2, 'x', [1,2,3,4]); //=> [1,2,'x',3,4] */ var insert = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function insert(idx, elt, list) { idx = idx < list.length && idx >= 0 ? idx : list.length; var result = Array.prototype.slice.call(list, 0); result.splice(idx, 0, elt); return result; }); /* harmony default export */ __webpack_exports__["default"] = (insert); /***/ }), /***/ "./node_modules/ramda/es/insertAll.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/insertAll.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Inserts the sub-list into the list, at the specified `index`. _Note that this is not * destructive_: it returns a copy of the list with the changes. * No lists have been harmed in the application of this function. * * @func * @memberOf R * @since v0.9.0 * @category List * @sig Number -> [a] -> [a] -> [a] * @param {Number} index The position to insert the sub-list * @param {Array} elts The sub-list to insert into the Array * @param {Array} list The list to insert the sub-list into * @return {Array} A new Array with `elts` inserted starting at `index`. * @example * * R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4] */ var insertAll = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function insertAll(idx, elts, list) { idx = idx < list.length && idx >= 0 ? idx : list.length; return [].concat(Array.prototype.slice.call(list, 0, idx), elts, Array.prototype.slice.call(list, idx)); }); /* harmony default export */ __webpack_exports__["default"] = (insertAll); /***/ }), /***/ "./node_modules/ramda/es/internal/_Set.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/internal/_Set.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_contains */ "./node_modules/ramda/es/internal/_contains.js"); var _Set = /*#__PURE__*/function () { function _Set() { /* globals Set */ this._nativeSet = typeof Set === 'function' ? new Set() : null; this._items = {}; } // until we figure out why jsdoc chokes on this // @param item The item to add to the Set // @returns {boolean} true if the item did not exist prior, otherwise false // _Set.prototype.add = function (item) { return !hasOrAdd(item, true, this); }; // // @param item The item to check for existence in the Set // @returns {boolean} true if the item exists in the Set, otherwise false // _Set.prototype.has = function (item) { return hasOrAdd(item, false, this); }; // // Combines the logic for checking whether an item is a member of the set and // for adding a new item to the set. // // @param item The item to check or add to the Set instance. // @param shouldAdd If true, the item will be added to the set if it doesn't // already exist. // @param set The set instance to check or add to. // @return {boolean} true if the item already existed, otherwise false. // return _Set; }(); function hasOrAdd(item, shouldAdd, set) { var type = typeof item; var prevSize, newSize; switch (type) { case 'string': case 'number': // distinguish between +0 and -0 if (item === 0 && 1 / item === -Infinity) { if (set._items['-0']) { return true; } else { if (shouldAdd) { set._items['-0'] = true; } return false; } } // these types can all utilise the native Set if (set._nativeSet !== null) { if (shouldAdd) { prevSize = set._nativeSet.size; set._nativeSet.add(item); newSize = set._nativeSet.size; return newSize === prevSize; } else { return set._nativeSet.has(item); } } else { if (!(type in set._items)) { if (shouldAdd) { set._items[type] = {}; set._items[type][item] = true; } return false; } else if (item in set._items[type]) { return true; } else { if (shouldAdd) { set._items[type][item] = true; } return false; } } case 'boolean': // set._items['boolean'] holds a two element array // representing [ falseExists, trueExists ] if (type in set._items) { var bIdx = item ? 1 : 0; if (set._items[type][bIdx]) { return true; } else { if (shouldAdd) { set._items[type][bIdx] = true; } return false; } } else { if (shouldAdd) { set._items[type] = item ? [false, true] : [true, false]; } return false; } case 'function': // compare functions for reference equality if (set._nativeSet !== null) { if (shouldAdd) { prevSize = set._nativeSet.size; set._nativeSet.add(item); newSize = set._nativeSet.size; return newSize === prevSize; } else { return set._nativeSet.has(item); } } else { if (!(type in set._items)) { if (shouldAdd) { set._items[type] = [item]; } return false; } if (!Object(_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(item, set._items[type])) { if (shouldAdd) { set._items[type].push(item); } return false; } return true; } case 'undefined': if (set._items[type]) { return true; } else { if (shouldAdd) { set._items[type] = true; } return false; } case 'object': if (item === null) { if (!set._items['null']) { if (shouldAdd) { set._items['null'] = true; } return false; } return true; } /* falls through */ default: // reduce the search size of heterogeneous sets by creating buckets // for each type. type = Object.prototype.toString.call(item); if (!(type in set._items)) { if (shouldAdd) { set._items[type] = [item]; } return false; } // scan through all previously applied items if (!Object(_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(item, set._items[type])) { if (shouldAdd) { set._items[type].push(item); } return false; } return true; } } // A simple Set type that honours R.equals semantics /* harmony default export */ __webpack_exports__["default"] = (_Set); /***/ }), /***/ "./node_modules/ramda/es/internal/_aperture.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_aperture.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _aperture; }); function _aperture(n, list) { var idx = 0; var limit = list.length - (n - 1); var acc = new Array(limit >= 0 ? limit : 0); while (idx < limit) { acc[idx] = Array.prototype.slice.call(list, idx, idx + n); idx += 1; } return acc; } /***/ }), /***/ "./node_modules/ramda/es/internal/_arity.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_arity.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _arity; }); function _arity(n, fn) { /* eslint-disable no-unused-vars */ switch (n) { case 0: return function () { return fn.apply(this, arguments); }; case 1: return function (a0) { return fn.apply(this, arguments); }; case 2: return function (a0, a1) { return fn.apply(this, arguments); }; case 3: return function (a0, a1, a2) { return fn.apply(this, arguments); }; case 4: return function (a0, a1, a2, a3) { return fn.apply(this, arguments); }; case 5: return function (a0, a1, a2, a3, a4) { return fn.apply(this, arguments); }; case 6: return function (a0, a1, a2, a3, a4, a5) { return fn.apply(this, arguments); }; case 7: return function (a0, a1, a2, a3, a4, a5, a6) { return fn.apply(this, arguments); }; case 8: return function (a0, a1, a2, a3, a4, a5, a6, a7) { return fn.apply(this, arguments); }; case 9: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.apply(this, arguments); }; case 10: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.apply(this, arguments); }; default: throw new Error('First argument to _arity must be a non-negative integer no greater than ten'); } } /***/ }), /***/ "./node_modules/ramda/es/internal/_arrayFromIterator.js": /*!**************************************************************!*\ !*** ./node_modules/ramda/es/internal/_arrayFromIterator.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _arrayFromIterator; }); function _arrayFromIterator(iter) { var list = []; var next; while (!(next = iter.next()).done) { list.push(next.value); } return list; } /***/ }), /***/ "./node_modules/ramda/es/internal/_assign.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_assign.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _objectAssign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_objectAssign */ "./node_modules/ramda/es/internal/_objectAssign.js"); /* harmony default export */ __webpack_exports__["default"] = (typeof Object.assign === 'function' ? Object.assign : _objectAssign__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./node_modules/ramda/es/internal/_checkForMethod.js": /*!***********************************************************!*\ !*** ./node_modules/ramda/es/internal/_checkForMethod.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _checkForMethod; }); /* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /** * This checks whether a function has a [methodname] function. If it isn't an * array it will execute that function otherwise it will default to the ramda * implementation. * * @private * @param {Function} fn ramda implemtation * @param {String} methodname property to check for a custom implementation * @return {Object} Whatever the return value of the method is. */ function _checkForMethod(methodname, fn) { return function () { var length = arguments.length; if (length === 0) { return fn(); } var obj = arguments[length - 1]; return Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["default"])(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_clone.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_clone.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _clone; }); /* harmony import */ var _cloneRegExp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_cloneRegExp */ "./node_modules/ramda/es/internal/_cloneRegExp.js"); /* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../type */ "./node_modules/ramda/es/type.js"); /** * Copies an object. * * @private * @param {*} value The value to be copied * @param {Array} refFrom Array containing the source references * @param {Array} refTo Array containing the copied source references * @param {Boolean} deep Whether or not to perform deep cloning. * @return {*} The copied value. */ function _clone(value, refFrom, refTo, deep) { var copy = function copy(copiedValue) { var len = refFrom.length; var idx = 0; while (idx < len) { if (value === refFrom[idx]) { return refTo[idx]; } idx += 1; } refFrom[idx + 1] = value; refTo[idx + 1] = copiedValue; for (var key in value) { copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key]; } return copiedValue; }; switch (Object(_type__WEBPACK_IMPORTED_MODULE_1__["default"])(value)) { case 'Object': return copy({}); case 'Array': return copy([]); case 'Date': return new Date(value.valueOf()); case 'RegExp': return Object(_cloneRegExp__WEBPACK_IMPORTED_MODULE_0__["default"])(value); default: return value; } } /***/ }), /***/ "./node_modules/ramda/es/internal/_cloneRegExp.js": /*!********************************************************!*\ !*** ./node_modules/ramda/es/internal/_cloneRegExp.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _cloneRegExp; }); function _cloneRegExp(pattern) { return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : '')); } /***/ }), /***/ "./node_modules/ramda/es/internal/_complement.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_complement.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _complement; }); function _complement(f) { return function () { return !f.apply(this, arguments); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_concat.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_concat.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _concat; }); /** * Private `concat` function to merge two array-like objects. * * @private * @param {Array|Arguments} [set1=[]] An array-like object. * @param {Array|Arguments} [set2=[]] An array-like object. * @return {Array} A new, merged array. * @example * * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] */ function _concat(set1, set2) { set1 = set1 || []; set2 = set2 || []; var idx; var len1 = set1.length; var len2 = set2.length; var result = []; idx = 0; while (idx < len1) { result[result.length] = set1[idx]; idx += 1; } idx = 0; while (idx < len2) { result[result.length] = set2[idx]; idx += 1; } return result; } /***/ }), /***/ "./node_modules/ramda/es/internal/_contains.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_contains.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _contains; }); /* harmony import */ var _indexOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_indexOf */ "./node_modules/ramda/es/internal/_indexOf.js"); function _contains(a, list) { return Object(_indexOf__WEBPACK_IMPORTED_MODULE_0__["default"])(list, a, 0) >= 0; } /***/ }), /***/ "./node_modules/ramda/es/internal/_containsWith.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_containsWith.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _containsWith; }); function _containsWith(pred, x, list) { var idx = 0; var len = list.length; while (idx < len) { if (pred(x, list[idx])) { return true; } idx += 1; } return false; } /***/ }), /***/ "./node_modules/ramda/es/internal/_createPartialApplicator.js": /*!********************************************************************!*\ !*** ./node_modules/ramda/es/internal/_createPartialApplicator.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _createPartialApplicator; }); /* harmony import */ var _arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); function _createPartialApplicator(concat) { return Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (fn, args) { return Object(_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.max(0, fn.length - args.length), function () { return fn.apply(this, concat(args, arguments)); }); }); } /***/ }), /***/ "./node_modules/ramda/es/internal/_curry1.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_curry1.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _curry1; }); /* harmony import */ var _isPlaceholder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isPlaceholder */ "./node_modules/ramda/es/internal/_isPlaceholder.js"); /** * Optimized internal one-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry1(fn) { return function f1(a) { if (arguments.length === 0 || Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_0__["default"])(a)) { return f1; } else { return fn.apply(this, arguments); } }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_curry2.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_curry2.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _curry2; }); /* harmony import */ var _curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _isPlaceholder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isPlaceholder */ "./node_modules/ramda/es/internal/_isPlaceholder.js"); /** * Optimized internal two-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry2(fn) { return function f2(a, b) { switch (arguments.length) { case 0: return f2; case 1: return Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(a) ? f2 : Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_b) { return fn(a, _b); }); default: return Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(a) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(b) ? f2 : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(a) ? Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_a) { return fn(_a, b); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(b) ? Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_b) { return fn(a, _b); }) : fn(a, b); } }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_curry3.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_curry3.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _curry3; }); /* harmony import */ var _curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _isPlaceholder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isPlaceholder */ "./node_modules/ramda/es/internal/_isPlaceholder.js"); /** * Optimized internal three-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry3(fn) { return function f3(a, b, c) { switch (arguments.length) { case 0: return f3; case 1: return Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) ? f3 : Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_b, _c) { return fn(a, _b, _c); }); case 2: return Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(b) ? f3 : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) ? Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_a, _c) { return fn(_a, b, _c); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(b) ? Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_b, _c) { return fn(a, _b, _c); }) : Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_c) { return fn(a, b, _c); }); default: return Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(b) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(c) ? f3 : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(b) ? Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_a, _b) { return fn(_a, _b, c); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(c) ? Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_a, _c) { return fn(_a, b, _c); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(b) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(c) ? Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_b, _c) { return fn(a, _b, _c); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) ? Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_a) { return fn(_a, b, c); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(b) ? Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_b) { return fn(a, _b, c); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(c) ? Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_c) { return fn(a, b, _c); }) : fn(a, b, c); } }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_curryN.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_curryN.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _curryN; }); /* harmony import */ var _arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _isPlaceholder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isPlaceholder */ "./node_modules/ramda/es/internal/_isPlaceholder.js"); /** * Internal curryN function. * * @private * @category Function * @param {Number} length The arity of the curried function. * @param {Array} received An array of arguments received thus far. * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curryN(length, received, fn) { return function () { var combined = []; var argsIdx = 0; var left = length; var combinedIdx = 0; while (combinedIdx < received.length || argsIdx < arguments.length) { var result; if (combinedIdx < received.length && (!Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(received[combinedIdx]) || argsIdx >= arguments.length)) { result = received[combinedIdx]; } else { result = arguments[argsIdx]; argsIdx += 1; } combined[combinedIdx] = result; if (!Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(result)) { left -= 1; } combinedIdx += 1; } return left <= 0 ? fn.apply(this, combined) : Object(_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(left, _curryN(length, combined, fn)); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_dispatchable.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_dispatchable.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _dispatchable; }); /* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _isTransformer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isTransformer */ "./node_modules/ramda/es/internal/_isTransformer.js"); /** * Returns a function that dispatches with different strategies based on the * object in list position (last argument). If it is an array, executes [fn]. * Otherwise, if it has a function with one of the given method names, it will * execute that function (functor case). Otherwise, if it is a transformer, * uses transducer [xf] to return a new transformer (transducer case). * Otherwise, it will default to executing [fn]. * * @private * @param {Array} methodNames properties to check for a custom implementation * @param {Function} xf transducer to initialize if object is transformer * @param {Function} fn default ramda implementation * @return {Function} A function that dispatches on object in list position */ function _dispatchable(methodNames, xf, fn) { return function () { if (arguments.length === 0) { return fn(); } var args = Array.prototype.slice.call(arguments, 0); var obj = args.pop(); if (!Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["default"])(obj)) { var idx = 0; while (idx < methodNames.length) { if (typeof obj[methodNames[idx]] === 'function') { return obj[methodNames[idx]].apply(obj, args); } idx += 1; } if (Object(_isTransformer__WEBPACK_IMPORTED_MODULE_1__["default"])(obj)) { var transducer = xf.apply(null, args); return transducer(obj); } } return fn.apply(this, arguments); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_dropLast.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_dropLast.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return dropLast; }); /* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../take */ "./node_modules/ramda/es/take.js"); function dropLast(n, xs) { return Object(_take__WEBPACK_IMPORTED_MODULE_0__["default"])(n < xs.length ? xs.length - n : 0, xs); } /***/ }), /***/ "./node_modules/ramda/es/internal/_dropLastWhile.js": /*!**********************************************************!*\ !*** ./node_modules/ramda/es/internal/_dropLastWhile.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return dropLastWhile; }); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../slice */ "./node_modules/ramda/es/slice.js"); function dropLastWhile(pred, xs) { var idx = xs.length - 1; while (idx >= 0 && pred(xs[idx])) { idx -= 1; } return Object(_slice__WEBPACK_IMPORTED_MODULE_0__["default"])(0, idx + 1, xs); } /***/ }), /***/ "./node_modules/ramda/es/internal/_equals.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_equals.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _equals; }); /* harmony import */ var _arrayFromIterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arrayFromIterator */ "./node_modules/ramda/es/internal/_arrayFromIterator.js"); /* harmony import */ var _containsWith__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_containsWith */ "./node_modules/ramda/es/internal/_containsWith.js"); /* harmony import */ var _functionName__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_functionName */ "./node_modules/ramda/es/internal/_functionName.js"); /* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_has */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _identical__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../identical */ "./node_modules/ramda/es/identical.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../keys */ "./node_modules/ramda/es/keys.js"); /* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../type */ "./node_modules/ramda/es/type.js"); /** * private _uniqContentEquals function. * That function is checking equality of 2 iterator contents with 2 assumptions * - iterators lengths are the same * - iterators values are unique * * false-positive result will be returned for comparision of, e.g. * - [1,2,3] and [1,2,3,4] * - [1,1,1] and [1,2,3] * */ function _uniqContentEquals(aIterator, bIterator, stackA, stackB) { var a = Object(_arrayFromIterator__WEBPACK_IMPORTED_MODULE_0__["default"])(aIterator); var b = Object(_arrayFromIterator__WEBPACK_IMPORTED_MODULE_0__["default"])(bIterator); function eq(_a, _b) { return _equals(_a, _b, stackA.slice(), stackB.slice()); } // if *a* array contains any element that is not included in *b* return !Object(_containsWith__WEBPACK_IMPORTED_MODULE_1__["default"])(function (b, aItem) { return !Object(_containsWith__WEBPACK_IMPORTED_MODULE_1__["default"])(eq, aItem, b); }, b, a); } function _equals(a, b, stackA, stackB) { if (Object(_identical__WEBPACK_IMPORTED_MODULE_4__["default"])(a, b)) { return true; } var typeA = Object(_type__WEBPACK_IMPORTED_MODULE_6__["default"])(a); if (typeA !== Object(_type__WEBPACK_IMPORTED_MODULE_6__["default"])(b)) { return false; } if (a == null || b == null) { return false; } if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') { return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a); } if (typeof a.equals === 'function' || typeof b.equals === 'function') { return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a); } switch (typeA) { case 'Arguments': case 'Array': case 'Object': if (typeof a.constructor === 'function' && Object(_functionName__WEBPACK_IMPORTED_MODULE_2__["default"])(a.constructor) === 'Promise') { return a === b; } break; case 'Boolean': case 'Number': case 'String': if (!(typeof a === typeof b && Object(_identical__WEBPACK_IMPORTED_MODULE_4__["default"])(a.valueOf(), b.valueOf()))) { return false; } break; case 'Date': if (!Object(_identical__WEBPACK_IMPORTED_MODULE_4__["default"])(a.valueOf(), b.valueOf())) { return false; } break; case 'Error': return a.name === b.name && a.message === b.message; case 'RegExp': if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) { return false; } break; } var idx = stackA.length - 1; while (idx >= 0) { if (stackA[idx] === a) { return stackB[idx] === b; } idx -= 1; } switch (typeA) { case 'Map': if (a.size !== b.size) { return false; } return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b])); case 'Set': if (a.size !== b.size) { return false; } return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b])); case 'Arguments': case 'Array': case 'Object': case 'Boolean': case 'Number': case 'String': case 'Date': case 'Error': case 'RegExp': case 'Int8Array': case 'Uint8Array': case 'Uint8ClampedArray': case 'Int16Array': case 'Uint16Array': case 'Int32Array': case 'Uint32Array': case 'Float32Array': case 'Float64Array': case 'ArrayBuffer': break; default: // Values of other types are only equal if identical. return false; } var keysA = Object(_keys__WEBPACK_IMPORTED_MODULE_5__["default"])(a); if (keysA.length !== Object(_keys__WEBPACK_IMPORTED_MODULE_5__["default"])(b).length) { return false; } var extendedStackA = stackA.concat([a]); var extendedStackB = stackB.concat([b]); idx = keysA.length - 1; while (idx >= 0) { var key = keysA[idx]; if (!(Object(_has__WEBPACK_IMPORTED_MODULE_3__["default"])(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) { return false; } idx -= 1; } return true; } /***/ }), /***/ "./node_modules/ramda/es/internal/_filter.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_filter.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _filter; }); function _filter(fn, list) { var idx = 0; var len = list.length; var result = []; while (idx < len) { if (fn(list[idx])) { result[result.length] = list[idx]; } idx += 1; } return result; } /***/ }), /***/ "./node_modules/ramda/es/internal/_flatCat.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_flatCat.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _forceReduced__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_forceReduced */ "./node_modules/ramda/es/internal/_forceReduced.js"); /* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isArrayLike */ "./node_modules/ramda/es/internal/_isArrayLike.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var preservingReduced = function (xf) { return { '@@transducer/init': _xfBase__WEBPACK_IMPORTED_MODULE_3__["default"].init, '@@transducer/result': function (result) { return xf['@@transducer/result'](result); }, '@@transducer/step': function (result, input) { var ret = xf['@@transducer/step'](result, input); return ret['@@transducer/reduced'] ? Object(_forceReduced__WEBPACK_IMPORTED_MODULE_0__["default"])(ret) : ret; } }; }; var _flatCat = function _xcat(xf) { var rxf = preservingReduced(xf); return { '@@transducer/init': _xfBase__WEBPACK_IMPORTED_MODULE_3__["default"].init, '@@transducer/result': function (result) { return rxf['@@transducer/result'](result); }, '@@transducer/step': function (result, input) { return !Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_1__["default"])(input) ? Object(_reduce__WEBPACK_IMPORTED_MODULE_2__["default"])(rxf, result, [input]) : Object(_reduce__WEBPACK_IMPORTED_MODULE_2__["default"])(rxf, result, input); } }; }; /* harmony default export */ __webpack_exports__["default"] = (_flatCat); /***/ }), /***/ "./node_modules/ramda/es/internal/_forceReduced.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_forceReduced.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _forceReduced; }); function _forceReduced(x) { return { '@@transducer/value': x, '@@transducer/reduced': true }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_functionName.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_functionName.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _functionName; }); function _functionName(f) { // String(x => x) evaluates to "x => x", so the pattern may not match. var match = String(f).match(/^function (\w*)/); return match == null ? '' : match[1]; } /***/ }), /***/ "./node_modules/ramda/es/internal/_has.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/internal/_has.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _has; }); function _has(prop, obj) { return Object.prototype.hasOwnProperty.call(obj, prop); } /***/ }), /***/ "./node_modules/ramda/es/internal/_identity.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_identity.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _identity; }); function _identity(x) { return x; } /***/ }), /***/ "./node_modules/ramda/es/internal/_indexOf.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_indexOf.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _indexOf; }); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../equals */ "./node_modules/ramda/es/equals.js"); function _indexOf(list, a, idx) { var inf, item; // Array.prototype.indexOf doesn't exist below IE9 if (typeof list.indexOf === 'function') { switch (typeof a) { case 'number': if (a === 0) { // manually crawl the list to distinguish between +0 and -0 inf = 1 / a; while (idx < list.length) { item = list[idx]; if (item === 0 && 1 / item === inf) { return idx; } idx += 1; } return -1; } else if (a !== a) { // NaN while (idx < list.length) { item = list[idx]; if (typeof item === 'number' && item !== item) { return idx; } idx += 1; } return -1; } // non-zero numbers can utilise Set return list.indexOf(a, idx); // all these types can utilise Set case 'string': case 'boolean': case 'function': case 'undefined': return list.indexOf(a, idx); case 'object': if (a === null) { // null can utilise Set return list.indexOf(a, idx); } } } // anything else not covered above, defer to R.equals while (idx < list.length) { if (Object(_equals__WEBPACK_IMPORTED_MODULE_0__["default"])(list[idx], a)) { return idx; } idx += 1; } return -1; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isArguments.js": /*!********************************************************!*\ !*** ./node_modules/ramda/es/internal/_isArguments.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_has */ "./node_modules/ramda/es/internal/_has.js"); var toString = Object.prototype.toString; var _isArguments = function () { return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) { return toString.call(x) === '[object Arguments]'; } : function _isArguments(x) { return Object(_has__WEBPACK_IMPORTED_MODULE_0__["default"])('callee', x); }; }; /* harmony default export */ __webpack_exports__["default"] = (_isArguments); /***/ }), /***/ "./node_modules/ramda/es/internal/_isArray.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isArray.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Tests whether or not an object is an array. * * @private * @param {*} val The object to test. * @return {Boolean} `true` if `val` is an array, `false` otherwise. * @example * * _isArray([]); //=> true * _isArray(null); //=> false * _isArray({}); //=> false */ /* harmony default export */ __webpack_exports__["default"] = (Array.isArray || function _isArray(val) { return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]'; }); /***/ }), /***/ "./node_modules/ramda/es/internal/_isArrayLike.js": /*!********************************************************!*\ !*** ./node_modules/ramda/es/internal/_isArrayLike.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _isString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isString */ "./node_modules/ramda/es/internal/_isString.js"); /** * Tests whether or not an object is similar to an array. * * @private * @category Type * @category List * @sig * -> Boolean * @param {*} x The object to test. * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise. * @example * * _isArrayLike([]); //=> true * _isArrayLike(true); //=> false * _isArrayLike({}); //=> false * _isArrayLike({length: 10}); //=> false * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true */ var _isArrayLike = /*#__PURE__*/Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function isArrayLike(x) { if (Object(_isArray__WEBPACK_IMPORTED_MODULE_1__["default"])(x)) { return true; } if (!x) { return false; } if (typeof x !== 'object') { return false; } if (Object(_isString__WEBPACK_IMPORTED_MODULE_2__["default"])(x)) { return false; } if (x.nodeType === 1) { return !!x.length; } if (x.length === 0) { return true; } if (x.length > 0) { return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1); } return false; }); /* harmony default export */ __webpack_exports__["default"] = (_isArrayLike); /***/ }), /***/ "./node_modules/ramda/es/internal/_isFunction.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_isFunction.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isFunction; }); function _isFunction(x) { return Object.prototype.toString.call(x) === '[object Function]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isInteger.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_isInteger.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Determine if the passed argument is an integer. * * @private * @param {*} n * @category Type * @return {Boolean} */ /* harmony default export */ __webpack_exports__["default"] = (Number.isInteger || function _isInteger(n) { return n << 0 === n; }); /***/ }), /***/ "./node_modules/ramda/es/internal/_isNumber.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isNumber.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isNumber; }); function _isNumber(x) { return Object.prototype.toString.call(x) === '[object Number]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isObject.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isObject.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isObject; }); function _isObject(x) { return Object.prototype.toString.call(x) === '[object Object]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isPlaceholder.js": /*!**********************************************************!*\ !*** ./node_modules/ramda/es/internal/_isPlaceholder.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isPlaceholder; }); function _isPlaceholder(a) { return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isRegExp.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isRegExp.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isRegExp; }); function _isRegExp(x) { return Object.prototype.toString.call(x) === '[object RegExp]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isString.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isString.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isString; }); function _isString(x) { return Object.prototype.toString.call(x) === '[object String]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isTransformer.js": /*!**********************************************************!*\ !*** ./node_modules/ramda/es/internal/_isTransformer.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isTransformer; }); function _isTransformer(obj) { return typeof obj['@@transducer/step'] === 'function'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_makeFlat.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_makeFlat.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _makeFlat; }); /* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArrayLike */ "./node_modules/ramda/es/internal/_isArrayLike.js"); /** * `_makeFlat` is a helper function that returns a one-level or fully recursive * function based on the flag passed in. * * @private */ function _makeFlat(recursive) { return function flatt(list) { var value, jlen, j; var result = []; var idx = 0; var ilen = list.length; while (idx < ilen) { if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_0__["default"])(list[idx])) { value = recursive ? flatt(list[idx]) : list[idx]; j = 0; jlen = value.length; while (j < jlen) { result[result.length] = value[j]; j += 1; } } else { result[result.length] = list[idx]; } idx += 1; } return result; }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_map.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/internal/_map.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _map; }); function _map(fn, functor) { var idx = 0; var len = functor.length; var result = Array(len); while (idx < len) { result[idx] = fn(functor[idx]); idx += 1; } return result; } /***/ }), /***/ "./node_modules/ramda/es/internal/_objectAssign.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_objectAssign.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectAssign; }); /* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_has */ "./node_modules/ramda/es/internal/_has.js"); // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign function _objectAssign(target) { if (target == null) { throw new TypeError('Cannot convert undefined or null to object'); } var output = Object(target); var idx = 1; var length = arguments.length; while (idx < length) { var source = arguments[idx]; if (source != null) { for (var nextKey in source) { if (Object(_has__WEBPACK_IMPORTED_MODULE_0__["default"])(nextKey, source)) { output[nextKey] = source[nextKey]; } } } idx += 1; } return output; } /***/ }), /***/ "./node_modules/ramda/es/internal/_of.js": /*!***********************************************!*\ !*** ./node_modules/ramda/es/internal/_of.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _of; }); function _of(x) { return [x]; } /***/ }), /***/ "./node_modules/ramda/es/internal/_pipe.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_pipe.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _pipe; }); function _pipe(f, g) { return function () { return g.call(this, f.apply(this, arguments)); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_pipeP.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_pipeP.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _pipeP; }); function _pipeP(f, g) { return function () { var ctx = this; return f.apply(ctx, arguments).then(function (x) { return g.call(ctx, x); }); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_quote.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_quote.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _quote; }); function _quote(s) { var escaped = s.replace(/\\/g, '\\\\').replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace .replace(/\f/g, '\\f').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t').replace(/\v/g, '\\v').replace(/\0/g, '\\0'); return '"' + escaped.replace(/"/g, '\\"') + '"'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_reduce.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_reduce.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _reduce; }); /* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArrayLike */ "./node_modules/ramda/es/internal/_isArrayLike.js"); /* harmony import */ var _xwrap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xwrap */ "./node_modules/ramda/es/internal/_xwrap.js"); /* harmony import */ var _bind__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../bind */ "./node_modules/ramda/es/bind.js"); function _arrayReduce(xf, acc, list) { var idx = 0; var len = list.length; while (idx < len) { acc = xf['@@transducer/step'](acc, list[idx]); if (acc && acc['@@transducer/reduced']) { acc = acc['@@transducer/value']; break; } idx += 1; } return xf['@@transducer/result'](acc); } function _iterableReduce(xf, acc, iter) { var step = iter.next(); while (!step.done) { acc = xf['@@transducer/step'](acc, step.value); if (acc && acc['@@transducer/reduced']) { acc = acc['@@transducer/value']; break; } step = iter.next(); } return xf['@@transducer/result'](acc); } function _methodReduce(xf, acc, obj, methodName) { return xf['@@transducer/result'](obj[methodName](Object(_bind__WEBPACK_IMPORTED_MODULE_2__["default"])(xf['@@transducer/step'], xf), acc)); } var symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator'; function _reduce(fn, acc, list) { if (typeof fn === 'function') { fn = Object(_xwrap__WEBPACK_IMPORTED_MODULE_1__["default"])(fn); } if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_0__["default"])(list)) { return _arrayReduce(fn, acc, list); } if (typeof list['fantasy-land/reduce'] === 'function') { return _methodReduce(fn, acc, list, 'fantasy-land/reduce'); } if (list[symIterator] != null) { return _iterableReduce(fn, acc, list[symIterator]()); } if (typeof list.next === 'function') { return _iterableReduce(fn, acc, list); } if (typeof list.reduce === 'function') { return _methodReduce(fn, acc, list, 'reduce'); } throw new TypeError('reduce: list must be array or iterable'); } /***/ }), /***/ "./node_modules/ramda/es/internal/_reduced.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_reduced.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _reduced; }); function _reduced(x) { return x && x['@@transducer/reduced'] ? x : { '@@transducer/value': x, '@@transducer/reduced': true }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_stepCat.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_stepCat.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _stepCat; }); /* harmony import */ var _assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_assign */ "./node_modules/ramda/es/internal/_assign.js"); /* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_identity */ "./node_modules/ramda/es/internal/_identity.js"); /* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isArrayLike */ "./node_modules/ramda/es/internal/_isArrayLike.js"); /* harmony import */ var _isTransformer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_isTransformer */ "./node_modules/ramda/es/internal/_isTransformer.js"); /* harmony import */ var _objOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../objOf */ "./node_modules/ramda/es/objOf.js"); var _stepCatArray = { '@@transducer/init': Array, '@@transducer/step': function (xs, x) { xs.push(x); return xs; }, '@@transducer/result': _identity__WEBPACK_IMPORTED_MODULE_1__["default"] }; var _stepCatString = { '@@transducer/init': String, '@@transducer/step': function (a, b) { return a + b; }, '@@transducer/result': _identity__WEBPACK_IMPORTED_MODULE_1__["default"] }; var _stepCatObject = { '@@transducer/init': Object, '@@transducer/step': function (result, input) { return Object(_assign__WEBPACK_IMPORTED_MODULE_0__["default"])(result, Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_2__["default"])(input) ? Object(_objOf__WEBPACK_IMPORTED_MODULE_4__["default"])(input[0], input[1]) : input); }, '@@transducer/result': _identity__WEBPACK_IMPORTED_MODULE_1__["default"] }; function _stepCat(obj) { if (Object(_isTransformer__WEBPACK_IMPORTED_MODULE_3__["default"])(obj)) { return obj; } if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_2__["default"])(obj)) { return _stepCatArray; } if (typeof obj === 'string') { return _stepCatString; } if (typeof obj === 'object') { return _stepCatObject; } throw new Error('Cannot create transformer for ' + obj); } /***/ }), /***/ "./node_modules/ramda/es/internal/_toISOString.js": /*!********************************************************!*\ !*** ./node_modules/ramda/es/internal/_toISOString.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Polyfill from . */ var pad = function pad(n) { return (n < 10 ? '0' : '') + n; }; var _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) { return d.toISOString(); } : function _toISOString(d) { return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z'; }; /* harmony default export */ __webpack_exports__["default"] = (_toISOString); /***/ }), /***/ "./node_modules/ramda/es/internal/_toString.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_toString.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _toString; }); /* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_contains */ "./node_modules/ramda/es/internal/_contains.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_map */ "./node_modules/ramda/es/internal/_map.js"); /* harmony import */ var _quote__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_quote */ "./node_modules/ramda/es/internal/_quote.js"); /* harmony import */ var _toISOString__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_toISOString */ "./node_modules/ramda/es/internal/_toISOString.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../keys */ "./node_modules/ramda/es/keys.js"); /* harmony import */ var _reject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../reject */ "./node_modules/ramda/es/reject.js"); function _toString(x, seen) { var recur = function recur(y) { var xs = seen.concat([x]); return Object(_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(y, xs) ? '' : _toString(y, xs); }; // mapPairs :: (Object, [String]) -> [String] var mapPairs = function (obj, keys) { return Object(_map__WEBPACK_IMPORTED_MODULE_1__["default"])(function (k) { return Object(_quote__WEBPACK_IMPORTED_MODULE_2__["default"])(k) + ': ' + recur(obj[k]); }, keys.slice().sort()); }; switch (Object.prototype.toString.call(x)) { case '[object Arguments]': return '(function() { return arguments; }(' + Object(_map__WEBPACK_IMPORTED_MODULE_1__["default"])(recur, x).join(', ') + '))'; case '[object Array]': return '[' + Object(_map__WEBPACK_IMPORTED_MODULE_1__["default"])(recur, x).concat(mapPairs(x, Object(_reject__WEBPACK_IMPORTED_MODULE_5__["default"])(function (k) { return (/^\d+$/.test(k) ); }, Object(_keys__WEBPACK_IMPORTED_MODULE_4__["default"])(x)))).join(', ') + ']'; case '[object Boolean]': return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString(); case '[object Date]': return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : Object(_quote__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_toISOString__WEBPACK_IMPORTED_MODULE_3__["default"])(x))) + ')'; case '[object Null]': return 'null'; case '[object Number]': return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10); case '[object String]': return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : Object(_quote__WEBPACK_IMPORTED_MODULE_2__["default"])(x); case '[object Undefined]': return 'undefined'; default: if (typeof x.toString === 'function') { var repr = x.toString(); if (repr !== '[object Object]') { return repr; } } return '{' + mapPairs(x, Object(_keys__WEBPACK_IMPORTED_MODULE_4__["default"])(x)).join(', ') + '}'; } } /***/ }), /***/ "./node_modules/ramda/es/internal/_xall.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_xall.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XAll = /*#__PURE__*/function () { function XAll(f, xf) { this.xf = xf; this.f = f; this.all = true; } XAll.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XAll.prototype['@@transducer/result'] = function (result) { if (this.all) { result = this.xf['@@transducer/step'](result, true); } return this.xf['@@transducer/result'](result); }; XAll.prototype['@@transducer/step'] = function (result, input) { if (!this.f(input)) { this.all = false; result = Object(_reduced__WEBPACK_IMPORTED_MODULE_1__["default"])(this.xf['@@transducer/step'](result, false)); } return result; }; return XAll; }(); var _xall = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xall(f, xf) { return new XAll(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xall); /***/ }), /***/ "./node_modules/ramda/es/internal/_xany.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_xany.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XAny = /*#__PURE__*/function () { function XAny(f, xf) { this.xf = xf; this.f = f; this.any = false; } XAny.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XAny.prototype['@@transducer/result'] = function (result) { if (!this.any) { result = this.xf['@@transducer/step'](result, false); } return this.xf['@@transducer/result'](result); }; XAny.prototype['@@transducer/step'] = function (result, input) { if (this.f(input)) { this.any = true; result = Object(_reduced__WEBPACK_IMPORTED_MODULE_1__["default"])(this.xf['@@transducer/step'](result, true)); } return result; }; return XAny; }(); var _xany = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xany(f, xf) { return new XAny(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xany); /***/ }), /***/ "./node_modules/ramda/es/internal/_xaperture.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xaperture.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XAperture = /*#__PURE__*/function () { function XAperture(n, xf) { this.xf = xf; this.pos = 0; this.full = false; this.acc = new Array(n); } XAperture.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XAperture.prototype['@@transducer/result'] = function (result) { this.acc = null; return this.xf['@@transducer/result'](result); }; XAperture.prototype['@@transducer/step'] = function (result, input) { this.store(input); return this.full ? this.xf['@@transducer/step'](result, this.getCopy()) : result; }; XAperture.prototype.store = function (input) { this.acc[this.pos] = input; this.pos += 1; if (this.pos === this.acc.length) { this.pos = 0; this.full = true; } }; XAperture.prototype.getCopy = function () { return Object(_concat__WEBPACK_IMPORTED_MODULE_0__["default"])(Array.prototype.slice.call(this.acc, this.pos), Array.prototype.slice.call(this.acc, 0, this.pos)); }; return XAperture; }(); var _xaperture = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function _xaperture(n, xf) { return new XAperture(n, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xaperture); /***/ }), /***/ "./node_modules/ramda/es/internal/_xchain.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_xchain.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _flatCat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_flatCat */ "./node_modules/ramda/es/internal/_flatCat.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../map */ "./node_modules/ramda/es/map.js"); var _xchain = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xchain(f, xf) { return Object(_map__WEBPACK_IMPORTED_MODULE_2__["default"])(f, Object(_flatCat__WEBPACK_IMPORTED_MODULE_1__["default"])(xf)); }); /* harmony default export */ __webpack_exports__["default"] = (_xchain); /***/ }), /***/ "./node_modules/ramda/es/internal/_xdrop.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdrop.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDrop = /*#__PURE__*/function () { function XDrop(n, xf) { this.xf = xf; this.n = n; } XDrop.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XDrop.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].result; XDrop.prototype['@@transducer/step'] = function (result, input) { if (this.n > 0) { this.n -= 1; return result; } return this.xf['@@transducer/step'](result, input); }; return XDrop; }(); var _xdrop = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xdrop(n, xf) { return new XDrop(n, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xdrop); /***/ }), /***/ "./node_modules/ramda/es/internal/_xdropLast.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdropLast.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDropLast = /*#__PURE__*/function () { function XDropLast(n, xf) { this.xf = xf; this.pos = 0; this.full = false; this.acc = new Array(n); } XDropLast.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XDropLast.prototype['@@transducer/result'] = function (result) { this.acc = null; return this.xf['@@transducer/result'](result); }; XDropLast.prototype['@@transducer/step'] = function (result, input) { if (this.full) { result = this.xf['@@transducer/step'](result, this.acc[this.pos]); } this.store(input); return result; }; XDropLast.prototype.store = function (input) { this.acc[this.pos] = input; this.pos += 1; if (this.pos === this.acc.length) { this.pos = 0; this.full = true; } }; return XDropLast; }(); var _xdropLast = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xdropLast(n, xf) { return new XDropLast(n, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xdropLast); /***/ }), /***/ "./node_modules/ramda/es/internal/_xdropLastWhile.js": /*!***********************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdropLastWhile.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDropLastWhile = /*#__PURE__*/function () { function XDropLastWhile(fn, xf) { this.f = fn; this.retained = []; this.xf = xf; } XDropLastWhile.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XDropLastWhile.prototype['@@transducer/result'] = function (result) { this.retained = null; return this.xf['@@transducer/result'](result); }; XDropLastWhile.prototype['@@transducer/step'] = function (result, input) { return this.f(input) ? this.retain(result, input) : this.flush(result, input); }; XDropLastWhile.prototype.flush = function (result, input) { result = Object(_reduce__WEBPACK_IMPORTED_MODULE_1__["default"])(this.xf['@@transducer/step'], result, this.retained); this.retained = []; return this.xf['@@transducer/step'](result, input); }; XDropLastWhile.prototype.retain = function (result, input) { this.retained.push(input); return result; }; return XDropLastWhile; }(); var _xdropLastWhile = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xdropLastWhile(fn, xf) { return new XDropLastWhile(fn, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xdropLastWhile); /***/ }), /***/ "./node_modules/ramda/es/internal/_xdropRepeatsWith.js": /*!*************************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdropRepeatsWith.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDropRepeatsWith = /*#__PURE__*/function () { function XDropRepeatsWith(pred, xf) { this.xf = xf; this.pred = pred; this.lastValue = undefined; this.seenFirstValue = false; } XDropRepeatsWith.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XDropRepeatsWith.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].result; XDropRepeatsWith.prototype['@@transducer/step'] = function (result, input) { var sameAsLast = false; if (!this.seenFirstValue) { this.seenFirstValue = true; } else if (this.pred(this.lastValue, input)) { sameAsLast = true; } this.lastValue = input; return sameAsLast ? result : this.xf['@@transducer/step'](result, input); }; return XDropRepeatsWith; }(); var _xdropRepeatsWith = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xdropRepeatsWith(pred, xf) { return new XDropRepeatsWith(pred, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xdropRepeatsWith); /***/ }), /***/ "./node_modules/ramda/es/internal/_xdropWhile.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdropWhile.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDropWhile = /*#__PURE__*/function () { function XDropWhile(f, xf) { this.xf = xf; this.f = f; } XDropWhile.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XDropWhile.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].result; XDropWhile.prototype['@@transducer/step'] = function (result, input) { if (this.f) { if (this.f(input)) { return result; } this.f = null; } return this.xf['@@transducer/step'](result, input); }; return XDropWhile; }(); var _xdropWhile = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xdropWhile(f, xf) { return new XDropWhile(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xdropWhile); /***/ }), /***/ "./node_modules/ramda/es/internal/_xfBase.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfBase.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = ({ init: function () { return this.xf['@@transducer/init'](); }, result: function (result) { return this.xf['@@transducer/result'](result); } }); /***/ }), /***/ "./node_modules/ramda/es/internal/_xfilter.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfilter.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFilter = /*#__PURE__*/function () { function XFilter(f, xf) { this.xf = xf; this.f = f; } XFilter.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XFilter.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].result; XFilter.prototype['@@transducer/step'] = function (result, input) { return this.f(input) ? this.xf['@@transducer/step'](result, input) : result; }; return XFilter; }(); var _xfilter = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xfilter(f, xf) { return new XFilter(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xfilter); /***/ }), /***/ "./node_modules/ramda/es/internal/_xfind.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfind.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFind = /*#__PURE__*/function () { function XFind(f, xf) { this.xf = xf; this.f = f; this.found = false; } XFind.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XFind.prototype['@@transducer/result'] = function (result) { if (!this.found) { result = this.xf['@@transducer/step'](result, void 0); } return this.xf['@@transducer/result'](result); }; XFind.prototype['@@transducer/step'] = function (result, input) { if (this.f(input)) { this.found = true; result = Object(_reduced__WEBPACK_IMPORTED_MODULE_1__["default"])(this.xf['@@transducer/step'](result, input)); } return result; }; return XFind; }(); var _xfind = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xfind(f, xf) { return new XFind(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xfind); /***/ }), /***/ "./node_modules/ramda/es/internal/_xfindIndex.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfindIndex.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFindIndex = /*#__PURE__*/function () { function XFindIndex(f, xf) { this.xf = xf; this.f = f; this.idx = -1; this.found = false; } XFindIndex.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XFindIndex.prototype['@@transducer/result'] = function (result) { if (!this.found) { result = this.xf['@@transducer/step'](result, -1); } return this.xf['@@transducer/result'](result); }; XFindIndex.prototype['@@transducer/step'] = function (result, input) { this.idx += 1; if (this.f(input)) { this.found = true; result = Object(_reduced__WEBPACK_IMPORTED_MODULE_1__["default"])(this.xf['@@transducer/step'](result, this.idx)); } return result; }; return XFindIndex; }(); var _xfindIndex = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xfindIndex(f, xf) { return new XFindIndex(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xfindIndex); /***/ }), /***/ "./node_modules/ramda/es/internal/_xfindLast.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfindLast.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFindLast = /*#__PURE__*/function () { function XFindLast(f, xf) { this.xf = xf; this.f = f; } XFindLast.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XFindLast.prototype['@@transducer/result'] = function (result) { return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.last)); }; XFindLast.prototype['@@transducer/step'] = function (result, input) { if (this.f(input)) { this.last = input; } return result; }; return XFindLast; }(); var _xfindLast = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xfindLast(f, xf) { return new XFindLast(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xfindLast); /***/ }), /***/ "./node_modules/ramda/es/internal/_xfindLastIndex.js": /*!***********************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfindLastIndex.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFindLastIndex = /*#__PURE__*/function () { function XFindLastIndex(f, xf) { this.xf = xf; this.f = f; this.idx = -1; this.lastIdx = -1; } XFindLastIndex.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XFindLastIndex.prototype['@@transducer/result'] = function (result) { return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.lastIdx)); }; XFindLastIndex.prototype['@@transducer/step'] = function (result, input) { this.idx += 1; if (this.f(input)) { this.lastIdx = this.idx; } return result; }; return XFindLastIndex; }(); var _xfindLastIndex = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xfindLastIndex(f, xf) { return new XFindLastIndex(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xfindLastIndex); /***/ }), /***/ "./node_modules/ramda/es/internal/_xmap.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_xmap.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XMap = /*#__PURE__*/function () { function XMap(f, xf) { this.xf = xf; this.f = f; } XMap.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XMap.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].result; XMap.prototype['@@transducer/step'] = function (result, input) { return this.xf['@@transducer/step'](result, this.f(input)); }; return XMap; }(); var _xmap = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xmap(f, xf) { return new XMap(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xmap); /***/ }), /***/ "./node_modules/ramda/es/internal/_xreduceBy.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xreduceBy.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curryN */ "./node_modules/ramda/es/internal/_curryN.js"); /* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_has */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XReduceBy = /*#__PURE__*/function () { function XReduceBy(valueFn, valueAcc, keyFn, xf) { this.valueFn = valueFn; this.valueAcc = valueAcc; this.keyFn = keyFn; this.xf = xf; this.inputs = {}; } XReduceBy.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XReduceBy.prototype['@@transducer/result'] = function (result) { var key; for (key in this.inputs) { if (Object(_has__WEBPACK_IMPORTED_MODULE_1__["default"])(key, this.inputs)) { result = this.xf['@@transducer/step'](result, this.inputs[key]); if (result['@@transducer/reduced']) { result = result['@@transducer/value']; break; } } } this.inputs = null; return this.xf['@@transducer/result'](result); }; XReduceBy.prototype['@@transducer/step'] = function (result, input) { var key = this.keyFn(input); this.inputs[key] = this.inputs[key] || [key, this.valueAcc]; this.inputs[key][1] = this.valueFn(this.inputs[key][1], input); return result; }; return XReduceBy; }(); var _xreduceBy = /*#__PURE__*/Object(_curryN__WEBPACK_IMPORTED_MODULE_0__["default"])(4, [], function _xreduceBy(valueFn, valueAcc, keyFn, xf) { return new XReduceBy(valueFn, valueAcc, keyFn, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xreduceBy); /***/ }), /***/ "./node_modules/ramda/es/internal/_xtake.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_xtake.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XTake = /*#__PURE__*/function () { function XTake(n, xf) { this.xf = xf; this.n = n; this.i = 0; } XTake.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XTake.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].result; XTake.prototype['@@transducer/step'] = function (result, input) { this.i += 1; var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input); return this.n >= 0 && this.i >= this.n ? Object(_reduced__WEBPACK_IMPORTED_MODULE_1__["default"])(ret) : ret; }; return XTake; }(); var _xtake = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xtake(n, xf) { return new XTake(n, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xtake); /***/ }), /***/ "./node_modules/ramda/es/internal/_xtakeWhile.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xtakeWhile.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XTakeWhile = /*#__PURE__*/function () { function XTakeWhile(f, xf) { this.xf = xf; this.f = f; } XTakeWhile.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XTakeWhile.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].result; XTakeWhile.prototype['@@transducer/step'] = function (result, input) { return this.f(input) ? this.xf['@@transducer/step'](result, input) : Object(_reduced__WEBPACK_IMPORTED_MODULE_1__["default"])(result); }; return XTakeWhile; }(); var _xtakeWhile = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xtakeWhile(f, xf) { return new XTakeWhile(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xtakeWhile); /***/ }), /***/ "./node_modules/ramda/es/internal/_xtap.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_xtap.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XTap = /*#__PURE__*/function () { function XTap(f, xf) { this.xf = xf; this.f = f; } XTap.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XTap.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].result; XTap.prototype['@@transducer/step'] = function (result, input) { this.f(input); return this.xf['@@transducer/step'](result, input); }; return XTap; }(); var _xtap = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xtap(f, xf) { return new XTap(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xtap); /***/ }), /***/ "./node_modules/ramda/es/internal/_xwrap.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_xwrap.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _xwrap; }); var XWrap = /*#__PURE__*/function () { function XWrap(fn) { this.f = fn; } XWrap.prototype['@@transducer/init'] = function () { throw new Error('init not implemented on XWrap'); }; XWrap.prototype['@@transducer/result'] = function (acc) { return acc; }; XWrap.prototype['@@transducer/step'] = function (acc, x) { return this.f(acc, x); }; return XWrap; }(); function _xwrap(fn) { return new XWrap(fn); } /***/ }), /***/ "./node_modules/ramda/es/intersection.js": /*!***********************************************!*\ !*** ./node_modules/ramda/es/intersection.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_contains */ "./node_modules/ramda/es/internal/_contains.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_filter */ "./node_modules/ramda/es/internal/_filter.js"); /* harmony import */ var _flip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./flip */ "./node_modules/ramda/es/flip.js"); /* harmony import */ var _uniq__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./uniq */ "./node_modules/ramda/es/uniq.js"); /** * Combines two lists into a set (i.e. no duplicates) composed of those * elements common to both lists. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The list of elements found in both `list1` and `list2`. * @see R.innerJoin * @example * * R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3] */ var intersection = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function intersection(list1, list2) { var lookupList, filteredList; if (list1.length > list2.length) { lookupList = list1; filteredList = list2; } else { lookupList = list2; filteredList = list1; } return Object(_uniq__WEBPACK_IMPORTED_MODULE_4__["default"])(Object(_internal_filter__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_flip__WEBPACK_IMPORTED_MODULE_3__["default"])(_internal_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(lookupList), filteredList)); }); /* harmony default export */ __webpack_exports__["default"] = (intersection); /***/ }), /***/ "./node_modules/ramda/es/intersperse.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/intersperse.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new list with the separator interposed between elements. * * Dispatches to the `intersperse` method of the second argument, if present. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig a -> [a] -> [a] * @param {*} separator The element to add to the list. * @param {Array} list The list to be interposed. * @return {Array} The new list. * @example * * R.intersperse('n', ['ba', 'a', 'a']); //=> ['ba', 'n', 'a', 'n', 'a'] */ var intersperse = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__["default"])('intersperse', function intersperse(separator, list) { var out = []; var idx = 0; var length = list.length; while (idx < length) { if (idx === length - 1) { out.push(list[idx]); } else { out.push(list[idx], separator); } idx += 1; } return out; })); /* harmony default export */ __webpack_exports__["default"] = (intersperse); /***/ }), /***/ "./node_modules/ramda/es/into.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/into.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_clone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_clone */ "./node_modules/ramda/es/internal/_clone.js"); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_isTransformer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isTransformer */ "./node_modules/ramda/es/internal/_isTransformer.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _internal_stepCat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_stepCat */ "./node_modules/ramda/es/internal/_stepCat.js"); /** * Transforms the items of the list with the transducer and appends the * transformed items to the accumulator using an appropriate iterator function * based on the accumulator type. * * The accumulator can be an array, string, object or a transformer. Iterated * items will be appended to arrays and concatenated to strings. Objects will * be merged directly or 2-item arrays will be merged as key, value pairs. * * The accumulator can also be a transformer object that provides a 2-arity * reducing iterator function, step, 0-arity initial value function, init, and * 1-arity result extraction function result. The step function is used as the * iterator function in reduce. The result function is used to convert the * final accumulator into the return type and in most cases is R.identity. The * init function is used to provide the initial accumulator. * * The iteration is performed with [`R.reduce`](#reduce) after initializing the * transducer. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig a -> (b -> b) -> [c] -> a * @param {*} acc The initial accumulator value. * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @example * * var numbers = [1, 2, 3, 4]; * var transducer = R.compose(R.map(R.add(1)), R.take(2)); * * R.into([], transducer, numbers); //=> [2, 3] * * var intoArray = R.into([]); * intoArray(transducer, numbers); //=> [2, 3] */ var into = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_1__["default"])(function into(acc, xf, list) { return Object(_internal_isTransformer__WEBPACK_IMPORTED_MODULE_2__["default"])(acc) ? Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_3__["default"])(xf(acc), acc['@@transducer/init'](), list) : Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_3__["default"])(xf(Object(_internal_stepCat__WEBPACK_IMPORTED_MODULE_4__["default"])(acc)), Object(_internal_clone__WEBPACK_IMPORTED_MODULE_0__["default"])(acc, [], [], false), list); }); /* harmony default export */ __webpack_exports__["default"] = (into); /***/ }), /***/ "./node_modules/ramda/es/invert.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/invert.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * Same as [`R.invertObj`](#invertObj), however this accounts for objects with * duplicate values by putting the values into an array. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig {s: x} -> {x: [ s, ... ]} * @param {Object} obj The object or array to invert * @return {Object} out A new object with keys in an array. * @see R.invertObj * @example * * var raceResultsByFirstName = { * first: 'alice', * second: 'jake', * third: 'alice', * }; * R.invert(raceResultsByFirstName); * //=> { 'alice': ['first', 'third'], 'jake':['second'] } */ var invert = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function invert(obj) { var props = Object(_keys__WEBPACK_IMPORTED_MODULE_2__["default"])(obj); var len = props.length; var idx = 0; var out = {}; while (idx < len) { var key = props[idx]; var val = obj[key]; var list = Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(val, out) ? out[val] : out[val] = []; list[list.length] = key; idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (invert); /***/ }), /***/ "./node_modules/ramda/es/invertObj.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/invertObj.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * Returns a new object with the keys of the given object as values, and the * values of the given object, which are coerced to strings, as keys. Note * that the last key found is preferred when handling the same value. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig {s: x} -> {x: s} * @param {Object} obj The object or array to invert * @return {Object} out A new object * @see R.invert * @example * * var raceResults = { * first: 'alice', * second: 'jake' * }; * R.invertObj(raceResults); * //=> { 'alice': 'first', 'jake':'second' } * * // Alternatively: * var raceResults = ['alice', 'jake']; * R.invertObj(raceResults); * //=> { 'alice': '0', 'jake':'1' } */ var invertObj = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function invertObj(obj) { var props = Object(_keys__WEBPACK_IMPORTED_MODULE_1__["default"])(obj); var len = props.length; var idx = 0; var out = {}; while (idx < len) { var key = props[idx]; out[obj[key]] = key; idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (invertObj); /***/ }), /***/ "./node_modules/ramda/es/invoker.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/invoker.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isFunction */ "./node_modules/ramda/es/internal/_isFunction.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _toString__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toString */ "./node_modules/ramda/es/toString.js"); /** * Turns a named method with a specified arity into a function that can be * called directly supplied with arguments and a target object. * * The returned function is curried and accepts `arity + 1` parameters where * the final parameter is the target object. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig Number -> String -> (a -> b -> ... -> n -> Object -> *) * @param {Number} arity Number of arguments the returned function should take * before the target object. * @param {String} method Name of the method to call. * @return {Function} A new curried function. * @see R.construct * @example * * var sliceFrom = R.invoker(1, 'slice'); * sliceFrom(6, 'abcdefghijklm'); //=> 'ghijklm' * var sliceFrom6 = R.invoker(2, 'slice')(6); * sliceFrom6(8, 'abcdefghijklm'); //=> 'gh' * @symb R.invoker(0, 'method')(o) = o['method']() * @symb R.invoker(1, 'method')(a, o) = o['method'](a) * @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b) */ var invoker = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function invoker(arity, method) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_2__["default"])(arity + 1, function () { var target = arguments[arity]; if (target != null && Object(_internal_isFunction__WEBPACK_IMPORTED_MODULE_1__["default"])(target[method])) { return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity)); } throw new TypeError(Object(_toString__WEBPACK_IMPORTED_MODULE_3__["default"])(target) + ' does not have a method named "' + method + '"'); }); }); /* harmony default export */ __webpack_exports__["default"] = (invoker); /***/ }), /***/ "./node_modules/ramda/es/is.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/is.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * See if an object (`val`) is an instance of the supplied constructor. This * function will check up the inheritance chain, if any. * * @func * @memberOf R * @since v0.3.0 * @category Type * @sig (* -> {*}) -> a -> Boolean * @param {Object} ctor A constructor * @param {*} val The value to test * @return {Boolean} * @example * * R.is(Object, {}); //=> true * R.is(Number, 1); //=> true * R.is(Object, 1); //=> false * R.is(String, 's'); //=> true * R.is(String, new String('')); //=> true * R.is(Object, new String('')); //=> true * R.is(Object, 's'); //=> false * R.is(Number, {}); //=> false */ var is = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function is(Ctor, val) { return val != null && val.constructor === Ctor || val instanceof Ctor; }); /* harmony default export */ __webpack_exports__["default"] = (is); /***/ }), /***/ "./node_modules/ramda/es/isEmpty.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/isEmpty.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./empty */ "./node_modules/ramda/es/empty.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /** * Returns `true` if the given value is its type's empty value; `false` * otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig a -> Boolean * @param {*} x * @return {Boolean} * @see R.empty * @example * * R.isEmpty([1, 2, 3]); //=> false * R.isEmpty([]); //=> true * R.isEmpty(''); //=> true * R.isEmpty(null); //=> false * R.isEmpty({}); //=> true * R.isEmpty({length: 0}); //=> false */ var isEmpty = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function isEmpty(x) { return x != null && Object(_equals__WEBPACK_IMPORTED_MODULE_2__["default"])(x, Object(_empty__WEBPACK_IMPORTED_MODULE_1__["default"])(x)); }); /* harmony default export */ __webpack_exports__["default"] = (isEmpty); /***/ }), /***/ "./node_modules/ramda/es/isNil.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/isNil.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Checks if the input value is `null` or `undefined`. * * @func * @memberOf R * @since v0.9.0 * @category Type * @sig * -> Boolean * @param {*} x The value to test. * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`. * @example * * R.isNil(null); //=> true * R.isNil(undefined); //=> true * R.isNil(0); //=> false * R.isNil([]); //=> false */ var isNil = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function isNil(x) { return x == null; }); /* harmony default export */ __webpack_exports__["default"] = (isNil); /***/ }), /***/ "./node_modules/ramda/es/join.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/join.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _invoker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker */ "./node_modules/ramda/es/invoker.js"); /** * Returns a string made by inserting the `separator` between each element and * concatenating all the elements into a single string. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig String -> [a] -> String * @param {Number|String} separator The string used to separate the elements. * @param {Array} xs The elements to join into a string. * @return {String} str The string made by concatenating `xs` with `separator`. * @see R.split * @example * * var spacer = R.join(' '); * spacer(['a', 2, 3.4]); //=> 'a 2 3.4' * R.join('|', [1, 2, 3]); //=> '1|2|3' */ var join = /*#__PURE__*/Object(_invoker__WEBPACK_IMPORTED_MODULE_0__["default"])(1, 'join'); /* harmony default export */ __webpack_exports__["default"] = (join); /***/ }), /***/ "./node_modules/ramda/es/juxt.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/juxt.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _converge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./converge */ "./node_modules/ramda/es/converge.js"); /** * juxt applies a list of functions to a list of values. * * @func * @memberOf R * @since v0.19.0 * @category Function * @sig [(a, b, ..., m) -> n] -> ((a, b, ..., m) -> [n]) * @param {Array} fns An array of functions * @return {Function} A function that returns a list of values after applying each of the original `fns` to its parameters. * @see R.applySpec * @example * * var getRange = R.juxt([Math.min, Math.max]); * getRange(3, 4, 9, -3); //=> [-3, 9] * @symb R.juxt([f, g, h])(a, b) = [f(a, b), g(a, b), h(a, b)] */ var juxt = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function juxt(fns) { return Object(_converge__WEBPACK_IMPORTED_MODULE_1__["default"])(function () { return Array.prototype.slice.call(arguments, 0); }, fns); }); /* harmony default export */ __webpack_exports__["default"] = (juxt); /***/ }), /***/ "./node_modules/ramda/es/keys.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/keys.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _internal_isArguments__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArguments */ "./node_modules/ramda/es/internal/_isArguments.js"); // cover IE < 9 keys issues var hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString'); var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug var hasArgsEnumBug = /*#__PURE__*/function () { 'use strict'; return arguments.propertyIsEnumerable('length'); }(); var contains = function contains(list, item) { var idx = 0; while (idx < list.length) { if (list[idx] === item) { return true; } idx += 1; } return false; }; /** * Returns a list containing the names of all the enumerable own properties of * the supplied object. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {k: v} -> [k] * @param {Object} obj The object to extract properties from * @return {Array} An array of the object's own properties. * @see R.keysIn, R.values * @example * * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c'] */ var _keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? function keys(obj) { return Object(obj) !== obj ? [] : Object.keys(obj); } : function keys(obj) { if (Object(obj) !== obj) { return []; } var prop, nIdx; var ks = []; var checkArgsLength = hasArgsEnumBug && Object(_internal_isArguments__WEBPACK_IMPORTED_MODULE_2__["default"])(obj); for (prop in obj) { if (Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(prop, obj) && (!checkArgsLength || prop !== 'length')) { ks[ks.length] = prop; } } if (hasEnumBug) { nIdx = nonEnumerableProps.length - 1; while (nIdx >= 0) { prop = nonEnumerableProps[nIdx]; if (Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(prop, obj) && !contains(ks, prop)) { ks[ks.length] = prop; } nIdx -= 1; } } return ks; }; var keys = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(_keys); /* harmony default export */ __webpack_exports__["default"] = (keys); /***/ }), /***/ "./node_modules/ramda/es/keysIn.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/keysIn.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Returns a list containing the names of all the properties of the supplied * object, including prototype properties. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.2.0 * @category Object * @sig {k: v} -> [k] * @param {Object} obj The object to extract properties from * @return {Array} An array of the object's own and prototype properties. * @see R.keys, R.valuesIn * @example * * var F = function() { this.x = 'X'; }; * F.prototype.y = 'Y'; * var f = new F(); * R.keysIn(f); //=> ['x', 'y'] */ var keysIn = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function keysIn(obj) { var prop; var ks = []; for (prop in obj) { ks[ks.length] = prop; } return ks; }); /* harmony default export */ __webpack_exports__["default"] = (keysIn); /***/ }), /***/ "./node_modules/ramda/es/last.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/last.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _nth__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nth */ "./node_modules/ramda/es/nth.js"); /** * Returns the last element of the given list or string. * * @func * @memberOf R * @since v0.1.4 * @category List * @sig [a] -> a | Undefined * @sig String -> String * @param {*} list * @return {*} * @see R.init, R.head, R.tail * @example * * R.last(['fi', 'fo', 'fum']); //=> 'fum' * R.last([]); //=> undefined * * R.last('abc'); //=> 'c' * R.last(''); //=> '' */ var last = /*#__PURE__*/Object(_nth__WEBPACK_IMPORTED_MODULE_0__["default"])(-1); /* harmony default export */ __webpack_exports__["default"] = (last); /***/ }), /***/ "./node_modules/ramda/es/lastIndexOf.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/lastIndexOf.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /** * Returns the position of the last occurrence of an item in an array, or -1 if * the item is not included in the array. [`R.equals`](#equals) is used to * determine equality. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> Number * @param {*} target The item to find. * @param {Array} xs The array to search in. * @return {Number} the index of the target, or -1 if the target is not found. * @see R.indexOf * @example * * R.lastIndexOf(3, [-1,3,3,0,1,2,3,4]); //=> 6 * R.lastIndexOf(10, [1,2,3,4]); //=> -1 */ var lastIndexOf = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function lastIndexOf(target, xs) { if (typeof xs.lastIndexOf === 'function' && !Object(_internal_isArray__WEBPACK_IMPORTED_MODULE_1__["default"])(xs)) { return xs.lastIndexOf(target); } else { var idx = xs.length - 1; while (idx >= 0) { if (Object(_equals__WEBPACK_IMPORTED_MODULE_2__["default"])(xs[idx], target)) { return idx; } idx -= 1; } return -1; } }); /* harmony default export */ __webpack_exports__["default"] = (lastIndexOf); /***/ }), /***/ "./node_modules/ramda/es/length.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/length.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_isNumber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isNumber */ "./node_modules/ramda/es/internal/_isNumber.js"); /** * Returns the number of elements in the array by returning `list.length`. * * @func * @memberOf R * @since v0.3.0 * @category List * @sig [a] -> Number * @param {Array} list The array to inspect. * @return {Number} The length of the array. * @example * * R.length([]); //=> 0 * R.length([1, 2, 3]); //=> 3 */ var length = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function length(list) { return list != null && Object(_internal_isNumber__WEBPACK_IMPORTED_MODULE_1__["default"])(list.length) ? list.length : NaN; }); /* harmony default export */ __webpack_exports__["default"] = (length); /***/ }), /***/ "./node_modules/ramda/es/lens.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/lens.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /** * Returns a lens for the given getter and setter functions. The getter "gets" * the value of the focus; the setter "sets" the value of the focus. The setter * should not mutate the data structure. * * @func * @memberOf R * @since v0.8.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig (s -> a) -> ((a, s) -> s) -> Lens s a * @param {Function} getter * @param {Function} setter * @return {Lens} * @see R.view, R.set, R.over, R.lensIndex, R.lensProp * @example * * var xLens = R.lens(R.prop('x'), R.assoc('x')); * * R.view(xLens, {x: 1, y: 2}); //=> 1 * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} */ var lens = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function lens(getter, setter) { return function (toFunctorFn) { return function (target) { return Object(_map__WEBPACK_IMPORTED_MODULE_1__["default"])(function (focus) { return setter(focus, target); }, toFunctorFn(getter(target))); }; }; }); /* harmony default export */ __webpack_exports__["default"] = (lens); /***/ }), /***/ "./node_modules/ramda/es/lensIndex.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/lensIndex.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _lens__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lens */ "./node_modules/ramda/es/lens.js"); /* harmony import */ var _nth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nth */ "./node_modules/ramda/es/nth.js"); /* harmony import */ var _update__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./update */ "./node_modules/ramda/es/update.js"); /** * Returns a lens whose focus is the specified index. * * @func * @memberOf R * @since v0.14.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Number -> Lens s a * @param {Number} n * @return {Lens} * @see R.view, R.set, R.over * @example * * var headLens = R.lensIndex(0); * * R.view(headLens, ['a', 'b', 'c']); //=> 'a' * R.set(headLens, 'x', ['a', 'b', 'c']); //=> ['x', 'b', 'c'] * R.over(headLens, R.toUpper, ['a', 'b', 'c']); //=> ['A', 'b', 'c'] */ var lensIndex = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function lensIndex(n) { return Object(_lens__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_nth__WEBPACK_IMPORTED_MODULE_2__["default"])(n), Object(_update__WEBPACK_IMPORTED_MODULE_3__["default"])(n)); }); /* harmony default export */ __webpack_exports__["default"] = (lensIndex); /***/ }), /***/ "./node_modules/ramda/es/lensPath.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/lensPath.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _assocPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assocPath */ "./node_modules/ramda/es/assocPath.js"); /* harmony import */ var _lens__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lens */ "./node_modules/ramda/es/lens.js"); /* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./path */ "./node_modules/ramda/es/path.js"); /** * Returns a lens whose focus is the specified path. * * @func * @memberOf R * @since v0.19.0 * @category Object * @typedefn Idx = String | Int * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig [Idx] -> Lens s a * @param {Array} path The path to use. * @return {Lens} * @see R.view, R.set, R.over * @example * * var xHeadYLens = R.lensPath(['x', 0, 'y']); * * R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); * //=> 2 * R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); * //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]} * R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); * //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]} */ var lensPath = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function lensPath(p) { return Object(_lens__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_path__WEBPACK_IMPORTED_MODULE_3__["default"])(p), Object(_assocPath__WEBPACK_IMPORTED_MODULE_1__["default"])(p)); }); /* harmony default export */ __webpack_exports__["default"] = (lensPath); /***/ }), /***/ "./node_modules/ramda/es/lensProp.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/lensProp.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _assoc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assoc */ "./node_modules/ramda/es/assoc.js"); /* harmony import */ var _lens__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lens */ "./node_modules/ramda/es/lens.js"); /* harmony import */ var _prop__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./prop */ "./node_modules/ramda/es/prop.js"); /** * Returns a lens whose focus is the specified property. * * @func * @memberOf R * @since v0.14.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig String -> Lens s a * @param {String} k * @return {Lens} * @see R.view, R.set, R.over * @example * * var xLens = R.lensProp('x'); * * R.view(xLens, {x: 1, y: 2}); //=> 1 * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} */ var lensProp = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function lensProp(k) { return Object(_lens__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_prop__WEBPACK_IMPORTED_MODULE_3__["default"])(k), Object(_assoc__WEBPACK_IMPORTED_MODULE_1__["default"])(k)); }); /* harmony default export */ __webpack_exports__["default"] = (lensProp); /***/ }), /***/ "./node_modules/ramda/es/lift.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/lift.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _liftN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./liftN */ "./node_modules/ramda/es/liftN.js"); /** * "lifts" a function of arity > 1 so that it may "map over" a list, Function or other * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). * * @func * @memberOf R * @since v0.7.0 * @category Function * @sig (*... -> *) -> ([*]... -> [*]) * @param {Function} fn The function to lift into higher context * @return {Function} The lifted function. * @see R.liftN * @example * * var madd3 = R.lift((a, b, c) => a + b + c); * * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] * * var madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e); * * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24] */ var lift = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function lift(fn) { return Object(_liftN__WEBPACK_IMPORTED_MODULE_1__["default"])(fn.length, fn); }); /* harmony default export */ __webpack_exports__["default"] = (lift); /***/ }), /***/ "./node_modules/ramda/es/liftN.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/liftN.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _ap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ap */ "./node_modules/ramda/es/ap.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /** * "lifts" a function to be the specified arity, so that it may "map over" that * many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). * * @func * @memberOf R * @since v0.7.0 * @category Function * @sig Number -> (*... -> *) -> ([*]... -> [*]) * @param {Function} fn The function to lift into higher context * @return {Function} The lifted function. * @see R.lift, R.ap * @example * * var madd3 = R.liftN(3, (...args) => R.sum(args)); * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] */ var liftN = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function liftN(arity, fn) { var lifted = Object(_curryN__WEBPACK_IMPORTED_MODULE_3__["default"])(arity, fn); return Object(_curryN__WEBPACK_IMPORTED_MODULE_3__["default"])(arity, function () { return Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_1__["default"])(_ap__WEBPACK_IMPORTED_MODULE_2__["default"], Object(_map__WEBPACK_IMPORTED_MODULE_4__["default"])(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1)); }); }); /* harmony default export */ __webpack_exports__["default"] = (liftN); /***/ }), /***/ "./node_modules/ramda/es/lt.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/lt.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the first argument is less than the second; `false` * otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @see R.gt * @example * * R.lt(2, 1); //=> false * R.lt(2, 2); //=> false * R.lt(2, 3); //=> true * R.lt('a', 'z'); //=> true * R.lt('z', 'a'); //=> false */ var lt = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function lt(a, b) { return a < b; }); /* harmony default export */ __webpack_exports__["default"] = (lt); /***/ }), /***/ "./node_modules/ramda/es/lte.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/lte.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the first argument is less than or equal to the second; * `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {Number} a * @param {Number} b * @return {Boolean} * @see R.gte * @example * * R.lte(2, 1); //=> false * R.lte(2, 2); //=> true * R.lte(2, 3); //=> true * R.lte('a', 'z'); //=> true * R.lte('z', 'a'); //=> false */ var lte = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function lte(a, b) { return a <= b; }); /* harmony default export */ __webpack_exports__["default"] = (lte); /***/ }), /***/ "./node_modules/ramda/es/map.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/map.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_map */ "./node_modules/ramda/es/internal/_map.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _internal_xmap__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_xmap */ "./node_modules/ramda/es/internal/_xmap.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * Takes a function and * a [functor](https://github.com/fantasyland/fantasy-land#functor), * applies the function to each of the functor's values, and returns * a functor of the same shape. * * Ramda provides suitable `map` implementations for `Array` and `Object`, * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`. * * Dispatches to the `map` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * Also treats functions as functors and will compose them together. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Functor f => (a -> b) -> f a -> f b * @param {Function} fn The function to be called on every element of the input `list`. * @param {Array} list The list to be iterated over. * @return {Array} The new list. * @see R.transduce, R.addIndex * @example * * var double = x => x * 2; * * R.map(double, [1, 2, 3]); //=> [2, 4, 6] * * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6} * @symb R.map(f, [a, b]) = [f(a), f(b)] * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) } * @symb R.map(f, functor_o) = functor_o.map(f) */ var map = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['fantasy-land/map', 'map'], _internal_xmap__WEBPACK_IMPORTED_MODULE_4__["default"], function map(fn, functor) { switch (Object.prototype.toString.call(functor)) { case '[object Function]': return Object(_curryN__WEBPACK_IMPORTED_MODULE_5__["default"])(functor.length, function () { return fn.call(this, functor.apply(this, arguments)); }); case '[object Object]': return Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_3__["default"])(function (acc, key) { acc[key] = fn(functor[key]); return acc; }, {}, Object(_keys__WEBPACK_IMPORTED_MODULE_6__["default"])(functor)); default: return Object(_internal_map__WEBPACK_IMPORTED_MODULE_2__["default"])(fn, functor); } })); /* harmony default export */ __webpack_exports__["default"] = (map); /***/ }), /***/ "./node_modules/ramda/es/mapAccum.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/mapAccum.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * The `mapAccum` function behaves like a combination of map and reduce; it * applies a function to each element of a list, passing an accumulating * parameter from left to right, and returning a final value of this * accumulator together with the new list. * * The iterator function receives two arguments, *acc* and *value*, and should * return a tuple *[acc, value]*. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y]) * @param {Function} fn The function to be called on every element of the input `list`. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.addIndex, R.mapAccumRight * @example * * var digits = ['1', '2', '3', '4']; * var appender = (a, b) => [a + b, a + b]; * * R.mapAccum(appender, 0, digits); //=> ['01234', ['01', '012', '0123', '01234']] * @symb R.mapAccum(f, a, [b, c, d]) = [ * f(f(f(a, b)[0], c)[0], d)[0], * [ * f(a, b)[1], * f(f(a, b)[0], c)[1], * f(f(f(a, b)[0], c)[0], d)[1] * ] * ] */ var mapAccum = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function mapAccum(fn, acc, list) { var idx = 0; var len = list.length; var result = []; var tuple = [acc]; while (idx < len) { tuple = fn(tuple[0], list[idx]); result[idx] = tuple[1]; idx += 1; } return [tuple[0], result]; }); /* harmony default export */ __webpack_exports__["default"] = (mapAccum); /***/ }), /***/ "./node_modules/ramda/es/mapAccumRight.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/mapAccumRight.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * The `mapAccumRight` function behaves like a combination of map and reduce; it * applies a function to each element of a list, passing an accumulating * parameter from right to left, and returning a final value of this * accumulator together with the new list. * * Similar to [`mapAccum`](#mapAccum), except moves through the input list from * the right to the left. * * The iterator function receives two arguments, *value* and *acc*, and should * return a tuple *[value, acc]*. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig ((x, acc) -> (y, acc)) -> acc -> [x] -> ([y], acc) * @param {Function} fn The function to be called on every element of the input `list`. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.addIndex, R.mapAccum * @example * * var digits = ['1', '2', '3', '4']; * var append = (a, b) => [a + b, a + b]; * * R.mapAccumRight(append, 5, digits); //=> [['12345', '2345', '345', '45'], '12345'] * @symb R.mapAccumRight(f, a, [b, c, d]) = [ * [ * f(b, f(c, f(d, a)[0])[0])[1], * f(c, f(d, a)[0])[1], * f(d, a)[1], * ] * f(b, f(c, f(d, a)[0])[0])[0], * ] */ var mapAccumRight = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function mapAccumRight(fn, acc, list) { var idx = list.length - 1; var result = []; var tuple = [acc]; while (idx >= 0) { tuple = fn(list[idx], tuple[0]); result[idx] = tuple[1]; idx -= 1; } return [result, tuple[0]]; }); /* harmony default export */ __webpack_exports__["default"] = (mapAccumRight); /***/ }), /***/ "./node_modules/ramda/es/mapObjIndexed.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/mapObjIndexed.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * An Object-specific version of [`map`](#map). The function is applied to three * arguments: *(value, key, obj)*. If only the value is significant, use * [`map`](#map) instead. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig ((*, String, Object) -> *) -> Object -> Object * @param {Function} fn * @param {Object} obj * @return {Object} * @see R.map * @example * * var values = { x: 1, y: 2, z: 3 }; * var prependKeyAndDouble = (num, key, obj) => key + (num * 2); * * R.mapObjIndexed(prependKeyAndDouble, values); //=> { x: 'x2', y: 'y4', z: 'z6' } */ var mapObjIndexed = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function mapObjIndexed(fn, obj) { return Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_1__["default"])(function (acc, key) { acc[key] = fn(obj[key], key, obj); return acc; }, {}, Object(_keys__WEBPACK_IMPORTED_MODULE_2__["default"])(obj)); }); /* harmony default export */ __webpack_exports__["default"] = (mapObjIndexed); /***/ }), /***/ "./node_modules/ramda/es/match.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/match.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Tests a regular expression against a String. Note that this function will * return an empty array when there are no matches. This differs from * [`String.prototype.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match) * which returns `null` when there are no matches. * * @func * @memberOf R * @since v0.1.0 * @category String * @sig RegExp -> String -> [String | Undefined] * @param {RegExp} rx A regular expression. * @param {String} str The string to match against * @return {Array} The list of matches or empty array. * @see R.test * @example * * R.match(/([a-z]a)/g, 'bananas'); //=> ['ba', 'na', 'na'] * R.match(/a/, 'b'); //=> [] * R.match(/a/, null); //=> TypeError: null does not have a method named "match" */ var match = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function match(rx, str) { return str.match(rx) || []; }); /* harmony default export */ __webpack_exports__["default"] = (match); /***/ }), /***/ "./node_modules/ramda/es/mathMod.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/mathMod.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isInteger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isInteger */ "./node_modules/ramda/es/internal/_isInteger.js"); /** * `mathMod` behaves like the modulo operator should mathematically, unlike the * `%` operator (and by extension, [`R.modulo`](#modulo)). So while * `-17 % 5` is `-2`, `mathMod(-17, 5)` is `3`. `mathMod` requires Integer * arguments, and returns NaN when the modulus is zero or negative. * * @func * @memberOf R * @since v0.3.0 * @category Math * @sig Number -> Number -> Number * @param {Number} m The dividend. * @param {Number} p the modulus. * @return {Number} The result of `b mod a`. * @see R.modulo * @example * * R.mathMod(-17, 5); //=> 3 * R.mathMod(17, 5); //=> 2 * R.mathMod(17, -5); //=> NaN * R.mathMod(17, 0); //=> NaN * R.mathMod(17.2, 5); //=> NaN * R.mathMod(17, 5.3); //=> NaN * * var clock = R.mathMod(R.__, 12); * clock(15); //=> 3 * clock(24); //=> 0 * * var seventeenMod = R.mathMod(17); * seventeenMod(3); //=> 2 * seventeenMod(4); //=> 1 * seventeenMod(10); //=> 7 */ var mathMod = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function mathMod(m, p) { if (!Object(_internal_isInteger__WEBPACK_IMPORTED_MODULE_1__["default"])(m)) { return NaN; } if (!Object(_internal_isInteger__WEBPACK_IMPORTED_MODULE_1__["default"])(p) || p < 1) { return NaN; } return (m % p + p) % p; }); /* harmony default export */ __webpack_exports__["default"] = (mathMod); /***/ }), /***/ "./node_modules/ramda/es/max.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/max.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns the larger of its two arguments. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> a * @param {*} a * @param {*} b * @return {*} * @see R.maxBy, R.min * @example * * R.max(789, 123); //=> 789 * R.max('a', 'b'); //=> 'b' */ var max = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function max(a, b) { return b > a ? b : a; }); /* harmony default export */ __webpack_exports__["default"] = (max); /***/ }), /***/ "./node_modules/ramda/es/maxBy.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/maxBy.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Takes a function and two values, and returns whichever value produces the * larger result when passed to the provided function. * * @func * @memberOf R * @since v0.8.0 * @category Relation * @sig Ord b => (a -> b) -> a -> a -> a * @param {Function} f * @param {*} a * @param {*} b * @return {*} * @see R.max, R.minBy * @example * * // square :: Number -> Number * var square = n => n * n; * * R.maxBy(square, -3, 2); //=> -3 * * R.reduce(R.maxBy(square), 0, [3, -5, 4, 1, -2]); //=> -5 * R.reduce(R.maxBy(square), 0, []); //=> 0 */ var maxBy = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function maxBy(f, a, b) { return f(b) > f(a) ? b : a; }); /* harmony default export */ __webpack_exports__["default"] = (maxBy); /***/ }), /***/ "./node_modules/ramda/es/mean.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/mean.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _sum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sum */ "./node_modules/ramda/es/sum.js"); /** * Returns the mean of the given list of numbers. * * @func * @memberOf R * @since v0.14.0 * @category Math * @sig [Number] -> Number * @param {Array} list * @return {Number} * @see R.median * @example * * R.mean([2, 7, 9]); //=> 6 * R.mean([]); //=> NaN */ var mean = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function mean(list) { return Object(_sum__WEBPACK_IMPORTED_MODULE_1__["default"])(list) / list.length; }); /* harmony default export */ __webpack_exports__["default"] = (mean); /***/ }), /***/ "./node_modules/ramda/es/median.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/median.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _mean__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mean */ "./node_modules/ramda/es/mean.js"); /** * Returns the median of the given list of numbers. * * @func * @memberOf R * @since v0.14.0 * @category Math * @sig [Number] -> Number * @param {Array} list * @return {Number} * @see R.mean * @example * * R.median([2, 9, 7]); //=> 7 * R.median([7, 2, 10, 9]); //=> 8 * R.median([]); //=> NaN */ var median = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function median(list) { var len = list.length; if (len === 0) { return NaN; } var width = 2 - len % 2; var idx = (len - width) / 2; return Object(_mean__WEBPACK_IMPORTED_MODULE_1__["default"])(Array.prototype.slice.call(list, 0).sort(function (a, b) { return a < b ? -1 : a > b ? 1 : 0; }).slice(idx, idx + width)); }); /* harmony default export */ __webpack_exports__["default"] = (median); /***/ }), /***/ "./node_modules/ramda/es/memoize.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/memoize.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _memoizeWith__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./memoizeWith */ "./node_modules/ramda/es/memoizeWith.js"); /* harmony import */ var _toString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toString */ "./node_modules/ramda/es/toString.js"); /** * Creates a new function that, when invoked, caches the result of calling `fn` * for a given argument set and returns the result. Subsequent calls to the * memoized `fn` with the same argument set will not result in an additional * call to `fn`; instead, the cached result for that set of arguments will be * returned. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (*... -> a) -> (*... -> a) * @param {Function} fn The function to memoize. * @return {Function} Memoized version of `fn`. * @see R.memoizeWith * @deprecated since v0.25.0 * @example * * let count = 0; * const factorial = R.memoize(n => { * count += 1; * return R.product(R.range(1, n + 1)); * }); * factorial(5); //=> 120 * factorial(5); //=> 120 * factorial(5); //=> 120 * count; //=> 1 */ var memoize = /*#__PURE__*/Object(_memoizeWith__WEBPACK_IMPORTED_MODULE_0__["default"])(function () { return Object(_toString__WEBPACK_IMPORTED_MODULE_1__["default"])(arguments); }); /* harmony default export */ __webpack_exports__["default"] = (memoize); /***/ }), /***/ "./node_modules/ramda/es/memoizeWith.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/memoizeWith.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /** * A customisable version of [`R.memoize`](#memoize). `memoizeWith` takes an * additional function that will be applied to a given argument set and used to * create the cache key under which the results of the function to be memoized * will be stored. Care must be taken when implementing key generation to avoid * clashes that may overwrite previous entries erroneously. * * * @func * @memberOf R * @since v0.24.0 * @category Function * @sig (*... -> String) -> (*... -> a) -> (*... -> a) * @param {Function} fn The function to generate the cache key. * @param {Function} fn The function to memoize. * @return {Function} Memoized version of `fn`. * @see R.memoize * @example * * let count = 0; * const factorial = R.memoizeWith(R.identity, n => { * count += 1; * return R.product(R.range(1, n + 1)); * }); * factorial(5); //=> 120 * factorial(5); //=> 120 * factorial(5); //=> 120 * count; //=> 1 */ var memoizeWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function memoizeWith(mFn, fn) { var cache = {}; return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(fn.length, function () { var key = mFn.apply(this, arguments); if (!Object(_internal_has__WEBPACK_IMPORTED_MODULE_2__["default"])(key, cache)) { cache[key] = fn.apply(this, arguments); } return cache[key]; }); }); /* harmony default export */ __webpack_exports__["default"] = (memoizeWith); /***/ }), /***/ "./node_modules/ramda/es/merge.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/merge.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_assign */ "./node_modules/ramda/es/internal/_assign.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Create a new object with the own properties of the first object merged with * the own properties of the second object. If a key exists in both objects, * the value from the second object will be used. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {k: v} -> {k: v} -> {k: v} * @param {Object} l * @param {Object} r * @return {Object} * @see R.mergeDeepRight, R.mergeWith, R.mergeWithKey * @example * * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 }); * //=> { 'name': 'fred', 'age': 40 } * * var resetToDefault = R.merge(R.__, {x: 0}); * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2} * @symb R.merge({ x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: 5, z: 3 } */ var merge = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function merge(l, r) { return Object(_internal_assign__WEBPACK_IMPORTED_MODULE_0__["default"])({}, l, r); }); /* harmony default export */ __webpack_exports__["default"] = (merge); /***/ }), /***/ "./node_modules/ramda/es/mergeAll.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/mergeAll.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_assign */ "./node_modules/ramda/es/internal/_assign.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Merges a list of objects together into one object. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig [{k: v}] -> {k: v} * @param {Array} list An array of objects * @return {Object} A merged object. * @see R.reduce * @example * * R.mergeAll([{foo:1},{bar:2},{baz:3}]); //=> {foo:1,bar:2,baz:3} * R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2} * @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 } */ var mergeAll = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])(function mergeAll(list) { return _internal_assign__WEBPACK_IMPORTED_MODULE_0__["default"].apply(null, [{}].concat(list)); }); /* harmony default export */ __webpack_exports__["default"] = (mergeAll); /***/ }), /***/ "./node_modules/ramda/es/mergeDeepLeft.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/mergeDeepLeft.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeDeepWithKey */ "./node_modules/ramda/es/mergeDeepWithKey.js"); /** * Creates a new object with the own properties of the first object merged with * the own properties of the second object. If a key exists in both objects: * - and both values are objects, the two values will be recursively merged * - otherwise the value from the first object will be used. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig {a} -> {a} -> {a} * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.merge, R.mergeDeepRight, R.mergeDeepWith, R.mergeDeepWithKey * @example * * R.mergeDeepLeft({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, * { age: 40, contact: { email: 'baa@example.com' }}); * //=> { name: 'fred', age: 10, contact: { email: 'moo@example.com' }} */ var mergeDeepLeft = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeDeepLeft(lObj, rObj) { return Object(_mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_1__["default"])(function (k, lVal, rVal) { return lVal; }, lObj, rObj); }); /* harmony default export */ __webpack_exports__["default"] = (mergeDeepLeft); /***/ }), /***/ "./node_modules/ramda/es/mergeDeepRight.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/mergeDeepRight.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeDeepWithKey */ "./node_modules/ramda/es/mergeDeepWithKey.js"); /** * Creates a new object with the own properties of the first object merged with * the own properties of the second object. If a key exists in both objects: * - and both values are objects, the two values will be recursively merged * - otherwise the value from the second object will be used. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig {a} -> {a} -> {a} * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey * @example * * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, * { age: 40, contact: { email: 'baa@example.com' }}); * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }} */ var mergeDeepRight = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeDeepRight(lObj, rObj) { return Object(_mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_1__["default"])(function (k, lVal, rVal) { return rVal; }, lObj, rObj); }); /* harmony default export */ __webpack_exports__["default"] = (mergeDeepRight); /***/ }), /***/ "./node_modules/ramda/es/mergeDeepWith.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/mergeDeepWith.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeDeepWithKey */ "./node_modules/ramda/es/mergeDeepWithKey.js"); /** * Creates a new object with the own properties of the two provided objects. * If a key exists in both objects: * - and both associated values are also objects then the values will be * recursively merged. * - otherwise the provided function is applied to associated values using the * resulting value as the new value associated with the key. * If a key only exists in one object, the value will be associated with the key * of the resulting object. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig ((a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.mergeWith, R.mergeDeep, R.mergeDeepWithKey * @example * * R.mergeDeepWith(R.concat, * { a: true, c: { values: [10, 20] }}, * { b: true, c: { values: [15, 35] }}); * //=> { a: true, b: true, c: { values: [10, 20, 15, 35] }} */ var mergeDeepWith = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeDeepWith(fn, lObj, rObj) { return Object(_mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_1__["default"])(function (k, lVal, rVal) { return fn(lVal, rVal); }, lObj, rObj); }); /* harmony default export */ __webpack_exports__["default"] = (mergeDeepWith); /***/ }), /***/ "./node_modules/ramda/es/mergeDeepWithKey.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/mergeDeepWithKey.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isObject */ "./node_modules/ramda/es/internal/_isObject.js"); /* harmony import */ var _mergeWithKey__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mergeWithKey */ "./node_modules/ramda/es/mergeWithKey.js"); /** * Creates a new object with the own properties of the two provided objects. * If a key exists in both objects: * - and both associated values are also objects then the values will be * recursively merged. * - otherwise the provided function is applied to the key and associated values * using the resulting value as the new value associated with the key. * If a key only exists in one object, the value will be associated with the key * of the resulting object. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.mergeWithKey, R.mergeDeep, R.mergeDeepWith * @example * * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r * R.mergeDeepWithKey(concatValues, * { a: true, c: { thing: 'foo', values: [10, 20] }}, * { b: true, c: { thing: 'bar', values: [15, 35] }}); * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }} */ var mergeDeepWithKey = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeDeepWithKey(fn, lObj, rObj) { return Object(_mergeWithKey__WEBPACK_IMPORTED_MODULE_2__["default"])(function (k, lVal, rVal) { if (Object(_internal_isObject__WEBPACK_IMPORTED_MODULE_1__["default"])(lVal) && Object(_internal_isObject__WEBPACK_IMPORTED_MODULE_1__["default"])(rVal)) { return mergeDeepWithKey(fn, lVal, rVal); } else { return fn(k, lVal, rVal); } }, lObj, rObj); }); /* harmony default export */ __webpack_exports__["default"] = (mergeDeepWithKey); /***/ }), /***/ "./node_modules/ramda/es/mergeWith.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/mergeWith.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _mergeWithKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeWithKey */ "./node_modules/ramda/es/mergeWithKey.js"); /** * Creates a new object with the own properties of the two provided objects. If * a key exists in both objects, the provided function is applied to the values * associated with the key in each object, with the result being used as the * value associated with the key in the returned object. * * @func * @memberOf R * @since v0.19.0 * @category Object * @sig ((a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} l * @param {Object} r * @return {Object} * @see R.mergeDeepWith, R.merge, R.mergeWithKey * @example * * R.mergeWith(R.concat, * { a: true, values: [10, 20] }, * { b: true, values: [15, 35] }); * //=> { a: true, b: true, values: [10, 20, 15, 35] } */ var mergeWith = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeWith(fn, l, r) { return Object(_mergeWithKey__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_, _l, _r) { return fn(_l, _r); }, l, r); }); /* harmony default export */ __webpack_exports__["default"] = (mergeWith); /***/ }), /***/ "./node_modules/ramda/es/mergeWithKey.js": /*!***********************************************!*\ !*** ./node_modules/ramda/es/mergeWithKey.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /** * Creates a new object with the own properties of the two provided objects. If * a key exists in both objects, the provided function is applied to the key * and the values associated with the key in each object, with the result being * used as the value associated with the key in the returned object. * * @func * @memberOf R * @since v0.19.0 * @category Object * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} l * @param {Object} r * @return {Object} * @see R.mergeDeepWithKey, R.merge, R.mergeWith * @example * * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r * R.mergeWithKey(concatValues, * { a: true, thing: 'foo', values: [10, 20] }, * { b: true, thing: 'bar', values: [15, 35] }); * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] } * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 } */ var mergeWithKey = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeWithKey(fn, l, r) { var result = {}; var k; for (k in l) { if (Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(k, l)) { result[k] = Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(k, r) ? fn(k, l[k], r[k]) : l[k]; } } for (k in r) { if (Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(k, r) && !Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(k, result)) { result[k] = r[k]; } } return result; }); /* harmony default export */ __webpack_exports__["default"] = (mergeWithKey); /***/ }), /***/ "./node_modules/ramda/es/min.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/min.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns the smaller of its two arguments. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> a * @param {*} a * @param {*} b * @return {*} * @see R.minBy, R.max * @example * * R.min(789, 123); //=> 123 * R.min('a', 'b'); //=> 'a' */ var min = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function min(a, b) { return b < a ? b : a; }); /* harmony default export */ __webpack_exports__["default"] = (min); /***/ }), /***/ "./node_modules/ramda/es/minBy.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/minBy.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Takes a function and two values, and returns whichever value produces the * smaller result when passed to the provided function. * * @func * @memberOf R * @since v0.8.0 * @category Relation * @sig Ord b => (a -> b) -> a -> a -> a * @param {Function} f * @param {*} a * @param {*} b * @return {*} * @see R.min, R.maxBy * @example * * // square :: Number -> Number * var square = n => n * n; * * R.minBy(square, -3, 2); //=> 2 * * R.reduce(R.minBy(square), Infinity, [3, -5, 4, 1, -2]); //=> 1 * R.reduce(R.minBy(square), Infinity, []); //=> Infinity */ var minBy = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function minBy(f, a, b) { return f(b) < f(a) ? b : a; }); /* harmony default export */ __webpack_exports__["default"] = (minBy); /***/ }), /***/ "./node_modules/ramda/es/modulo.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/modulo.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Divides the first parameter by the second and returns the remainder. Note * that this function preserves the JavaScript-style behavior for modulo. For * mathematical modulo see [`mathMod`](#mathMod). * * @func * @memberOf R * @since v0.1.1 * @category Math * @sig Number -> Number -> Number * @param {Number} a The value to the divide. * @param {Number} b The pseudo-modulus * @return {Number} The result of `b % a`. * @see R.mathMod * @example * * R.modulo(17, 3); //=> 2 * // JS behavior: * R.modulo(-17, 3); //=> -2 * R.modulo(17, -3); //=> 2 * * var isOdd = R.modulo(R.__, 2); * isOdd(42); //=> 0 * isOdd(21); //=> 1 */ var modulo = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function modulo(a, b) { return a % b; }); /* harmony default export */ __webpack_exports__["default"] = (modulo); /***/ }), /***/ "./node_modules/ramda/es/multiply.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/multiply.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Multiplies two numbers. Equivalent to `a * b` but curried. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a The first value. * @param {Number} b The second value. * @return {Number} The result of `a * b`. * @see R.divide * @example * * var double = R.multiply(2); * var triple = R.multiply(3); * double(3); //=> 6 * triple(4); //=> 12 * R.multiply(2, 5); //=> 10 */ var multiply = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function multiply(a, b) { return a * b; }); /* harmony default export */ __webpack_exports__["default"] = (multiply); /***/ }), /***/ "./node_modules/ramda/es/nAry.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/nAry.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Wraps a function of any arity (including nullary) in a function that accepts * exactly `n` parameters. Any extraneous parameters will not be passed to the * supplied function. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig Number -> (* -> a) -> (* -> a) * @param {Number} n The desired arity of the new function. * @param {Function} fn The function to wrap. * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of * arity `n`. * @see R.binary, R.unary * @example * * var takesTwoArgs = (a, b) => [a, b]; * * takesTwoArgs.length; //=> 2 * takesTwoArgs(1, 2); //=> [1, 2] * * var takesOneArg = R.nAry(1, takesTwoArgs); * takesOneArg.length; //=> 1 * // Only `n` arguments are passed to the wrapped function * takesOneArg(1, 2); //=> [1, undefined] * @symb R.nAry(0, f)(a, b) = f() * @symb R.nAry(1, f)(a, b) = f(a) * @symb R.nAry(2, f)(a, b) = f(a, b) */ var nAry = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function nAry(n, fn) { switch (n) { case 0: return function () { return fn.call(this); }; case 1: return function (a0) { return fn.call(this, a0); }; case 2: return function (a0, a1) { return fn.call(this, a0, a1); }; case 3: return function (a0, a1, a2) { return fn.call(this, a0, a1, a2); }; case 4: return function (a0, a1, a2, a3) { return fn.call(this, a0, a1, a2, a3); }; case 5: return function (a0, a1, a2, a3, a4) { return fn.call(this, a0, a1, a2, a3, a4); }; case 6: return function (a0, a1, a2, a3, a4, a5) { return fn.call(this, a0, a1, a2, a3, a4, a5); }; case 7: return function (a0, a1, a2, a3, a4, a5, a6) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6); }; case 8: return function (a0, a1, a2, a3, a4, a5, a6, a7) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7); }; case 9: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8); }; case 10: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }; default: throw new Error('First argument to nAry must be a non-negative integer no greater than ten'); } }); /* harmony default export */ __webpack_exports__["default"] = (nAry); /***/ }), /***/ "./node_modules/ramda/es/negate.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/negate.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Negates its argument. * * @func * @memberOf R * @since v0.9.0 * @category Math * @sig Number -> Number * @param {Number} n * @return {Number} * @example * * R.negate(42); //=> -42 */ var negate = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function negate(n) { return -n; }); /* harmony default export */ __webpack_exports__["default"] = (negate); /***/ }), /***/ "./node_modules/ramda/es/none.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/none.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_complement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_complement */ "./node_modules/ramda/es/internal/_complement.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xany__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xany */ "./node_modules/ramda/es/internal/_xany.js"); /* harmony import */ var _any__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./any */ "./node_modules/ramda/es/any.js"); /** * Returns `true` if no elements of the list match the predicate, `false` * otherwise. * * Dispatches to the `any` method of the second argument, if present. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig (a -> Boolean) -> [a] -> Boolean * @param {Function} fn The predicate function. * @param {Array} list The array to consider. * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise. * @see R.all, R.any * @example * * var isEven = n => n % 2 === 0; * var isOdd = n => n % 2 === 1; * * R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true * R.none(isOdd, [1, 3, 5, 7, 8, 11]); //=> false */ var none = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_complement__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_2__["default"])(['any'], _internal_xany__WEBPACK_IMPORTED_MODULE_3__["default"], _any__WEBPACK_IMPORTED_MODULE_4__["default"]))); /* harmony default export */ __webpack_exports__["default"] = (none); /***/ }), /***/ "./node_modules/ramda/es/not.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/not.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * A function that returns the `!` of its argument. It will return `true` when * passed false-y value, and `false` when passed a truth-y one. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig * -> Boolean * @param {*} a any value * @return {Boolean} the logical inverse of passed argument. * @see R.complement * @example * * R.not(true); //=> false * R.not(false); //=> true * R.not(0); //=> true * R.not(1); //=> false */ var not = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function not(a) { return !a; }); /* harmony default export */ __webpack_exports__["default"] = (not); /***/ }), /***/ "./node_modules/ramda/es/nth.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/nth.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isString */ "./node_modules/ramda/es/internal/_isString.js"); /** * Returns the nth element of the given list or string. If n is negative the * element at index length + n is returned. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> [a] -> a | Undefined * @sig Number -> String -> String * @param {Number} offset * @param {*} list * @return {*} * @example * * var list = ['foo', 'bar', 'baz', 'quux']; * R.nth(1, list); //=> 'bar' * R.nth(-1, list); //=> 'quux' * R.nth(-99, list); //=> undefined * * R.nth(2, 'abc'); //=> 'c' * R.nth(3, 'abc'); //=> '' * @symb R.nth(-1, [a, b, c]) = c * @symb R.nth(0, [a, b, c]) = a * @symb R.nth(1, [a, b, c]) = b */ var nth = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function nth(offset, list) { var idx = offset < 0 ? list.length + offset : offset; return Object(_internal_isString__WEBPACK_IMPORTED_MODULE_1__["default"])(list) ? list.charAt(idx) : list[idx]; }); /* harmony default export */ __webpack_exports__["default"] = (nth); /***/ }), /***/ "./node_modules/ramda/es/nthArg.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/nthArg.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _nth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nth */ "./node_modules/ramda/es/nth.js"); /** * Returns a function which returns its nth argument. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig Number -> *... -> * * @param {Number} n * @return {Function} * @example * * R.nthArg(1)('a', 'b', 'c'); //=> 'b' * R.nthArg(-1)('a', 'b', 'c'); //=> 'c' * @symb R.nthArg(-1)(a, b, c) = c * @symb R.nthArg(0)(a, b, c) = a * @symb R.nthArg(1)(a, b, c) = b */ var nthArg = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function nthArg(n) { var arity = n < 0 ? 1 : n + 1; return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(arity, function () { return Object(_nth__WEBPACK_IMPORTED_MODULE_2__["default"])(n, arguments); }); }); /* harmony default export */ __webpack_exports__["default"] = (nthArg); /***/ }), /***/ "./node_modules/ramda/es/o.js": /*!************************************!*\ !*** ./node_modules/ramda/es/o.js ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * `o` is a curried composition function that returns a unary function. * Like [`compose`](#compose), `o` performs right-to-left function composition. * Unlike [`compose`](#compose), the rightmost function passed to `o` will be * invoked with only one argument. * * @func * @memberOf R * @since v0.24.0 * @category Function * @sig (b -> c) -> (a -> b) -> a -> c * @param {Function} f * @param {Function} g * @return {Function} * @see R.compose, R.pipe * @example * * var classyGreeting = name => "The name's " + name.last + ", " + name.first + " " + name.last * var yellGreeting = R.o(R.toUpper, classyGreeting); * yellGreeting({first: 'James', last: 'Bond'}); //=> "THE NAME'S BOND, JAMES BOND" * * R.o(R.multiply(10), R.add(10))(-4) //=> 60 * * @symb R.o(f, g, x) = f(g(x)) */ var o = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function o(f, g, x) { return f(g(x)); }); /* harmony default export */ __webpack_exports__["default"] = (o); /***/ }), /***/ "./node_modules/ramda/es/objOf.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/objOf.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates an object containing a single key:value pair. * * @func * @memberOf R * @since v0.18.0 * @category Object * @sig String -> a -> {String:a} * @param {String} key * @param {*} val * @return {Object} * @see R.pair * @example * * var matchPhrases = R.compose( * R.objOf('must'), * R.map(R.objOf('match_phrase')) * ); * matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]} */ var objOf = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function objOf(key, val) { var obj = {}; obj[key] = val; return obj; }); /* harmony default export */ __webpack_exports__["default"] = (objOf); /***/ }), /***/ "./node_modules/ramda/es/of.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/of.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_of */ "./node_modules/ramda/es/internal/_of.js"); /** * Returns a singleton array containing the value provided. * * Note this `of` is different from the ES6 `of`; See * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of * * @func * @memberOf R * @since v0.3.0 * @category Function * @sig a -> [a] * @param {*} x any value * @return {Array} An array wrapping `x`. * @example * * R.of(null); //=> [null] * R.of([42]); //=> [[42]] */ var of = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(_internal_of__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (of); /***/ }), /***/ "./node_modules/ramda/es/omit.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/omit.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a partial copy of an object omitting the keys specified. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [String] -> {String: *} -> {String: *} * @param {Array} names an array of String property names to omit from the new object * @param {Object} obj The object to copy from * @return {Object} A new object with properties from `names` not on it. * @see R.pick * @example * * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3} */ var omit = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function omit(names, obj) { var result = {}; var index = {}; var idx = 0; var len = names.length; while (idx < len) { index[names[idx]] = 1; idx += 1; } for (var prop in obj) { if (!index.hasOwnProperty(prop)) { result[prop] = obj[prop]; } } return result; }); /* harmony default export */ __webpack_exports__["default"] = (omit); /***/ }), /***/ "./node_modules/ramda/es/once.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/once.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Accepts a function `fn` and returns a function that guards invocation of * `fn` such that `fn` can only ever be called once, no matter how many times * the returned function is invoked. The first value calculated is returned in * subsequent invocations. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (a... -> b) -> (a... -> b) * @param {Function} fn The function to wrap in a call-only-once wrapper. * @return {Function} The wrapped function. * @example * * var addOneOnce = R.once(x => x + 1); * addOneOnce(10); //=> 11 * addOneOnce(addOneOnce(50)); //=> 11 */ var once = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])(function once(fn) { var called = false; var result; return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(fn.length, function () { if (called) { return result; } called = true; result = fn.apply(this, arguments); return result; }); }); /* harmony default export */ __webpack_exports__["default"] = (once); /***/ }), /***/ "./node_modules/ramda/es/or.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/or.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if one or both of its arguments are `true`. Returns `false` * if both arguments are `false`. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig a -> b -> a | b * @param {Any} a * @param {Any} b * @return {Any} the first argument if truthy, otherwise the second argument. * @see R.either * @example * * R.or(true, true); //=> true * R.or(true, false); //=> true * R.or(false, true); //=> true * R.or(false, false); //=> false */ var or = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function or(a, b) { return a || b; }); /* harmony default export */ __webpack_exports__["default"] = (or); /***/ }), /***/ "./node_modules/ramda/es/over.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/over.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); // `Identity` is a functor that holds a single value, where `map` simply // transforms the held value with the provided function. var Identity = function (x) { return { value: x, map: function (f) { return Identity(f(x)); } }; }; /** * Returns the result of "setting" the portion of the given data structure * focused by the given lens to the result of applying the given function to * the focused value. * * @func * @memberOf R * @since v0.16.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Lens s a -> (a -> a) -> s -> s * @param {Lens} lens * @param {*} v * @param {*} x * @return {*} * @see R.prop, R.lensIndex, R.lensProp * @example * * var headLens = R.lensIndex(0); * * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz'] */ var over = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function over(lens, f, x) { // The value returned by the getter function is first transformed with `f`, // then set as the value of an `Identity`. This is then mapped over with the // setter function of the lens. return lens(function (y) { return Identity(f(y)); })(x).value; }); /* harmony default export */ __webpack_exports__["default"] = (over); /***/ }), /***/ "./node_modules/ramda/es/pair.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/pair.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Takes two arguments, `fst` and `snd`, and returns `[fst, snd]`. * * @func * @memberOf R * @since v0.18.0 * @category List * @sig a -> b -> (a,b) * @param {*} fst * @param {*} snd * @return {Array} * @see R.objOf, R.of * @example * * R.pair('foo', 'bar'); //=> ['foo', 'bar'] */ var pair = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function pair(fst, snd) { return [fst, snd]; }); /* harmony default export */ __webpack_exports__["default"] = (pair); /***/ }), /***/ "./node_modules/ramda/es/partial.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/partial.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_createPartialApplicator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_createPartialApplicator */ "./node_modules/ramda/es/internal/_createPartialApplicator.js"); /** * Takes a function `f` and a list of arguments, and returns a function `g`. * When applied, `g` returns the result of applying `f` to the arguments * provided initially followed by the arguments provided to `g`. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x) * @param {Function} f * @param {Array} args * @return {Function} * @see R.partialRight * @example * * var multiply2 = (a, b) => a * b; * var double = R.partial(multiply2, [2]); * double(2); //=> 4 * * var greet = (salutation, title, firstName, lastName) => * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; * * var sayHello = R.partial(greet, ['Hello']); * var sayHelloToMs = R.partial(sayHello, ['Ms.']); * sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!' * @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d) */ var partial = /*#__PURE__*/Object(_internal_createPartialApplicator__WEBPACK_IMPORTED_MODULE_1__["default"])(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (partial); /***/ }), /***/ "./node_modules/ramda/es/partialRight.js": /*!***********************************************!*\ !*** ./node_modules/ramda/es/partialRight.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_createPartialApplicator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_createPartialApplicator */ "./node_modules/ramda/es/internal/_createPartialApplicator.js"); /* harmony import */ var _flip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flip */ "./node_modules/ramda/es/flip.js"); /** * Takes a function `f` and a list of arguments, and returns a function `g`. * When applied, `g` returns the result of applying `f` to the arguments * provided to `g` followed by the arguments provided initially. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x) * @param {Function} f * @param {Array} args * @return {Function} * @see R.partial * @example * * var greet = (salutation, title, firstName, lastName) => * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; * * var greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']); * * greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!' * @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b) */ var partialRight = /*#__PURE__*/Object(_internal_createPartialApplicator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_flip__WEBPACK_IMPORTED_MODULE_2__["default"])(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])); /* harmony default export */ __webpack_exports__["default"] = (partialRight); /***/ }), /***/ "./node_modules/ramda/es/partition.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/partition.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./filter */ "./node_modules/ramda/es/filter.js"); /* harmony import */ var _juxt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./juxt */ "./node_modules/ramda/es/juxt.js"); /* harmony import */ var _reject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reject */ "./node_modules/ramda/es/reject.js"); /** * Takes a predicate and a list or other `Filterable` object and returns the * pair of filterable objects of the same type of elements which do and do not * satisfy, the predicate, respectively. Filterable objects include plain objects or any object * that has a filter method such as `Array`. * * @func * @memberOf R * @since v0.1.4 * @category List * @sig Filterable f => (a -> Boolean) -> f a -> [f a, f a] * @param {Function} pred A predicate to determine which side the element belongs to. * @param {Array} filterable the list (or other filterable) to partition. * @return {Array} An array, containing first the subset of elements that satisfy the * predicate, and second the subset of elements that do not satisfy. * @see R.filter, R.reject * @example * * R.partition(R.contains('s'), ['sss', 'ttt', 'foo', 'bars']); * // => [ [ 'sss', 'bars' ], [ 'ttt', 'foo' ] ] * * R.partition(R.contains('s'), { a: 'sss', b: 'ttt', foo: 'bars' }); * // => [ { a: 'sss', foo: 'bars' }, { b: 'ttt' } ] */ var partition = /*#__PURE__*/Object(_juxt__WEBPACK_IMPORTED_MODULE_1__["default"])([_filter__WEBPACK_IMPORTED_MODULE_0__["default"], _reject__WEBPACK_IMPORTED_MODULE_2__["default"]]); /* harmony default export */ __webpack_exports__["default"] = (partition); /***/ }), /***/ "./node_modules/ramda/es/path.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/path.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Retrieve the value at a given path. * * @func * @memberOf R * @since v0.2.0 * @category Object * @typedefn Idx = String | Int * @sig [Idx] -> {a} -> a | Undefined * @param {Array} path The path to use. * @param {Object} obj The object to retrieve the nested property from. * @return {*} The data at `path`. * @see R.prop * @example * * R.path(['a', 'b'], {a: {b: 2}}); //=> 2 * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined */ var path = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function path(paths, obj) { var val = obj; var idx = 0; while (idx < paths.length) { if (val == null) { return; } val = val[paths[idx]]; idx += 1; } return val; }); /* harmony default export */ __webpack_exports__["default"] = (path); /***/ }), /***/ "./node_modules/ramda/es/pathEq.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/pathEq.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./path */ "./node_modules/ramda/es/path.js"); /** * Determines whether a nested path on an object has a specific value, in * [`R.equals`](#equals) terms. Most likely used to filter a list. * * @func * @memberOf R * @since v0.7.0 * @category Relation * @typedefn Idx = String | Int * @sig [Idx] -> a -> {a} -> Boolean * @param {Array} path The path of the nested property to use * @param {*} val The value to compare the nested property with * @param {Object} obj The object to check the nested property in * @return {Boolean} `true` if the value equals the nested object property, * `false` otherwise. * @example * * var user1 = { address: { zipCode: 90210 } }; * var user2 = { address: { zipCode: 55555 } }; * var user3 = { name: 'Bob' }; * var users = [ user1, user2, user3 ]; * var isFamous = R.pathEq(['address', 'zipCode'], 90210); * R.filter(isFamous, users); //=> [ user1 ] */ var pathEq = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function pathEq(_path, val, obj) { return Object(_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_path__WEBPACK_IMPORTED_MODULE_2__["default"])(_path, obj), val); }); /* harmony default export */ __webpack_exports__["default"] = (pathEq); /***/ }), /***/ "./node_modules/ramda/es/pathOr.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/pathOr.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _defaultTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultTo */ "./node_modules/ramda/es/defaultTo.js"); /* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./path */ "./node_modules/ramda/es/path.js"); /** * If the given, non-null object has a value at the given path, returns the * value at that path. Otherwise returns the provided default value. * * @func * @memberOf R * @since v0.18.0 * @category Object * @typedefn Idx = String | Int * @sig a -> [Idx] -> {a} -> a * @param {*} d The default value. * @param {Array} p The path to use. * @param {Object} obj The object to retrieve the nested property from. * @return {*} The data at `path` of the supplied object or the default value. * @example * * R.pathOr('N/A', ['a', 'b'], {a: {b: 2}}); //=> 2 * R.pathOr('N/A', ['a', 'b'], {c: {b: 2}}); //=> "N/A" */ var pathOr = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function pathOr(d, p, obj) { return Object(_defaultTo__WEBPACK_IMPORTED_MODULE_1__["default"])(d, Object(_path__WEBPACK_IMPORTED_MODULE_2__["default"])(p, obj)); }); /* harmony default export */ __webpack_exports__["default"] = (pathOr); /***/ }), /***/ "./node_modules/ramda/es/pathSatisfies.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/pathSatisfies.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path */ "./node_modules/ramda/es/path.js"); /** * Returns `true` if the specified object property at given path satisfies the * given predicate; `false` otherwise. * * @func * @memberOf R * @since v0.19.0 * @category Logic * @typedefn Idx = String | Int * @sig (a -> Boolean) -> [Idx] -> {a} -> Boolean * @param {Function} pred * @param {Array} propPath * @param {*} obj * @return {Boolean} * @see R.propSatisfies, R.path * @example * * R.pathSatisfies(y => y > 0, ['x', 'y'], {x: {y: 2}}); //=> true */ var pathSatisfies = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function pathSatisfies(pred, propPath, obj) { return propPath.length > 0 && pred(Object(_path__WEBPACK_IMPORTED_MODULE_1__["default"])(propPath, obj)); }); /* harmony default export */ __webpack_exports__["default"] = (pathSatisfies); /***/ }), /***/ "./node_modules/ramda/es/pick.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/pick.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a partial copy of an object containing only the keys specified. If * the key does not exist, the property is ignored. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [k] -> {k: v} -> {k: v} * @param {Array} names an array of String property names to copy onto a new object * @param {Object} obj The object to copy from * @return {Object} A new object with only properties from `names` on it. * @see R.omit, R.props * @example * * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1} */ var pick = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function pick(names, obj) { var result = {}; var idx = 0; while (idx < names.length) { if (names[idx] in obj) { result[names[idx]] = obj[names[idx]]; } idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (pick); /***/ }), /***/ "./node_modules/ramda/es/pickAll.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/pickAll.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Similar to `pick` except that this one includes a `key: undefined` pair for * properties that don't exist. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [k] -> {k: v} -> {k: v} * @param {Array} names an array of String property names to copy onto a new object * @param {Object} obj The object to copy from * @return {Object} A new object with only properties from `names` on it. * @see R.pick * @example * * R.pickAll(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} * R.pickAll(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined} */ var pickAll = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function pickAll(names, obj) { var result = {}; var idx = 0; var len = names.length; while (idx < len) { var name = names[idx]; result[name] = obj[name]; idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (pickAll); /***/ }), /***/ "./node_modules/ramda/es/pickBy.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/pickBy.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a partial copy of an object containing only the keys that satisfy * the supplied predicate. * * @func * @memberOf R * @since v0.8.0 * @category Object * @sig ((v, k) -> Boolean) -> {k: v} -> {k: v} * @param {Function} pred A predicate to determine whether or not a key * should be included on the output object. * @param {Object} obj The object to copy from * @return {Object} A new object with only properties that satisfy `pred` * on it. * @see R.pick, R.filter * @example * * var isUpperCase = (val, key) => key.toUpperCase() === key; * R.pickBy(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4} */ var pickBy = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function pickBy(test, obj) { var result = {}; for (var prop in obj) { if (test(obj[prop], prop, obj)) { result[prop] = obj[prop]; } } return result; }); /* harmony default export */ __webpack_exports__["default"] = (pickBy); /***/ }), /***/ "./node_modules/ramda/es/pipe.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/pipe.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pipe; }); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_pipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_pipe */ "./node_modules/ramda/es/internal/_pipe.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /* harmony import */ var _tail__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tail */ "./node_modules/ramda/es/tail.js"); /** * Performs left-to-right function composition. The leftmost function may have * any arity; the remaining functions must be unary. * * In some libraries this function is named `sequence`. * * **Note:** The result of pipe is not automatically curried. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z) * @param {...Function} functions * @return {Function} * @see R.compose * @example * * var f = R.pipe(Math.pow, R.negate, R.inc); * * f(3, 4); // -(3^4) + 1 * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b))) */ function pipe() { if (arguments.length === 0) { throw new Error('pipe requires at least one argument'); } return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments[0].length, Object(_reduce__WEBPACK_IMPORTED_MODULE_2__["default"])(_internal_pipe__WEBPACK_IMPORTED_MODULE_1__["default"], arguments[0], Object(_tail__WEBPACK_IMPORTED_MODULE_3__["default"])(arguments))); } /***/ }), /***/ "./node_modules/ramda/es/pipeK.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/pipeK.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pipeK; }); /* harmony import */ var _composeK__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./composeK */ "./node_modules/ramda/es/composeK.js"); /* harmony import */ var _reverse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reverse */ "./node_modules/ramda/es/reverse.js"); /** * Returns the left-to-right Kleisli composition of the provided functions, * each of which must return a value of a type supported by [`chain`](#chain). * * `R.pipeK(f, g, h)` is equivalent to `R.pipe(f, R.chain(g), R.chain(h))`. * * @func * @memberOf R * @since v0.16.0 * @category Function * @sig Chain m => ((a -> m b), (b -> m c), ..., (y -> m z)) -> (a -> m z) * @param {...Function} * @return {Function} * @see R.composeK * @example * * // parseJson :: String -> Maybe * * // get :: String -> Object -> Maybe * * * // getStateCode :: Maybe String -> Maybe String * var getStateCode = R.pipeK( * parseJson, * get('user'), * get('address'), * get('state'), * R.compose(Maybe.of, R.toUpper) * ); * * getStateCode('{"user":{"address":{"state":"ny"}}}'); * //=> Just('NY') * getStateCode('[Invalid JSON]'); * //=> Nothing() * @symb R.pipeK(f, g, h)(a) = R.chain(h, R.chain(g, f(a))) */ function pipeK() { if (arguments.length === 0) { throw new Error('pipeK requires at least one argument'); } return _composeK__WEBPACK_IMPORTED_MODULE_0__["default"].apply(this, Object(_reverse__WEBPACK_IMPORTED_MODULE_1__["default"])(arguments)); } /***/ }), /***/ "./node_modules/ramda/es/pipeP.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/pipeP.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pipeP; }); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_pipeP__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_pipeP */ "./node_modules/ramda/es/internal/_pipeP.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /* harmony import */ var _tail__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tail */ "./node_modules/ramda/es/tail.js"); /** * Performs left-to-right composition of one or more Promise-returning * functions. The leftmost function may have any arity; the remaining functions * must be unary. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((a -> Promise b), (b -> Promise c), ..., (y -> Promise z)) -> (a -> Promise z) * @param {...Function} functions * @return {Function} * @see R.composeP * @example * * // followersForUser :: String -> Promise [User] * var followersForUser = R.pipeP(db.getUserById, db.getFollowers); */ function pipeP() { if (arguments.length === 0) { throw new Error('pipeP requires at least one argument'); } return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments[0].length, Object(_reduce__WEBPACK_IMPORTED_MODULE_2__["default"])(_internal_pipeP__WEBPACK_IMPORTED_MODULE_1__["default"], arguments[0], Object(_tail__WEBPACK_IMPORTED_MODULE_3__["default"])(arguments))); } /***/ }), /***/ "./node_modules/ramda/es/pluck.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/pluck.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _prop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./prop */ "./node_modules/ramda/es/prop.js"); /** * Returns a new list by plucking the same named property off all objects in * the list supplied. * * `pluck` will work on * any [functor](https://github.com/fantasyland/fantasy-land#functor) in * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Functor f => k -> f {k: v} -> f v * @param {Number|String} key The key name to pluck off of each object. * @param {Array} f The array or functor to consider. * @return {Array} The list of values for the given key. * @see R.props * @example * * R.pluck('a')([{a: 1}, {a: 2}]); //=> [1, 2] * R.pluck(0)([[1, 2], [3, 4]]); //=> [1, 3] * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5} * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5] * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5] */ var pluck = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function pluck(p, list) { return Object(_map__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_prop__WEBPACK_IMPORTED_MODULE_2__["default"])(p), list); }); /* harmony default export */ __webpack_exports__["default"] = (pluck); /***/ }), /***/ "./node_modules/ramda/es/prepend.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/prepend.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a new list with the given element at the front, followed by the * contents of the list. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> [a] * @param {*} el The item to add to the head of the output list. * @param {Array} list The array to add to the tail of the output list. * @return {Array} A new array. * @see R.append * @example * * R.prepend('fee', ['fi', 'fo', 'fum']); //=> ['fee', 'fi', 'fo', 'fum'] */ var prepend = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function prepend(el, list) { return Object(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])([el], list); }); /* harmony default export */ __webpack_exports__["default"] = (prepend); /***/ }), /***/ "./node_modules/ramda/es/product.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/product.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _multiply__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multiply */ "./node_modules/ramda/es/multiply.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /** * Multiplies together all the elements of a list. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig [Number] -> Number * @param {Array} list An array of numbers * @return {Number} The product of all the numbers in the list. * @see R.reduce * @example * * R.product([2,4,6,8,100,1]); //=> 38400 */ var product = /*#__PURE__*/Object(_reduce__WEBPACK_IMPORTED_MODULE_1__["default"])(_multiply__WEBPACK_IMPORTED_MODULE_0__["default"], 1); /* harmony default export */ __webpack_exports__["default"] = (product); /***/ }), /***/ "./node_modules/ramda/es/project.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/project.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_map */ "./node_modules/ramda/es/internal/_map.js"); /* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity */ "./node_modules/ramda/es/identity.js"); /* harmony import */ var _pickAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pickAll */ "./node_modules/ramda/es/pickAll.js"); /* harmony import */ var _useWith__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useWith */ "./node_modules/ramda/es/useWith.js"); /** * Reasonable analog to SQL `select` statement. * * @func * @memberOf R * @since v0.1.0 * @category Object * @category Relation * @sig [k] -> [{k: v}] -> [{k: v}] * @param {Array} props The property names to project * @param {Array} objs The objects to query * @return {Array} An array of objects with just the `props` properties. * @example * * var abby = {name: 'Abby', age: 7, hair: 'blond', grade: 2}; * var fred = {name: 'Fred', age: 12, hair: 'brown', grade: 7}; * var kids = [abby, fred]; * R.project(['name', 'grade'], kids); //=> [{name: 'Abby', grade: 2}, {name: 'Fred', grade: 7}] */ var project = /*#__PURE__*/Object(_useWith__WEBPACK_IMPORTED_MODULE_3__["default"])(_internal_map__WEBPACK_IMPORTED_MODULE_0__["default"], [_pickAll__WEBPACK_IMPORTED_MODULE_2__["default"], _identity__WEBPACK_IMPORTED_MODULE_1__["default"]]); // passing `identity` gives correct arity /* harmony default export */ __webpack_exports__["default"] = (project); /***/ }), /***/ "./node_modules/ramda/es/prop.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/prop.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path */ "./node_modules/ramda/es/path.js"); /** * Returns a function that when supplied an object returns the indicated * property of that object, if it exists. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig s -> {s: a} -> a | Undefined * @param {String} p The property name * @param {Object} obj The object to query * @return {*} The value at `obj.p`. * @see R.path * @example * * R.prop('x', {x: 100}); //=> 100 * R.prop('x', {}); //=> undefined */ var prop = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function prop(p, obj) { return Object(_path__WEBPACK_IMPORTED_MODULE_1__["default"])([p], obj); }); /* harmony default export */ __webpack_exports__["default"] = (prop); /***/ }), /***/ "./node_modules/ramda/es/propEq.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/propEq.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /** * Returns `true` if the specified object property is equal, in * [`R.equals`](#equals) terms, to the given value; `false` otherwise. * You can test multiple properties with [`R.where`](#where). * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig String -> a -> Object -> Boolean * @param {String} name * @param {*} val * @param {*} obj * @return {Boolean} * @see R.whereEq, R.propSatisfies, R.equals * @example * * var abby = {name: 'Abby', age: 7, hair: 'blond'}; * var fred = {name: 'Fred', age: 12, hair: 'brown'}; * var rusty = {name: 'Rusty', age: 10, hair: 'brown'}; * var alois = {name: 'Alois', age: 15, disposition: 'surly'}; * var kids = [abby, fred, rusty, alois]; * var hasBrownHair = R.propEq('hair', 'brown'); * R.filter(hasBrownHair, kids); //=> [fred, rusty] */ var propEq = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function propEq(name, val, obj) { return Object(_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(val, obj[name]); }); /* harmony default export */ __webpack_exports__["default"] = (propEq); /***/ }), /***/ "./node_modules/ramda/es/propIs.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/propIs.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is */ "./node_modules/ramda/es/is.js"); /** * Returns `true` if the specified object property is of the given type; * `false` otherwise. * * @func * @memberOf R * @since v0.16.0 * @category Type * @sig Type -> String -> Object -> Boolean * @param {Function} type * @param {String} name * @param {*} obj * @return {Boolean} * @see R.is, R.propSatisfies * @example * * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true * R.propIs(Number, 'x', {x: 'foo'}); //=> false * R.propIs(Number, 'x', {}); //=> false */ var propIs = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function propIs(type, name, obj) { return Object(_is__WEBPACK_IMPORTED_MODULE_1__["default"])(type, obj[name]); }); /* harmony default export */ __webpack_exports__["default"] = (propIs); /***/ }), /***/ "./node_modules/ramda/es/propOr.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/propOr.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /** * If the given, non-null object has an own property with the specified name, * returns the value of that property. Otherwise returns the provided default * value. * * @func * @memberOf R * @since v0.6.0 * @category Object * @sig a -> String -> Object -> a * @param {*} val The default value. * @param {String} p The name of the property to return. * @param {Object} obj The object to query. * @return {*} The value of given property of the supplied object or the default value. * @example * * var alice = { * name: 'ALICE', * age: 101 * }; * var favorite = R.prop('favoriteLibrary'); * var favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary'); * * favorite(alice); //=> undefined * favoriteWithDefault(alice); //=> 'Ramda' */ var propOr = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function propOr(val, p, obj) { return obj != null && Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(p, obj) ? obj[p] : val; }); /* harmony default export */ __webpack_exports__["default"] = (propOr); /***/ }), /***/ "./node_modules/ramda/es/propSatisfies.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/propSatisfies.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Returns `true` if the specified object property satisfies the given * predicate; `false` otherwise. You can test multiple properties with * [`R.where`](#where). * * @func * @memberOf R * @since v0.16.0 * @category Logic * @sig (a -> Boolean) -> String -> {String: a} -> Boolean * @param {Function} pred * @param {String} name * @param {*} obj * @return {Boolean} * @see R.where, R.propEq, R.propIs * @example * * R.propSatisfies(x => x > 0, 'x', {x: 1, y: 2}); //=> true */ var propSatisfies = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function propSatisfies(pred, name, obj) { return pred(obj[name]); }); /* harmony default export */ __webpack_exports__["default"] = (propSatisfies); /***/ }), /***/ "./node_modules/ramda/es/props.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/props.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Acts as multiple `prop`: array of keys in, array of values out. Preserves * order. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [k] -> {k: v} -> [v] * @param {Array} ps The property names to fetch * @param {Object} obj The object to query * @return {Array} The corresponding values or partially applied function. * @example * * R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2] * R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2] * * var fullName = R.compose(R.join(' '), R.props(['first', 'last'])); * fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth' */ var props = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function props(ps, obj) { var len = ps.length; var out = []; var idx = 0; while (idx < len) { out[idx] = obj[ps[idx]]; idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (props); /***/ }), /***/ "./node_modules/ramda/es/range.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/range.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isNumber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isNumber */ "./node_modules/ramda/es/internal/_isNumber.js"); /** * Returns a list of numbers from `from` (inclusive) to `to` (exclusive). * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> Number -> [Number] * @param {Number} from The first number in the list. * @param {Number} to One more than the last number in the list. * @return {Array} The list of numbers in tthe set `[a, b)`. * @example * * R.range(1, 5); //=> [1, 2, 3, 4] * R.range(50, 53); //=> [50, 51, 52] */ var range = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function range(from, to) { if (!(Object(_internal_isNumber__WEBPACK_IMPORTED_MODULE_1__["default"])(from) && Object(_internal_isNumber__WEBPACK_IMPORTED_MODULE_1__["default"])(to))) { throw new TypeError('Both arguments to range must be numbers'); } var result = []; var n = from; while (n < to) { result.push(n); n += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (range); /***/ }), /***/ "./node_modules/ramda/es/reduce.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/reduce.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /** * Returns a single item by iterating through the list, successively calling * the iterator function and passing it an accumulator value and the current * value from the array, and then passing the result to the next call. * * The iterator function receives two values: *(acc, value)*. It may use * [`R.reduced`](#reduced) to shortcut the iteration. * * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function * is *(value, acc)*. * * Note: `R.reduce` does not skip deleted or unassigned indices (sparse * arrays), unlike the native `Array.prototype.reduce` method. For more details * on this behavior, see: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description * * Dispatches to the `reduce` method of the third argument, if present. When * doing so, it is up to the user to handle the [`R.reduced`](#reduced) * shortcuting, as this is not implemented by `reduce`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig ((a, b) -> a) -> a -> [b] -> a * @param {Function} fn The iterator function. Receives two values, the accumulator and the * current element from the array. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduced, R.addIndex, R.reduceRight * @example * * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10 * // - -10 * // / \ / \ * // - 4 -6 4 * // / \ / \ * // - 3 ==> -3 3 * // / \ / \ * // - 2 -1 2 * // / \ / \ * // 0 1 0 1 * * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d) */ var reduce = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(_internal_reduce__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (reduce); /***/ }), /***/ "./node_modules/ramda/es/reduceBy.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/reduceBy.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curryN__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curryN */ "./node_modules/ramda/es/internal/_curryN.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _internal_xreduceBy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_xreduceBy */ "./node_modules/ramda/es/internal/_xreduceBy.js"); /** * Groups the elements of the list according to the result of calling * the String-returning function `keyFn` on each element and reduces the elements * of each group to a single value via the reducer function `valueFn`. * * This function is basically a more general [`groupBy`](#groupBy) function. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.20.0 * @category List * @sig ((a, b) -> a) -> a -> (b -> String) -> [b] -> {String: a} * @param {Function} valueFn The function that reduces the elements of each group to a single * value. Receives two values, accumulator for a particular group and the current element. * @param {*} acc The (initial) accumulator value for each group. * @param {Function} keyFn The function that maps the list's element into a key. * @param {Array} list The array to group. * @return {Object} An object with the output of `keyFn` for keys, mapped to the output of * `valueFn` for elements which produced that key when passed to `keyFn`. * @see R.groupBy, R.reduce * @example * * var reduceToNamesBy = R.reduceBy((acc, student) => acc.concat(student.name), []); * var namesByGrade = reduceToNamesBy(function(student) { * var score = student.score; * return score < 65 ? 'F' : * score < 70 ? 'D' : * score < 80 ? 'C' : * score < 90 ? 'B' : 'A'; * }); * var students = [{name: 'Lucy', score: 92}, * {name: 'Drew', score: 85}, * // ... * {name: 'Bart', score: 62}]; * namesByGrade(students); * // { * // 'A': ['Lucy'], * // 'B': ['Drew'] * // // ..., * // 'F': ['Bart'] * // } */ var reduceBy = /*#__PURE__*/Object(_internal_curryN__WEBPACK_IMPORTED_MODULE_0__["default"])(4, [], /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xreduceBy__WEBPACK_IMPORTED_MODULE_4__["default"], function reduceBy(valueFn, valueAcc, keyFn, list) { return Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_3__["default"])(function (acc, elt) { var key = keyFn(elt); acc[key] = valueFn(Object(_internal_has__WEBPACK_IMPORTED_MODULE_2__["default"])(key, acc) ? acc[key] : valueAcc, elt); return acc; }, {}, list); })); /* harmony default export */ __webpack_exports__["default"] = (reduceBy); /***/ }), /***/ "./node_modules/ramda/es/reduceRight.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/reduceRight.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Returns a single item by iterating through the list, successively calling * the iterator function and passing it an accumulator value and the current * value from the array, and then passing the result to the next call. * * Similar to [`reduce`](#reduce), except moves through the input list from the * right to the left. * * The iterator function receives two values: *(value, acc)*, while the arguments' * order of `reduce`'s iterator function is *(acc, value)*. * * Note: `R.reduceRight` does not skip deleted or unassigned indices (sparse * arrays), unlike the native `Array.prototype.reduceRight` method. For more details * on this behavior, see: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description * * @func * @memberOf R * @since v0.1.0 * @category List * @sig ((a, b) -> b) -> b -> [a] -> b * @param {Function} fn The iterator function. Receives two values, the current element from the array * and the accumulator. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduce, R.addIndex * @example * * R.reduceRight(R.subtract, 0, [1, 2, 3, 4]) // => (1 - (2 - (3 - (4 - 0)))) = -2 * // - -2 * // / \ / \ * // 1 - 1 3 * // / \ / \ * // 2 - ==> 2 -1 * // / \ / \ * // 3 - 3 4 * // / \ / \ * // 4 0 4 0 * * @symb R.reduceRight(f, a, [b, c, d]) = f(b, f(c, f(d, a))) */ var reduceRight = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function reduceRight(fn, acc, list) { var idx = list.length - 1; while (idx >= 0) { acc = fn(list[idx], acc); idx -= 1; } return acc; }); /* harmony default export */ __webpack_exports__["default"] = (reduceRight); /***/ }), /***/ "./node_modules/ramda/es/reduceWhile.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/reduceWhile.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curryN__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curryN */ "./node_modules/ramda/es/internal/_curryN.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _internal_reduced__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /** * Like [`reduce`](#reduce), `reduceWhile` returns a single item by iterating * through the list, successively calling the iterator function. `reduceWhile` * also takes a predicate that is evaluated before each step. If the predicate * returns `false`, it "short-circuits" the iteration and returns the current * value of the accumulator. * * @func * @memberOf R * @since v0.22.0 * @category List * @sig ((a, b) -> Boolean) -> ((a, b) -> a) -> a -> [b] -> a * @param {Function} pred The predicate. It is passed the accumulator and the * current element. * @param {Function} fn The iterator function. Receives two values, the * accumulator and the current element. * @param {*} a The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduce, R.reduced * @example * * var isOdd = (acc, x) => x % 2 === 1; * var xs = [1, 3, 5, 60, 777, 800]; * R.reduceWhile(isOdd, R.add, 0, xs); //=> 9 * * var ys = [2, 4, 6] * R.reduceWhile(isOdd, R.add, 111, ys); //=> 111 */ var reduceWhile = /*#__PURE__*/Object(_internal_curryN__WEBPACK_IMPORTED_MODULE_0__["default"])(4, [], function _reduceWhile(pred, fn, a, list) { return Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_1__["default"])(function (acc, x) { return pred(acc, x) ? fn(acc, x) : Object(_internal_reduced__WEBPACK_IMPORTED_MODULE_2__["default"])(acc); }, a, list); }); /* harmony default export */ __webpack_exports__["default"] = (reduceWhile); /***/ }), /***/ "./node_modules/ramda/es/reduced.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/reduced.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /** * Returns a value wrapped to indicate that it is the final value of the reduce * and transduce functions. The returned value should be considered a black * box: the internal structure is not guaranteed to be stable. * * Note: this optimization is unavailable to functions not explicitly listed * above. For instance, it is not currently supported by * [`reduceRight`](#reduceRight). * * @func * @memberOf R * @since v0.15.0 * @category List * @sig a -> * * @param {*} x The final value of the reduce. * @return {*} The wrapped value. * @see R.reduce, R.transduce * @example * * R.reduce( * (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item), * [], * [1, 2, 3, 4, 5]) // [1, 2, 3] */ var reduced = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(_internal_reduced__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (reduced); /***/ }), /***/ "./node_modules/ramda/es/reject.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/reject.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_complement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_complement */ "./node_modules/ramda/es/internal/_complement.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filter */ "./node_modules/ramda/es/filter.js"); /** * The complement of [`filter`](#filter). * * Acts as a transducer if a transformer is given in list position. Filterable * objects include plain objects or any object that has a filter method such * as `Array`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Filterable f => (a -> Boolean) -> f a -> f a * @param {Function} pred * @param {Array} filterable * @return {Array} * @see R.filter, R.transduce, R.addIndex * @example * * var isOdd = (n) => n % 2 === 1; * * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4] * * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} */ var reject = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function reject(pred, filterable) { return Object(_filter__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_internal_complement__WEBPACK_IMPORTED_MODULE_0__["default"])(pred), filterable); }); /* harmony default export */ __webpack_exports__["default"] = (reject); /***/ }), /***/ "./node_modules/ramda/es/remove.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/remove.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Removes the sub-list of `list` starting at index `start` and containing * `count` elements. _Note that this is not destructive_: it returns a copy of * the list with the changes. * No lists have been harmed in the application of this function. * * @func * @memberOf R * @since v0.2.2 * @category List * @sig Number -> Number -> [a] -> [a] * @param {Number} start The position to start removing elements * @param {Number} count The number of elements to remove * @param {Array} list The list to remove from * @return {Array} A new Array with `count` elements from `start` removed. * @example * * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8] */ var remove = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function remove(start, count, list) { var result = Array.prototype.slice.call(list, 0); result.splice(start, count); return result; }); /* harmony default export */ __webpack_exports__["default"] = (remove); /***/ }), /***/ "./node_modules/ramda/es/repeat.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/repeat.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _always__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./always */ "./node_modules/ramda/es/always.js"); /* harmony import */ var _times__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./times */ "./node_modules/ramda/es/times.js"); /** * Returns a fixed list of size `n` containing a specified identical value. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig a -> n -> [a] * @param {*} value The value to repeat. * @param {Number} n The desired size of the output list. * @return {Array} A new array containing `n` `value`s. * @see R.times * @example * * R.repeat('hi', 5); //=> ['hi', 'hi', 'hi', 'hi', 'hi'] * * var obj = {}; * var repeatedObjs = R.repeat(obj, 5); //=> [{}, {}, {}, {}, {}] * repeatedObjs[0] === repeatedObjs[1]; //=> true * @symb R.repeat(a, 0) = [] * @symb R.repeat(a, 1) = [a] * @symb R.repeat(a, 2) = [a, a] */ var repeat = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function repeat(value, n) { return Object(_times__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_always__WEBPACK_IMPORTED_MODULE_1__["default"])(value), n); }); /* harmony default export */ __webpack_exports__["default"] = (repeat); /***/ }), /***/ "./node_modules/ramda/es/replace.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/replace.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Replace a substring or regex match in a string with a replacement. * * @func * @memberOf R * @since v0.7.0 * @category String * @sig RegExp|String -> String -> String -> String * @param {RegExp|String} pattern A regular expression or a substring to match. * @param {String} replacement The string to replace the matches with. * @param {String} str The String to do the search and replacement in. * @return {String} The result. * @example * * R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo' * R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo' * * // Use the "g" (global) flag to replace all occurrences: * R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar' */ var replace = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function replace(regex, replacement, str) { return str.replace(regex, replacement); }); /* harmony default export */ __webpack_exports__["default"] = (replace); /***/ }), /***/ "./node_modules/ramda/es/reverse.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/reverse.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_isString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isString */ "./node_modules/ramda/es/internal/_isString.js"); /** * Returns a new list or string with the elements or characters in reverse * order. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] * @sig String -> String * @param {Array|String} list * @return {Array|String} * @example * * R.reverse([1, 2, 3]); //=> [3, 2, 1] * R.reverse([1, 2]); //=> [2, 1] * R.reverse([1]); //=> [1] * R.reverse([]); //=> [] * * R.reverse('abc'); //=> 'cba' * R.reverse('ab'); //=> 'ba' * R.reverse('a'); //=> 'a' * R.reverse(''); //=> '' */ var reverse = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function reverse(list) { return Object(_internal_isString__WEBPACK_IMPORTED_MODULE_1__["default"])(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse(); }); /* harmony default export */ __webpack_exports__["default"] = (reverse); /***/ }), /***/ "./node_modules/ramda/es/scan.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/scan.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Scan is similar to [`reduce`](#reduce), but returns a list of successively * reduced values from the left * * @func * @memberOf R * @since v0.10.0 * @category List * @sig ((a, b) -> a) -> a -> [b] -> [a] * @param {Function} fn The iterator function. Receives two values, the accumulator and the * current element from the array * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {Array} A list of all intermediately reduced values. * @see R.reduce * @example * * var numbers = [1, 2, 3, 4]; * var factorials = R.scan(R.multiply, 1, numbers); //=> [1, 1, 2, 6, 24] * @symb R.scan(f, a, [b, c]) = [a, f(a, b), f(f(a, b), c)] */ var scan = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function scan(fn, acc, list) { var idx = 0; var len = list.length; var result = [acc]; while (idx < len) { acc = fn(acc, list[idx]); result[idx + 1] = acc; idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (scan); /***/ }), /***/ "./node_modules/ramda/es/sequence.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/sequence.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _ap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ap */ "./node_modules/ramda/es/ap.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _prepend__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./prepend */ "./node_modules/ramda/es/prepend.js"); /* harmony import */ var _reduceRight__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduceRight */ "./node_modules/ramda/es/reduceRight.js"); /** * Transforms a [Traversable](https://github.com/fantasyland/fantasy-land#traversable) * of [Applicative](https://github.com/fantasyland/fantasy-land#applicative) into an * Applicative of Traversable. * * Dispatches to the `sequence` method of the second argument, if present. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig (Applicative f, Traversable t) => (a -> f a) -> t (f a) -> f (t a) * @param {Function} of * @param {*} traversable * @return {*} * @see R.traverse * @example * * R.sequence(Maybe.of, [Just(1), Just(2), Just(3)]); //=> Just([1, 2, 3]) * R.sequence(Maybe.of, [Just(1), Just(2), Nothing()]); //=> Nothing() * * R.sequence(R.of, Just([1, 2, 3])); //=> [Just(1), Just(2), Just(3)] * R.sequence(R.of, Nothing()); //=> [Nothing()] */ var sequence = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function sequence(of, traversable) { return typeof traversable.sequence === 'function' ? traversable.sequence(of) : Object(_reduceRight__WEBPACK_IMPORTED_MODULE_4__["default"])(function (x, acc) { return Object(_ap__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_map__WEBPACK_IMPORTED_MODULE_2__["default"])(_prepend__WEBPACK_IMPORTED_MODULE_3__["default"], x), acc); }, of([]), traversable); }); /* harmony default export */ __webpack_exports__["default"] = (sequence); /***/ }), /***/ "./node_modules/ramda/es/set.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/set.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _always__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./always */ "./node_modules/ramda/es/always.js"); /* harmony import */ var _over__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./over */ "./node_modules/ramda/es/over.js"); /** * Returns the result of "setting" the portion of the given data structure * focused by the given lens to the given value. * * @func * @memberOf R * @since v0.16.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Lens s a -> a -> s -> s * @param {Lens} lens * @param {*} v * @param {*} x * @return {*} * @see R.prop, R.lensIndex, R.lensProp * @example * * var xLens = R.lensProp('x'); * * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} * R.set(xLens, 8, {x: 1, y: 2}); //=> {x: 8, y: 2} */ var set = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function set(lens, v, x) { return Object(_over__WEBPACK_IMPORTED_MODULE_2__["default"])(lens, Object(_always__WEBPACK_IMPORTED_MODULE_1__["default"])(v), x); }); /* harmony default export */ __webpack_exports__["default"] = (set); /***/ }), /***/ "./node_modules/ramda/es/slice.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/slice.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Returns the elements of the given list or string (or object with a `slice` * method) from `fromIndex` (inclusive) to `toIndex` (exclusive). * * Dispatches to the `slice` method of the third argument, if present. * * @func * @memberOf R * @since v0.1.4 * @category List * @sig Number -> Number -> [a] -> [a] * @sig Number -> Number -> String -> String * @param {Number} fromIndex The start index (inclusive). * @param {Number} toIndex The end index (exclusive). * @param {*} list * @return {*} * @example * * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd'] * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c'] * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] * R.slice(0, 3, 'ramda'); //=> 'ram' */ var slice = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__["default"])('slice', function slice(fromIndex, toIndex, list) { return Array.prototype.slice.call(list, fromIndex, toIndex); })); /* harmony default export */ __webpack_exports__["default"] = (slice); /***/ }), /***/ "./node_modules/ramda/es/sort.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/sort.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a copy of the list, sorted according to the comparator function, * which should accept two values at a time and return a negative number if the * first value is smaller, a positive number if it's larger, and zero if they * are equal. Please note that this is a **copy** of the list. It does not * modify the original. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig ((a, a) -> Number) -> [a] -> [a] * @param {Function} comparator A sorting function :: a -> b -> Int * @param {Array} list The list to sort * @return {Array} a new array with its elements sorted by the comparator function. * @example * * var diff = function(a, b) { return a - b; }; * R.sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7] */ var sort = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function sort(comparator, list) { return Array.prototype.slice.call(list, 0).sort(comparator); }); /* harmony default export */ __webpack_exports__["default"] = (sort); /***/ }), /***/ "./node_modules/ramda/es/sortBy.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/sortBy.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Sorts the list according to the supplied function. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord b => (a -> b) -> [a] -> [a] * @param {Function} fn * @param {Array} list The list to sort. * @return {Array} A new list sorted by the keys generated by `fn`. * @example * * var sortByFirstItem = R.sortBy(R.prop(0)); * var sortByNameCaseInsensitive = R.sortBy(R.compose(R.toLower, R.prop('name'))); * var pairs = [[-1, 1], [-2, 2], [-3, 3]]; * sortByFirstItem(pairs); //=> [[-3, 3], [-2, 2], [-1, 1]] * var alice = { * name: 'ALICE', * age: 101 * }; * var bob = { * name: 'Bob', * age: -10 * }; * var clara = { * name: 'clara', * age: 314.159 * }; * var people = [clara, bob, alice]; * sortByNameCaseInsensitive(people); //=> [alice, bob, clara] */ var sortBy = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function sortBy(fn, list) { return Array.prototype.slice.call(list, 0).sort(function (a, b) { var aa = fn(a); var bb = fn(b); return aa < bb ? -1 : aa > bb ? 1 : 0; }); }); /* harmony default export */ __webpack_exports__["default"] = (sortBy); /***/ }), /***/ "./node_modules/ramda/es/sortWith.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/sortWith.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Sorts a list according to a list of comparators. * * @func * @memberOf R * @since v0.23.0 * @category Relation * @sig [(a, a) -> Number] -> [a] -> [a] * @param {Array} functions A list of comparator functions. * @param {Array} list The list to sort. * @return {Array} A new list sorted according to the comarator functions. * @example * * var alice = { * name: 'alice', * age: 40 * }; * var bob = { * name: 'bob', * age: 30 * }; * var clara = { * name: 'clara', * age: 40 * }; * var people = [clara, bob, alice]; * var ageNameSort = R.sortWith([ * R.descend(R.prop('age')), * R.ascend(R.prop('name')) * ]); * ageNameSort(people); //=> [alice, clara, bob] */ var sortWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function sortWith(fns, list) { return Array.prototype.slice.call(list, 0).sort(function (a, b) { var result = 0; var i = 0; while (result === 0 && i < fns.length) { result = fns[i](a, b); i += 1; } return result; }); }); /* harmony default export */ __webpack_exports__["default"] = (sortWith); /***/ }), /***/ "./node_modules/ramda/es/split.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/split.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _invoker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker */ "./node_modules/ramda/es/invoker.js"); /** * Splits a string into an array of strings based on the given * separator. * * @func * @memberOf R * @since v0.1.0 * @category String * @sig (String | RegExp) -> String -> [String] * @param {String|RegExp} sep The pattern. * @param {String} str The string to separate into an array. * @return {Array} The array of strings from `str` separated by `str`. * @see R.join * @example * * var pathComponents = R.split('/'); * R.tail(pathComponents('/usr/local/bin/node')); //=> ['usr', 'local', 'bin', 'node'] * * R.split('.', 'a.b.c.xyz.d'); //=> ['a', 'b', 'c', 'xyz', 'd'] */ var split = /*#__PURE__*/Object(_invoker__WEBPACK_IMPORTED_MODULE_0__["default"])(1, 'split'); /* harmony default export */ __webpack_exports__["default"] = (split); /***/ }), /***/ "./node_modules/ramda/es/splitAt.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/splitAt.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _length__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./length */ "./node_modules/ramda/es/length.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Splits a given list or string at a given index. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig Number -> [a] -> [[a], [a]] * @sig Number -> String -> [String, String] * @param {Number} index The index where the array/string is split. * @param {Array|String} array The array/string to be split. * @return {Array} * @example * * R.splitAt(1, [1, 2, 3]); //=> [[1], [2, 3]] * R.splitAt(5, 'hello world'); //=> ['hello', ' world'] * R.splitAt(-1, 'foobar'); //=> ['fooba', 'r'] */ var splitAt = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function splitAt(index, array) { return [Object(_slice__WEBPACK_IMPORTED_MODULE_2__["default"])(0, index, array), Object(_slice__WEBPACK_IMPORTED_MODULE_2__["default"])(index, Object(_length__WEBPACK_IMPORTED_MODULE_1__["default"])(array), array)]; }); /* harmony default export */ __webpack_exports__["default"] = (splitAt); /***/ }), /***/ "./node_modules/ramda/es/splitEvery.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/splitEvery.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Splits a collection into slices of the specified length. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig Number -> [a] -> [[a]] * @sig Number -> String -> [String] * @param {Number} n * @param {Array} list * @return {Array} * @example * * R.splitEvery(3, [1, 2, 3, 4, 5, 6, 7]); //=> [[1, 2, 3], [4, 5, 6], [7]] * R.splitEvery(3, 'foobarbaz'); //=> ['foo', 'bar', 'baz'] */ var splitEvery = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function splitEvery(n, list) { if (n <= 0) { throw new Error('First argument to splitEvery must be a positive integer'); } var result = []; var idx = 0; while (idx < list.length) { result.push(Object(_slice__WEBPACK_IMPORTED_MODULE_1__["default"])(idx, idx += n, list)); } return result; }); /* harmony default export */ __webpack_exports__["default"] = (splitEvery); /***/ }), /***/ "./node_modules/ramda/es/splitWhen.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/splitWhen.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Takes a list and a predicate and returns a pair of lists with the following properties: * * - the result of concatenating the two output lists is equivalent to the input list; * - none of the elements of the first output list satisfies the predicate; and * - if the second output list is non-empty, its first element satisfies the predicate. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig (a -> Boolean) -> [a] -> [[a], [a]] * @param {Function} pred The predicate that determines where the array is split. * @param {Array} list The array to be split. * @return {Array} * @example * * R.splitWhen(R.equals(2), [1, 2, 3, 1, 2, 3]); //=> [[1], [2, 3, 1, 2, 3]] */ var splitWhen = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function splitWhen(pred, list) { var idx = 0; var len = list.length; var prefix = []; while (idx < len && !pred(list[idx])) { prefix.push(list[idx]); idx += 1; } return [prefix, Array.prototype.slice.call(list, idx)]; }); /* harmony default export */ __webpack_exports__["default"] = (splitWhen); /***/ }), /***/ "./node_modules/ramda/es/startsWith.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/startsWith.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./take */ "./node_modules/ramda/es/take.js"); /** * Checks if a list starts with the provided values * * @func * @memberOf R * @since v0.24.0 * @category List * @sig [a] -> Boolean * @sig String -> Boolean * @param {*} prefix * @param {*} list * @return {Boolean} * @example * * R.startsWith('a', 'abc') //=> true * R.startsWith('b', 'abc') //=> false * R.startsWith(['a'], ['a', 'b', 'c']) //=> true * R.startsWith(['b'], ['a', 'b', 'c']) //=> false */ var startsWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prefix, list) { return Object(_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_take__WEBPACK_IMPORTED_MODULE_2__["default"])(prefix.length, list), prefix); }); /* harmony default export */ __webpack_exports__["default"] = (startsWith); /***/ }), /***/ "./node_modules/ramda/es/subtract.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/subtract.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Subtracts its second argument from its first argument. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a The first value. * @param {Number} b The second value. * @return {Number} The result of `a - b`. * @see R.add * @example * * R.subtract(10, 8); //=> 2 * * var minus5 = R.subtract(R.__, 5); * minus5(17); //=> 12 * * var complementaryAngle = R.subtract(90); * complementaryAngle(30); //=> 60 * complementaryAngle(72); //=> 18 */ var subtract = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function subtract(a, b) { return Number(a) - Number(b); }); /* harmony default export */ __webpack_exports__["default"] = (subtract); /***/ }), /***/ "./node_modules/ramda/es/sum.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/sum.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _add__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add */ "./node_modules/ramda/es/add.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /** * Adds together all the elements of a list. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig [Number] -> Number * @param {Array} list An array of numbers * @return {Number} The sum of all the numbers in the list. * @see R.reduce * @example * * R.sum([2,4,6,8,100,1]); //=> 121 */ var sum = /*#__PURE__*/Object(_reduce__WEBPACK_IMPORTED_MODULE_1__["default"])(_add__WEBPACK_IMPORTED_MODULE_0__["default"], 0); /* harmony default export */ __webpack_exports__["default"] = (sum); /***/ }), /***/ "./node_modules/ramda/es/symmetricDifference.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/symmetricDifference.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./concat */ "./node_modules/ramda/es/concat.js"); /* harmony import */ var _difference__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./difference */ "./node_modules/ramda/es/difference.js"); /** * Finds the set (i.e. no duplicates) of all elements contained in the first or * second list, but not both. * * @func * @memberOf R * @since v0.19.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` or `list2`, but not both. * @see R.symmetricDifferenceWith, R.difference, R.differenceWith * @example * * R.symmetricDifference([1,2,3,4], [7,6,5,4,3]); //=> [1,2,7,6,5] * R.symmetricDifference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5,1,2] */ var symmetricDifference = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function symmetricDifference(list1, list2) { return Object(_concat__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_difference__WEBPACK_IMPORTED_MODULE_2__["default"])(list1, list2), Object(_difference__WEBPACK_IMPORTED_MODULE_2__["default"])(list2, list1)); }); /* harmony default export */ __webpack_exports__["default"] = (symmetricDifference); /***/ }), /***/ "./node_modules/ramda/es/symmetricDifferenceWith.js": /*!**********************************************************!*\ !*** ./node_modules/ramda/es/symmetricDifferenceWith.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./concat */ "./node_modules/ramda/es/concat.js"); /* harmony import */ var _differenceWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./differenceWith */ "./node_modules/ramda/es/differenceWith.js"); /** * Finds the set (i.e. no duplicates) of all elements contained in the first or * second list, but not both. Duplication is determined according to the value * returned by applying the supplied predicate to two list elements. * * @func * @memberOf R * @since v0.19.0 * @category Relation * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` or `list2`, but not both. * @see R.symmetricDifference, R.difference, R.differenceWith * @example * * var eqA = R.eqBy(R.prop('a')); * var l1 = [{a: 1}, {a: 2}, {a: 3}, {a: 4}]; * var l2 = [{a: 3}, {a: 4}, {a: 5}, {a: 6}]; * R.symmetricDifferenceWith(eqA, l1, l2); //=> [{a: 1}, {a: 2}, {a: 5}, {a: 6}] */ var symmetricDifferenceWith = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function symmetricDifferenceWith(pred, list1, list2) { return Object(_concat__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_differenceWith__WEBPACK_IMPORTED_MODULE_2__["default"])(pred, list1, list2), Object(_differenceWith__WEBPACK_IMPORTED_MODULE_2__["default"])(pred, list2, list1)); }); /* harmony default export */ __webpack_exports__["default"] = (symmetricDifferenceWith); /***/ }), /***/ "./node_modules/ramda/es/tail.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/tail.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns all but the first element of the given list or string (or object * with a `tail` method). * * Dispatches to the `slice` method of the first argument, if present. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] * @sig String -> String * @param {*} list * @return {*} * @see R.head, R.init, R.last * @example * * R.tail([1, 2, 3]); //=> [2, 3] * R.tail([1, 2]); //=> [2] * R.tail([1]); //=> [] * R.tail([]); //=> [] * * R.tail('abc'); //=> 'bc' * R.tail('ab'); //=> 'b' * R.tail('a'); //=> '' * R.tail(''); //=> '' */ var tail = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__["default"])('tail', /*#__PURE__*/Object(_slice__WEBPACK_IMPORTED_MODULE_2__["default"])(1, Infinity))); /* harmony default export */ __webpack_exports__["default"] = (tail); /***/ }), /***/ "./node_modules/ramda/es/take.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/take.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xtake__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xtake */ "./node_modules/ramda/es/internal/_xtake.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns the first `n` elements of the given list, string, or * transducer/transformer (or object with a `take` method). * * Dispatches to the `take` method of the second argument, if present. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n * @param {*} list * @return {*} * @see R.drop * @example * * R.take(1, ['foo', 'bar', 'baz']); //=> ['foo'] * R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] * R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.take(3, 'ramda'); //=> 'ram' * * var personnel = [ * 'Dave Brubeck', * 'Paul Desmond', * 'Eugene Wright', * 'Joe Morello', * 'Gerry Mulligan', * 'Bob Bates', * 'Joe Dodge', * 'Ron Crotty' * ]; * * var takeFive = R.take(5); * takeFive(personnel); * //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan'] * @symb R.take(-1, [a, b]) = [a, b] * @symb R.take(0, [a, b]) = [] * @symb R.take(1, [a, b]) = [a] * @symb R.take(2, [a, b]) = [a, b] */ var take = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['take'], _internal_xtake__WEBPACK_IMPORTED_MODULE_2__["default"], function take(n, xs) { return Object(_slice__WEBPACK_IMPORTED_MODULE_3__["default"])(0, n < 0 ? Infinity : n, xs); })); /* harmony default export */ __webpack_exports__["default"] = (take); /***/ }), /***/ "./node_modules/ramda/es/takeLast.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/takeLast.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _drop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./drop */ "./node_modules/ramda/es/drop.js"); /** * Returns a new list containing the last `n` elements of the given list. * If `n > list.length`, returns a list of `list.length` elements. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n The number of elements to return. * @param {Array} xs The collection to consider. * @return {Array} * @see R.dropLast * @example * * R.takeLast(1, ['foo', 'bar', 'baz']); //=> ['baz'] * R.takeLast(2, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] * R.takeLast(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.takeLast(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.takeLast(3, 'ramda'); //=> 'mda' */ var takeLast = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function takeLast(n, xs) { return Object(_drop__WEBPACK_IMPORTED_MODULE_1__["default"])(n >= 0 ? xs.length - n : 0, xs); }); /* harmony default export */ __webpack_exports__["default"] = (takeLast); /***/ }), /***/ "./node_modules/ramda/es/takeLastWhile.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/takeLastWhile.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns a new list containing the last `n` elements of a given list, passing * each value to the supplied predicate function, and terminating when the * predicate function returns `false`. Excludes the element that caused the * predicate function to fail. The predicate function is passed one argument: * *(value)*. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} fn The function called per iteration. * @param {Array} xs The collection to iterate over. * @return {Array} A new array. * @see R.dropLastWhile, R.addIndex * @example * * var isNotOne = x => x !== 1; * * R.takeLastWhile(isNotOne, [1, 2, 3, 4]); //=> [2, 3, 4] * * R.takeLastWhile(x => x !== 'R' , 'Ramda'); //=> 'amda' */ var takeLastWhile = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function takeLastWhile(fn, xs) { var idx = xs.length - 1; while (idx >= 0 && fn(xs[idx])) { idx -= 1; } return Object(_slice__WEBPACK_IMPORTED_MODULE_1__["default"])(idx + 1, Infinity, xs); }); /* harmony default export */ __webpack_exports__["default"] = (takeLastWhile); /***/ }), /***/ "./node_modules/ramda/es/takeWhile.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/takeWhile.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xtakeWhile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xtakeWhile */ "./node_modules/ramda/es/internal/_xtakeWhile.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns a new list containing the first `n` elements of a given list, * passing each value to the supplied predicate function, and terminating when * the predicate function returns `false`. Excludes the element that caused the * predicate function to fail. The predicate function is passed one argument: * *(value)*. * * Dispatches to the `takeWhile` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} fn The function called per iteration. * @param {Array} xs The collection to iterate over. * @return {Array} A new array. * @see R.dropWhile, R.transduce, R.addIndex * @example * * var isNotFour = x => x !== 4; * * R.takeWhile(isNotFour, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3] * * R.takeWhile(x => x !== 'd' , 'Ramda'); //=> 'Ram' */ var takeWhile = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['takeWhile'], _internal_xtakeWhile__WEBPACK_IMPORTED_MODULE_2__["default"], function takeWhile(fn, xs) { var idx = 0; var len = xs.length; while (idx < len && fn(xs[idx])) { idx += 1; } return Object(_slice__WEBPACK_IMPORTED_MODULE_3__["default"])(0, idx, xs); })); /* harmony default export */ __webpack_exports__["default"] = (takeWhile); /***/ }), /***/ "./node_modules/ramda/es/tap.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/tap.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xtap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xtap */ "./node_modules/ramda/es/internal/_xtap.js"); /** * Runs the given function with the supplied object, then returns the object. * * Acts as a transducer if a transformer is given as second parameter. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (a -> *) -> a -> a * @param {Function} fn The function to call with `x`. The return value of `fn` will be thrown away. * @param {*} x * @return {*} `x`. * @example * * var sayX = x => console.log('x is ' + x); * R.tap(sayX, 100); //=> 100 * // logs 'x is 100' * @symb R.tap(f, a) = a */ var tap = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xtap__WEBPACK_IMPORTED_MODULE_2__["default"], function tap(fn, x) { fn(x); return x; })); /* harmony default export */ __webpack_exports__["default"] = (tap); /***/ }), /***/ "./node_modules/ramda/es/test.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/test.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_cloneRegExp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_cloneRegExp */ "./node_modules/ramda/es/internal/_cloneRegExp.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isRegExp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isRegExp */ "./node_modules/ramda/es/internal/_isRegExp.js"); /* harmony import */ var _toString__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toString */ "./node_modules/ramda/es/toString.js"); /** * Determines whether a given string matches a given regular expression. * * @func * @memberOf R * @since v0.12.0 * @category String * @sig RegExp -> String -> Boolean * @param {RegExp} pattern * @param {String} str * @return {Boolean} * @see R.match * @example * * R.test(/^x/, 'xyz'); //=> true * R.test(/^y/, 'xyz'); //=> false */ var test = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function test(pattern, str) { if (!Object(_internal_isRegExp__WEBPACK_IMPORTED_MODULE_2__["default"])(pattern)) { throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + Object(_toString__WEBPACK_IMPORTED_MODULE_3__["default"])(pattern)); } return Object(_internal_cloneRegExp__WEBPACK_IMPORTED_MODULE_0__["default"])(pattern).test(str); }); /* harmony default export */ __webpack_exports__["default"] = (test); /***/ }), /***/ "./node_modules/ramda/es/times.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/times.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Calls an input function `n` times, returning an array containing the results * of those function calls. * * `fn` is passed one argument: The current value of `n`, which begins at `0` * and is gradually incremented to `n - 1`. * * @func * @memberOf R * @since v0.2.3 * @category List * @sig (Number -> a) -> Number -> [a] * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`. * @param {Number} n A value between `0` and `n - 1`. Increments after each function call. * @return {Array} An array containing the return values of all calls to `fn`. * @see R.repeat * @example * * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4] * @symb R.times(f, 0) = [] * @symb R.times(f, 1) = [f(0)] * @symb R.times(f, 2) = [f(0), f(1)] */ var times = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function times(fn, n) { var len = Number(n); var idx = 0; var list; if (len < 0 || isNaN(len)) { throw new RangeError('n must be a non-negative number'); } list = new Array(len); while (idx < len) { list[idx] = fn(idx); idx += 1; } return list; }); /* harmony default export */ __webpack_exports__["default"] = (times); /***/ }), /***/ "./node_modules/ramda/es/toLower.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/toLower.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _invoker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker */ "./node_modules/ramda/es/invoker.js"); /** * The lower case version of a string. * * @func * @memberOf R * @since v0.9.0 * @category String * @sig String -> String * @param {String} str The string to lower case. * @return {String} The lower case version of `str`. * @see R.toUpper * @example * * R.toLower('XYZ'); //=> 'xyz' */ var toLower = /*#__PURE__*/Object(_invoker__WEBPACK_IMPORTED_MODULE_0__["default"])(0, 'toLowerCase'); /* harmony default export */ __webpack_exports__["default"] = (toLower); /***/ }), /***/ "./node_modules/ramda/es/toPairs.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/toPairs.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /** * Converts an object into an array of key, value arrays. Only the object's * own properties are used. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.4.0 * @category Object * @sig {String: *} -> [[String,*]] * @param {Object} obj The object to extract from * @return {Array} An array of key, value arrays from the object's own properties. * @see R.fromPairs * @example * * R.toPairs({a: 1, b: 2, c: 3}); //=> [['a', 1], ['b', 2], ['c', 3]] */ var toPairs = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function toPairs(obj) { var pairs = []; for (var prop in obj) { if (Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(prop, obj)) { pairs[pairs.length] = [prop, obj[prop]]; } } return pairs; }); /* harmony default export */ __webpack_exports__["default"] = (toPairs); /***/ }), /***/ "./node_modules/ramda/es/toPairsIn.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/toPairsIn.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Converts an object into an array of key, value arrays. The object's own * properties and prototype properties are used. Note that the order of the * output array is not guaranteed to be consistent across different JS * platforms. * * @func * @memberOf R * @since v0.4.0 * @category Object * @sig {String: *} -> [[String,*]] * @param {Object} obj The object to extract from * @return {Array} An array of key, value arrays from the object's own * and prototype properties. * @example * * var F = function() { this.x = 'X'; }; * F.prototype.y = 'Y'; * var f = new F(); * R.toPairsIn(f); //=> [['x','X'], ['y','Y']] */ var toPairsIn = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function toPairsIn(obj) { var pairs = []; for (var prop in obj) { pairs[pairs.length] = [prop, obj[prop]]; } return pairs; }); /* harmony default export */ __webpack_exports__["default"] = (toPairsIn); /***/ }), /***/ "./node_modules/ramda/es/toString.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/toString.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_toString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_toString */ "./node_modules/ramda/es/internal/_toString.js"); /** * Returns the string representation of the given value. `eval`'ing the output * should result in a value equivalent to the input value. Many of the built-in * `toString` methods do not satisfy this requirement. * * If the given value is an `[object Object]` with a `toString` method other * than `Object.prototype.toString`, this method is invoked with no arguments * to produce the return value. This means user-defined constructor functions * can provide a suitable `toString` method. For example: * * function Point(x, y) { * this.x = x; * this.y = y; * } * * Point.prototype.toString = function() { * return 'new Point(' + this.x + ', ' + this.y + ')'; * }; * * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)' * * @func * @memberOf R * @since v0.14.0 * @category String * @sig * -> String * @param {*} val * @return {String} * @example * * R.toString(42); //=> '42' * R.toString('abc'); //=> '"abc"' * R.toString([1, 2, 3]); //=> '[1, 2, 3]' * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{"bar": 2, "baz": 3, "foo": 1}' * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date("2001-02-03T04:05:06.000Z")' */ var toString = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function toString(val) { return Object(_internal_toString__WEBPACK_IMPORTED_MODULE_1__["default"])(val, []); }); /* harmony default export */ __webpack_exports__["default"] = (toString); /***/ }), /***/ "./node_modules/ramda/es/toUpper.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/toUpper.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _invoker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker */ "./node_modules/ramda/es/invoker.js"); /** * The upper case version of a string. * * @func * @memberOf R * @since v0.9.0 * @category String * @sig String -> String * @param {String} str The string to upper case. * @return {String} The upper case version of `str`. * @see R.toLower * @example * * R.toUpper('abc'); //=> 'ABC' */ var toUpper = /*#__PURE__*/Object(_invoker__WEBPACK_IMPORTED_MODULE_0__["default"])(0, 'toUpperCase'); /* harmony default export */ __webpack_exports__["default"] = (toUpper); /***/ }), /***/ "./node_modules/ramda/es/transduce.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/transduce.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _internal_xwrap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_xwrap */ "./node_modules/ramda/es/internal/_xwrap.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Initializes a transducer using supplied iterator function. Returns a single * item by iterating through the list, successively calling the transformed * iterator function and passing it an accumulator value and the current value * from the array, and then passing the result to the next call. * * The iterator function receives two values: *(acc, value)*. It will be * wrapped as a transformer to initialize the transducer. A transformer can be * passed directly in place of an iterator function. In both cases, iteration * may be stopped early with the [`R.reduced`](#reduced) function. * * A transducer is a function that accepts a transformer and returns a * transformer and can be composed directly. * * A transformer is an an object that provides a 2-arity reducing iterator * function, step, 0-arity initial value function, init, and 1-arity result * extraction function, result. The step function is used as the iterator * function in reduce. The result function is used to convert the final * accumulator into the return type and in most cases is * [`R.identity`](#identity). The init function can be used to provide an * initial accumulator, but is ignored by transduce. * * The iteration is performed with [`R.reduce`](#reduce) after initializing the transducer. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig (c -> c) -> ((a, b) -> a) -> a -> [b] -> a * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. * @param {Function} fn The iterator function. Receives two values, the accumulator and the * current element from the array. Wrapped as transformer, if necessary, and used to * initialize the transducer * @param {*} acc The initial accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduce, R.reduced, R.into * @example * * var numbers = [1, 2, 3, 4]; * var transducer = R.compose(R.map(R.add(1)), R.take(2)); * R.transduce(transducer, R.flip(R.append), [], numbers); //=> [2, 3] * * var isOdd = (x) => x % 2 === 1; * var firstOddTransducer = R.compose(R.filter(isOdd), R.take(1)); * R.transduce(firstOddTransducer, R.flip(R.append), [], R.range(0, 100)); //=> [1] */ var transduce = /*#__PURE__*/Object(_curryN__WEBPACK_IMPORTED_MODULE_2__["default"])(4, function transduce(xf, fn, acc, list) { return Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_0__["default"])(xf(typeof fn === 'function' ? Object(_internal_xwrap__WEBPACK_IMPORTED_MODULE_1__["default"])(fn) : fn), acc, list); }); /* harmony default export */ __webpack_exports__["default"] = (transduce); /***/ }), /***/ "./node_modules/ramda/es/transpose.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/transpose.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Transposes the rows and columns of a 2D list. * When passed a list of `n` lists of length `x`, * returns a list of `x` lists of length `n`. * * * @func * @memberOf R * @since v0.19.0 * @category List * @sig [[a]] -> [[a]] * @param {Array} list A 2D list * @return {Array} A 2D list * @example * * R.transpose([[1, 'a'], [2, 'b'], [3, 'c']]) //=> [[1, 2, 3], ['a', 'b', 'c']] * R.transpose([[1, 2, 3], ['a', 'b', 'c']]) //=> [[1, 'a'], [2, 'b'], [3, 'c']] * * // If some of the rows are shorter than the following rows, their elements are skipped: * R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]] * @symb R.transpose([[a], [b], [c]]) = [a, b, c] * @symb R.transpose([[a, b], [c, d]]) = [[a, c], [b, d]] * @symb R.transpose([[a, b], [c]]) = [[a, c], [b]] */ var transpose = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function transpose(outerlist) { var i = 0; var result = []; while (i < outerlist.length) { var innerlist = outerlist[i]; var j = 0; while (j < innerlist.length) { if (typeof result[j] === 'undefined') { result[j] = []; } result[j].push(innerlist[j]); j += 1; } i += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (transpose); /***/ }), /***/ "./node_modules/ramda/es/traverse.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/traverse.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _sequence__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sequence */ "./node_modules/ramda/es/sequence.js"); /** * Maps an [Applicative](https://github.com/fantasyland/fantasy-land#applicative)-returning * function over a [Traversable](https://github.com/fantasyland/fantasy-land#traversable), * then uses [`sequence`](#sequence) to transform the resulting Traversable of Applicative * into an Applicative of Traversable. * * Dispatches to the `traverse` method of the third argument, if present. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig (Applicative f, Traversable t) => (a -> f a) -> (a -> f b) -> t a -> f (t b) * @param {Function} of * @param {Function} f * @param {*} traversable * @return {*} * @see R.sequence * @example * * // Returns `Nothing` if the given divisor is `0` * safeDiv = n => d => d === 0 ? Nothing() : Just(n / d) * * R.traverse(Maybe.of, safeDiv(10), [2, 4, 5]); //=> Just([5, 2.5, 2]) * R.traverse(Maybe.of, safeDiv(10), [2, 0, 5]); //=> Nothing */ var traverse = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function traverse(of, f, traversable) { return typeof traversable['fantasy-land/traverse'] === 'function' ? traversable['fantasy-land/traverse'](f, of) : Object(_sequence__WEBPACK_IMPORTED_MODULE_2__["default"])(of, Object(_map__WEBPACK_IMPORTED_MODULE_1__["default"])(f, traversable)); }); /* harmony default export */ __webpack_exports__["default"] = (traverse); /***/ }), /***/ "./node_modules/ramda/es/trim.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/trim.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + '\u2029\uFEFF'; var zeroWidth = '\u200b'; var hasProtoTrim = typeof String.prototype.trim === 'function'; /** * Removes (strips) whitespace from both ends of the string. * * @func * @memberOf R * @since v0.6.0 * @category String * @sig String -> String * @param {String} str The string to trim. * @return {String} Trimmed version of `str`. * @example * * R.trim(' xyz '); //=> 'xyz' * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z'] */ var _trim = !hasProtoTrim || /*#__PURE__*/ws.trim() || ! /*#__PURE__*/zeroWidth.trim() ? function trim(str) { var beginRx = new RegExp('^[' + ws + '][' + ws + ']*'); var endRx = new RegExp('[' + ws + '][' + ws + ']*$'); return str.replace(beginRx, '').replace(endRx, ''); } : function trim(str) { return str.trim(); }; var trim = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(_trim); /* harmony default export */ __webpack_exports__["default"] = (trim); /***/ }), /***/ "./node_modules/ramda/es/tryCatch.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/tryCatch.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * `tryCatch` takes two functions, a `tryer` and a `catcher`. The returned * function evaluates the `tryer`; if it does not throw, it simply returns the * result. If the `tryer` *does* throw, the returned function evaluates the * `catcher` function and returns its result. Note that for effective * composition with this function, both the `tryer` and `catcher` functions * must return the same type of results. * * @func * @memberOf R * @since v0.20.0 * @category Function * @sig (...x -> a) -> ((e, ...x) -> a) -> (...x -> a) * @param {Function} tryer The function that may throw. * @param {Function} catcher The function that will be evaluated if `tryer` throws. * @return {Function} A new function that will catch exceptions and send then to the catcher. * @example * * R.tryCatch(R.prop('x'), R.F)({x: true}); //=> true * R.tryCatch(R.prop('x'), R.F)(null); //=> false */ var tryCatch = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_2__["default"])(function _tryCatch(tryer, catcher) { return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(tryer.length, function () { try { return tryer.apply(this, arguments); } catch (e) { return catcher.apply(this, Object(_internal_concat__WEBPACK_IMPORTED_MODULE_1__["default"])([e], arguments)); } }); }); /* harmony default export */ __webpack_exports__["default"] = (tryCatch); /***/ }), /***/ "./node_modules/ramda/es/type.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/type.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Gives a single-word string description of the (native) type of a value, * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not * attempt to distinguish user Object types any further, reporting them all as * 'Object'. * * @func * @memberOf R * @since v0.8.0 * @category Type * @sig (* -> {*}) -> String * @param {*} val The value to test * @return {String} * @example * * R.type({}); //=> "Object" * R.type(1); //=> "Number" * R.type(false); //=> "Boolean" * R.type('s'); //=> "String" * R.type(null); //=> "Null" * R.type([]); //=> "Array" * R.type(/[A-z]/); //=> "RegExp" * R.type(() => {}); //=> "Function" * R.type(undefined); //=> "Undefined" */ var type = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function type(val) { return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1); }); /* harmony default export */ __webpack_exports__["default"] = (type); /***/ }), /***/ "./node_modules/ramda/es/unapply.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/unapply.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Takes a function `fn`, which takes a single array argument, and returns a * function which: * * - takes any number of positional arguments; * - passes these arguments to `fn` as an array; and * - returns the result. * * In other words, `R.unapply` derives a variadic function from a function which * takes an array. `R.unapply` is the inverse of [`R.apply`](#apply). * * @func * @memberOf R * @since v0.8.0 * @category Function * @sig ([*...] -> a) -> (*... -> a) * @param {Function} fn * @return {Function} * @see R.apply * @example * * R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]' * @symb R.unapply(f)(a, b) = f([a, b]) */ var unapply = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function unapply(fn) { return function () { return fn(Array.prototype.slice.call(arguments, 0)); }; }); /* harmony default export */ __webpack_exports__["default"] = (unapply); /***/ }), /***/ "./node_modules/ramda/es/unary.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/unary.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _nAry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nAry */ "./node_modules/ramda/es/nAry.js"); /** * Wraps a function of any arity (including nullary) in a function that accepts * exactly 1 parameter. Any extraneous parameters will not be passed to the * supplied function. * * @func * @memberOf R * @since v0.2.0 * @category Function * @sig (* -> b) -> (a -> b) * @param {Function} fn The function to wrap. * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of * arity 1. * @see R.binary, R.nAry * @example * * var takesTwoArgs = function(a, b) { * return [a, b]; * }; * takesTwoArgs.length; //=> 2 * takesTwoArgs(1, 2); //=> [1, 2] * * var takesOneArg = R.unary(takesTwoArgs); * takesOneArg.length; //=> 1 * // Only 1 argument is passed to the wrapped function * takesOneArg(1, 2); //=> [1, undefined] * @symb R.unary(f)(a, b, c) = f(a) */ var unary = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function unary(fn) { return Object(_nAry__WEBPACK_IMPORTED_MODULE_1__["default"])(1, fn); }); /* harmony default export */ __webpack_exports__["default"] = (unary); /***/ }), /***/ "./node_modules/ramda/es/uncurryN.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/uncurryN.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Returns a function of arity `n` from a (manually) curried function. * * @func * @memberOf R * @since v0.14.0 * @category Function * @sig Number -> (a -> b) -> (a -> c) * @param {Number} length The arity for the returned function. * @param {Function} fn The function to uncurry. * @return {Function} A new function. * @see R.curry * @example * * var addFour = a => b => c => d => a + b + c + d; * * var uncurriedAddFour = R.uncurryN(4, addFour); * uncurriedAddFour(1, 2, 3, 4); //=> 10 */ var uncurryN = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function uncurryN(depth, fn) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(depth, function () { var currentDepth = 1; var value = fn; var idx = 0; var endIdx; while (currentDepth <= depth && typeof value === 'function') { endIdx = currentDepth === depth ? arguments.length : idx + value.length; value = value.apply(this, Array.prototype.slice.call(arguments, idx, endIdx)); currentDepth += 1; idx = endIdx; } return value; }); }); /* harmony default export */ __webpack_exports__["default"] = (uncurryN); /***/ }), /***/ "./node_modules/ramda/es/unfold.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/unfold.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Builds a list from a seed value. Accepts an iterator function, which returns * either false to stop iteration or an array of length 2 containing the value * to add to the resulting list and the seed to be used in the next call to the * iterator function. * * The iterator function receives one argument: *(seed)*. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig (a -> [b]) -> * -> [b] * @param {Function} fn The iterator function. receives one argument, `seed`, and returns * either false to quit iteration or an array of length two to proceed. The element * at index 0 of this array will be added to the resulting array, and the element * at index 1 will be passed to the next call to `fn`. * @param {*} seed The seed value. * @return {Array} The final list. * @example * * var f = n => n > 50 ? false : [-n, n + 10]; * R.unfold(f, 10); //=> [-10, -20, -30, -40, -50] * @symb R.unfold(f, x) = [f(x)[0], f(f(x)[1])[0], f(f(f(x)[1])[1])[0], ...] */ var unfold = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function unfold(fn, seed) { var pair = fn(seed); var result = []; while (pair && pair.length) { result[result.length] = pair[0]; pair = fn(pair[1]); } return result; }); /* harmony default export */ __webpack_exports__["default"] = (unfold); /***/ }), /***/ "./node_modules/ramda/es/union.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/union.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./compose */ "./node_modules/ramda/es/compose.js"); /* harmony import */ var _uniq__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./uniq */ "./node_modules/ramda/es/uniq.js"); /** * Combines two lists into a set (i.e. no duplicates) composed of the elements * of each list. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} as The first list. * @param {Array} bs The second list. * @return {Array} The first and second lists concatenated, with * duplicates removed. * @example * * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4] */ var union = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_compose__WEBPACK_IMPORTED_MODULE_2__["default"])(_uniq__WEBPACK_IMPORTED_MODULE_3__["default"], _internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])); /* harmony default export */ __webpack_exports__["default"] = (union); /***/ }), /***/ "./node_modules/ramda/es/unionWith.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/unionWith.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _uniqWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./uniqWith */ "./node_modules/ramda/es/uniqWith.js"); /** * Combines two lists into a set (i.e. no duplicates) composed of the elements * of each list. Duplication is determined according to the value returned by * applying the supplied predicate to two list elements. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig ((a, a) -> Boolean) -> [*] -> [*] -> [*] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The first and second lists concatenated, with * duplicates removed. * @see R.union * @example * * var l1 = [{a: 1}, {a: 2}]; * var l2 = [{a: 1}, {a: 4}]; * R.unionWith(R.eqBy(R.prop('a')), l1, l2); //=> [{a: 1}, {a: 2}, {a: 4}] */ var unionWith = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_1__["default"])(function unionWith(pred, list1, list2) { return Object(_uniqWith__WEBPACK_IMPORTED_MODULE_2__["default"])(pred, Object(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])(list1, list2)); }); /* harmony default export */ __webpack_exports__["default"] = (unionWith); /***/ }), /***/ "./node_modules/ramda/es/uniq.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/uniq.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity */ "./node_modules/ramda/es/identity.js"); /* harmony import */ var _uniqBy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uniqBy */ "./node_modules/ramda/es/uniqBy.js"); /** * Returns a new list containing only one copy of each element in the original * list. [`R.equals`](#equals) is used to determine equality. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] * @param {Array} list The array to consider. * @return {Array} The list of unique items. * @example * * R.uniq([1, 1, 2, 1]); //=> [1, 2] * R.uniq([1, '1']); //=> [1, '1'] * R.uniq([[42], [42]]); //=> [[42]] */ var uniq = /*#__PURE__*/Object(_uniqBy__WEBPACK_IMPORTED_MODULE_1__["default"])(_identity__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (uniq); /***/ }), /***/ "./node_modules/ramda/es/uniqBy.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/uniqBy.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_Set__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_Set */ "./node_modules/ramda/es/internal/_Set.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a new list containing only one copy of each element in the original * list, based upon the value returned by applying the supplied function to * each list element. Prefers the first item if the supplied function produces * the same value on two items. [`R.equals`](#equals) is used for comparison. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig (a -> b) -> [a] -> [a] * @param {Function} fn A function used to produce a value to use during comparisons. * @param {Array} list The array to consider. * @return {Array} The list of unique items. * @example * * R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10] */ var uniqBy = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function uniqBy(fn, list) { var set = new _internal_Set__WEBPACK_IMPORTED_MODULE_0__["default"](); var result = []; var idx = 0; var appliedItem, item; while (idx < list.length) { item = list[idx]; appliedItem = fn(item); if (set.add(appliedItem)) { result.push(item); } idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (uniqBy); /***/ }), /***/ "./node_modules/ramda/es/uniqWith.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/uniqWith.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_containsWith__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_containsWith */ "./node_modules/ramda/es/internal/_containsWith.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a new list containing only one copy of each element in the original * list, based upon the value returned by applying the supplied predicate to * two list elements. Prefers the first item if two items compare equal based * on the predicate. * * @func * @memberOf R * @since v0.2.0 * @category List * @sig ((a, a) -> Boolean) -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list The array to consider. * @return {Array} The list of unique items. * @example * * var strEq = R.eqBy(String); * R.uniqWith(strEq)([1, '1', 2, 1]); //=> [1, 2] * R.uniqWith(strEq)([{}, {}]); //=> [{}] * R.uniqWith(strEq)([1, '1', 1]); //=> [1] * R.uniqWith(strEq)(['1', 1, 1]); //=> ['1'] */ var uniqWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function uniqWith(pred, list) { var idx = 0; var len = list.length; var result = []; var item; while (idx < len) { item = list[idx]; if (!Object(_internal_containsWith__WEBPACK_IMPORTED_MODULE_0__["default"])(pred, item, result)) { result[result.length] = item; } idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (uniqWith); /***/ }), /***/ "./node_modules/ramda/es/unless.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/unless.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Tests the final argument by passing it to the given predicate function. If * the predicate is not satisfied, the function will return the result of * calling the `whenFalseFn` function with the same argument. If the predicate * is satisfied, the argument is returned as is. * * @func * @memberOf R * @since v0.18.0 * @category Logic * @sig (a -> Boolean) -> (a -> a) -> a -> a * @param {Function} pred A predicate function * @param {Function} whenFalseFn A function to invoke when the `pred` evaluates * to a falsy value. * @param {*} x An object to test with the `pred` function and * pass to `whenFalseFn` if necessary. * @return {*} Either `x` or the result of applying `x` to `whenFalseFn`. * @see R.ifElse, R.when * @example * * let safeInc = R.unless(R.isNil, R.inc); * safeInc(null); //=> null * safeInc(1); //=> 2 */ var unless = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function unless(pred, whenFalseFn, x) { return pred(x) ? x : whenFalseFn(x); }); /* harmony default export */ __webpack_exports__["default"] = (unless); /***/ }), /***/ "./node_modules/ramda/es/unnest.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/unnest.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_identity */ "./node_modules/ramda/es/internal/_identity.js"); /* harmony import */ var _chain__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chain */ "./node_modules/ramda/es/chain.js"); /** * Shorthand for `R.chain(R.identity)`, which removes one level of nesting from * any [Chain](https://github.com/fantasyland/fantasy-land#chain). * * @func * @memberOf R * @since v0.3.0 * @category List * @sig Chain c => c (c a) -> c a * @param {*} list * @return {*} * @see R.flatten, R.chain * @example * * R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]] * R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6] */ var unnest = /*#__PURE__*/Object(_chain__WEBPACK_IMPORTED_MODULE_1__["default"])(_internal_identity__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (unnest); /***/ }), /***/ "./node_modules/ramda/es/until.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/until.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Takes a predicate, a transformation function, and an initial value, * and returns a value of the same type as the initial value. * It does so by applying the transformation until the predicate is satisfied, * at which point it returns the satisfactory value. * * @func * @memberOf R * @since v0.20.0 * @category Logic * @sig (a -> Boolean) -> (a -> a) -> a -> a * @param {Function} pred A predicate function * @param {Function} fn The iterator function * @param {*} init Initial value * @return {*} Final value that satisfies predicate * @example * * R.until(R.gt(R.__, 100), R.multiply(2))(1) // => 128 */ var until = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function until(pred, fn, init) { var val = init; while (!pred(val)) { val = fn(val); } return val; }); /* harmony default export */ __webpack_exports__["default"] = (until); /***/ }), /***/ "./node_modules/ramda/es/update.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/update.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _adjust__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./adjust */ "./node_modules/ramda/es/adjust.js"); /* harmony import */ var _always__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./always */ "./node_modules/ramda/es/always.js"); /** * Returns a new copy of the array with the element at the provided index * replaced with the given value. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig Number -> a -> [a] -> [a] * @param {Number} idx The index to update. * @param {*} x The value to exist at the given index of the returned array. * @param {Array|Arguments} list The source array-like object to be updated. * @return {Array} A copy of `list` with the value at index `idx` replaced with `x`. * @see R.adjust * @example * * R.update(1, 11, [0, 1, 2]); //=> [0, 11, 2] * R.update(1)(11)([0, 1, 2]); //=> [0, 11, 2] * @symb R.update(-1, a, [b, c]) = [b, a] * @symb R.update(0, a, [b, c]) = [a, c] * @symb R.update(1, a, [b, c]) = [b, a] */ var update = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function update(idx, x, list) { return Object(_adjust__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_always__WEBPACK_IMPORTED_MODULE_2__["default"])(x), idx, list); }); /* harmony default export */ __webpack_exports__["default"] = (update); /***/ }), /***/ "./node_modules/ramda/es/useWith.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/useWith.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Accepts a function `fn` and a list of transformer functions and returns a * new curried function. When the new function is invoked, it calls the * function `fn` with parameters consisting of the result of calling each * supplied handler on successive arguments to the new function. * * If more arguments are passed to the returned function than transformer * functions, those arguments are passed directly to `fn` as additional * parameters. If you expect additional arguments that don't need to be * transformed, although you can ignore them, it's best to pass an identity * function so that the new function reports the correct arity. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((x1, x2, ...) -> z) -> [(a -> x1), (b -> x2), ...] -> (a -> b -> ... -> z) * @param {Function} fn The function to wrap. * @param {Array} transformers A list of transformer functions * @return {Function} The wrapped function. * @see R.converge * @example * * R.useWith(Math.pow, [R.identity, R.identity])(3, 4); //=> 81 * R.useWith(Math.pow, [R.identity, R.identity])(3)(4); //=> 81 * R.useWith(Math.pow, [R.dec, R.inc])(3, 4); //=> 32 * R.useWith(Math.pow, [R.dec, R.inc])(3)(4); //=> 32 * @symb R.useWith(f, [g, h])(a, b) = f(g(a), h(b)) */ var useWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function useWith(fn, transformers) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(transformers.length, function () { var args = []; var idx = 0; while (idx < transformers.length) { args.push(transformers[idx].call(this, arguments[idx])); idx += 1; } return fn.apply(this, args.concat(Array.prototype.slice.call(arguments, transformers.length))); }); }); /* harmony default export */ __webpack_exports__["default"] = (useWith); /***/ }), /***/ "./node_modules/ramda/es/values.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/values.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * Returns a list of all the enumerable own properties of the supplied object. * Note that the order of the output array is not guaranteed across different * JS platforms. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {k: v} -> [v] * @param {Object} obj The object to extract values from * @return {Array} An array of the values of the object's own properties. * @see R.valuesIn, R.keys * @example * * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3] */ var values = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function values(obj) { var props = Object(_keys__WEBPACK_IMPORTED_MODULE_1__["default"])(obj); var len = props.length; var vals = []; var idx = 0; while (idx < len) { vals[idx] = obj[props[idx]]; idx += 1; } return vals; }); /* harmony default export */ __webpack_exports__["default"] = (values); /***/ }), /***/ "./node_modules/ramda/es/valuesIn.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/valuesIn.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Returns a list of all the properties, including prototype properties, of the * supplied object. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.2.0 * @category Object * @sig {k: v} -> [v] * @param {Object} obj The object to extract values from * @return {Array} An array of the values of the object's own and prototype properties. * @see R.values, R.keysIn * @example * * var F = function() { this.x = 'X'; }; * F.prototype.y = 'Y'; * var f = new F(); * R.valuesIn(f); //=> ['X', 'Y'] */ var valuesIn = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function valuesIn(obj) { var prop; var vs = []; for (prop in obj) { vs[vs.length] = obj[prop]; } return vs; }); /* harmony default export */ __webpack_exports__["default"] = (valuesIn); /***/ }), /***/ "./node_modules/ramda/es/view.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/view.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); // `Const` is a functor that effectively ignores the function given to `map`. var Const = function (x) { return { value: x, 'fantasy-land/map': function () { return this; } }; }; /** * Returns a "view" of the given data structure, determined by the given lens. * The lens's focus determines which portion of the data structure is visible. * * @func * @memberOf R * @since v0.16.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Lens s a -> s -> a * @param {Lens} lens * @param {*} x * @return {*} * @see R.prop, R.lensIndex, R.lensProp * @example * * var xLens = R.lensProp('x'); * * R.view(xLens, {x: 1, y: 2}); //=> 1 * R.view(xLens, {x: 4, y: 2}); //=> 4 */ var view = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function view(lens, x) { // Using `Const` effectively ignores the setter function of the `lens`, // leaving the value returned by the getter function unmodified. return lens(Const)(x).value; }); /* harmony default export */ __webpack_exports__["default"] = (view); /***/ }), /***/ "./node_modules/ramda/es/when.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/when.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Tests the final argument by passing it to the given predicate function. If * the predicate is satisfied, the function will return the result of calling * the `whenTrueFn` function with the same argument. If the predicate is not * satisfied, the argument is returned as is. * * @func * @memberOf R * @since v0.18.0 * @category Logic * @sig (a -> Boolean) -> (a -> a) -> a -> a * @param {Function} pred A predicate function * @param {Function} whenTrueFn A function to invoke when the `condition` * evaluates to a truthy value. * @param {*} x An object to test with the `pred` function and * pass to `whenTrueFn` if necessary. * @return {*} Either `x` or the result of applying `x` to `whenTrueFn`. * @see R.ifElse, R.unless * @example * * // truncate :: String -> String * var truncate = R.when( * R.propSatisfies(R.gt(R.__, 10), 'length'), * R.pipe(R.take(10), R.append('…'), R.join('')) * ); * truncate('12345'); //=> '12345' * truncate('0123456789ABC'); //=> '0123456789…' */ var when = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function when(pred, whenTrueFn, x) { return pred(x) ? whenTrueFn(x) : x; }); /* harmony default export */ __webpack_exports__["default"] = (when); /***/ }), /***/ "./node_modules/ramda/es/where.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/where.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /** * Takes a spec object and a test object; returns true if the test satisfies * the spec. Each of the spec's own properties must be a predicate function. * Each predicate is applied to the value of the corresponding property of the * test object. `where` returns true if all the predicates return true, false * otherwise. * * `where` is well suited to declaratively expressing constraints for other * functions such as [`filter`](#filter) and [`find`](#find). * * @func * @memberOf R * @since v0.1.1 * @category Object * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean * @param {Object} spec * @param {Object} testObj * @return {Boolean} * @see R.propSatisfies, R.whereEq * @example * * // pred :: Object -> Boolean * var pred = R.where({ * a: R.equals('foo'), * b: R.complement(R.equals('bar')), * x: R.gt(R.__, 10), * y: R.lt(R.__, 20) * }); * * pred({a: 'foo', b: 'xxx', x: 11, y: 19}); //=> true * pred({a: 'xxx', b: 'xxx', x: 11, y: 19}); //=> false * pred({a: 'foo', b: 'bar', x: 11, y: 19}); //=> false * pred({a: 'foo', b: 'xxx', x: 10, y: 19}); //=> false * pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> false */ var where = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function where(spec, testObj) { for (var prop in spec) { if (Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(prop, spec) && !spec[prop](testObj[prop])) { return false; } } return true; }); /* harmony default export */ __webpack_exports__["default"] = (where); /***/ }), /***/ "./node_modules/ramda/es/whereEq.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/whereEq.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _where__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./where */ "./node_modules/ramda/es/where.js"); /** * Takes a spec object and a test object; returns true if the test satisfies * the spec, false otherwise. An object satisfies the spec if, for each of the * spec's own properties, accessing that property of the object gives the same * value (in [`R.equals`](#equals) terms) as accessing that property of the * spec. * * `whereEq` is a specialization of [`where`](#where). * * @func * @memberOf R * @since v0.14.0 * @category Object * @sig {String: *} -> {String: *} -> Boolean * @param {Object} spec * @param {Object} testObj * @return {Boolean} * @see R.propEq, R.where * @example * * // pred :: Object -> Boolean * var pred = R.whereEq({a: 1, b: 2}); * * pred({a: 1}); //=> false * pred({a: 1, b: 2}); //=> true * pred({a: 1, b: 2, c: 3}); //=> true * pred({a: 1, b: 1}); //=> false */ var whereEq = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function whereEq(spec, testObj) { return Object(_where__WEBPACK_IMPORTED_MODULE_3__["default"])(Object(_map__WEBPACK_IMPORTED_MODULE_2__["default"])(_equals__WEBPACK_IMPORTED_MODULE_1__["default"], spec), testObj); }); /* harmony default export */ __webpack_exports__["default"] = (whereEq); /***/ }), /***/ "./node_modules/ramda/es/without.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/without.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_contains */ "./node_modules/ramda/es/internal/_contains.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _flip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flip */ "./node_modules/ramda/es/flip.js"); /* harmony import */ var _reject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reject */ "./node_modules/ramda/es/reject.js"); /** * Returns a new list without values in the first argument. * [`R.equals`](#equals) is used to determine equality. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig [a] -> [a] -> [a] * @param {Array} list1 The values to be removed from `list2`. * @param {Array} list2 The array to remove values from. * @return {Array} The new array without values in `list1`. * @see R.transduce, R.difference * @example * * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4] */ var without = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (xs, list) { return Object(_reject__WEBPACK_IMPORTED_MODULE_3__["default"])(Object(_flip__WEBPACK_IMPORTED_MODULE_2__["default"])(_internal_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(xs), list); }); /* harmony default export */ __webpack_exports__["default"] = (without); /***/ }), /***/ "./node_modules/ramda/es/xprod.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/xprod.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new list out of the two supplied by creating each possible pair * from the lists. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [b] -> [[a,b]] * @param {Array} as The first list. * @param {Array} bs The second list. * @return {Array} The list made by combining each possible pair from * `as` and `bs` into pairs (`[a, b]`). * @example * * R.xprod([1, 2], ['a', 'b']); //=> [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] * @symb R.xprod([a, b], [c, d]) = [[a, c], [a, d], [b, c], [b, d]] */ var xprod = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function xprod(a, b) { // = xprodWith(prepend); (takes about 3 times as long...) var idx = 0; var ilen = a.length; var j; var jlen = b.length; var result = []; while (idx < ilen) { j = 0; while (j < jlen) { result[result.length] = [a[idx], b[j]]; j += 1; } idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (xprod); /***/ }), /***/ "./node_modules/ramda/es/zip.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/zip.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new list out of the two supplied by pairing up equally-positioned * items from both lists. The returned list is truncated to the length of the * shorter of the two input lists. * Note: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [b] -> [[a,b]] * @param {Array} list1 The first array to consider. * @param {Array} list2 The second array to consider. * @return {Array} The list made by pairing up same-indexed elements of `list1` and `list2`. * @example * * R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']] * @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]] */ var zip = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function zip(a, b) { var rv = []; var idx = 0; var len = Math.min(a.length, b.length); while (idx < len) { rv[idx] = [a[idx], b[idx]]; idx += 1; } return rv; }); /* harmony default export */ __webpack_exports__["default"] = (zip); /***/ }), /***/ "./node_modules/ramda/es/zipObj.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/zipObj.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new object out of a list of keys and a list of values. * Key/value pairing is truncated to the length of the shorter of the two lists. * Note: `zipObj` is equivalent to `pipe(zip, fromPairs)`. * * @func * @memberOf R * @since v0.3.0 * @category List * @sig [String] -> [*] -> {String: *} * @param {Array} keys The array that will be properties on the output object. * @param {Array} values The list of values on the output object. * @return {Object} The object made by pairing up same-indexed elements of `keys` and `values`. * @example * * R.zipObj(['a', 'b', 'c'], [1, 2, 3]); //=> {a: 1, b: 2, c: 3} */ var zipObj = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function zipObj(keys, values) { var idx = 0; var len = Math.min(keys.length, values.length); var out = {}; while (idx < len) { out[keys[idx]] = values[idx]; idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (zipObj); /***/ }), /***/ "./node_modules/ramda/es/zipWith.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/zipWith.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Creates a new list out of the two supplied by applying the function to each * equally-positioned pair in the lists. The returned list is truncated to the * length of the shorter of the two input lists. * * @function * @memberOf R * @since v0.1.0 * @category List * @sig ((a, b) -> c) -> [a] -> [b] -> [c] * @param {Function} fn The function used to combine the two elements into one value. * @param {Array} list1 The first array to consider. * @param {Array} list2 The second array to consider. * @return {Array} The list made by combining same-indexed elements of `list1` and `list2` * using `fn`. * @example * * var f = (x, y) => { * // ... * }; * R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']); * //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')] * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)] */ var zipWith = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function zipWith(fn, a, b) { var rv = []; var idx = 0; var len = Math.min(a.length, b.length); while (idx < len) { rv[idx] = fn(a[idx], b[idx]); idx += 1; } return rv; }); /* harmony default export */ __webpack_exports__["default"] = (zipWith); /***/ }), /***/ "./node_modules/rc-align/es/Align.js": /*!*******************************************!*\ !*** ./node_modules/rc-align/es/Align.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var dom_align__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dom-align */ "./node_modules/dom-align/dist-web/index.js"); /* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ "./node_modules/rc-util/es/Dom/addEventListener.js"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util */ "./node_modules/rc-align/es/util.js"); /* harmony import */ var _hooks_useBuffer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useBuffer */ "./node_modules/rc-align/es/hooks/useBuffer.js"); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } /** * Removed props: * - childrenProps */ function getElement(func) { if (typeof func !== 'function') return null; return func(); } function getPoint(point) { if (_typeof(point) !== 'object' || !point) return null; return point; } var Align = function Align(_ref, ref) { var children = _ref.children, disabled = _ref.disabled, target = _ref.target, align = _ref.align, onAlign = _ref.onAlign, monitorWindowResize = _ref.monitorWindowResize, _ref$monitorBufferTim = _ref.monitorBufferTime, monitorBufferTime = _ref$monitorBufferTim === void 0 ? 0 : _ref$monitorBufferTim; var cacheRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef({}); var nodeRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef(); var childNode = react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.only(children); // ===================== Align ====================== // We save the props here to avoid closure makes props ood var forceAlignPropsRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef({}); forceAlignPropsRef.current.disabled = disabled; forceAlignPropsRef.current.target = target; forceAlignPropsRef.current.onAlign = onAlign; var _useBuffer = Object(_hooks_useBuffer__WEBPACK_IMPORTED_MODULE_5__["default"])(function () { var _forceAlignPropsRef$c = forceAlignPropsRef.current, latestDisabled = _forceAlignPropsRef$c.disabled, latestTarget = _forceAlignPropsRef$c.target; if (!latestDisabled && latestTarget) { var source = nodeRef.current; var result; var element = getElement(latestTarget); var point = getPoint(latestTarget); cacheRef.current.element = element; cacheRef.current.point = point; // IE lose focus after element realign // We should record activeElement and restore later var _document = document, activeElement = _document.activeElement; if (element) { result = Object(dom_align__WEBPACK_IMPORTED_MODULE_2__["alignElement"])(source, element, align); } else if (point) { result = Object(dom_align__WEBPACK_IMPORTED_MODULE_2__["alignPoint"])(source, point, align); } Object(_util__WEBPACK_IMPORTED_MODULE_4__["restoreFocus"])(activeElement, source); if (onAlign) { onAlign(source, result); } return true; } return false; }, monitorBufferTime), _useBuffer2 = _slicedToArray(_useBuffer, 2), _forceAlign = _useBuffer2[0], cancelForceAlign = _useBuffer2[1]; // ===================== Effect ===================== // Listen for target updated var resizeMonitor = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef({ cancel: function cancel() {} }); // Listen for source updated var sourceResizeMonitor = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef({ cancel: function cancel() {} }); react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () { var element = getElement(target); var point = getPoint(target); if (nodeRef.current !== sourceResizeMonitor.current.element) { sourceResizeMonitor.current.cancel(); sourceResizeMonitor.current.element = nodeRef.current; sourceResizeMonitor.current.cancel = Object(_util__WEBPACK_IMPORTED_MODULE_4__["monitorResize"])(nodeRef.current, _forceAlign); } if (cacheRef.current.element !== element || !Object(_util__WEBPACK_IMPORTED_MODULE_4__["isSamePoint"])(cacheRef.current.point, point)) { _forceAlign(); // Add resize observer if (resizeMonitor.current.element !== element) { resizeMonitor.current.cancel(); resizeMonitor.current.element = element; resizeMonitor.current.cancel = Object(_util__WEBPACK_IMPORTED_MODULE_4__["monitorResize"])(element, _forceAlign); } } }); // Listen for disabled change react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () { if (!disabled) { _forceAlign(); } else { cancelForceAlign(); } }, [disabled]); // Listen for window resize var winResizeRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef(null); react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () { if (monitorWindowResize) { if (!winResizeRef.current) { winResizeRef.current = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_3__["default"])(window, 'resize', _forceAlign); } } else if (winResizeRef.current) { winResizeRef.current.remove(); winResizeRef.current = null; } }, [monitorWindowResize]); // Clear all if unmount react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () { return function () { resizeMonitor.current.cancel(); sourceResizeMonitor.current.cancel(); if (winResizeRef.current) winResizeRef.current.remove(); cancelForceAlign(); }; }, []); // ====================== Ref ======================= react__WEBPACK_IMPORTED_MODULE_0___default.a.useImperativeHandle(ref, function () { return { forceAlign: function forceAlign() { return _forceAlign(true); } }; }); // ===================== Render ===================== if (react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(childNode)) { childNode = react__WEBPACK_IMPORTED_MODULE_0___default.a.cloneElement(childNode, { ref: Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_1__["composeRef"])(childNode.ref, nodeRef) }); } return childNode; }; var RefAlign = react__WEBPACK_IMPORTED_MODULE_0___default.a.forwardRef(Align); RefAlign.displayName = 'Align'; /* harmony default export */ __webpack_exports__["default"] = (RefAlign); /***/ }), /***/ "./node_modules/rc-align/es/hooks/useBuffer.js": /*!*****************************************************!*\ !*** ./node_modules/rc-align/es/hooks/useBuffer.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony default export */ __webpack_exports__["default"] = (function (callback, buffer) { var calledRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef(false); var timeoutRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef(null); function cancelTrigger() { window.clearTimeout(timeoutRef.current); } function trigger(force) { if (!calledRef.current || force === true) { if (callback() === false) { // Not delay since callback cancelled self return; } calledRef.current = true; cancelTrigger(); timeoutRef.current = window.setTimeout(function () { calledRef.current = false; }, buffer); } else { cancelTrigger(); timeoutRef.current = window.setTimeout(function () { calledRef.current = false; trigger(); }, buffer); } } return [trigger, function () { calledRef.current = false; cancelTrigger(); }]; }); /***/ }), /***/ "./node_modules/rc-align/es/index.js": /*!*******************************************!*\ !*** ./node_modules/rc-align/es/index.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Align */ "./node_modules/rc-align/es/Align.js"); // export this package's api /* harmony default export */ __webpack_exports__["default"] = (_Align__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./node_modules/rc-align/es/util.js": /*!******************************************!*\ !*** ./node_modules/rc-align/es/util.js ***! \******************************************/ /*! exports provided: isSamePoint, restoreFocus, monitorResize */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSamePoint", function() { return isSamePoint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "restoreFocus", function() { return restoreFocus; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monitorResize", function() { return monitorResize; }); /* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! resize-observer-polyfill */ "./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js"); /* harmony import */ var rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/Dom/contains */ "./node_modules/rc-util/es/Dom/contains.js"); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function isSamePoint(prev, next) { if (prev === next) return true; if (!prev || !next) return false; if ('pageX' in next && 'pageY' in next) { return prev.pageX === next.pageX && prev.pageY === next.pageY; } if ('clientX' in next && 'clientY' in next) { return prev.clientX === next.clientX && prev.clientY === next.clientY; } return false; } function restoreFocus(activeElement, container) { // Focus back if is in the container if (activeElement !== document.activeElement && Object(rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_1__["default"])(container, activeElement)) { activeElement.focus(); } } function monitorResize(element, callback) { var prevWidth = null; var prevHeight = null; function onResize(_ref) { var _ref2 = _slicedToArray(_ref, 1), target = _ref2[0].target; var _target$getBoundingCl = target.getBoundingClientRect(), width = _target$getBoundingCl.width, height = _target$getBoundingCl.height; var fixedWidth = Math.floor(width); var fixedHeight = Math.floor(height); if (prevWidth !== fixedWidth || prevHeight !== fixedHeight) { callback({ width: fixedWidth, height: fixedHeight }); } prevWidth = fixedWidth; prevHeight = fixedHeight; } var resizeObserver = new resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_0__["default"](onResize); if (element) { resizeObserver.observe(element); } return function () { resizeObserver.disconnect(); }; } /***/ }), /***/ "./node_modules/rc-animate/es/CSSMotion.js": /*!*************************************************!*\ !*** ./node_modules/rc-animate/es/CSSMotion.js ***! \*************************************************/ /*! exports provided: MotionPropTypes, genCSSMotion, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MotionPropTypes", function() { return MotionPropTypes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genCSSMotion", function() { return genCSSMotion; }); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ "./node_modules/babel-runtime/helpers/classCallCheck.js"); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ "./node_modules/babel-runtime/helpers/createClass.js"); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js"); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ "./node_modules/babel-runtime/helpers/inherits.js"); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-lifecycles-compat */ "./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js"); /* harmony import */ var rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-util/es/Dom/findDOMNode */ "./node_modules/rc-util/es/Dom/findDOMNode.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! raf */ "./node_modules/raf/index.js"); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./util/motion */ "./node_modules/rc-animate/es/util/motion.js"); /* eslint-disable react/default-props-match-prop-types, react/no-multi-comp */ var STATUS_NONE = 'none'; var STATUS_APPEAR = 'appear'; var STATUS_ENTER = 'enter'; var STATUS_LEAVE = 'leave'; var MotionPropTypes = { eventProps: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.object, // Internal usage. Only pass by CSSMotionList visible: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, children: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, motionName: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.object]), motionAppear: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, motionEnter: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, motionLeave: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, motionLeaveImmediately: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, // Trigger leave motion immediately removeOnLeave: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, leavedClassName: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, onAppearStart: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onAppearActive: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onAppearEnd: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onEnterStart: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onEnterActive: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onEnterEnd: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onLeaveStart: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onLeaveActive: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onLeaveEnd: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func }; /** * `transitionSupport` is used for none transition test case. * Default we use browser transition event support check. */ function genCSSMotion(config) { var transitionSupport = config; var forwardRef = !!react__WEBPACK_IMPORTED_MODULE_6___default.a.forwardRef; if (typeof config === 'object') { transitionSupport = config.transitionSupport; forwardRef = 'forwardRef' in config ? config.forwardRef : forwardRef; } function isSupportTransition(props) { return !!(props.motionName && transitionSupport); } var CSSMotion = function (_React$Component) { babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(CSSMotion, _React$Component); function CSSMotion() { babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, CSSMotion); var _this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (CSSMotion.__proto__ || Object.getPrototypeOf(CSSMotion)).call(this)); _this.onDomUpdate = function () { var _this$state = _this.state, status = _this$state.status, newStatus = _this$state.newStatus; var _this$props = _this.props, onAppearStart = _this$props.onAppearStart, onEnterStart = _this$props.onEnterStart, onLeaveStart = _this$props.onLeaveStart, onAppearActive = _this$props.onAppearActive, onEnterActive = _this$props.onEnterActive, onLeaveActive = _this$props.onLeaveActive, motionAppear = _this$props.motionAppear, motionEnter = _this$props.motionEnter, motionLeave = _this$props.motionLeave; if (!isSupportTransition(_this.props)) { return; } // Event injection var $ele = _this.getElement(); if (_this.$cacheEle !== $ele) { _this.removeEventListener(_this.$cacheEle); _this.addEventListener($ele); _this.$cacheEle = $ele; } // Init status if (newStatus && status === STATUS_APPEAR && motionAppear) { _this.updateStatus(onAppearStart, null, null, function () { _this.updateActiveStatus(onAppearActive, STATUS_APPEAR); }); } else if (newStatus && status === STATUS_ENTER && motionEnter) { _this.updateStatus(onEnterStart, null, null, function () { _this.updateActiveStatus(onEnterActive, STATUS_ENTER); }); } else if (newStatus && status === STATUS_LEAVE && motionLeave) { _this.updateStatus(onLeaveStart, null, null, function () { _this.updateActiveStatus(onLeaveActive, STATUS_LEAVE); }); } }; _this.onMotionEnd = function (event) { var _this$state2 = _this.state, status = _this$state2.status, statusActive = _this$state2.statusActive; var _this$props2 = _this.props, onAppearEnd = _this$props2.onAppearEnd, onEnterEnd = _this$props2.onEnterEnd, onLeaveEnd = _this$props2.onLeaveEnd; if (status === STATUS_APPEAR && statusActive) { _this.updateStatus(onAppearEnd, { status: STATUS_NONE }, event); } else if (status === STATUS_ENTER && statusActive) { _this.updateStatus(onEnterEnd, { status: STATUS_NONE }, event); } else if (status === STATUS_LEAVE && statusActive) { _this.updateStatus(onLeaveEnd, { status: STATUS_NONE }, event); } }; _this.setNodeRef = function (node) { var internalRef = _this.props.internalRef; _this.node = node; if (typeof internalRef === 'function') { internalRef(node); } else if (internalRef && 'current' in internalRef) { internalRef.current = node; } }; _this.getElement = function () { return Object(rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_9__["default"])(_this.node || _this); }; _this.addEventListener = function ($ele) { if (!$ele) return; $ele.addEventListener(_util_motion__WEBPACK_IMPORTED_MODULE_12__["transitionEndName"], _this.onMotionEnd); $ele.addEventListener(_util_motion__WEBPACK_IMPORTED_MODULE_12__["animationEndName"], _this.onMotionEnd); }; _this.removeEventListener = function ($ele) { if (!$ele) return; $ele.removeEventListener(_util_motion__WEBPACK_IMPORTED_MODULE_12__["transitionEndName"], _this.onMotionEnd); $ele.removeEventListener(_util_motion__WEBPACK_IMPORTED_MODULE_12__["animationEndName"], _this.onMotionEnd); }; _this.updateStatus = function (styleFunc, additionalState, event, callback) { var statusStyle = styleFunc ? styleFunc(_this.getElement(), event) : null; if (statusStyle === false || _this._destroyed) return; var nextStep = void 0; if (callback) { nextStep = function nextStep() { _this.nextFrame(callback); }; } _this.setState(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({ statusStyle: typeof statusStyle === 'object' ? statusStyle : null, newStatus: false }, additionalState), nextStep); // Trigger before next frame & after `componentDidMount` }; _this.updateActiveStatus = function (styleFunc, currentStatus) { // `setState` use `postMessage` to trigger at the end of frame. // Let's use requestAnimationFrame to update new state in next frame. _this.nextFrame(function () { var status = _this.state.status; if (status !== currentStatus) return; _this.updateStatus(styleFunc, { statusActive: true }); }); }; _this.nextFrame = function (func) { _this.cancelNextFrame(); _this.raf = raf__WEBPACK_IMPORTED_MODULE_11___default()(func); }; _this.cancelNextFrame = function () { if (_this.raf) { raf__WEBPACK_IMPORTED_MODULE_11___default.a.cancel(_this.raf); _this.raf = null; } }; _this.state = { status: STATUS_NONE, statusActive: false, newStatus: false, statusStyle: null }; _this.$cacheEle = null; _this.node = null; _this.raf = null; return _this; } babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(CSSMotion, [{ key: 'componentDidMount', value: function componentDidMount() { this.onDomUpdate(); } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { this.onDomUpdate(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this._destroyed = true; this.removeEventListener(this.$cacheEle); this.cancelNextFrame(); } }, { key: 'render', value: function render() { var _classNames; var _state = this.state, status = _state.status, statusActive = _state.statusActive, statusStyle = _state.statusStyle; var _props = this.props, children = _props.children, motionName = _props.motionName, visible = _props.visible, removeOnLeave = _props.removeOnLeave, leavedClassName = _props.leavedClassName, eventProps = _props.eventProps; if (!children) return null; if (status === STATUS_NONE || !isSupportTransition(this.props)) { if (visible) { return children(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, eventProps), this.setNodeRef); } else if (!removeOnLeave) { return children(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, eventProps, { className: leavedClassName }), this.setNodeRef); } return null; } return children(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, eventProps, { className: classnames__WEBPACK_IMPORTED_MODULE_10___default()((_classNames = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, Object(_util_motion__WEBPACK_IMPORTED_MODULE_12__["getTransitionName"])(motionName, status), status !== STATUS_NONE), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, Object(_util_motion__WEBPACK_IMPORTED_MODULE_12__["getTransitionName"])(motionName, status + '-active'), status !== STATUS_NONE && statusActive), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, motionName, typeof motionName === 'string'), _classNames)), style: statusStyle }), this.setNodeRef); } }], [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(props, _ref) { var prevProps = _ref.prevProps, prevStatus = _ref.status; if (!isSupportTransition(props)) return {}; var visible = props.visible, motionAppear = props.motionAppear, motionEnter = props.motionEnter, motionLeave = props.motionLeave, motionLeaveImmediately = props.motionLeaveImmediately; var newState = { prevProps: props }; // Clean up status if prop set to false if (prevStatus === STATUS_APPEAR && !motionAppear || prevStatus === STATUS_ENTER && !motionEnter || prevStatus === STATUS_LEAVE && !motionLeave) { newState.status = STATUS_NONE; newState.statusActive = false; newState.newStatus = false; } // Appear if (!prevProps && visible && motionAppear) { newState.status = STATUS_APPEAR; newState.statusActive = false; newState.newStatus = true; } // Enter if (prevProps && !prevProps.visible && visible && motionEnter) { newState.status = STATUS_ENTER; newState.statusActive = false; newState.newStatus = true; } // Leave if (prevProps && prevProps.visible && !visible && motionLeave || !prevProps && motionLeaveImmediately && !visible && motionLeave) { newState.status = STATUS_LEAVE; newState.statusActive = false; newState.newStatus = true; } return newState; } }]); return CSSMotion; }(react__WEBPACK_IMPORTED_MODULE_6___default.a.Component); CSSMotion.propTypes = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, MotionPropTypes, { internalRef: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func]) }); CSSMotion.defaultProps = { visible: true, motionEnter: true, motionAppear: true, motionLeave: true, removeOnLeave: true }; Object(react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_8__["polyfill"])(CSSMotion); if (!forwardRef) { return CSSMotion; } return react__WEBPACK_IMPORTED_MODULE_6___default.a.forwardRef(function (props, ref) { return react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(CSSMotion, babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({ internalRef: ref }, props)); }); } /* harmony default export */ __webpack_exports__["default"] = (genCSSMotion(_util_motion__WEBPACK_IMPORTED_MODULE_12__["supportTransition"])); /***/ }), /***/ "./node_modules/rc-animate/es/util/motion.js": /*!***************************************************!*\ !*** ./node_modules/rc-animate/es/util/motion.js ***! \***************************************************/ /*! exports provided: getVendorPrefixes, getVendorPrefixedEventName, animationEndName, transitionEndName, supportTransition, getTransitionName */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getVendorPrefixes", function() { return getVendorPrefixes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getVendorPrefixedEventName", function() { return getVendorPrefixedEventName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationEndName", function() { return animationEndName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transitionEndName", function() { return transitionEndName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportTransition", function() { return supportTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTransitionName", function() { return getTransitionName; }); var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); // ================= Transition ================= // Event wrapper. Copy from react source code function makePrefixMap(styleProp, eventName) { var prefixes = {}; prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); prefixes['Webkit' + styleProp] = 'webkit' + eventName; prefixes['Moz' + styleProp] = 'moz' + eventName; prefixes['ms' + styleProp] = 'MS' + eventName; prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); return prefixes; } function getVendorPrefixes(domSupport, win) { var prefixes = { animationend: makePrefixMap('Animation', 'AnimationEnd'), transitionend: makePrefixMap('Transition', 'TransitionEnd') }; if (domSupport) { if (!('AnimationEvent' in win)) { delete prefixes.animationend.animation; } if (!('TransitionEvent' in win)) { delete prefixes.transitionend.transition; } } return prefixes; } var vendorPrefixes = getVendorPrefixes(canUseDOM, typeof window !== 'undefined' ? window : {}); var style = {}; if (canUseDOM) { style = document.createElement('div').style; } var prefixedEventNames = {}; function getVendorPrefixedEventName(eventName) { if (prefixedEventNames[eventName]) { return prefixedEventNames[eventName]; } var prefixMap = vendorPrefixes[eventName]; if (prefixMap) { var stylePropList = Object.keys(prefixMap); var len = stylePropList.length; for (var i = 0; i < len; i += 1) { var styleProp = stylePropList[i]; if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) { prefixedEventNames[eventName] = prefixMap[styleProp]; return prefixedEventNames[eventName]; } } } return ''; } var animationEndName = getVendorPrefixedEventName('animationend'); var transitionEndName = getVendorPrefixedEventName('transitionend'); var supportTransition = !!(animationEndName && transitionEndName); function getTransitionName(transitionName, transitionType) { if (!transitionName) return null; if (typeof transitionName === 'object') { var type = transitionType.replace(/-\w/g, function (match) { return match[1].toUpperCase(); }); return transitionName[type]; } return transitionName + '-' + transitionType; } /***/ }), /***/ "./node_modules/rc-slider/assets/index.css": /*!*************************************************!*\ !*** ./node_modules/rc-slider/assets/index.css ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var api = __webpack_require__(/*! ../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); var content = __webpack_require__(/*! !../../css-loader/dist/cjs.js!./index.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/rc-slider/assets/index.css"); content = content.__esModule ? content.default : content; if (typeof content === 'string') { content = [[module.i, content, '']]; } var options = {}; options.insert = function insertAtTop(element) { document.head.insertBefore(element, document.head.firstElementChild); }; options.singleton = false; var update = api(content, options); var exported = content.locals ? content.locals : {}; module.exports = exported; /***/ }), /***/ "./node_modules/rc-slider/es/Handle.js": /*!*********************************************!*\ !*** ./node_modules/rc-slider/es/Handle.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ "./node_modules/babel-runtime/helpers/objectWithoutProperties.js"); /* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ "./node_modules/babel-runtime/helpers/classCallCheck.js"); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ "./node_modules/babel-runtime/helpers/createClass.js"); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js"); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ "./node_modules/babel-runtime/helpers/inherits.js"); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ "./node_modules/rc-util/es/Dom/addEventListener.js"); var Handle = function (_React$Component) { babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(Handle, _React$Component); function Handle() { var _ref; var _temp, _this, _ret; babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, Handle); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_ref = Handle.__proto__ || Object.getPrototypeOf(Handle)).call.apply(_ref, [this].concat(args))), _this), _this.state = { clickFocused: false }, _this.setHandleRef = function (node) { _this.handle = node; }, _this.handleMouseUp = function () { if (document.activeElement === _this.handle) { _this.setClickFocus(true); } }, _this.handleMouseDown = function () { // fix https://github.com/ant-design/ant-design/issues/15324 _this.focus(); }, _this.handleBlur = function () { _this.setClickFocus(false); }, _this.handleKeyDown = function () { _this.setClickFocus(false); }, _temp), babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(_this, _ret); } babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(Handle, [{ key: 'componentDidMount', value: function componentDidMount() { // mouseup won't trigger if mouse moved out of handle, // so we listen on document here. this.onMouseUpListener = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__["default"])(document, 'mouseup', this.handleMouseUp); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.onMouseUpListener) { this.onMouseUpListener.remove(); } } }, { key: 'setClickFocus', value: function setClickFocus(focused) { this.setState({ clickFocused: focused }); } }, { key: 'clickFocus', value: function clickFocus() { this.setClickFocus(true); this.focus(); } }, { key: 'focus', value: function focus() { this.handle.focus(); } }, { key: 'blur', value: function blur() { this.handle.blur(); } }, { key: 'render', value: function render() { var _ref2, _ref3; var _props = this.props, prefixCls = _props.prefixCls, vertical = _props.vertical, reverse = _props.reverse, offset = _props.offset, style = _props.style, disabled = _props.disabled, min = _props.min, max = _props.max, value = _props.value, tabIndex = _props.tabIndex, ariaLabel = _props.ariaLabel, ariaLabelledBy = _props.ariaLabelledBy, ariaValueTextFormatter = _props.ariaValueTextFormatter, restProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default()(_props, ['prefixCls', 'vertical', 'reverse', 'offset', 'style', 'disabled', 'min', 'max', 'value', 'tabIndex', 'ariaLabel', 'ariaLabelledBy', 'ariaValueTextFormatter']); var className = classnames__WEBPACK_IMPORTED_MODULE_9___default()(this.props.className, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, prefixCls + '-handle-click-focused', this.state.clickFocused)); var positionStyle = vertical ? (_ref2 = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, reverse ? 'top' : 'bottom', offset + '%'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, reverse ? 'bottom' : 'top', 'auto'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, 'transform', 'translateY(+50%)'), _ref2) : (_ref3 = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref3, reverse ? 'right' : 'left', offset + '%'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref3, reverse ? 'left' : 'right', 'auto'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref3, 'transform', 'translateX(' + (reverse ? '+' : '-') + '50%)'), _ref3); var elStyle = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, style, positionStyle); var _tabIndex = tabIndex || 0; if (disabled || tabIndex === null) { _tabIndex = null; } var ariaValueText = void 0; if (ariaValueTextFormatter) { ariaValueText = ariaValueTextFormatter(value); } return react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement('div', babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({ ref: this.setHandleRef, tabIndex: _tabIndex }, restProps, { className: className, style: elStyle, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, onMouseDown: this.handleMouseDown // aria attribute , role: 'slider', 'aria-valuemin': min, 'aria-valuemax': max, 'aria-valuenow': value, 'aria-disabled': !!disabled, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-valuetext': ariaValueText })); } }]); return Handle; }(react__WEBPACK_IMPORTED_MODULE_7___default.a.Component); /* harmony default export */ __webpack_exports__["default"] = (Handle); Handle.propTypes = { prefixCls: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, className: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, vertical: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, offset: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, style: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.object, disabled: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, min: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, max: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, value: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, reverse: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, ariaLabel: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, ariaLabelledBy: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, ariaValueTextFormatter: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.func }; /***/ }), /***/ "./node_modules/rc-slider/es/Range.js": /*!********************************************!*\ !*** ./node_modules/rc-slider/es/Range.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ "./node_modules/babel-runtime/helpers/toConsumableArray.js"); /* harmony import */ var babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ "./node_modules/babel-runtime/helpers/classCallCheck.js"); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ "./node_modules/babel-runtime/helpers/createClass.js"); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js"); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ "./node_modules/babel-runtime/helpers/inherits.js"); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var shallowequal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! shallowequal */ "./node_modules/shallowequal/index.js"); /* harmony import */ var shallowequal__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(shallowequal__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _common_Track__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./common/Track */ "./node_modules/rc-slider/es/common/Track.js"); /* harmony import */ var _common_createSlider__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./common/createSlider */ "./node_modules/rc-slider/es/common/createSlider.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utils */ "./node_modules/rc-slider/es/utils.js"); /* eslint-disable react/prop-types */ var _trimAlignValue = function _trimAlignValue(_ref) { var value = _ref.value, handle = _ref.handle, bounds = _ref.bounds, props = _ref.props; var allowCross = props.allowCross, pushable = props.pushable; var thershold = Number(pushable); var valInRange = _utils__WEBPACK_IMPORTED_MODULE_13__["ensureValueInRange"](value, props); var valNotConflict = valInRange; if (!allowCross && handle != null && bounds !== undefined) { if (handle > 0 && valInRange <= bounds[handle - 1] + thershold) { valNotConflict = bounds[handle - 1] + thershold; } if (handle < bounds.length - 1 && valInRange >= bounds[handle + 1] - thershold) { valNotConflict = bounds[handle + 1] - thershold; } } return _utils__WEBPACK_IMPORTED_MODULE_13__["ensureValuePrecision"](valNotConflict, props); }; var Range = function (_React$Component) { babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(Range, _React$Component); function Range(props) { babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, Range); var _this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (Range.__proto__ || Object.getPrototypeOf(Range)).call(this, props)); _this.onEnd = function (force) { var handle = _this.state.handle; _this.removeDocumentEvents(); if (handle !== null || force) { _this.props.onAfterChange(_this.getValue()); } _this.setState({ handle: null }); }; var count = props.count, min = props.min, max = props.max; var initialValue = Array.apply(undefined, babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(Array(count + 1))).map(function () { return min; }); var defaultValue = 'defaultValue' in props ? props.defaultValue : initialValue; var value = props.value !== undefined ? props.value : defaultValue; var bounds = value.map(function (v, i) { return _trimAlignValue({ value: v, handle: i, props: props }); }); var recent = bounds[0] === max ? 0 : bounds.length - 1; _this.state = { handle: null, recent: recent, bounds: bounds }; return _this; } babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(Range, [{ key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { var _this2 = this; if (!('value' in this.props || 'min' in this.props || 'max' in this.props)) { return; } if (this.props.min === prevProps.min && this.props.max === prevProps.max && shallowequal__WEBPACK_IMPORTED_MODULE_10___default()(this.props.value, prevProps.value)) { return; } var _props = this.props, onChange = _props.onChange, value = _props.value; var currentValue = value || prevState.bounds; if (currentValue.some(function (v) { return _utils__WEBPACK_IMPORTED_MODULE_13__["isValueOutOfRange"](v, _this2.props); })) { var newValues = currentValue.map(function (v) { return _utils__WEBPACK_IMPORTED_MODULE_13__["ensureValueInRange"](v, _this2.props); }); onChange(newValues); } } }, { key: 'onChange', value: function onChange(state) { var props = this.props; var isNotControlled = !('value' in props); if (isNotControlled) { this.setState(state); } else { var controlledState = {}; ['handle', 'recent'].forEach(function (item) { if (state[item] !== undefined) { controlledState[item] = state[item]; } }); if (Object.keys(controlledState).length) { this.setState(controlledState); } } var data = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, this.state, state); var changedValue = data.bounds; props.onChange(changedValue); } }, { key: 'onStart', value: function onStart(position) { var props = this.props; var state = this.state; var bounds = this.getValue(); props.onBeforeChange(bounds); var value = this.calcValueByPos(position); this.startValue = value; this.startPosition = position; var closestBound = this.getClosestBound(value); this.prevMovedHandleIndex = this.getBoundNeedMoving(value, closestBound); this.setState({ handle: this.prevMovedHandleIndex, recent: this.prevMovedHandleIndex }); var prevValue = bounds[this.prevMovedHandleIndex]; if (value === prevValue) return; var nextBounds = [].concat(babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(state.bounds)); nextBounds[this.prevMovedHandleIndex] = value; this.onChange({ bounds: nextBounds }); } }, { key: 'onMove', value: function onMove(e, position) { _utils__WEBPACK_IMPORTED_MODULE_13__["pauseEvent"](e); var state = this.state; var value = this.calcValueByPos(position); var oldValue = state.bounds[state.handle]; if (value === oldValue) return; this.moveTo(value); } }, { key: 'onKeyboard', value: function onKeyboard(e) { var _props2 = this.props, reverse = _props2.reverse, vertical = _props2.vertical; var valueMutator = _utils__WEBPACK_IMPORTED_MODULE_13__["getKeyboardValueMutator"](e, vertical, reverse); if (valueMutator) { _utils__WEBPACK_IMPORTED_MODULE_13__["pauseEvent"](e); var state = this.state, props = this.props; var bounds = state.bounds, handle = state.handle; var oldValue = bounds[handle === null ? state.recent : handle]; var mutatedValue = valueMutator(oldValue, props); var value = _trimAlignValue({ value: mutatedValue, handle: handle, bounds: state.bounds, props: props }); if (value === oldValue) return; var isFromKeyboardEvent = true; this.moveTo(value, isFromKeyboardEvent); } } }, { key: 'getValue', value: function getValue() { return this.state.bounds; } }, { key: 'getClosestBound', value: function getClosestBound(value) { var bounds = this.state.bounds; var closestBound = 0; for (var i = 1; i < bounds.length - 1; ++i) { if (value >= bounds[i]) { closestBound = i; } } if (Math.abs(bounds[closestBound + 1] - value) < Math.abs(bounds[closestBound] - value)) { closestBound += 1; } return closestBound; } }, { key: 'getBoundNeedMoving', value: function getBoundNeedMoving(value, closestBound) { var _state = this.state, bounds = _state.bounds, recent = _state.recent; var boundNeedMoving = closestBound; var isAtTheSamePoint = bounds[closestBound + 1] === bounds[closestBound]; if (isAtTheSamePoint && bounds[recent] === bounds[closestBound]) { boundNeedMoving = recent; } if (isAtTheSamePoint && value !== bounds[closestBound + 1]) { boundNeedMoving = value < bounds[closestBound + 1] ? closestBound : closestBound + 1; } return boundNeedMoving; } }, { key: 'getLowerBound', value: function getLowerBound() { return this.state.bounds[0]; } }, { key: 'getUpperBound', value: function getUpperBound() { var bounds = this.state.bounds; return bounds[bounds.length - 1]; } /** * Returns an array of possible slider points, taking into account both * `marks` and `step`. The result is cached. */ }, { key: 'getPoints', value: function getPoints() { var _props3 = this.props, marks = _props3.marks, step = _props3.step, min = _props3.min, max = _props3.max; var cache = this._getPointsCache; if (!cache || cache.marks !== marks || cache.step !== step) { var pointsObject = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, marks); if (step !== null) { for (var point = min; point <= max; point += step) { pointsObject[point] = point; } } var points = Object.keys(pointsObject).map(parseFloat); points.sort(function (a, b) { return a - b; }); this._getPointsCache = { marks: marks, step: step, points: points }; } return this._getPointsCache.points; } }, { key: 'moveTo', value: function moveTo(value, isFromKeyboardEvent) { var _this3 = this; var state = this.state, props = this.props; var nextBounds = [].concat(babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(state.bounds)); var handle = state.handle === null ? state.recent : state.handle; nextBounds[handle] = value; var nextHandle = handle; if (props.pushable !== false) { this.pushSurroundingHandles(nextBounds, nextHandle); } else if (props.allowCross) { nextBounds.sort(function (a, b) { return a - b; }); nextHandle = nextBounds.indexOf(value); } this.onChange({ recent: nextHandle, handle: nextHandle, bounds: nextBounds }); if (isFromKeyboardEvent) { // known problem: because setState is async, // so trigger focus will invoke handler's onEnd and another handler's onStart too early, // cause onBeforeChange and onAfterChange receive wrong value. // here use setState callback to hack,but not elegant this.props.onAfterChange(nextBounds); this.setState({}, function () { _this3.handlesRefs[nextHandle].focus(); }); this.onEnd(); } } }, { key: 'pushSurroundingHandles', value: function pushSurroundingHandles(bounds, handle) { var value = bounds[handle]; var threshold = this.props.pushable; threshold = Number(threshold); var direction = 0; if (bounds[handle + 1] - value < threshold) { direction = +1; // push to right } if (value - bounds[handle - 1] < threshold) { direction = -1; // push to left } if (direction === 0) { return; } var nextHandle = handle + direction; var diffToNext = direction * (bounds[nextHandle] - value); if (!this.pushHandle(bounds, nextHandle, direction, threshold - diffToNext)) { // revert to original value if pushing is impossible bounds[handle] = bounds[nextHandle] - direction * threshold; } } }, { key: 'pushHandle', value: function pushHandle(bounds, handle, direction, amount) { var originalValue = bounds[handle]; var currentValue = bounds[handle]; while (direction * (currentValue - originalValue) < amount) { if (!this.pushHandleOnePoint(bounds, handle, direction)) { // can't push handle enough to create the needed `amount` gap, so we // revert its position to the original value bounds[handle] = originalValue; return false; } currentValue = bounds[handle]; } // the handle was pushed enough to create the needed `amount` gap return true; } }, { key: 'pushHandleOnePoint', value: function pushHandleOnePoint(bounds, handle, direction) { var points = this.getPoints(); var pointIndex = points.indexOf(bounds[handle]); var nextPointIndex = pointIndex + direction; if (nextPointIndex >= points.length || nextPointIndex < 0) { // reached the minimum or maximum available point, can't push anymore return false; } var nextHandle = handle + direction; var nextValue = points[nextPointIndex]; var threshold = this.props.pushable; var diffToNext = direction * (bounds[nextHandle] - nextValue); if (!this.pushHandle(bounds, nextHandle, direction, threshold - diffToNext)) { // couldn't push next handle, so we won't push this one either return false; } // push the handle bounds[handle] = nextValue; return true; } }, { key: 'trimAlignValue', value: function trimAlignValue(value) { var _state2 = this.state, handle = _state2.handle, bounds = _state2.bounds; return _trimAlignValue({ value: value, handle: handle, bounds: bounds, props: this.props }); } }, { key: 'render', value: function render() { var _this4 = this; var _state3 = this.state, handle = _state3.handle, bounds = _state3.bounds; var _props4 = this.props, prefixCls = _props4.prefixCls, vertical = _props4.vertical, included = _props4.included, disabled = _props4.disabled, min = _props4.min, max = _props4.max, reverse = _props4.reverse, handleGenerator = _props4.handle, trackStyle = _props4.trackStyle, handleStyle = _props4.handleStyle, tabIndex = _props4.tabIndex, ariaLabelGroupForHandles = _props4.ariaLabelGroupForHandles, ariaLabelledByGroupForHandles = _props4.ariaLabelledByGroupForHandles, ariaValueTextFormatterGroupForHandles = _props4.ariaValueTextFormatterGroupForHandles; var offsets = bounds.map(function (v) { return _this4.calcOffset(v); }); var handleClassName = prefixCls + '-handle'; var handles = bounds.map(function (v, i) { var _classNames; var _tabIndex = tabIndex[i] || 0; if (disabled || tabIndex[i] === null) { _tabIndex = null; } return handleGenerator({ className: classnames__WEBPACK_IMPORTED_MODULE_9___default()((_classNames = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, handleClassName, true), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, handleClassName + '-' + (i + 1), true), _classNames)), prefixCls: prefixCls, vertical: vertical, offset: offsets[i], value: v, dragging: handle === i, index: i, tabIndex: _tabIndex, min: min, max: max, reverse: reverse, disabled: disabled, style: handleStyle[i], ref: function ref(h) { return _this4.saveHandle(i, h); }, ariaLabel: ariaLabelGroupForHandles[i], ariaLabelledBy: ariaLabelledByGroupForHandles[i], ariaValueTextFormatter: ariaValueTextFormatterGroupForHandles[i] }); }); var tracks = bounds.slice(0, -1).map(function (_, index) { var _classNames2; var i = index + 1; var trackClassName = classnames__WEBPACK_IMPORTED_MODULE_9___default()((_classNames2 = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, prefixCls + '-track', true), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, prefixCls + '-track-' + i, true), _classNames2)); return react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_common_Track__WEBPACK_IMPORTED_MODULE_11__["default"], { className: trackClassName, vertical: vertical, reverse: reverse, included: included, offset: offsets[i - 1], length: offsets[i] - offsets[i - 1], style: trackStyle[index], key: i }); }); return { tracks: tracks, handles: handles }; } }], [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(props, state) { if ('value' in props || 'min' in props || 'max' in props) { var value = props.value || state.bounds; var nextBounds = value.map(function (v, i) { return _trimAlignValue({ value: v, handle: i, bounds: state.bounds, props: props }); }); if (nextBounds.length === state.bounds.length && nextBounds.every(function (v, i) { return v === state.bounds[i]; })) { return null; } return babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, state, { bounds: nextBounds }); } return null; } }]); return Range; }(react__WEBPACK_IMPORTED_MODULE_7___default.a.Component); Range.displayName = 'Range'; Range.propTypes = { autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number), value: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number), count: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, pushable: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number]), allowCross: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, disabled: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, reverse: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number), min: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, max: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, ariaLabelGroupForHandles: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string), ariaLabelledByGroupForHandles: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string), ariaValueTextFormatterGroupForHandles: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.func) }; Range.defaultProps = { count: 1, allowCross: true, pushable: false, tabIndex: [], ariaLabelGroupForHandles: [], ariaLabelledByGroupForHandles: [], ariaValueTextFormatterGroupForHandles: [] }; /* harmony default export */ __webpack_exports__["default"] = (Object(_common_createSlider__WEBPACK_IMPORTED_MODULE_12__["default"])(Range)); /***/ }), /***/ "./node_modules/rc-slider/es/Slider.js": /*!*********************************************!*\ !*** ./node_modules/rc-slider/es/Slider.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ "./node_modules/babel-runtime/helpers/classCallCheck.js"); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ "./node_modules/babel-runtime/helpers/createClass.js"); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js"); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ "./node_modules/babel-runtime/helpers/inherits.js"); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _common_Track__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./common/Track */ "./node_modules/rc-slider/es/common/Track.js"); /* harmony import */ var _common_createSlider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./common/createSlider */ "./node_modules/rc-slider/es/common/createSlider.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils */ "./node_modules/rc-slider/es/utils.js"); /* eslint-disable react/prop-types */ var Slider = function (_React$Component) { babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(Slider, _React$Component); function Slider(props) { babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Slider); var _this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, props)); _this.onEnd = function (force) { var dragging = _this.state.dragging; _this.removeDocumentEvents(); if (dragging || force) { _this.props.onAfterChange(_this.getValue()); } _this.setState({ dragging: false }); }; var defaultValue = props.defaultValue !== undefined ? props.defaultValue : props.min; var value = props.value !== undefined ? props.value : defaultValue; _this.state = { value: _this.trimAlignValue(value), dragging: false }; warning__WEBPACK_IMPORTED_MODULE_7___default()(!('minimumTrackStyle' in props), 'minimumTrackStyle will be deprecated, please use trackStyle instead.'); warning__WEBPACK_IMPORTED_MODULE_7___default()(!('maximumTrackStyle' in props), 'maximumTrackStyle will be deprecated, please use railStyle instead.'); return _this; } babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Slider, [{ key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { if (!('value' in this.props || 'min' in this.props || 'max' in this.props)) { return; } var _props = this.props, value = _props.value, onChange = _props.onChange; var theValue = value !== undefined ? value : prevState.value; var nextValue = this.trimAlignValue(theValue, this.props); if (nextValue !== prevState.value) { // eslint-disable-next-line this.setState({ value: nextValue }); if (_utils__WEBPACK_IMPORTED_MODULE_10__["isValueOutOfRange"](theValue, this.props)) { onChange(nextValue); } } } }, { key: 'onChange', value: function onChange(state) { var props = this.props; var isNotControlled = !('value' in props); var nextState = state.value > this.props.max ? babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { value: this.props.max }) : state; if (isNotControlled) { this.setState(nextState); } var changedValue = nextState.value; props.onChange(changedValue); } }, { key: 'onStart', value: function onStart(position) { this.setState({ dragging: true }); var props = this.props; var prevValue = this.getValue(); props.onBeforeChange(prevValue); var value = this.calcValueByPos(position); this.startValue = value; this.startPosition = position; if (value === prevValue) return; this.prevMovedHandleIndex = 0; this.onChange({ value: value }); } }, { key: 'onMove', value: function onMove(e, position) { _utils__WEBPACK_IMPORTED_MODULE_10__["pauseEvent"](e); var oldValue = this.state.value; var value = this.calcValueByPos(position); if (value === oldValue) return; this.onChange({ value: value }); } }, { key: 'onKeyboard', value: function onKeyboard(e) { var _props2 = this.props, reverse = _props2.reverse, vertical = _props2.vertical; var valueMutator = _utils__WEBPACK_IMPORTED_MODULE_10__["getKeyboardValueMutator"](e, vertical, reverse); if (valueMutator) { _utils__WEBPACK_IMPORTED_MODULE_10__["pauseEvent"](e); var state = this.state; var oldValue = state.value; var mutatedValue = valueMutator(oldValue, this.props); var value = this.trimAlignValue(mutatedValue); if (value === oldValue) return; this.onChange({ value: value }); this.props.onAfterChange(value); this.onEnd(); } } }, { key: 'getValue', value: function getValue() { return this.state.value; } }, { key: 'getLowerBound', value: function getLowerBound() { return this.props.min; } }, { key: 'getUpperBound', value: function getUpperBound() { return this.state.value; } }, { key: 'trimAlignValue', value: function trimAlignValue(v) { var nextProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (v === null) { return null; } var mergedProps = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, this.props, nextProps); var val = _utils__WEBPACK_IMPORTED_MODULE_10__["ensureValueInRange"](v, mergedProps); return _utils__WEBPACK_IMPORTED_MODULE_10__["ensureValuePrecision"](val, mergedProps); } }, { key: 'render', value: function render() { var _this2 = this; var _props3 = this.props, prefixCls = _props3.prefixCls, vertical = _props3.vertical, included = _props3.included, disabled = _props3.disabled, minimumTrackStyle = _props3.minimumTrackStyle, trackStyle = _props3.trackStyle, handleStyle = _props3.handleStyle, tabIndex = _props3.tabIndex, ariaLabelForHandle = _props3.ariaLabelForHandle, ariaLabelledByForHandle = _props3.ariaLabelledByForHandle, ariaValueTextFormatterForHandle = _props3.ariaValueTextFormatterForHandle, min = _props3.min, max = _props3.max, startPoint = _props3.startPoint, reverse = _props3.reverse, handleGenerator = _props3.handle; var _state = this.state, value = _state.value, dragging = _state.dragging; var offset = this.calcOffset(value); var handle = handleGenerator({ className: prefixCls + '-handle', prefixCls: prefixCls, vertical: vertical, offset: offset, value: value, dragging: dragging, disabled: disabled, min: min, max: max, reverse: reverse, index: 0, tabIndex: tabIndex, ariaLabel: ariaLabelForHandle, ariaLabelledBy: ariaLabelledByForHandle, ariaValueTextFormatter: ariaValueTextFormatterForHandle, style: handleStyle[0] || handleStyle, ref: function ref(h) { return _this2.saveHandle(0, h); } }); var trackOffset = startPoint !== undefined ? this.calcOffset(startPoint) : 0; var _trackStyle = trackStyle[0] || trackStyle; var track = react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_common_Track__WEBPACK_IMPORTED_MODULE_8__["default"], { className: prefixCls + '-track', vertical: vertical, included: included, offset: trackOffset, reverse: reverse, length: offset - trackOffset, style: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, minimumTrackStyle, _trackStyle) }); return { tracks: track, handles: handle }; } }]); return Slider; }(react__WEBPACK_IMPORTED_MODULE_5___default.a.Component); Slider.propTypes = { defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number, value: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number, disabled: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool, autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool, tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number, reverse: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool, min: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number, max: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number, startPoint: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number, ariaLabelForHandle: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.string, ariaLabelledByForHandle: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.string, ariaValueTextFormatterForHandle: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.func }; /* harmony default export */ __webpack_exports__["default"] = (Object(_common_createSlider__WEBPACK_IMPORTED_MODULE_9__["default"])(Slider)); /***/ }), /***/ "./node_modules/rc-slider/es/common/Marks.js": /*!***************************************************!*\ !*** ./node_modules/rc-slider/es/common/Marks.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); var Marks = function Marks(_ref) { var className = _ref.className, vertical = _ref.vertical, reverse = _ref.reverse, marks = _ref.marks, included = _ref.included, upperBound = _ref.upperBound, lowerBound = _ref.lowerBound, max = _ref.max, min = _ref.min, onClickLabel = _ref.onClickLabel; var marksKeys = Object.keys(marks); var range = max - min; var elements = marksKeys.map(parseFloat).sort(function (a, b) { return a - b; }).map(function (point) { var _classNames; var markPoint = marks[point]; var markPointIsObject = typeof markPoint === 'object' && !react__WEBPACK_IMPORTED_MODULE_2___default.a.isValidElement(markPoint); var markLabel = markPointIsObject ? markPoint.label : markPoint; if (!markLabel && markLabel !== 0) { return null; } var isActive = !included && point === upperBound || included && point <= upperBound && point >= lowerBound; var markClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()((_classNames = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, className + '-text', true), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, className + '-text-active', isActive), _classNames)); var bottomStyle = babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({ marginBottom: '-50%' }, reverse ? 'top' : 'bottom', (point - min) / range * 100 + '%'); var leftStyle = babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({ transform: 'translateX(-50%)', msTransform: 'translateX(-50%)' }, reverse ? 'right' : 'left', reverse ? (point - min / 4) / range * 100 + '%' : (point - min) / range * 100 + '%'); var style = vertical ? bottomStyle : leftStyle; var markStyle = markPointIsObject ? babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, style, markPoint.style) : style; return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( 'span', { className: markClassName, style: markStyle, key: point, onMouseDown: function onMouseDown(e) { return onClickLabel(e, point); }, onTouchStart: function onTouchStart(e) { return onClickLabel(e, point); } }, markLabel ); }); return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( 'div', { className: className }, elements ); }; Marks.propTypes = { className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string, vertical: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool, reverse: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool, marks: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, included: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool, upperBound: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, lowerBound: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, max: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, min: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, onClickLabel: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func }; /* harmony default export */ __webpack_exports__["default"] = (Marks); /***/ }), /***/ "./node_modules/rc-slider/es/common/Steps.js": /*!***************************************************!*\ !*** ./node_modules/rc-slider/es/common/Steps.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_5__); var calcPoints = function calcPoints(vertical, marks, dots, step, min, max) { warning__WEBPACK_IMPORTED_MODULE_5___default()(dots ? step > 0 : true, '`Slider[step]` should be a positive number in order to make Slider[dots] work.'); var points = Object.keys(marks).map(parseFloat).sort(function (a, b) { return a - b; }); if (dots && step) { for (var i = min; i <= max; i += step) { if (points.indexOf(i) === -1) { points.push(i); } } } return points; }; var Steps = function Steps(_ref) { var prefixCls = _ref.prefixCls, vertical = _ref.vertical, reverse = _ref.reverse, marks = _ref.marks, dots = _ref.dots, step = _ref.step, included = _ref.included, lowerBound = _ref.lowerBound, upperBound = _ref.upperBound, max = _ref.max, min = _ref.min, dotStyle = _ref.dotStyle, activeDotStyle = _ref.activeDotStyle; var range = max - min; var elements = calcPoints(vertical, marks, dots, step, min, max).map(function (point) { var _classNames; var offset = Math.abs(point - min) / range * 100 + '%'; var isActived = !included && point === upperBound || included && point <= upperBound && point >= lowerBound; var style = vertical ? babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, dotStyle, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, reverse ? 'top' : 'bottom', offset)) : babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, dotStyle, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, reverse ? 'right' : 'left', offset)); if (isActived) { style = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, style, activeDotStyle); } var pointClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()((_classNames = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, prefixCls + '-dot', true), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, prefixCls + '-dot-active', isActived), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, prefixCls + '-dot-reverse', reverse), _classNames)); return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement('span', { className: pointClassName, style: style, key: point }); }); return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( 'div', { className: prefixCls + '-step' }, elements ); }; Steps.propTypes = { prefixCls: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string, activeDotStyle: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, dotStyle: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, min: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, max: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, upperBound: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, lowerBound: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, included: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool, dots: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool, step: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, marks: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, vertical: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool, reverse: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool }; /* harmony default export */ __webpack_exports__["default"] = (Steps); /***/ }), /***/ "./node_modules/rc-slider/es/common/Track.js": /*!***************************************************!*\ !*** ./node_modules/rc-slider/es/common/Track.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* eslint-disable react/prop-types */ var Track = function Track(props) { var _ref, _ref2; var className = props.className, included = props.included, vertical = props.vertical, style = props.style; var length = props.length, offset = props.offset, reverse = props.reverse; if (length < 0) { reverse = !reverse; length = Math.abs(length); offset = 100 - offset; } var positonStyle = vertical ? (_ref = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref, reverse ? 'top' : 'bottom', offset + '%'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref, reverse ? 'bottom' : 'top', 'auto'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref, 'height', length + '%'), _ref) : (_ref2 = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, reverse ? 'right' : 'left', offset + '%'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, reverse ? 'left' : 'right', 'auto'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, 'width', length + '%'), _ref2); var elStyle = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, style, positonStyle); return included ? react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement('div', { className: className, style: elStyle }) : null; }; /* harmony default export */ __webpack_exports__["default"] = (Track); /***/ }), /***/ "./node_modules/rc-slider/es/common/createSlider.js": /*!**********************************************************!*\ !*** ./node_modules/rc-slider/es/common/createSlider.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createSlider; }); /* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ "./node_modules/babel-runtime/helpers/objectWithoutProperties.js"); /* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ "./node_modules/babel-runtime/helpers/classCallCheck.js"); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ "./node_modules/babel-runtime/helpers/createClass.js"); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js"); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! babel-runtime/helpers/get */ "./node_modules/babel-runtime/helpers/get.js"); /* harmony import */ var babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ "./node_modules/babel-runtime/helpers/inherits.js"); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ "./node_modules/rc-util/es/Dom/addEventListener.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _Steps__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Steps */ "./node_modules/rc-slider/es/common/Steps.js"); /* harmony import */ var _Marks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Marks */ "./node_modules/rc-slider/es/common/Marks.js"); /* harmony import */ var _Handle__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../Handle */ "./node_modules/rc-slider/es/Handle.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils */ "./node_modules/rc-slider/es/utils.js"); function noop() {} function createSlider(Component) { var _class, _temp; return _temp = _class = function (_Component) { babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(ComponentEnhancer, _Component); function ComponentEnhancer(props) { babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, ComponentEnhancer); var _this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (ComponentEnhancer.__proto__ || Object.getPrototypeOf(ComponentEnhancer)).call(this, props)); _this.onMouseDown = function (e) { if (e.button !== 0) { return; } var isVertical = _this.props.vertical; var position = _utils__WEBPACK_IMPORTED_MODULE_16__["getMousePosition"](isVertical, e); if (!_utils__WEBPACK_IMPORTED_MODULE_16__["isEventFromHandle"](e, _this.handlesRefs)) { _this.dragOffset = 0; } else { var handlePosition = _utils__WEBPACK_IMPORTED_MODULE_16__["getHandleCenterPosition"](isVertical, e.target); _this.dragOffset = position - handlePosition; position = handlePosition; } _this.removeDocumentEvents(); _this.onStart(position); _this.addDocumentMouseEvents(); }; _this.onTouchStart = function (e) { if (_utils__WEBPACK_IMPORTED_MODULE_16__["isNotTouchEvent"](e)) return; var isVertical = _this.props.vertical; var position = _utils__WEBPACK_IMPORTED_MODULE_16__["getTouchPosition"](isVertical, e); if (!_utils__WEBPACK_IMPORTED_MODULE_16__["isEventFromHandle"](e, _this.handlesRefs)) { _this.dragOffset = 0; } else { var handlePosition = _utils__WEBPACK_IMPORTED_MODULE_16__["getHandleCenterPosition"](isVertical, e.target); _this.dragOffset = position - handlePosition; position = handlePosition; } _this.onStart(position); _this.addDocumentTouchEvents(); _utils__WEBPACK_IMPORTED_MODULE_16__["pauseEvent"](e); }; _this.onFocus = function (e) { var _this$props = _this.props, onFocus = _this$props.onFocus, vertical = _this$props.vertical; if (_utils__WEBPACK_IMPORTED_MODULE_16__["isEventFromHandle"](e, _this.handlesRefs)) { var handlePosition = _utils__WEBPACK_IMPORTED_MODULE_16__["getHandleCenterPosition"](vertical, e.target); _this.dragOffset = 0; _this.onStart(handlePosition); _utils__WEBPACK_IMPORTED_MODULE_16__["pauseEvent"](e); if (onFocus) { onFocus(e); } } }; _this.onBlur = function (e) { var onBlur = _this.props.onBlur; _this.onEnd(); if (onBlur) { onBlur(e); } }; _this.onMouseUp = function () { if (_this.handlesRefs[_this.prevMovedHandleIndex]) { _this.handlesRefs[_this.prevMovedHandleIndex].clickFocus(); } }; _this.onMouseMove = function (e) { if (!_this.sliderRef) { _this.onEnd(); return; } var position = _utils__WEBPACK_IMPORTED_MODULE_16__["getMousePosition"](_this.props.vertical, e); _this.onMove(e, position - _this.dragOffset); }; _this.onTouchMove = function (e) { if (_utils__WEBPACK_IMPORTED_MODULE_16__["isNotTouchEvent"](e) || !_this.sliderRef) { _this.onEnd(); return; } var position = _utils__WEBPACK_IMPORTED_MODULE_16__["getTouchPosition"](_this.props.vertical, e); _this.onMove(e, position - _this.dragOffset); }; _this.onKeyDown = function (e) { if (_this.sliderRef && _utils__WEBPACK_IMPORTED_MODULE_16__["isEventFromHandle"](e, _this.handlesRefs)) { _this.onKeyboard(e); } }; _this.onClickMarkLabel = function (e, value) { e.stopPropagation(); _this.onChange({ value: value }); _this.setState({ value: value }, function () { return _this.onEnd(true); }); }; _this.saveSlider = function (slider) { _this.sliderRef = slider; }; var step = props.step, max = props.max, min = props.min; var isPointDiffEven = isFinite(max - min) ? (max - min) % step === 0 : true; // eslint-disable-line warning__WEBPACK_IMPORTED_MODULE_12___default()(step && Math.floor(step) === step ? isPointDiffEven : true, 'Slider[max] - Slider[min] (%s) should be a multiple of Slider[step] (%s)', max - min, step); _this.handlesRefs = {}; return _this; } babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(ComponentEnhancer, [{ key: 'componentDidMount', value: function componentDidMount() { // Snapshot testing cannot handle refs, so be sure to null-check this. this.document = this.sliderRef && this.sliderRef.ownerDocument; var _props = this.props, autoFocus = _props.autoFocus, disabled = _props.disabled; if (autoFocus && !disabled) { this.focus(); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_6___default()(ComponentEnhancer.prototype.__proto__ || Object.getPrototypeOf(ComponentEnhancer.prototype), 'componentWillUnmount', this)) babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_6___default()(ComponentEnhancer.prototype.__proto__ || Object.getPrototypeOf(ComponentEnhancer.prototype), 'componentWillUnmount', this).call(this); this.removeDocumentEvents(); } }, { key: 'getSliderStart', value: function getSliderStart() { var slider = this.sliderRef; var _props2 = this.props, vertical = _props2.vertical, reverse = _props2.reverse; var rect = slider.getBoundingClientRect(); if (vertical) { return reverse ? rect.bottom : rect.top; } return window.pageXOffset + (reverse ? rect.right : rect.left); } }, { key: 'getSliderLength', value: function getSliderLength() { var slider = this.sliderRef; if (!slider) { return 0; } var coords = slider.getBoundingClientRect(); return this.props.vertical ? coords.height : coords.width; } }, { key: 'addDocumentTouchEvents', value: function addDocumentTouchEvents() { // just work for Chrome iOS Safari and Android Browser this.onTouchMoveListener = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__["default"])(this.document, 'touchmove', this.onTouchMove); this.onTouchUpListener = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__["default"])(this.document, 'touchend', this.onEnd); } }, { key: 'addDocumentMouseEvents', value: function addDocumentMouseEvents() { this.onMouseMoveListener = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__["default"])(this.document, 'mousemove', this.onMouseMove); this.onMouseUpListener = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__["default"])(this.document, 'mouseup', this.onEnd); } }, { key: 'removeDocumentEvents', value: function removeDocumentEvents() { /* eslint-disable no-unused-expressions */ this.onTouchMoveListener && this.onTouchMoveListener.remove(); this.onTouchUpListener && this.onTouchUpListener.remove(); this.onMouseMoveListener && this.onMouseMoveListener.remove(); this.onMouseUpListener && this.onMouseUpListener.remove(); /* eslint-enable no-unused-expressions */ } }, { key: 'focus', value: function focus() { if (!this.props.disabled) { this.handlesRefs[0].focus(); } } }, { key: 'blur', value: function blur() { var _this2 = this; if (!this.props.disabled) { Object.keys(this.handlesRefs).forEach(function (key) { if (_this2.handlesRefs[key] && _this2.handlesRefs[key].blur) { _this2.handlesRefs[key].blur(); } }); } } }, { key: 'calcValue', value: function calcValue(offset) { var _props3 = this.props, vertical = _props3.vertical, min = _props3.min, max = _props3.max; var ratio = Math.abs(Math.max(offset, 0) / this.getSliderLength()); var value = vertical ? (1 - ratio) * (max - min) + min : ratio * (max - min) + min; return value; } }, { key: 'calcValueByPos', value: function calcValueByPos(position) { var sign = this.props.reverse ? -1 : +1; var pixelOffset = sign * (position - this.getSliderStart()); var nextValue = this.trimAlignValue(this.calcValue(pixelOffset)); return nextValue; } }, { key: 'calcOffset', value: function calcOffset(value) { var _props4 = this.props, min = _props4.min, max = _props4.max; var ratio = (value - min) / (max - min); return ratio * 100; } }, { key: 'saveHandle', value: function saveHandle(index, handle) { this.handlesRefs[index] = handle; } }, { key: 'render', value: function render() { var _classNames; var _props5 = this.props, prefixCls = _props5.prefixCls, className = _props5.className, marks = _props5.marks, dots = _props5.dots, step = _props5.step, included = _props5.included, disabled = _props5.disabled, vertical = _props5.vertical, reverse = _props5.reverse, min = _props5.min, max = _props5.max, children = _props5.children, maximumTrackStyle = _props5.maximumTrackStyle, style = _props5.style, railStyle = _props5.railStyle, dotStyle = _props5.dotStyle, activeDotStyle = _props5.activeDotStyle; var _get$call = babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_6___default()(ComponentEnhancer.prototype.__proto__ || Object.getPrototypeOf(ComponentEnhancer.prototype), 'render', this).call(this), tracks = _get$call.tracks, handles = _get$call.handles; var sliderClassName = classnames__WEBPACK_IMPORTED_MODULE_11___default()(prefixCls, (_classNames = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(_classNames, prefixCls + '-with-marks', Object.keys(marks).length), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(_classNames, prefixCls + '-disabled', disabled), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(_classNames, prefixCls + '-vertical', vertical), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(_classNames, className, className), _classNames)); return react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement( 'div', { ref: this.saveSlider, className: sliderClassName, onTouchStart: disabled ? noop : this.onTouchStart, onMouseDown: disabled ? noop : this.onMouseDown, onMouseUp: disabled ? noop : this.onMouseUp, onKeyDown: disabled ? noop : this.onKeyDown, onFocus: disabled ? noop : this.onFocus, onBlur: disabled ? noop : this.onBlur, style: style }, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement('div', { className: prefixCls + '-rail', style: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, maximumTrackStyle, railStyle) }), tracks, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_Steps__WEBPACK_IMPORTED_MODULE_13__["default"], { prefixCls: prefixCls, vertical: vertical, reverse: reverse, marks: marks, dots: dots, step: step, included: included, lowerBound: this.getLowerBound(), upperBound: this.getUpperBound(), max: max, min: min, dotStyle: dotStyle, activeDotStyle: activeDotStyle }), handles, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_Marks__WEBPACK_IMPORTED_MODULE_14__["default"], { className: prefixCls + '-mark', onClickLabel: disabled ? noop : this.onClickMarkLabel, vertical: vertical, marks: marks, included: included, lowerBound: this.getLowerBound(), upperBound: this.getUpperBound(), max: max, min: min, reverse: reverse }), children ); } }]); return ComponentEnhancer; }(Component), _class.displayName = 'ComponentEnhancer(' + Component.displayName + ')', _class.propTypes = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, Component.propTypes, { min: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number, max: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number, startPoint: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number, step: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number, marks: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, included: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool, className: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string, prefixCls: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string, disabled: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool, children: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.any, onBeforeChange: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func, onChange: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func, onAfterChange: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func, handle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func, dots: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool, vertical: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool, style: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, reverse: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool, minimumTrackStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, // just for compatibility, will be deperecate maximumTrackStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, // just for compatibility, will be deperecate handleStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object)]), trackStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object)]), railStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, dotStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, activeDotStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool, onFocus: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func, onBlur: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func }), _class.defaultProps = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, Component.defaultProps, { prefixCls: 'rc-slider', className: '', min: 0, max: 100, step: 1, marks: {}, handle: function handle(_ref) { var index = _ref.index, restProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0___default()(_ref, ['index']); delete restProps.dragging; if (restProps.value === null) { return null; } return react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_Handle__WEBPACK_IMPORTED_MODULE_15__["default"], babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, restProps, { key: index })); }, onBeforeChange: noop, onChange: noop, onAfterChange: noop, included: true, disabled: false, dots: false, vertical: false, reverse: false, trackStyle: [{}], handleStyle: [{}], railStyle: {}, dotStyle: {}, activeDotStyle: {} }), _temp; } /***/ }), /***/ "./node_modules/rc-slider/es/createSliderWithTooltip.js": /*!**************************************************************!*\ !*** ./node_modules/rc-slider/es/createSliderWithTooltip.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createSliderWithTooltip; }); /* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ "./node_modules/babel-runtime/helpers/objectWithoutProperties.js"); /* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ "./node_modules/babel-runtime/helpers/classCallCheck.js"); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ "./node_modules/babel-runtime/helpers/createClass.js"); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js"); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ "./node_modules/babel-runtime/helpers/inherits.js"); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var rc_tooltip__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-tooltip */ "./node_modules/rc-tooltip/es/index.js"); /* harmony import */ var _Handle__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Handle */ "./node_modules/rc-slider/es/Handle.js"); function createSliderWithTooltip(Component) { var _class, _temp2; return _temp2 = _class = function (_React$Component) { babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(ComponentWrapper, _React$Component); function ComponentWrapper() { var _ref; var _temp, _this, _ret; babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, ComponentWrapper); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_ref = ComponentWrapper.__proto__ || Object.getPrototypeOf(ComponentWrapper)).call.apply(_ref, [this].concat(args))), _this), _this.state = { visibles: {} }, _this.handleTooltipVisibleChange = function (index, visible) { _this.setState(function (prevState) { return { visibles: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, prevState.visibles, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, index, visible)) }; }); }, _this.handleWithTooltip = function (_ref2) { var value = _ref2.value, dragging = _ref2.dragging, index = _ref2.index, disabled = _ref2.disabled, restProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0___default()(_ref2, ['value', 'dragging', 'index', 'disabled']); var _this$props = _this.props, tipFormatter = _this$props.tipFormatter, tipProps = _this$props.tipProps, handleStyle = _this$props.handleStyle; var _tipProps$prefixCls = tipProps.prefixCls, prefixCls = _tipProps$prefixCls === undefined ? 'rc-slider-tooltip' : _tipProps$prefixCls, _tipProps$overlay = tipProps.overlay, overlay = _tipProps$overlay === undefined ? tipFormatter(value) : _tipProps$overlay, _tipProps$placement = tipProps.placement, placement = _tipProps$placement === undefined ? 'top' : _tipProps$placement, _tipProps$visible = tipProps.visible, visible = _tipProps$visible === undefined ? false : _tipProps$visible, restTooltipProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0___default()(tipProps, ['prefixCls', 'overlay', 'placement', 'visible']); var handleStyleWithIndex = void 0; if (Array.isArray(handleStyle)) { handleStyleWithIndex = handleStyle[index] || handleStyle[0]; } else { handleStyleWithIndex = handleStyle; } return react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement( rc_tooltip__WEBPACK_IMPORTED_MODULE_9__["default"], babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, restTooltipProps, { prefixCls: prefixCls, overlay: overlay, placement: placement, visible: !disabled && (_this.state.visibles[index] || dragging) || visible, key: index }), react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_Handle__WEBPACK_IMPORTED_MODULE_10__["default"], babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, restProps, { style: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, handleStyleWithIndex), value: value, onMouseEnter: function onMouseEnter() { return _this.handleTooltipVisibleChange(index, true); }, onMouseLeave: function onMouseLeave() { return _this.handleTooltipVisibleChange(index, false); } })) ); }, _temp), babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(_this, _ret); } babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(ComponentWrapper, [{ key: 'render', value: function render() { return react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(Component, babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, this.props, { handle: this.handleWithTooltip })); } }]); return ComponentWrapper; }(react__WEBPACK_IMPORTED_MODULE_7___default.a.Component), _class.propTypes = { tipFormatter: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.func, handleStyle: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.object)]), tipProps: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.object }, _class.defaultProps = { tipFormatter: function tipFormatter(value) { return value; }, handleStyle: [{}], tipProps: {} }, _temp2; } /***/ }), /***/ "./node_modules/rc-slider/es/index.js": /*!********************************************!*\ !*** ./node_modules/rc-slider/es/index.js ***! \********************************************/ /*! exports provided: default, Range, Handle, createSliderWithTooltip */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Slider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Slider */ "./node_modules/rc-slider/es/Slider.js"); /* harmony import */ var _Range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Range */ "./node_modules/rc-slider/es/Range.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return _Range__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _Handle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Handle */ "./node_modules/rc-slider/es/Handle.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Handle", function() { return _Handle__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _createSliderWithTooltip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./createSliderWithTooltip */ "./node_modules/rc-slider/es/createSliderWithTooltip.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSliderWithTooltip", function() { return _createSliderWithTooltip__WEBPACK_IMPORTED_MODULE_3__["default"]; }); _Slider__WEBPACK_IMPORTED_MODULE_0__["default"].Range = _Range__WEBPACK_IMPORTED_MODULE_1__["default"]; _Slider__WEBPACK_IMPORTED_MODULE_0__["default"].Handle = _Handle__WEBPACK_IMPORTED_MODULE_2__["default"]; _Slider__WEBPACK_IMPORTED_MODULE_0__["default"].createSliderWithTooltip = _createSliderWithTooltip__WEBPACK_IMPORTED_MODULE_3__["default"]; /* harmony default export */ __webpack_exports__["default"] = (_Slider__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./node_modules/rc-slider/es/utils.js": /*!********************************************!*\ !*** ./node_modules/rc-slider/es/utils.js ***! \********************************************/ /*! exports provided: isEventFromHandle, isValueOutOfRange, isNotTouchEvent, getClosestPoint, getPrecision, getMousePosition, getTouchPosition, getHandleCenterPosition, ensureValueInRange, ensureValuePrecision, pauseEvent, calculateNextValue, getKeyboardValueMutator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEventFromHandle", function() { return isEventFromHandle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValueOutOfRange", function() { return isValueOutOfRange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNotTouchEvent", function() { return isNotTouchEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClosestPoint", function() { return getClosestPoint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPrecision", function() { return getPrecision; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMousePosition", function() { return getMousePosition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTouchPosition", function() { return getTouchPosition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHandleCenterPosition", function() { return getHandleCenterPosition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ensureValueInRange", function() { return ensureValueInRange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ensureValuePrecision", function() { return ensureValuePrecision; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pauseEvent", function() { return pauseEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateNextValue", function() { return calculateNextValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getKeyboardValueMutator", function() { return getKeyboardValueMutator; }); /* harmony import */ var babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ "./node_modules/babel-runtime/helpers/toConsumableArray.js"); /* harmony import */ var babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/KeyCode */ "./node_modules/rc-util/es/KeyCode.js"); function isEventFromHandle(e, handles) { try { return Object.keys(handles).some(function (key) { return e.target === Object(react_dom__WEBPACK_IMPORTED_MODULE_1__["findDOMNode"])(handles[key]); }); } catch (error) { return false; } } function isValueOutOfRange(value, _ref) { var min = _ref.min, max = _ref.max; return value < min || value > max; } function isNotTouchEvent(e) { return e.touches.length > 1 || e.type.toLowerCase() === 'touchend' && e.touches.length > 0; } function getClosestPoint(val, _ref2) { var marks = _ref2.marks, step = _ref2.step, min = _ref2.min, max = _ref2.max; var points = Object.keys(marks).map(parseFloat); if (step !== null) { var maxSteps = Math.floor((max - min) / step); var steps = Math.min((val - min) / step, maxSteps); var closestStep = Math.round(steps) * step + min; points.push(closestStep); } var diffs = points.map(function (point) { return Math.abs(val - point); }); return points[diffs.indexOf(Math.min.apply(Math, babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(diffs)))]; } function getPrecision(step) { var stepString = step.toString(); var precision = 0; if (stepString.indexOf('.') >= 0) { precision = stepString.length - stepString.indexOf('.') - 1; } return precision; } function getMousePosition(vertical, e) { return vertical ? e.clientY : e.pageX; } function getTouchPosition(vertical, e) { return vertical ? e.touches[0].clientY : e.touches[0].pageX; } function getHandleCenterPosition(vertical, handle) { var coords = handle.getBoundingClientRect(); return vertical ? coords.top + coords.height * 0.5 : window.pageXOffset + coords.left + coords.width * 0.5; } function ensureValueInRange(val, _ref3) { var max = _ref3.max, min = _ref3.min; if (val <= min) { return min; } if (val >= max) { return max; } return val; } function ensureValuePrecision(val, props) { var step = props.step; var closestPoint = isFinite(getClosestPoint(val, props)) ? getClosestPoint(val, props) : 0; // eslint-disable-line return step === null ? closestPoint : parseFloat(closestPoint.toFixed(getPrecision(step))); } function pauseEvent(e) { e.stopPropagation(); e.preventDefault(); } function calculateNextValue(func, value, props) { var operations = { increase: function increase(a, b) { return a + b; }, decrease: function decrease(a, b) { return a - b; } }; var indexToGet = operations[func](Object.keys(props.marks).indexOf(JSON.stringify(value)), 1); var keyToGet = Object.keys(props.marks)[indexToGet]; if (props.step) { return operations[func](value, props.step); } else if (!!Object.keys(props.marks).length && !!props.marks[keyToGet]) { return props.marks[keyToGet]; } return value; } function getKeyboardValueMutator(e, vertical, reverse) { var increase = 'increase'; var decrease = 'decrease'; var method = increase; switch (e.keyCode) { case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].UP: method = vertical && reverse ? decrease : increase;break; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].RIGHT: method = !vertical && reverse ? decrease : increase;break; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].DOWN: method = vertical && reverse ? increase : decrease;break; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].LEFT: method = !vertical && reverse ? increase : decrease;break; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].END: return function (value, props) { return props.max; }; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].HOME: return function (value, props) { return props.min; }; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].PAGE_UP: return function (value, props) { return value + props.step * 2; }; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].PAGE_DOWN: return function (value, props) { return value - props.step * 2; }; default: return undefined; } return function (value, props) { return calculateNextValue(method, value, props); }; } /***/ }), /***/ "./node_modules/rc-tooltip/es/Content.js": /*!***********************************************!*\ !*** ./node_modules/rc-tooltip/es/Content.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var Content = function Content(props) { var overlay = props.overlay, prefixCls = props.prefixCls, id = props.id; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "".concat(prefixCls, "-inner"), id: id, role: "tooltip" }, typeof overlay === 'function' ? overlay() : overlay); }; /* harmony default export */ __webpack_exports__["default"] = (Content); /***/ }), /***/ "./node_modules/rc-tooltip/es/Tooltip.js": /*!***********************************************!*\ !*** ./node_modules/rc-tooltip/es/Tooltip.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var rc_trigger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-trigger */ "./node_modules/rc-trigger/es/index.js"); /* harmony import */ var _placements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./placements */ "./node_modules/rc-tooltip/es/placements.js"); /* harmony import */ var _Content__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Content */ "./node_modules/rc-tooltip/es/Content.js"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } var Tooltip = function Tooltip(props, ref) { var overlayClassName = props.overlayClassName, _props$trigger = props.trigger, trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger, _props$mouseEnterDela = props.mouseEnterDelay, mouseEnterDelay = _props$mouseEnterDela === void 0 ? 0 : _props$mouseEnterDela, _props$mouseLeaveDela = props.mouseLeaveDelay, mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela, overlayStyle = props.overlayStyle, _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? 'rc-tooltip' : _props$prefixCls, children = props.children, onVisibleChange = props.onVisibleChange, afterVisibleChange = props.afterVisibleChange, transitionName = props.transitionName, animation = props.animation, _props$placement = props.placement, placement = _props$placement === void 0 ? 'right' : _props$placement, _props$align = props.align, align = _props$align === void 0 ? {} : _props$align, _props$destroyTooltip = props.destroyTooltipOnHide, destroyTooltipOnHide = _props$destroyTooltip === void 0 ? false : _props$destroyTooltip, defaultVisible = props.defaultVisible, getTooltipContainer = props.getTooltipContainer, restProps = _objectWithoutProperties(props, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer"]); var domRef = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(null); Object(react__WEBPACK_IMPORTED_MODULE_0__["useImperativeHandle"])(ref, function () { return domRef.current; }); var extraProps = _objectSpread({}, restProps); if ('visible' in props) { extraProps.popupVisible = props.visible; } var getPopupElement = function getPopupElement() { var _props$arrowContent = props.arrowContent, arrowContent = _props$arrowContent === void 0 ? null : _props$arrowContent, overlay = props.overlay, id = props.id; return [react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "".concat(prefixCls, "-arrow"), key: "arrow" }, arrowContent), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Content__WEBPACK_IMPORTED_MODULE_3__["default"], { key: "content", prefixCls: prefixCls, id: id, overlay: overlay })]; }; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(rc_trigger__WEBPACK_IMPORTED_MODULE_1__["default"], Object.assign({ popupClassName: overlayClassName, prefixCls: prefixCls, popup: getPopupElement, action: trigger, builtinPlacements: _placements__WEBPACK_IMPORTED_MODULE_2__["placements"], popupPlacement: placement, ref: domRef, popupAlign: align, getPopupContainer: getTooltipContainer, onPopupVisibleChange: onVisibleChange, afterPopupVisibleChange: afterVisibleChange, popupTransitionName: transitionName, popupAnimation: animation, defaultPopupVisible: defaultVisible, destroyPopupOnHide: destroyTooltipOnHide, mouseLeaveDelay: mouseLeaveDelay, popupStyle: overlayStyle, mouseEnterDelay: mouseEnterDelay }, extraProps), children); }; /* harmony default export */ __webpack_exports__["default"] = (Object(react__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(Tooltip)); /***/ }), /***/ "./node_modules/rc-tooltip/es/index.js": /*!*********************************************!*\ !*** ./node_modules/rc-tooltip/es/index.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Tooltip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tooltip */ "./node_modules/rc-tooltip/es/Tooltip.js"); /* harmony default export */ __webpack_exports__["default"] = (_Tooltip__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./node_modules/rc-tooltip/es/placements.js": /*!**************************************************!*\ !*** ./node_modules/rc-tooltip/es/placements.js ***! \**************************************************/ /*! exports provided: placements, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "placements", function() { return placements; }); var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var targetOffset = [0, 0]; var placements = { left: { points: ['cr', 'cl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset }, right: { points: ['cl', 'cr'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, top: { points: ['bc', 'tc'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, bottom: { points: ['tc', 'bc'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, leftTop: { points: ['tr', 'tl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset }, topRight: { points: ['br', 'tr'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, rightTop: { points: ['tl', 'tr'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, bottomRight: { points: ['tr', 'br'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, rightBottom: { points: ['bl', 'br'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, leftBottom: { points: ['br', 'bl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset } }; /* harmony default export */ __webpack_exports__["default"] = (placements); /***/ }), /***/ "./node_modules/rc-trigger/es/Popup.js": /*!*********************************************!*\ !*** ./node_modules/rc-trigger/es/Popup.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raf */ "./node_modules/raf/index.js"); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_align__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-align */ "./node_modules/rc-align/es/index.js"); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_animate_es_CSSMotion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-animate/es/CSSMotion */ "./node_modules/rc-animate/es/CSSMotion.js"); /* harmony import */ var _PopupInner__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./PopupInner */ "./node_modules/rc-trigger/es/PopupInner.js"); /* harmony import */ var _utils_legacyUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/legacyUtil */ "./node_modules/rc-trigger/es/utils/legacyUtil.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /* eslint-disable no-param-reassign */ var CSSMotion = rc_animate_es_CSSMotion__WEBPACK_IMPORTED_MODULE_5__["default"]; function supportMotion(motion) { return motion && motion.motionName; } var Popup = /*#__PURE__*/ function (_Component) { _inherits(Popup, _Component); function Popup() { var _this; _classCallCheck(this, Popup); _this = _possibleConstructorReturn(this, _getPrototypeOf(Popup).apply(this, arguments)); _this.state = { targetWidth: undefined, targetHeight: undefined, status: null, prevVisible: null, alignClassName: null }; _this.popupRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.createRef(); _this.alignRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.createRef(); _this.nextFrameState = null; _this.nextFrameId = null; _this.onAlign = function (popupDomNode, align) { var status = _this.state.status; var _this$props = _this.props, getClassNameFromAlign = _this$props.getClassNameFromAlign, onAlign = _this$props.onAlign; var alignClassName = getClassNameFromAlign(align); if (status === 'align') { _this.setState({ alignClassName: alignClassName, status: 'aligned' }, function () { _this.alignRef.current.forceAlign(); }); } else if (status === 'aligned') { _this.setState({ alignClassName: alignClassName, status: 'afterAlign' }); onAlign(popupDomNode, align); } else { _this.setState({ alignClassName: alignClassName }); } }; _this.onMotionEnd = function () { var visible = _this.props.visible; _this.setState({ status: visible ? 'AfterMotion' : 'stable' }); }; _this.setStateOnNextFrame = function (state) { _this.cancelFrameState(); _this.nextFrameState = _objectSpread({}, _this.nextFrameState, {}, state); _this.nextFrameId = raf__WEBPACK_IMPORTED_MODULE_1___default()(function () { var submitState = _objectSpread({}, _this.nextFrameState); _this.nextFrameState = null; _this.setState(submitState); }); }; _this.getMotion = function () { return _objectSpread({}, Object(_utils_legacyUtil__WEBPACK_IMPORTED_MODULE_7__["getMotion"])(_this.props)); }; // `target` on `rc-align` can accept as a function to get the bind element or a point. // ref: https://www.npmjs.com/package/rc-align _this.getAlignTarget = function () { var _this$props2 = _this.props, point = _this$props2.point, getRootDomNode = _this$props2.getRootDomNode; if (point) { return point; } return getRootDomNode; }; _this.cancelFrameState = function () { raf__WEBPACK_IMPORTED_MODULE_1___default.a.cancel(_this.nextFrameId); }; _this.renderPopupElement = function () { var _this$state = _this.state, status = _this$state.status, targetHeight = _this$state.targetHeight, targetWidth = _this$state.targetWidth, alignClassName = _this$state.alignClassName; var _this$props3 = _this.props, prefixCls = _this$props3.prefixCls, className = _this$props3.className, style = _this$props3.style, stretch = _this$props3.stretch, visible = _this$props3.visible, align = _this$props3.align, destroyPopupOnHide = _this$props3.destroyPopupOnHide, onMouseEnter = _this$props3.onMouseEnter, onMouseLeave = _this$props3.onMouseLeave, onMouseDown = _this$props3.onMouseDown, onTouchStart = _this$props3.onTouchStart, children = _this$props3.children; var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, className, alignClassName); var hiddenClassName = "".concat(prefixCls, "-hidden"); // ================== Style ================== var sizeStyle = {}; if (stretch) { // Stretch with target if (stretch.indexOf('height') !== -1) { sizeStyle.height = targetHeight; } else if (stretch.indexOf('minHeight') !== -1) { sizeStyle.minHeight = targetHeight; } if (stretch.indexOf('width') !== -1) { sizeStyle.width = targetWidth; } else if (stretch.indexOf('minWidth') !== -1) { sizeStyle.minWidth = targetWidth; } } var mergedStyle = _objectSpread({}, sizeStyle, {}, style, {}, _this.getZIndexStyle(), { opacity: status === 'stable' || !visible ? undefined : 0 }); // ================= Motions ================= var mergedMotion = _this.getMotion(); var mergedMotionVisible = visible; if (visible && status !== 'beforeMotion' && status !== 'motion' && status !== 'stable') { mergedMotion.motionAppear = false; mergedMotion.motionEnter = false; mergedMotion.motionLeave = false; } if (status === 'afterAlign' || status === 'beforeMotion') { mergedMotionVisible = false; } // ================== Align ================== var mergedAlignDisabled = !visible || status !== 'align' && status !== 'aligned' && status !== 'stable'; // ================== Popup ================== var mergedPopupVisible = true; if (status === 'stable') { mergedPopupVisible = visible; } // Only remove popup since mask may still need animation if (destroyPopupOnHide && !mergedPopupVisible) { return null; } return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CSSMotion, Object.assign({ visible: mergedMotionVisible }, mergedMotion, { removeOnLeave: false, onEnterEnd: _this.onMotionEnd, onLeaveEnd: _this.onMotionEnd }), function (_ref, motionRef) { var motionStyle = _ref.style, motionClassName = _ref.className; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(rc_align__WEBPACK_IMPORTED_MODULE_2__["default"], { target: _this.getAlignTarget(), key: "popup", ref: _this.alignRef, monitorWindowResize: true, disabled: mergedAlignDisabled, align: align, onAlign: _this.onAlign }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PopupInner__WEBPACK_IMPORTED_MODULE_6__["default"], { prefixCls: prefixCls, visible: mergedPopupVisible, hiddenClassName: hiddenClassName, className: classnames__WEBPACK_IMPORTED_MODULE_4___default()(mergedClassName, motionClassName), ref: Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_3__["composeRef"])(motionRef, _this.popupRef), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onTouchStart: onTouchStart, style: _objectSpread({}, mergedStyle, {}, motionStyle) }, children)); }); }; _this.renderMaskElement = function () { var _this$props4 = _this.props, mask = _this$props4.mask, maskMotion = _this$props4.maskMotion, maskTransitionName = _this$props4.maskTransitionName, maskAnimation = _this$props4.maskAnimation, prefixCls = _this$props4.prefixCls, visible = _this$props4.visible; if (!mask) { return null; } var motion = {}; if (maskMotion && maskMotion.motionName) { motion = _objectSpread({ motionAppear: true }, Object(_utils_legacyUtil__WEBPACK_IMPORTED_MODULE_7__["getMotion"])({ motion: maskMotion, prefixCls: prefixCls, transitionName: maskTransitionName, animation: maskAnimation })); } return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CSSMotion, Object.assign({}, motion, { visible: visible, removeOnLeave: true }), function (_ref2) { var className = _ref2.className; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: _this.getZIndexStyle(), key: "mask", className: classnames__WEBPACK_IMPORTED_MODULE_4___default()("".concat(prefixCls, "-mask"), className) }); }); }; return _this; } _createClass(Popup, [{ key: "componentDidMount", value: function componentDidMount() { this.componentDidUpdate(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { var status = this.state.status; var _this$props5 = this.props, getRootDomNode = _this$props5.getRootDomNode, visible = _this$props5.visible, stretch = _this$props5.stretch; if (visible && status !== 'stable') { switch (status) { case null: { this.setStateOnNextFrame({ status: stretch ? 'measure' : 'align' }); break; } case 'afterAlign': { this.setStateOnNextFrame({ status: supportMotion(this.getMotion()) ? 'beforeMotion' : 'stable' }); break; } case 'AfterMotion': { this.setStateOnNextFrame({ status: 'stable' }); break; } default: { // Go to next status var queue = ['measure', 'align', null, 'beforeMotion', 'motion']; var index = queue.indexOf(status); var nextStatus = queue[index + 1]; if (index !== -1 && nextStatus) { this.setStateOnNextFrame({ status: nextStatus }); } } } } // Measure stretch size if (status === 'measure') { var $ele = getRootDomNode(); if ($ele) { this.setStateOnNextFrame({ targetHeight: $ele.offsetHeight, targetWidth: $ele.offsetWidth }); } } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.cancelFrameState(); } }, { key: "getZIndexStyle", value: function getZIndexStyle() { var zIndex = this.props.zIndex; return { zIndex: zIndex }; } }, { key: "render", value: function render() { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, this.renderMaskElement(), this.renderPopupElement()); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(_ref3, _ref4) { var visible = _ref3.visible, props = _objectWithoutProperties(_ref3, ["visible"]); var prevVisible = _ref4.prevVisible, status = _ref4.status; var newState = { prevVisible: visible, status: status }; var mergedMotion = Object(_utils_legacyUtil__WEBPACK_IMPORTED_MODULE_7__["getMotion"])(props); if (prevVisible === null && visible === false) { // Init render should always be stable newState.status = 'stable'; } else if (visible !== prevVisible) { newState.status = visible || supportMotion(mergedMotion) ? null : 'stable'; if (visible) { newState.alignClassName = null; } } return newState; } }]); return Popup; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Popup); /* eslint-enable */ /***/ }), /***/ "./node_modules/rc-trigger/es/PopupInner.js": /*!**************************************************!*\ !*** ./node_modules/rc-trigger/es/PopupInner.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); var PopupInner = function PopupInner(props, ref) { var prefixCls = props.prefixCls, className = props.className, visible = props.visible, style = props.style, children = props.children, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, onMouseDown = props.onMouseDown, onTouchStart = props.onTouchStart; var childNode = children; if (react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.count(children) > 1) { childNode = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "".concat(prefixCls, "-content") }, children); } return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { ref: ref, className: classnames__WEBPACK_IMPORTED_MODULE_1___default()(className, !visible && "".concat(props.hiddenClassName)), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onTouchStart: onTouchStart, style: style }, childNode); }; var RefPopupInner = react__WEBPACK_IMPORTED_MODULE_0___default.a.forwardRef(PopupInner); RefPopupInner.displayName = 'PopupInner'; /* harmony default export */ __webpack_exports__["default"] = (RefPopupInner); /***/ }), /***/ "./node_modules/rc-trigger/es/context.js": /*!***********************************************!*\ !*** ./node_modules/rc-trigger/es/context.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var TriggerContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(null); /* harmony default export */ __webpack_exports__["default"] = (TriggerContext); /***/ }), /***/ "./node_modules/rc-trigger/es/index.js": /*!*********************************************!*\ !*** ./node_modules/rc-trigger/es/index.js ***! \*********************************************/ /*! exports provided: generateTrigger, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateTrigger", function() { return generateTrigger; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/Dom/contains */ "./node_modules/rc-util/es/Dom/contains.js"); /* harmony import */ var rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/Dom/findDOMNode */ "./node_modules/rc-util/es/Dom/findDOMNode.js"); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ "./node_modules/rc-util/es/Dom/addEventListener.js"); /* harmony import */ var rc_util_es_Portal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/Portal */ "./node_modules/rc-util/es/Portal.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _utils_alignUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/alignUtil */ "./node_modules/rc-trigger/es/utils/alignUtil.js"); /* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Popup */ "./node_modules/rc-trigger/es/Popup.js"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./context */ "./node_modules/rc-trigger/es/context.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function noop() {} function returnEmptyString() { return ''; } function returnDocument() { return window.document; } var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu']; /** * Internal usage. Do not use in your code since this will be removed. */ function generateTrigger(PortalComponent) { var Trigger = /*#__PURE__*/ function (_React$Component) { _inherits(Trigger, _React$Component); function Trigger(props) { var _this; _classCallCheck(this, Trigger); _this = _possibleConstructorReturn(this, _getPrototypeOf(Trigger).call(this, props)); _this.popupRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.createRef(); _this.triggerRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.createRef(); _this.onMouseEnter = function (e) { var mouseEnterDelay = _this.props.mouseEnterDelay; _this.fireEvents('onMouseEnter', e); _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e); }; _this.onMouseMove = function (e) { _this.fireEvents('onMouseMove', e); _this.setPoint(e); }; _this.onMouseLeave = function (e) { _this.fireEvents('onMouseLeave', e); _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay); }; _this.onPopupMouseEnter = function () { _this.clearDelayTimer(); }; _this.onPopupMouseLeave = function (e) { // https://github.com/react-component/trigger/pull/13 // react bug? if (e.relatedTarget && !e.relatedTarget.setTimeout && _this.popupRef.current && _this.popupRef.current.popupRef.current && Object(rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_2__["default"])(_this.popupRef.current.popupRef.current, e.relatedTarget)) { return; } _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay); }; _this.onFocus = function (e) { _this.fireEvents('onFocus', e); // incase focusin and focusout _this.clearDelayTimer(); if (_this.isFocusToShow()) { _this.focusTime = Date.now(); _this.delaySetPopupVisible(true, _this.props.focusDelay); } }; _this.onMouseDown = function (e) { _this.fireEvents('onMouseDown', e); _this.preClickTime = Date.now(); }; _this.onTouchStart = function (e) { _this.fireEvents('onTouchStart', e); _this.preTouchTime = Date.now(); }; _this.onBlur = function (e) { _this.fireEvents('onBlur', e); _this.clearDelayTimer(); if (_this.isBlurToHide()) { _this.delaySetPopupVisible(false, _this.props.blurDelay); } }; _this.onContextMenu = function (e) { e.preventDefault(); _this.fireEvents('onContextMenu', e); _this.setPopupVisible(true, e); }; _this.onContextMenuClose = function () { if (_this.isContextMenuToShow()) { _this.close(); } }; _this.onClick = function (event) { _this.fireEvents('onClick', event); // focus will trigger click if (_this.focusTime) { var preTime; if (_this.preClickTime && _this.preTouchTime) { preTime = Math.min(_this.preClickTime, _this.preTouchTime); } else if (_this.preClickTime) { preTime = _this.preClickTime; } else if (_this.preTouchTime) { preTime = _this.preTouchTime; } if (Math.abs(preTime - _this.focusTime) < 20) { return; } _this.focusTime = 0; } _this.preClickTime = 0; _this.preTouchTime = 0; // Only prevent default when all the action is click. // https://github.com/ant-design/ant-design/issues/17043 // https://github.com/ant-design/ant-design/issues/17291 if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) { event.preventDefault(); } var nextVisible = !_this.state.popupVisible; if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) { _this.setPopupVisible(!_this.state.popupVisible, event); } }; _this.onPopupMouseDown = function () { _this.hasPopupMouseDown = true; clearTimeout(_this.mouseDownTimeout); _this.mouseDownTimeout = window.setTimeout(function () { _this.hasPopupMouseDown = false; }, 0); if (_this.context) { var _this$context; (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments); } }; _this.onDocumentClick = function (event) { if (_this.props.mask && !_this.props.maskClosable) { return; } var target = event.target; var root = _this.getRootDomNode(); var popupNode = _this.getPopupDomNode(); if (!Object(rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_2__["default"])(root, target) && !Object(rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_2__["default"])(popupNode, target) && !_this.hasPopupMouseDown) { _this.close(); } }; _this.getRootDomNode = function () { var getTriggerDOMNode = _this.props.getTriggerDOMNode; if (getTriggerDOMNode) { return getTriggerDOMNode(_this.triggerRef.current); } try { var domNode = Object(rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_3__["default"])(_this.triggerRef.current); if (domNode) { return domNode; } } catch (err) {// Do nothing } return react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.findDOMNode(_assertThisInitialized(_this)); }; _this.getPopupClassNameFromAlign = function (align) { var className = []; var _this$props = _this.props, popupPlacement = _this$props.popupPlacement, builtinPlacements = _this$props.builtinPlacements, prefixCls = _this$props.prefixCls, alignPoint = _this$props.alignPoint, getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign; if (popupPlacement && builtinPlacements) { className.push(Object(_utils_alignUtil__WEBPACK_IMPORTED_MODULE_8__["getAlignPopupClassName"])(builtinPlacements, prefixCls, align, alignPoint)); } if (getPopupClassNameFromAlign) { className.push(getPopupClassNameFromAlign(align)); } return className.join(' '); }; _this.getComponent = function () { var _this$props2 = _this.props, prefixCls = _this$props2.prefixCls, destroyPopupOnHide = _this$props2.destroyPopupOnHide, popupClassName = _this$props2.popupClassName, onPopupAlign = _this$props2.onPopupAlign, popupMotion = _this$props2.popupMotion, popupAnimation = _this$props2.popupAnimation, popupTransitionName = _this$props2.popupTransitionName, popupStyle = _this$props2.popupStyle, mask = _this$props2.mask, maskAnimation = _this$props2.maskAnimation, maskTransitionName = _this$props2.maskTransitionName, maskMotion = _this$props2.maskMotion, zIndex = _this$props2.zIndex, popup = _this$props2.popup, stretch = _this$props2.stretch, alignPoint = _this$props2.alignPoint; var _this$state = _this.state, popupVisible = _this$state.popupVisible, point = _this$state.point; var align = _this.getPopupAlign(); var mouseProps = {}; if (_this.isMouseEnterToShow()) { mouseProps.onMouseEnter = _this.onPopupMouseEnter; } if (_this.isMouseLeaveToHide()) { mouseProps.onMouseLeave = _this.onPopupMouseLeave; } mouseProps.onMouseDown = _this.onPopupMouseDown; mouseProps.onTouchStart = _this.onPopupMouseDown; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Popup__WEBPACK_IMPORTED_MODULE_9__["default"], Object.assign({ prefixCls: prefixCls, destroyPopupOnHide: destroyPopupOnHide, visible: popupVisible, point: alignPoint && point, className: popupClassName, align: align, onAlign: onPopupAlign, animation: popupAnimation, getClassNameFromAlign: _this.getPopupClassNameFromAlign }, mouseProps, { stretch: stretch, getRootDomNode: _this.getRootDomNode, style: popupStyle, mask: mask, zIndex: zIndex, transitionName: popupTransitionName, maskAnimation: maskAnimation, maskTransitionName: maskTransitionName, maskMotion: maskMotion, ref: _this.popupRef, motion: popupMotion }), typeof popup === 'function' ? popup() : popup); }; _this.getContainer = function () { var _assertThisInitialize = _assertThisInitialized(_this), props = _assertThisInitialize.props; var popupContainer = document.createElement('div'); // Make sure default popup container will never cause scrollbar appearing // https://github.com/react-component/trigger/issues/41 popupContainer.style.position = 'absolute'; popupContainer.style.top = '0'; popupContainer.style.left = '0'; popupContainer.style.width = '100%'; var mountNode = props.getPopupContainer ? props.getPopupContainer(_this.getRootDomNode()) : props.getDocument().body; mountNode.appendChild(popupContainer); return popupContainer; }; _this.setPoint = function (point) { var alignPoint = _this.props.alignPoint; if (!alignPoint || !point) return; _this.setState({ point: { pageX: point.pageX, pageY: point.pageY } }); }; _this.handlePortalUpdate = function () { if (_this.state.prevPopupVisible !== _this.state.popupVisible) { _this.props.afterPopupVisibleChange(_this.state.popupVisible); } }; var popupVisible; if ('popupVisible' in props) { popupVisible = !!props.popupVisible; } else { popupVisible = !!props.defaultPopupVisible; } _this.state = { prevPopupVisible: popupVisible, popupVisible: popupVisible }; ALL_HANDLERS.forEach(function (h) { _this["fire".concat(h)] = function (e) { _this.fireEvents(h, e); }; }); return _this; } _createClass(Trigger, [{ key: "componentDidMount", value: function componentDidMount() { this.componentDidUpdate(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { var props = this.props; var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case: // https://github.com/ant-design/ant-design/issues/5804 // https://github.com/react-component/calendar/issues/250 // https://github.com/react-component/trigger/issues/50 if (state.popupVisible) { var currentDocument; if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) { currentDocument = props.getDocument(); this.clickOutsideHandler = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_5__["default"])(currentDocument, 'mousedown', this.onDocumentClick); } // always hide on mobile if (!this.touchOutsideHandler) { currentDocument = currentDocument || props.getDocument(); this.touchOutsideHandler = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_5__["default"])(currentDocument, 'touchstart', this.onDocumentClick); } // close popup when trigger type contains 'onContextMenu' and document is scrolling. if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) { currentDocument = currentDocument || props.getDocument(); this.contextMenuOutsideHandler1 = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_5__["default"])(currentDocument, 'scroll', this.onContextMenuClose); } // close popup when trigger type contains 'onContextMenu' and window is blur. if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) { this.contextMenuOutsideHandler2 = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_5__["default"])(window, 'blur', this.onContextMenuClose); } return; } this.clearOutsideHandler(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.clearDelayTimer(); this.clearOutsideHandler(); clearTimeout(this.mouseDownTimeout); } }, { key: "getPopupDomNode", value: function getPopupDomNode() { // for test if (this.popupRef.current && this.popupRef.current.popupRef.current) { return this.popupRef.current.popupRef.current; } return null; } }, { key: "getPopupAlign", value: function getPopupAlign() { var props = this.props; var popupPlacement = props.popupPlacement, popupAlign = props.popupAlign, builtinPlacements = props.builtinPlacements; if (popupPlacement && builtinPlacements) { return Object(_utils_alignUtil__WEBPACK_IMPORTED_MODULE_8__["getAlignFromPlacement"])(builtinPlacements, popupPlacement, popupAlign); } return popupAlign; } /** * @param popupVisible Show or not the popup element * @param event SyntheticEvent, used for `pointAlign` */ }, { key: "setPopupVisible", value: function setPopupVisible(popupVisible, event) { var alignPoint = this.props.alignPoint; var prevPopupVisible = this.state.popupVisible; this.clearDelayTimer(); if (prevPopupVisible !== popupVisible) { if (!('popupVisible' in this.props)) { this.setState({ popupVisible: popupVisible, prevPopupVisible: prevPopupVisible }); } this.props.onPopupVisibleChange(popupVisible); } // Always record the point position since mouseEnterDelay will delay the show if (alignPoint && event) { this.setPoint(event); } } }, { key: "delaySetPopupVisible", value: function delaySetPopupVisible(visible, delayS, event) { var _this2 = this; var delay = delayS * 1000; this.clearDelayTimer(); if (delay) { var point = event ? { pageX: event.pageX, pageY: event.pageY } : null; this.delayTimer = window.setTimeout(function () { _this2.setPopupVisible(visible, point); _this2.clearDelayTimer(); }, delay); } else { this.setPopupVisible(visible, event); } } }, { key: "clearDelayTimer", value: function clearDelayTimer() { if (this.delayTimer) { clearTimeout(this.delayTimer); this.delayTimer = null; } } }, { key: "clearOutsideHandler", value: function clearOutsideHandler() { if (this.clickOutsideHandler) { this.clickOutsideHandler.remove(); this.clickOutsideHandler = null; } if (this.contextMenuOutsideHandler1) { this.contextMenuOutsideHandler1.remove(); this.contextMenuOutsideHandler1 = null; } if (this.contextMenuOutsideHandler2) { this.contextMenuOutsideHandler2.remove(); this.contextMenuOutsideHandler2 = null; } if (this.touchOutsideHandler) { this.touchOutsideHandler.remove(); this.touchOutsideHandler = null; } } }, { key: "createTwoChains", value: function createTwoChains(event) { var childPros = this.props.children.props; var props = this.props; if (childPros[event] && props[event]) { return this["fire".concat(event)]; } return childPros[event] || props[event]; } }, { key: "isClickToShow", value: function isClickToShow() { var _this$props3 = this.props, action = _this$props3.action, showAction = _this$props3.showAction; return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1; } }, { key: "isContextMenuToShow", value: function isContextMenuToShow() { var _this$props4 = this.props, action = _this$props4.action, showAction = _this$props4.showAction; return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1; } }, { key: "isClickToHide", value: function isClickToHide() { var _this$props5 = this.props, action = _this$props5.action, hideAction = _this$props5.hideAction; return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1; } }, { key: "isMouseEnterToShow", value: function isMouseEnterToShow() { var _this$props6 = this.props, action = _this$props6.action, showAction = _this$props6.showAction; return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1; } }, { key: "isMouseLeaveToHide", value: function isMouseLeaveToHide() { var _this$props7 = this.props, action = _this$props7.action, hideAction = _this$props7.hideAction; return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1; } }, { key: "isFocusToShow", value: function isFocusToShow() { var _this$props8 = this.props, action = _this$props8.action, showAction = _this$props8.showAction; return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1; } }, { key: "isBlurToHide", value: function isBlurToHide() { var _this$props9 = this.props, action = _this$props9.action, hideAction = _this$props9.hideAction; return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1; } }, { key: "forcePopupAlign", value: function forcePopupAlign() { if (this.state.popupVisible && this.popupRef.current && this.popupRef.current.alignRef.current) { this.popupRef.current.alignRef.current.forceAlign(); } } }, { key: "fireEvents", value: function fireEvents(type, e) { var childCallback = this.props.children.props[type]; if (childCallback) { childCallback(e); } var callback = this.props[type]; if (callback) { callback(e); } } }, { key: "close", value: function close() { this.setPopupVisible(false); } }, { key: "render", value: function render() { var popupVisible = this.state.popupVisible; var _this$props10 = this.props, children = _this$props10.children, forceRender = _this$props10.forceRender, alignPoint = _this$props10.alignPoint, className = _this$props10.className; var child = react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.only(children); var newChildProps = { key: 'trigger' }; if (this.isContextMenuToShow()) { newChildProps.onContextMenu = this.onContextMenu; } else { newChildProps.onContextMenu = this.createTwoChains('onContextMenu'); } if (this.isClickToHide() || this.isClickToShow()) { newChildProps.onClick = this.onClick; newChildProps.onMouseDown = this.onMouseDown; newChildProps.onTouchStart = this.onTouchStart; } else { newChildProps.onClick = this.createTwoChains('onClick'); newChildProps.onMouseDown = this.createTwoChains('onMouseDown'); newChildProps.onTouchStart = this.createTwoChains('onTouchStart'); } if (this.isMouseEnterToShow()) { newChildProps.onMouseEnter = this.onMouseEnter; if (alignPoint) { newChildProps.onMouseMove = this.onMouseMove; } } else { newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter'); } if (this.isMouseLeaveToHide()) { newChildProps.onMouseLeave = this.onMouseLeave; } else { newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave'); } if (this.isFocusToShow() || this.isBlurToHide()) { newChildProps.onFocus = this.onFocus; newChildProps.onBlur = this.onBlur; } else { newChildProps.onFocus = this.createTwoChains('onFocus'); newChildProps.onBlur = this.createTwoChains('onBlur'); } var childrenClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(child && child.props && child.props.className, className); if (childrenClassName) { newChildProps.className = childrenClassName; } var trigger = react__WEBPACK_IMPORTED_MODULE_0___default.a.cloneElement(child, _objectSpread({}, newChildProps, { ref: Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_4__["composeRef"])(this.triggerRef, child.ref) })); var portal; // prevent unmounting after it's rendered if (popupVisible || this.popupRef.current || forceRender) { portal = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(PortalComponent, { key: "portal", getContainer: this.getContainer, didUpdate: this.handlePortalUpdate }, this.getComponent()); } return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_context__WEBPACK_IMPORTED_MODULE_10__["default"].Provider, { value: { onPopupMouseDown: this.onPopupMouseDown } }, trigger, portal); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(_ref, prevState) { var popupVisible = _ref.popupVisible; var newState = {}; if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) { newState.popupVisible = popupVisible; newState.prevPopupVisible = prevState.popupVisible; } return newState; } }]); return Trigger; }(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component); Trigger.contextType = _context__WEBPACK_IMPORTED_MODULE_10__["default"]; Trigger.defaultProps = { prefixCls: 'rc-trigger-popup', getPopupClassNameFromAlign: returnEmptyString, getDocument: returnDocument, onPopupVisibleChange: noop, afterPopupVisibleChange: noop, onPopupAlign: noop, popupClassName: '', mouseEnterDelay: 0, mouseLeaveDelay: 0.1, focusDelay: 0, blurDelay: 0.15, popupStyle: {}, destroyPopupOnHide: false, popupAlign: {}, defaultPopupVisible: false, mask: false, maskClosable: true, action: [], showAction: [], hideAction: [] }; return Trigger; } /* harmony default export */ __webpack_exports__["default"] = (generateTrigger(rc_util_es_Portal__WEBPACK_IMPORTED_MODULE_6__["default"])); /***/ }), /***/ "./node_modules/rc-trigger/es/utils/alignUtil.js": /*!*******************************************************!*\ !*** ./node_modules/rc-trigger/es/utils/alignUtil.js ***! \*******************************************************/ /*! exports provided: getAlignFromPlacement, getAlignPopupClassName */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAlignFromPlacement", function() { return getAlignFromPlacement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAlignPopupClassName", function() { return getAlignPopupClassName; }); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function isPointsEq(a1, a2, isAlignPoint) { if (isAlignPoint) { return a1[0] === a2[0]; } return a1[0] === a2[0] && a1[1] === a2[1]; } function getAlignFromPlacement(builtinPlacements, placementStr, align) { var baseAlign = builtinPlacements[placementStr] || {}; return _objectSpread({}, baseAlign, {}, align); } function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) { var points = align.points; var placements = Object.keys(builtinPlacements); for (var i = 0; i < placements.length; i += 1) { var placement = placements[i]; if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) { return "".concat(prefixCls, "-placement-").concat(placement); } } return ''; } /***/ }), /***/ "./node_modules/rc-trigger/es/utils/legacyUtil.js": /*!********************************************************!*\ !*** ./node_modules/rc-trigger/es/utils/legacyUtil.js ***! \********************************************************/ /*! exports provided: getMotion */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMotion", function() { return getMotion; }); function getMotion(_ref) { var prefixCls = _ref.prefixCls, motion = _ref.motion, animation = _ref.animation, transitionName = _ref.transitionName; if (motion) { return motion; } if (animation) { return { motionName: "".concat(prefixCls, "-").concat(animation) }; } if (transitionName) { return { motionName: transitionName }; } return null; } /***/ }), /***/ "./node_modules/rc-util/es/Dom/addEventListener.js": /*!*********************************************************!*\ !*** ./node_modules/rc-util/es/Dom/addEventListener.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addEventListenerWrap; }); /* harmony import */ var add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! add-dom-event-listener */ "./node_modules/add-dom-event-listener/lib/index.js"); /* harmony import */ var add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); function addEventListenerWrap(target, eventType, cb, option) { /* eslint camelcase: 2 */ var callback = react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.unstable_batchedUpdates ? function run(e) { react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.unstable_batchedUpdates(cb, e); } : cb; return add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0___default()(target, eventType, callback, option); } /***/ }), /***/ "./node_modules/rc-util/es/Dom/contains.js": /*!*************************************************!*\ !*** ./node_modules/rc-util/es/Dom/contains.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return contains; }); function contains(root, n) { var node = n; while (node) { if (node === root) { return true; } node = node.parentNode; } return false; } /***/ }), /***/ "./node_modules/rc-util/es/Dom/findDOMNode.js": /*!****************************************************!*\ !*** ./node_modules/rc-util/es/Dom/findDOMNode.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return findDOMNode; }); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__); /** * Return if a node is a DOM node. Else will return by `findDOMNode` */ function findDOMNode(node) { if (node instanceof HTMLElement) { return node; } return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node); } /***/ }), /***/ "./node_modules/rc-util/es/KeyCode.js": /*!********************************************!*\ !*** ./node_modules/rc-util/es/KeyCode.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * @ignore * some key-codes definition and utils from closure-library * @author yiminghe@gmail.com */ var KeyCode = { /** * MAC_ENTER */ MAC_ENTER: 3, /** * BACKSPACE */ BACKSPACE: 8, /** * TAB */ TAB: 9, /** * NUMLOCK on FF/Safari Mac */ NUM_CENTER: 12, /** * ENTER */ ENTER: 13, /** * SHIFT */ SHIFT: 16, /** * CTRL */ CTRL: 17, /** * ALT */ ALT: 18, /** * PAUSE */ PAUSE: 19, /** * CAPS_LOCK */ CAPS_LOCK: 20, /** * ESC */ ESC: 27, /** * SPACE */ SPACE: 32, /** * PAGE_UP */ PAGE_UP: 33, /** * PAGE_DOWN */ PAGE_DOWN: 34, /** * END */ END: 35, /** * HOME */ HOME: 36, /** * LEFT */ LEFT: 37, /** * UP */ UP: 38, /** * RIGHT */ RIGHT: 39, /** * DOWN */ DOWN: 40, /** * PRINT_SCREEN */ PRINT_SCREEN: 44, /** * INSERT */ INSERT: 45, /** * DELETE */ DELETE: 46, /** * ZERO */ ZERO: 48, /** * ONE */ ONE: 49, /** * TWO */ TWO: 50, /** * THREE */ THREE: 51, /** * FOUR */ FOUR: 52, /** * FIVE */ FIVE: 53, /** * SIX */ SIX: 54, /** * SEVEN */ SEVEN: 55, /** * EIGHT */ EIGHT: 56, /** * NINE */ NINE: 57, /** * QUESTION_MARK */ QUESTION_MARK: 63, /** * A */ A: 65, /** * B */ B: 66, /** * C */ C: 67, /** * D */ D: 68, /** * E */ E: 69, /** * F */ F: 70, /** * G */ G: 71, /** * H */ H: 72, /** * I */ I: 73, /** * J */ J: 74, /** * K */ K: 75, /** * L */ L: 76, /** * M */ M: 77, /** * N */ N: 78, /** * O */ O: 79, /** * P */ P: 80, /** * Q */ Q: 81, /** * R */ R: 82, /** * S */ S: 83, /** * T */ T: 84, /** * U */ U: 85, /** * V */ V: 86, /** * W */ W: 87, /** * X */ X: 88, /** * Y */ Y: 89, /** * Z */ Z: 90, /** * META */ META: 91, /** * WIN_KEY_RIGHT */ WIN_KEY_RIGHT: 92, /** * CONTEXT_MENU */ CONTEXT_MENU: 93, /** * NUM_ZERO */ NUM_ZERO: 96, /** * NUM_ONE */ NUM_ONE: 97, /** * NUM_TWO */ NUM_TWO: 98, /** * NUM_THREE */ NUM_THREE: 99, /** * NUM_FOUR */ NUM_FOUR: 100, /** * NUM_FIVE */ NUM_FIVE: 101, /** * NUM_SIX */ NUM_SIX: 102, /** * NUM_SEVEN */ NUM_SEVEN: 103, /** * NUM_EIGHT */ NUM_EIGHT: 104, /** * NUM_NINE */ NUM_NINE: 105, /** * NUM_MULTIPLY */ NUM_MULTIPLY: 106, /** * NUM_PLUS */ NUM_PLUS: 107, /** * NUM_MINUS */ NUM_MINUS: 109, /** * NUM_PERIOD */ NUM_PERIOD: 110, /** * NUM_DIVISION */ NUM_DIVISION: 111, /** * F1 */ F1: 112, /** * F2 */ F2: 113, /** * F3 */ F3: 114, /** * F4 */ F4: 115, /** * F5 */ F5: 116, /** * F6 */ F6: 117, /** * F7 */ F7: 118, /** * F8 */ F8: 119, /** * F9 */ F9: 120, /** * F10 */ F10: 121, /** * F11 */ F11: 122, /** * F12 */ F12: 123, /** * NUMLOCK */ NUMLOCK: 144, /** * SEMICOLON */ SEMICOLON: 186, /** * DASH */ DASH: 189, /** * EQUALS */ EQUALS: 187, /** * COMMA */ COMMA: 188, /** * PERIOD */ PERIOD: 190, /** * SLASH */ SLASH: 191, /** * APOSTROPHE */ APOSTROPHE: 192, /** * SINGLE_QUOTE */ SINGLE_QUOTE: 222, /** * OPEN_SQUARE_BRACKET */ OPEN_SQUARE_BRACKET: 219, /** * BACKSLASH */ BACKSLASH: 220, /** * CLOSE_SQUARE_BRACKET */ CLOSE_SQUARE_BRACKET: 221, /** * WIN_KEY */ WIN_KEY: 224, /** * MAC_FF_META */ MAC_FF_META: 224, /** * WIN_IME */ WIN_IME: 229, // ======================== Function ======================== /** * whether text and modified key is entered at the same time. */ isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) { var keyCode = e.keyCode; if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) { return false; } // The following keys are quite harmless, even in combination with // CTRL, ALT or SHIFT. switch (keyCode) { case KeyCode.ALT: case KeyCode.CAPS_LOCK: case KeyCode.CONTEXT_MENU: case KeyCode.CTRL: case KeyCode.DOWN: case KeyCode.END: case KeyCode.ESC: case KeyCode.HOME: case KeyCode.INSERT: case KeyCode.LEFT: case KeyCode.MAC_FF_META: case KeyCode.META: case KeyCode.NUMLOCK: case KeyCode.NUM_CENTER: case KeyCode.PAGE_DOWN: case KeyCode.PAGE_UP: case KeyCode.PAUSE: case KeyCode.PRINT_SCREEN: case KeyCode.RIGHT: case KeyCode.SHIFT: case KeyCode.UP: case KeyCode.WIN_KEY: case KeyCode.WIN_KEY_RIGHT: return false; default: return true; } }, /** * whether character is entered. */ isCharacterKey: function isCharacterKey(keyCode) { if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) { return true; } if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) { return true; } if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) { return true; } // Safari sends zero key code for non-latin characters. if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) { return true; } switch (keyCode) { case KeyCode.SPACE: case KeyCode.QUESTION_MARK: case KeyCode.NUM_PLUS: case KeyCode.NUM_MINUS: case KeyCode.NUM_PERIOD: case KeyCode.NUM_DIVISION: case KeyCode.SEMICOLON: case KeyCode.DASH: case KeyCode.EQUALS: case KeyCode.COMMA: case KeyCode.PERIOD: case KeyCode.SLASH: case KeyCode.APOSTROPHE: case KeyCode.SINGLE_QUOTE: case KeyCode.OPEN_SQUARE_BRACKET: case KeyCode.BACKSLASH: case KeyCode.CLOSE_SQUARE_BRACKET: return true; default: return false; } } }; /* harmony default export */ __webpack_exports__["default"] = (KeyCode); /***/ }), /***/ "./node_modules/rc-util/es/Portal.js": /*!*******************************************!*\ !*** ./node_modules/rc-util/es/Portal.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Portal; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var Portal = /*#__PURE__*/ function (_React$Component) { _inherits(Portal, _React$Component); function Portal() { _classCallCheck(this, Portal); return _possibleConstructorReturn(this, _getPrototypeOf(Portal).apply(this, arguments)); } _createClass(Portal, [{ key: "componentDidMount", value: function componentDidMount() { this.createContainer(); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var didUpdate = this.props.didUpdate; if (didUpdate) { didUpdate(prevProps); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.removeContainer(); } }, { key: "createContainer", value: function createContainer() { this._container = this.props.getContainer(); this.forceUpdate(); } }, { key: "removeContainer", value: function removeContainer() { if (this._container) { this._container.parentNode.removeChild(this._container); } } }, { key: "render", value: function render() { if (this._container) { return react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.createPortal(this.props.children, this._container); } return null; } }]); return Portal; }(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component); Portal.propTypes = { getContainer: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func.isRequired, children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node.isRequired, didUpdate: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func }; /***/ }), /***/ "./node_modules/rc-util/es/ref.js": /*!****************************************!*\ !*** ./node_modules/rc-util/es/ref.js ***! \****************************************/ /*! exports provided: fillRef, composeRef, supportRef */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fillRef", function() { return fillRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "composeRef", function() { return composeRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportRef", function() { return supportRef; }); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function fillRef(ref, node) { if (typeof ref === 'function') { ref(node); } else if (_typeof(ref) === 'object' && ref && 'current' in ref) { ref.current = node; } } /** * Merge refs into one ref function to support ref passing. */ function composeRef() { for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) { refs[_key] = arguments[_key]; } return function (node) { refs.forEach(function (ref) { fillRef(ref, node); }); }; } function supportRef(nodeOrComponent) { // Function component node if (nodeOrComponent.type && nodeOrComponent.type.prototype && !nodeOrComponent.type.prototype.render) { return false; } // Class component if (typeof nodeOrComponent === 'function' && nodeOrComponent.prototype && !nodeOrComponent.prototype.render) { return false; } return true; } /* eslint-enable */ /***/ }), /***/ "./node_modules/react-is/cjs/react-is.development.js": /*!***********************************************************!*\ !*** ./node_modules/react-is/cjs/react-is.development.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @license React v16.8.6 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (true) { (function() { 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); // The Symbol used to tag the ReactElement-like types. If there is no native Symbol // nor polyfill, then a plain number is used for performance. var hasSymbol = typeof Symbol === 'function' && Symbol.for; var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; function isValidElementType(type) { return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE); } /** * Forked from fbjs/warning: * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js * * Only change is we use console.warn instead of console.error, * and do nothing when 'console' is not supported. * This really simplifies the code. * --- * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var lowPriorityWarning = function () {}; { var printWarning = function (format) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.warn(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; lowPriorityWarning = function (condition, format) { if (format === undefined) { throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (!condition) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } printWarning.apply(undefined, [format].concat(args)); } }; } var lowPriorityWarning$1 = lowPriorityWarning; function typeOf(object) { if (typeof object === 'object' && object !== null) { var $$typeof = object.$$typeof; switch ($$typeof) { case REACT_ELEMENT_TYPE: var type = object.type; switch (type) { case REACT_ASYNC_MODE_TYPE: case REACT_CONCURRENT_MODE_TYPE: case REACT_FRAGMENT_TYPE: case REACT_PROFILER_TYPE: case REACT_STRICT_MODE_TYPE: case REACT_SUSPENSE_TYPE: return type; default: var $$typeofType = type && type.$$typeof; switch ($$typeofType) { case REACT_CONTEXT_TYPE: case REACT_FORWARD_REF_TYPE: case REACT_PROVIDER_TYPE: return $$typeofType; default: return $$typeof; } } case REACT_LAZY_TYPE: case REACT_MEMO_TYPE: case REACT_PORTAL_TYPE: return $$typeof; } } return undefined; } // AsyncMode is deprecated along with isAsyncMode var AsyncMode = REACT_ASYNC_MODE_TYPE; var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; var ContextConsumer = REACT_CONTEXT_TYPE; var ContextProvider = REACT_PROVIDER_TYPE; var Element = REACT_ELEMENT_TYPE; var ForwardRef = REACT_FORWARD_REF_TYPE; var Fragment = REACT_FRAGMENT_TYPE; var Lazy = REACT_LAZY_TYPE; var Memo = REACT_MEMO_TYPE; var Portal = REACT_PORTAL_TYPE; var Profiler = REACT_PROFILER_TYPE; var StrictMode = REACT_STRICT_MODE_TYPE; var Suspense = REACT_SUSPENSE_TYPE; var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated function isAsyncMode(object) { { if (!hasWarnedAboutDeprecatedIsAsyncMode) { hasWarnedAboutDeprecatedIsAsyncMode = true; lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); } } return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; } function isConcurrentMode(object) { return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; } function isContextConsumer(object) { return typeOf(object) === REACT_CONTEXT_TYPE; } function isContextProvider(object) { return typeOf(object) === REACT_PROVIDER_TYPE; } function isElement(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } function isForwardRef(object) { return typeOf(object) === REACT_FORWARD_REF_TYPE; } function isFragment(object) { return typeOf(object) === REACT_FRAGMENT_TYPE; } function isLazy(object) { return typeOf(object) === REACT_LAZY_TYPE; } function isMemo(object) { return typeOf(object) === REACT_MEMO_TYPE; } function isPortal(object) { return typeOf(object) === REACT_PORTAL_TYPE; } function isProfiler(object) { return typeOf(object) === REACT_PROFILER_TYPE; } function isStrictMode(object) { return typeOf(object) === REACT_STRICT_MODE_TYPE; } function isSuspense(object) { return typeOf(object) === REACT_SUSPENSE_TYPE; } exports.typeOf = typeOf; exports.AsyncMode = AsyncMode; exports.ConcurrentMode = ConcurrentMode; exports.ContextConsumer = ContextConsumer; exports.ContextProvider = ContextProvider; exports.Element = Element; exports.ForwardRef = ForwardRef; exports.Fragment = Fragment; exports.Lazy = Lazy; exports.Memo = Memo; exports.Portal = Portal; exports.Profiler = Profiler; exports.StrictMode = StrictMode; exports.Suspense = Suspense; exports.isValidElementType = isValidElementType; exports.isAsyncMode = isAsyncMode; exports.isConcurrentMode = isConcurrentMode; exports.isContextConsumer = isContextConsumer; exports.isContextProvider = isContextProvider; exports.isElement = isElement; exports.isForwardRef = isForwardRef; exports.isFragment = isFragment; exports.isLazy = isLazy; exports.isMemo = isMemo; exports.isPortal = isPortal; exports.isProfiler = isProfiler; exports.isStrictMode = isStrictMode; exports.isSuspense = isSuspense; })(); } /***/ }), /***/ "./node_modules/react-is/index.js": /*!****************************************!*\ !*** ./node_modules/react-is/index.js ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; if (false) {} else { module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js"); } /***/ }), /***/ "./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js": /*!****************************************************************************!*\ !*** ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js ***! \****************************************************************************/ /*! exports provided: polyfill */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyfill", function() { return polyfill; }); /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ function componentWillMount() { // Call this.constructor.gDSFP to support sub-classes. var state = this.constructor.getDerivedStateFromProps(this.props, this.state); if (state !== null && state !== undefined) { this.setState(state); } } function componentWillReceiveProps(nextProps) { // Call this.constructor.gDSFP to support sub-classes. // Use the setState() updater to ensure state isn't stale in certain edge cases. function updater(prevState) { var state = this.constructor.getDerivedStateFromProps(nextProps, prevState); return state !== null && state !== undefined ? state : null; } // Binding "this" is important for shallow renderer support. this.setState(updater.bind(this)); } function componentWillUpdate(nextProps, nextState) { try { var prevProps = this.props; var prevState = this.state; this.props = nextProps; this.state = nextState; this.__reactInternalSnapshotFlag = true; this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate( prevProps, prevState ); } finally { this.props = prevProps; this.state = prevState; } } // React may warn about cWM/cWRP/cWU methods being deprecated. // Add a flag to suppress these warnings for this special case. componentWillMount.__suppressDeprecationWarning = true; componentWillReceiveProps.__suppressDeprecationWarning = true; componentWillUpdate.__suppressDeprecationWarning = true; function polyfill(Component) { var prototype = Component.prototype; if (!prototype || !prototype.isReactComponent) { throw new Error('Can only polyfill class components'); } if ( typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function' ) { return Component; } // If new component APIs are defined, "unsafe" lifecycles won't be called. // Error if any of these lifecycles are present, // Because they would work differently between older and newer (16.3+) versions of React. var foundWillMountName = null; var foundWillReceivePropsName = null; var foundWillUpdateName = null; if (typeof prototype.componentWillMount === 'function') { foundWillMountName = 'componentWillMount'; } else if (typeof prototype.UNSAFE_componentWillMount === 'function') { foundWillMountName = 'UNSAFE_componentWillMount'; } if (typeof prototype.componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'componentWillReceiveProps'; } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; } if (typeof prototype.componentWillUpdate === 'function') { foundWillUpdateName = 'componentWillUpdate'; } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') { foundWillUpdateName = 'UNSAFE_componentWillUpdate'; } if ( foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null ) { var componentName = Component.displayName || Component.name; var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()'; throw Error( 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks' ); } // React <= 16.2 does not support static getDerivedStateFromProps. // As a workaround, use cWM and cWRP to invoke the new static lifecycle. // Newer versions of React will ignore these lifecycles if gDSFP exists. if (typeof Component.getDerivedStateFromProps === 'function') { prototype.componentWillMount = componentWillMount; prototype.componentWillReceiveProps = componentWillReceiveProps; } // React <= 16.2 does not support getSnapshotBeforeUpdate. // As a workaround, use cWU to invoke the new lifecycle. // Newer versions of React will ignore that lifecycle if gSBU exists. if (typeof prototype.getSnapshotBeforeUpdate === 'function') { if (typeof prototype.componentDidUpdate !== 'function') { throw new Error( 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype' ); } prototype.componentWillUpdate = componentWillUpdate; var componentDidUpdate = prototype.componentDidUpdate; prototype.componentDidUpdate = function componentDidUpdatePolyfill( prevProps, prevState, maybeSnapshot ) { // 16.3+ will not execute our will-update method; // It will pass a snapshot value to did-update though. // Older versions will require our polyfilled will-update value. // We need to handle both cases, but can't just check for the presence of "maybeSnapshot", // Because for <= 15.x versions this might be a "prevContext" object. // We also can't just check "__reactInternalSnapshot", // Because get-snapshot might return a falsy value. // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior. var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot; componentDidUpdate.call(this, prevProps, prevState, snapshot); }; } return Component; } /***/ }), /***/ "./node_modules/react-numeric-input/index.js": /*!***************************************************!*\ !*** ./node_modules/react-numeric-input/index.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(2); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var KEYCODE_UP = 38; var KEYCODE_DOWN = 40; var IS_BROWSER = typeof document != 'undefined'; var RE_NUMBER = /^[+-]?((\.\d+)|(\d+(\.\d+)?))$/; var RE_INCOMPLETE_NUMBER = /^([+-]|\.0*|[+-]\.0*|[+-]?\d+\.)?$/; function addClass(element, className) { if (element.classList) { return element.classList.add(className); } if (!element.className.search(new RegExp("\\b" + className + "\\b"))) { element.className = " " + className; } } function removeClass(element, className) { if (element.className) { if (element.classList) { return element.classList.remove(className); } element.className = element.className.replace(new RegExp("\\b" + className + "\\b", "g"), ""); } } function access(object, prop, defaultValue) { var result = object[prop]; if (typeof result == "function") { for (var _len = arguments.length, args = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { args[_key - 3] = arguments[_key]; } result = result.apply(undefined, args); } return result === undefined ? defaultValue : result; } var NumericInput = function (_Component) { _inherits(NumericInput, _Component); function NumericInput() { var _ref; _classCallCheck(this, NumericInput); for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } var _this = _possibleConstructorReturn(this, (_ref = NumericInput.__proto__ || Object.getPrototypeOf(NumericInput)).call.apply(_ref, [this].concat(args))); _this._isStrict = !!_this.props.strict; _this.state = _extends({ btnDownHover: false, btnDownActive: false, btnUpHover: false, btnUpActive: false, stringValue: "" }, _this._propsToState(_this.props)); _this.stop = _this.stop.bind(_this); _this.onTouchEnd = _this.onTouchEnd.bind(_this); _this.refsInput = {}; _this.refsWrapper = {}; return _this; } _createClass(NumericInput, [{ key: '_propsToState', value: function _propsToState(props) { var out = {}; if (props.hasOwnProperty("value")) { out.stringValue = String(props.value || props.value === 0 ? props.value : '').trim(); out.value = out.stringValue !== '' ? this._parse(props.value) : null; } else if (!this._isMounted && props.hasOwnProperty("defaultValue")) { out.stringValue = String(props.defaultValue || props.defaultValue === 0 ? props.defaultValue : '').trim(); out.value = props.defaultValue !== '' ? this._parse(props.defaultValue) : null; } return out; } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(props) { var _this2 = this; this._isStrict = !!props.strict; var nextState = this._propsToState(props); if (Object.keys(nextState).length) { this._ignoreValueChange = true; this.setState(nextState, function () { _this2._ignoreValueChange = false; }); } } }, { key: 'componentWillUpdate', value: function componentWillUpdate() { this.saveSelection(); } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { if (!this._ignoreValueChange && prevState.value !== this.state.value && (!isNaN(this.state.value) || this.state.value === null)) { this._invokeEventCallback("onChange", this.state.value, this.refsInput.value, this.refsInput); } if (this._inputFocus) { this.refsInput.focus(); if (this.state.selectionStart || this.state.selectionStart === 0) { this.refsInput.selectionStart = this.state.selectionStart; } if (this.state.selectionEnd || this.state.selectionEnd === 0) { this.refsInput.selectionEnd = this.state.selectionEnd; } } this.checkValidity(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this._isMounted = false; this.stop(); } }, { key: 'componentDidMount', value: function componentDidMount() { var _this3 = this; this._isMounted = true; this.refsInput.getValueAsNumber = function () { return _this3.state.value || 0; }; this.refsInput.setValue = function (value) { _this3.setState({ value: _this3._parse(value), stringValue: value }); }; if (!this._inputFocus && IS_BROWSER && document.activeElement === this.refsInput) { this._inputFocus = true; this.refsInput.focus(); this._invokeEventCallback("onFocus", { target: this.refsInput, type: "focus" }); } this.checkValidity(); } }, { key: 'saveSelection', value: function saveSelection() { this.state.selectionStart = this.refsInput.selectionStart; this.state.selectionEnd = this.refsInput.selectionEnd; } }, { key: 'checkValidity', value: function checkValidity() { var valid = void 0, validationError = ""; var supportsValidation = !!this.refsInput.checkValidity; var noValidate = !!(this.props.noValidate && this.props.noValidate != "false"); this.refsInput.noValidate = noValidate; valid = noValidate || !supportsValidation; if (valid) { validationError = ""; } else { if (this.refsInput.pattern === "") { this.refsInput.pattern = this.props.required ? ".+" : ".*"; } if (supportsValidation) { this.refsInput.checkValidity(); valid = this.refsInput.validity.valid; if (!valid) { validationError = this.refsInput.validationMessage; } } if (valid && supportsValidation && this.props.maxLength) { if (this.refsInput.value.length > this.props.maxLength) { validationError = "This value is too long"; } } } validationError = validationError || (valid ? "" : this.refsInput.validationMessage || "Unknown Error"); var validStateChanged = this._valid !== validationError; this._valid = validationError; if (validationError) { addClass(this.refsWrapper, "has-error"); if (validStateChanged) { this._invokeEventCallback("onInvalid", validationError, this.state.value, this.refsInput.value); } } else { removeClass(this.refsWrapper, "has-error"); if (validStateChanged) { this._invokeEventCallback("onValid", this.state.value, this.refsInput.value); } } } }, { key: '_toNumber', value: function _toNumber(x) { var n = parseFloat(x); if (isNaN(n) || !isFinite(n)) { n = 0; } if (this._isStrict) { var precision = access(this.props, "precision", null, this); var q = Math.pow(10, precision === null ? 10 : precision); var _min = +access(this.props, "min", NumericInput.defaultProps.min, this); var _max = +access(this.props, "max", NumericInput.defaultProps.max, this); n = Math.min(Math.max(n, _min), _max); n = Math.round(n * q) / q; } return n; } }, { key: '_parse', value: function _parse(x) { x = String(x); if (typeof this.props.parse == 'function') { return parseFloat(this.props.parse(x)); } return parseFloat(x); } }, { key: '_format', value: function _format(n) { var _n = this._toNumber(n); var precision = access(this.props, "precision", null, this); if (precision !== null) { _n = n.toFixed(precision); } _n += ""; if (this.props.format) { return this.props.format(_n); } return _n; } }, { key: '_step', value: function _step(n, callback) { var _isStrict = this._isStrict; this._isStrict = true; var _step = +access(this.props, "step", NumericInput.defaultProps.step, this, n > 0 ? NumericInput.DIRECTION_UP : NumericInput.DIRECTION_DOWN); var _n = this._toNumber((this.state.value || 0) + _step * n); if (this.props.snap) { _n = Math.round(_n / _step) * _step; } this._isStrict = _isStrict; if (_n !== this.state.value) { this.setState({ value: _n, stringValue: _n + "" }, callback); return true; } return false; } }, { key: '_onKeyDown', value: function _onKeyDown() { for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { args[_key3] = arguments[_key3]; } args[0].persist(); this._invokeEventCallback.apply(this, ["onKeyDown"].concat(args)); var e = args[0]; if (!e.isDefaultPrevented()) { if (e.keyCode === KEYCODE_UP) { e.preventDefault(); this._step(e.ctrlKey || e.metaKey ? 0.1 : e.shiftKey ? 10 : 1); } else if (e.keyCode === KEYCODE_DOWN) { e.preventDefault(); this._step(e.ctrlKey || e.metaKey ? -0.1 : e.shiftKey ? -10 : -1); } else { var _value = this.refsInput.value, length = _value.length; if (e.keyCode === 8) { if (this.refsInput.selectionStart == this.refsInput.selectionEnd && this.refsInput.selectionEnd > 0 && _value.length && _value.charAt(this.refsInput.selectionEnd - 1) === ".") { e.preventDefault(); this.refsInput.selectionStart = this.refsInput.selectionEnd = this.refsInput.selectionEnd - 1; } } else if (e.keyCode === 46) { if (this.refsInput.selectionStart == this.refsInput.selectionEnd && this.refsInput.selectionEnd < length + 1 && _value.length && _value.charAt(this.refsInput.selectionEnd) === ".") { e.preventDefault(); this.refsInput.selectionStart = this.refsInput.selectionEnd = this.refsInput.selectionEnd + 1; } } } } } }, { key: 'stop', value: function stop() { if (this._timer) { clearTimeout(this._timer); } } }, { key: 'increase', value: function increase() { var _this4 = this; var _recursive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var callback = arguments[1]; this.stop(); this._step(1, callback); var _max = +access(this.props, "max", NumericInput.defaultProps.max, this); if (isNaN(this.state.value) || +this.state.value < _max) { this._timer = setTimeout(function () { _this4.increase(true); }, _recursive ? NumericInput.SPEED : NumericInput.DELAY); } } }, { key: 'decrease', value: function decrease() { var _this5 = this; var _recursive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var callback = arguments[1]; this.stop(); this._step(-1, callback); var _min = +access(this.props, "min", NumericInput.defaultProps.min, this); if (isNaN(this.state.value) || +this.state.value > _min) { this._timer = setTimeout(function () { _this5.decrease(true); }, _recursive ? NumericInput.SPEED : NumericInput.DELAY); } } }, { key: 'onMouseDown', value: function onMouseDown(dir, callback) { if (dir == 'down') { this.decrease(false, callback); } else if (dir == 'up') { this.increase(false, callback); } } }, { key: 'onTouchStart', value: function onTouchStart(dir, e) { e.preventDefault(); if (dir == 'down') { this.decrease(); } else if (dir == 'up') { this.increase(); } } }, { key: 'onTouchEnd', value: function onTouchEnd(e) { e.preventDefault(); this.stop(); } }, { key: '_invokeEventCallback', value: function _invokeEventCallback(callbackName) { if (typeof this.props[callbackName] == "function") { var _props$callbackName; for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { args[_key4 - 1] = arguments[_key4]; } (_props$callbackName = this.props[callbackName]).call.apply(_props$callbackName, [null].concat(args)); } } }, { key: 'render', value: function render() { var _this6 = this; var props = this.props; var state = this.state; var css = {}; var _props = this.props, step = _props.step, min = _props.min, max = _props.max, precision = _props.precision, parse = _props.parse, format = _props.format, mobile = _props.mobile, snap = _props.snap, componentClass = _props.componentClass, value = _props.value, type = _props.type, style = _props.style, defaultValue = _props.defaultValue, onInvalid = _props.onInvalid, onValid = _props.onValid, strict = _props.strict, noStyle = _props.noStyle, rest = _objectWithoutProperties(_props, ['step', 'min', 'max', 'precision', 'parse', 'format', 'mobile', 'snap', 'componentClass', 'value', 'type', 'style', 'defaultValue', 'onInvalid', 'onValid', 'strict', 'noStyle']); noStyle = noStyle || style === false; for (var x in NumericInput.style) { css[x] = _extends({}, NumericInput.style[x], style ? style[x] || {} : {}); } var hasFormControl = props.className && /\bform-control\b/.test(props.className); if (mobile == 'auto') { mobile = IS_BROWSER && 'ontouchstart' in document; } if (typeof mobile == "function") { mobile = mobile.call(this); } mobile = !!mobile; var attrs = { wrap: { style: noStyle ? null : css.wrap, className: 'react-numeric-input', ref: function ref(e) { if (e != null && e != undefined) { _this6.refsWrapper = e; } }, onMouseUp: undefined, onMouseLeave: undefined }, input: _extends({ ref: function ref(e) { if (e != null && e != undefined) { _this6.refsInput = e; } }, type: 'text', style: noStyle ? null : _extends({}, css.input, !hasFormControl ? css['input:not(.form-control)'] : {}, this._inputFocus ? css['input:focus'] : {}) }, rest), btnUp: { onMouseEnter: undefined, onMouseDown: undefined, onMouseUp: undefined, onMouseLeave: undefined, onTouchStart: undefined, onTouchEnd: undefined, style: noStyle ? null : _extends({}, css.btn, css.btnUp, props.disabled || props.readOnly ? css['btn:disabled'] : state.btnUpActive ? css['btn:active'] : state.btnUpHover ? css['btn:hover'] : {}) }, btnDown: { onMouseEnter: undefined, onMouseDown: undefined, onMouseUp: undefined, onMouseLeave: undefined, onTouchStart: undefined, onTouchEnd: undefined, style: noStyle ? null : _extends({}, css.btn, css.btnDown, props.disabled || props.readOnly ? css['btn:disabled'] : state.btnDownActive ? css['btn:active'] : state.btnDownHover ? css['btn:hover'] : {}) } }; var stringValue = String(state.stringValue || (state.value || state.value === 0 ? state.value : "") || ""); var loose = !this._isStrict && (this._inputFocus || !this._isMounted); if (loose && RE_INCOMPLETE_NUMBER.test(stringValue)) { attrs.input.value = stringValue; } else if (loose && stringValue && !RE_NUMBER.test(stringValue)) { attrs.input.value = stringValue; } else if (state.value || state.value === 0) { attrs.input.value = this._format(state.value); } else { attrs.input.value = ""; } if (hasFormControl && !noStyle) { _extends(attrs.wrap.style, css['wrap.hasFormControl']); } if (mobile && !noStyle) { _extends(attrs.input.style, css['input.mobile']); _extends(attrs.btnUp.style, css['btnUp.mobile']); _extends(attrs.btnDown.style, css['btnDown.mobile']); } if (!props.disabled && !props.readOnly) { _extends(attrs.wrap, { onMouseUp: this.stop, onMouseLeave: this.stop }); _extends(attrs.btnUp, { onTouchStart: this.onTouchStart.bind(this, 'up'), onTouchEnd: this.onTouchEnd, onMouseEnter: function onMouseEnter() { _this6.setState({ btnUpHover: true }); }, onMouseLeave: function onMouseLeave() { _this6.stop(); _this6.setState({ btnUpHover: false, btnUpActive: false }); }, onMouseUp: function onMouseUp() { _this6.setState({ btnUpHover: true, btnUpActive: false }); }, onMouseDown: function onMouseDown() { for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { args[_key5] = arguments[_key5]; } args[0].preventDefault(); args[0].persist(); _this6._inputFocus = true; _this6.setState({ btnUpHover: true, btnUpActive: true }, function () { _this6._invokeEventCallback.apply(_this6, ["onFocus"].concat(args)); _this6.onMouseDown('up'); }); } }); _extends(attrs.btnDown, { onTouchStart: this.onTouchStart.bind(this, 'down'), onTouchEnd: this.onTouchEnd, onMouseEnter: function onMouseEnter() { _this6.setState({ btnDownHover: true }); }, onMouseLeave: function onMouseLeave() { _this6.stop(); _this6.setState({ btnDownHover: false, btnDownActive: false }); }, onMouseUp: function onMouseUp() { _this6.setState({ btnDownHover: true, btnDownActive: false }); }, onMouseDown: function onMouseDown() { for (var _len6 = arguments.length, args = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { args[_key6] = arguments[_key6]; } args[0].preventDefault(); args[0].persist(); _this6._inputFocus = true; _this6.setState({ btnDownHover: true, btnDownActive: true }, function () { _this6._invokeEventCallback.apply(_this6, ["onFocus"].concat(args)); _this6.onMouseDown('down'); }); } }); _extends(attrs.input, { onChange: function onChange(e) { var original = e.target.value; var val = _this6._parse(original); if (isNaN(val)) { val = null; } _this6.setState({ value: _this6._isStrict ? _this6._toNumber(val) : val, stringValue: original }); }, onKeyDown: this._onKeyDown.bind(this), onInput: function onInput() { for (var _len7 = arguments.length, args = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { args[_key7] = arguments[_key7]; } _this6.saveSelection(); _this6._invokeEventCallback.apply(_this6, ["onInput"].concat(args)); }, onSelect: function onSelect() { for (var _len8 = arguments.length, args = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { args[_key8] = arguments[_key8]; } _this6.saveSelection(); _this6._invokeEventCallback.apply(_this6, ["onSelect"].concat(args)); }, onFocus: function onFocus() { for (var _len9 = arguments.length, args = Array(_len9), _key9 = 0; _key9 < _len9; _key9++) { args[_key9] = arguments[_key9]; } args[0].persist(); _this6._inputFocus = true; var val = _this6._parse(args[0].target.value); _this6.setState({ value: val, stringValue: val || val === 0 ? val + "" : "" }, function () { _this6._invokeEventCallback.apply(_this6, ["onFocus"].concat(args)); }); }, onBlur: function onBlur() { for (var _len10 = arguments.length, args = Array(_len10), _key10 = 0; _key10 < _len10; _key10++) { args[_key10] = arguments[_key10]; } var _isStrict = _this6._isStrict; _this6._isStrict = true; args[0].persist(); _this6._inputFocus = false; var val = _this6._parse(args[0].target.value); _this6.setState({ value: val }, function () { _this6._invokeEventCallback.apply(_this6, ["onBlur"].concat(args)); _this6._isStrict = _isStrict; }); } }); } else { if (!noStyle && props.disabled) { _extends(attrs.input.style, css['input:disabled']); } } var InputTag = componentClass || 'input'; if (mobile) { return _react2.default.createElement( 'span', attrs.wrap, _react2.default.createElement(InputTag, attrs.input), _react2.default.createElement( 'b', attrs.btnUp, _react2.default.createElement('i', { style: noStyle ? null : css.minus }), _react2.default.createElement('i', { style: noStyle ? null : css.plus }) ), _react2.default.createElement( 'b', attrs.btnDown, _react2.default.createElement('i', { style: noStyle ? null : css.minus }) ) ); } return _react2.default.createElement( 'span', attrs.wrap, _react2.default.createElement(InputTag, attrs.input), _react2.default.createElement( 'b', attrs.btnUp, _react2.default.createElement('i', { style: noStyle ? null : css.arrowUp }) ), _react2.default.createElement( 'b', attrs.btnDown, _react2.default.createElement('i', { style: noStyle ? null : css.arrowDown }) ) ); } }]); return NumericInput; }(_react.Component); NumericInput.propTypes = { step: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.func]), min: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.func]), max: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.func]), precision: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.func]), maxLength: _propTypes2.default.number, parse: _propTypes2.default.func, format: _propTypes2.default.func, className: _propTypes2.default.string, disabled: _propTypes2.default.bool, readOnly: _propTypes2.default.bool, required: _propTypes2.default.bool, snap: _propTypes2.default.bool, noValidate: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.string]), style: _propTypes2.default.oneOfType([_propTypes2.default.object, _propTypes2.default.bool]), noStyle: _propTypes2.default.bool, type: _propTypes2.default.string, pattern: _propTypes2.default.string, onFocus: _propTypes2.default.func, onBlur: _propTypes2.default.func, onKeyDown: _propTypes2.default.func, onChange: _propTypes2.default.func, onInvalid: _propTypes2.default.func, onValid: _propTypes2.default.func, onInput: _propTypes2.default.func, onSelect: _propTypes2.default.func, size: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]), value: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]), defaultValue: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]), strict: _propTypes2.default.bool, componentClass: _propTypes2.default.string, mobile: function mobile(props, propName) { var prop = props[propName]; if (prop !== true && prop !== false && prop !== 'auto' && typeof prop != 'function') { return new Error('The "mobile" prop must be true, false, "auto" or a function'); } } }; NumericInput.defaultProps = { step: 1, min: Number.MIN_SAFE_INTEGER || -9007199254740991, max: Number.MAX_SAFE_INTEGER || 9007199254740991, precision: null, parse: null, format: null, mobile: 'auto', strict: false, componentClass: "input", style: {} }; NumericInput.style = { wrap: { position: 'relative', display: 'inline-block' }, 'wrap.hasFormControl': { display: 'block' }, arrowUp: { position: 'absolute', top: '50%', left: '50%', width: 0, height: 0, borderWidth: '0 0.6ex 0.6ex 0.6ex', borderColor: 'transparent transparent rgba(0, 0, 0, 0.7)', borderStyle: 'solid', margin: '-0.3ex 0 0 -0.56ex' }, arrowDown: { position: 'absolute', top: '50%', left: '50%', width: 0, height: 0, borderWidth: '0.6ex 0.6ex 0 0.6ex', borderColor: 'rgba(0, 0, 0, 0.7) transparent transparent', borderStyle: 'solid', margin: '-0.3ex 0 0 -0.56ex' }, plus: { position: 'absolute', top: '50%', left: '50%', width: 2, height: 10, background: 'rgba(0,0,0,.7)', margin: '-5px 0 0 -1px' }, minus: { position: 'absolute', top: '50%', left: '50%', width: 10, height: 2, background: 'rgba(0,0,0,.7)', margin: '-1px 0 0 -5px' }, btn: { position: 'absolute', right: 2, width: '2.26ex', borderColor: 'rgba(0,0,0,.1)', borderStyle: 'solid', textAlign: 'center', cursor: 'default', transition: 'all 0.1s', background: 'rgba(0,0,0,.1)', boxShadow: '-1px -1px 3px rgba(0,0,0,.1) inset,' + '1px 1px 3px rgba(255,255,255,.7) inset' }, btnUp: { top: 2, bottom: '50%', borderRadius: '2px 2px 0 0', borderWidth: '1px 1px 0 1px' }, 'btnUp.mobile': { width: '3.3ex', bottom: 2, boxShadow: 'none', borderRadius: 2, borderWidth: 1 }, btnDown: { top: '50%', bottom: 2, borderRadius: '0 0 2px 2px', borderWidth: '0 1px 1px 1px' }, 'btnDown.mobile': { width: '3.3ex', bottom: 2, left: 2, top: 2, right: 'auto', boxShadow: 'none', borderRadius: 2, borderWidth: 1 }, 'btn:hover': { background: 'rgba(0,0,0,.2)' }, 'btn:active': { background: 'rgba(0,0,0,.3)', boxShadow: '0 1px 3px rgba(0,0,0,.2) inset,' + '-1px -1px 4px rgba(255,255,255,.5) inset' }, 'btn:disabled': { opacity: 0.5, boxShadow: 'none', cursor: 'not-allowed' }, input: { paddingRight: '3ex', boxSizing: 'border-box', fontSize: 'inherit' }, 'input:not(.form-control)': { border: '1px solid #ccc', borderRadius: 2, paddingLeft: 4, display: 'block', WebkitAppearance: 'none', lineHeight: 'normal' }, 'input.mobile': { paddingLeft: ' 3.4ex', paddingRight: '3.4ex', textAlign: 'center' }, 'input:focus': {}, 'input:disabled': { color: 'rgba(0, 0, 0, 0.3)', textShadow: '0 1px 0 rgba(255, 255, 255, 0.8)' } }; NumericInput.SPEED = 50; NumericInput.DELAY = 500; NumericInput.DIRECTION_UP = "up"; NumericInput.DIRECTION_DOWN = "down"; module.exports = NumericInput; /***/ }), /* 1 */ /***/ (function(module, exports) { module.exports = __webpack_require__(/*! react */ "react"); /***/ }), /* 2 */ /***/ (function(module, exports) { module.exports = __webpack_require__(/*! prop-types */ "prop-types"); /***/ }) /******/ ]); /***/ }), /***/ "./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js": /*!*************************************************************************!*\ !*** ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js ***! \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* WEBPACK VAR INJECTION */(function(global) {/** * A collection of shims that provide minimal functionality of the ES6 collections. * * These implementations are not meant to be used outside of the ResizeObserver * modules as they cover only a limited range of use cases. */ /* eslint-disable require-jsdoc, valid-jsdoc */ var MapShim = (function () { if (typeof Map !== 'undefined') { return Map; } /** * Returns index in provided array that matches the specified key. * * @param {Array} arr * @param {*} key * @returns {number} */ function getIndex(arr, key) { var result = -1; arr.some(function (entry, index) { if (entry[0] === key) { result = index; return true; } return false; }); return result; } return /** @class */ (function () { function class_1() { this.__entries__ = []; } Object.defineProperty(class_1.prototype, "size", { /** * @returns {boolean} */ get: function () { return this.__entries__.length; }, enumerable: true, configurable: true }); /** * @param {*} key * @returns {*} */ class_1.prototype.get = function (key) { var index = getIndex(this.__entries__, key); var entry = this.__entries__[index]; return entry && entry[1]; }; /** * @param {*} key * @param {*} value * @returns {void} */ class_1.prototype.set = function (key, value) { var index = getIndex(this.__entries__, key); if (~index) { this.__entries__[index][1] = value; } else { this.__entries__.push([key, value]); } }; /** * @param {*} key * @returns {void} */ class_1.prototype.delete = function (key) { var entries = this.__entries__; var index = getIndex(entries, key); if (~index) { entries.splice(index, 1); } }; /** * @param {*} key * @returns {void} */ class_1.prototype.has = function (key) { return !!~getIndex(this.__entries__, key); }; /** * @returns {void} */ class_1.prototype.clear = function () { this.__entries__.splice(0); }; /** * @param {Function} callback * @param {*} [ctx=null] * @returns {void} */ class_1.prototype.forEach = function (callback, ctx) { if (ctx === void 0) { ctx = null; } for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) { var entry = _a[_i]; callback.call(ctx, entry[1], entry[0]); } }; return class_1; }()); })(); /** * Detects whether window and document objects are available in current environment. */ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document; // Returns global object of a current environment. var global$1 = (function () { if (typeof global !== 'undefined' && global.Math === Math) { return global; } if (typeof self !== 'undefined' && self.Math === Math) { return self; } if (typeof window !== 'undefined' && window.Math === Math) { return window; } // eslint-disable-next-line no-new-func return Function('return this')(); })(); /** * A shim for the requestAnimationFrame which falls back to the setTimeout if * first one is not supported. * * @returns {number} Requests' identifier. */ var requestAnimationFrame$1 = (function () { if (typeof requestAnimationFrame === 'function') { // It's required to use a bounded function because IE sometimes throws // an "Invalid calling object" error if rAF is invoked without the global // object on the left hand side. return requestAnimationFrame.bind(global$1); } return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); }; })(); // Defines minimum timeout before adding a trailing call. var trailingTimeout = 2; /** * Creates a wrapper function which ensures that provided callback will be * invoked only once during the specified delay period. * * @param {Function} callback - Function to be invoked after the delay period. * @param {number} delay - Delay after which to invoke callback. * @returns {Function} */ function throttle (callback, delay) { var leadingCall = false, trailingCall = false, lastCallTime = 0; /** * Invokes the original callback function and schedules new invocation if * the "proxy" was called during current request. * * @returns {void} */ function resolvePending() { if (leadingCall) { leadingCall = false; callback(); } if (trailingCall) { proxy(); } } /** * Callback invoked after the specified delay. It will further postpone * invocation of the original function delegating it to the * requestAnimationFrame. * * @returns {void} */ function timeoutCallback() { requestAnimationFrame$1(resolvePending); } /** * Schedules invocation of the original function. * * @returns {void} */ function proxy() { var timeStamp = Date.now(); if (leadingCall) { // Reject immediately following calls. if (timeStamp - lastCallTime < trailingTimeout) { return; } // Schedule new call to be in invoked when the pending one is resolved. // This is important for "transitions" which never actually start // immediately so there is a chance that we might miss one if change // happens amids the pending invocation. trailingCall = true; } else { leadingCall = true; trailingCall = false; setTimeout(timeoutCallback, delay); } lastCallTime = timeStamp; } return proxy; } // Minimum delay before invoking the update of observers. var REFRESH_DELAY = 20; // A list of substrings of CSS properties used to find transition events that // might affect dimensions of observed elements. var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight']; // Check if MutationObserver is available. var mutationObserverSupported = typeof MutationObserver !== 'undefined'; /** * Singleton controller class which handles updates of ResizeObserver instances. */ var ResizeObserverController = /** @class */ (function () { /** * Creates a new instance of ResizeObserverController. * * @private */ function ResizeObserverController() { /** * Indicates whether DOM listeners have been added. * * @private {boolean} */ this.connected_ = false; /** * Tells that controller has subscribed for Mutation Events. * * @private {boolean} */ this.mutationEventsAdded_ = false; /** * Keeps reference to the instance of MutationObserver. * * @private {MutationObserver} */ this.mutationsObserver_ = null; /** * A list of connected observers. * * @private {Array} */ this.observers_ = []; this.onTransitionEnd_ = this.onTransitionEnd_.bind(this); this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY); } /** * Adds observer to observers list. * * @param {ResizeObserverSPI} observer - Observer to be added. * @returns {void} */ ResizeObserverController.prototype.addObserver = function (observer) { if (!~this.observers_.indexOf(observer)) { this.observers_.push(observer); } // Add listeners if they haven't been added yet. if (!this.connected_) { this.connect_(); } }; /** * Removes observer from observers list. * * @param {ResizeObserverSPI} observer - Observer to be removed. * @returns {void} */ ResizeObserverController.prototype.removeObserver = function (observer) { var observers = this.observers_; var index = observers.indexOf(observer); // Remove observer if it's present in registry. if (~index) { observers.splice(index, 1); } // Remove listeners if controller has no connected observers. if (!observers.length && this.connected_) { this.disconnect_(); } }; /** * Invokes the update of observers. It will continue running updates insofar * it detects changes. * * @returns {void} */ ResizeObserverController.prototype.refresh = function () { var changesDetected = this.updateObservers_(); // Continue running updates if changes have been detected as there might // be future ones caused by CSS transitions. if (changesDetected) { this.refresh(); } }; /** * Updates every observer from observers list and notifies them of queued * entries. * * @private * @returns {boolean} Returns "true" if any observer has detected changes in * dimensions of it's elements. */ ResizeObserverController.prototype.updateObservers_ = function () { // Collect observers that have active observations. var activeObservers = this.observers_.filter(function (observer) { return observer.gatherActive(), observer.hasActive(); }); // Deliver notifications in a separate cycle in order to avoid any // collisions between observers, e.g. when multiple instances of // ResizeObserver are tracking the same element and the callback of one // of them changes content dimensions of the observed target. Sometimes // this may result in notifications being blocked for the rest of observers. activeObservers.forEach(function (observer) { return observer.broadcastActive(); }); return activeObservers.length > 0; }; /** * Initializes DOM listeners. * * @private * @returns {void} */ ResizeObserverController.prototype.connect_ = function () { // Do nothing if running in a non-browser environment or if listeners // have been already added. if (!isBrowser || this.connected_) { return; } // Subscription to the "Transitionend" event is used as a workaround for // delayed transitions. This way it's possible to capture at least the // final state of an element. document.addEventListener('transitionend', this.onTransitionEnd_); window.addEventListener('resize', this.refresh); if (mutationObserverSupported) { this.mutationsObserver_ = new MutationObserver(this.refresh); this.mutationsObserver_.observe(document, { attributes: true, childList: true, characterData: true, subtree: true }); } else { document.addEventListener('DOMSubtreeModified', this.refresh); this.mutationEventsAdded_ = true; } this.connected_ = true; }; /** * Removes DOM listeners. * * @private * @returns {void} */ ResizeObserverController.prototype.disconnect_ = function () { // Do nothing if running in a non-browser environment or if listeners // have been already removed. if (!isBrowser || !this.connected_) { return; } document.removeEventListener('transitionend', this.onTransitionEnd_); window.removeEventListener('resize', this.refresh); if (this.mutationsObserver_) { this.mutationsObserver_.disconnect(); } if (this.mutationEventsAdded_) { document.removeEventListener('DOMSubtreeModified', this.refresh); } this.mutationsObserver_ = null; this.mutationEventsAdded_ = false; this.connected_ = false; }; /** * "Transitionend" event handler. * * @private * @param {TransitionEvent} event * @returns {void} */ ResizeObserverController.prototype.onTransitionEnd_ = function (_a) { var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b; // Detect whether transition may affect dimensions of an element. var isReflowProperty = transitionKeys.some(function (key) { return !!~propertyName.indexOf(key); }); if (isReflowProperty) { this.refresh(); } }; /** * Returns instance of the ResizeObserverController. * * @returns {ResizeObserverController} */ ResizeObserverController.getInstance = function () { if (!this.instance_) { this.instance_ = new ResizeObserverController(); } return this.instance_; }; /** * Holds reference to the controller's instance. * * @private {ResizeObserverController} */ ResizeObserverController.instance_ = null; return ResizeObserverController; }()); /** * Defines non-writable/enumerable properties of the provided target object. * * @param {Object} target - Object for which to define properties. * @param {Object} props - Properties to be defined. * @returns {Object} Target object. */ var defineConfigurable = (function (target, props) { for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) { var key = _a[_i]; Object.defineProperty(target, key, { value: props[key], enumerable: false, writable: false, configurable: true }); } return target; }); /** * Returns the global object associated with provided element. * * @param {Object} target * @returns {Object} */ var getWindowOf = (function (target) { // Assume that the element is an instance of Node, which means that it // has the "ownerDocument" property from which we can retrieve a // corresponding global object. var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView; // Return the local global object if it's not possible extract one from // provided element. return ownerGlobal || global$1; }); // Placeholder of an empty content rectangle. var emptyRect = createRectInit(0, 0, 0, 0); /** * Converts provided string to a number. * * @param {number|string} value * @returns {number} */ function toFloat(value) { return parseFloat(value) || 0; } /** * Extracts borders size from provided styles. * * @param {CSSStyleDeclaration} styles * @param {...string} positions - Borders positions (top, right, ...) * @returns {number} */ function getBordersSize(styles) { var positions = []; for (var _i = 1; _i < arguments.length; _i++) { positions[_i - 1] = arguments[_i]; } return positions.reduce(function (size, position) { var value = styles['border-' + position + '-width']; return size + toFloat(value); }, 0); } /** * Extracts paddings sizes from provided styles. * * @param {CSSStyleDeclaration} styles * @returns {Object} Paddings box. */ function getPaddings(styles) { var positions = ['top', 'right', 'bottom', 'left']; var paddings = {}; for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) { var position = positions_1[_i]; var value = styles['padding-' + position]; paddings[position] = toFloat(value); } return paddings; } /** * Calculates content rectangle of provided SVG element. * * @param {SVGGraphicsElement} target - Element content rectangle of which needs * to be calculated. * @returns {DOMRectInit} */ function getSVGContentRect(target) { var bbox = target.getBBox(); return createRectInit(0, 0, bbox.width, bbox.height); } /** * Calculates content rectangle of provided HTMLElement. * * @param {HTMLElement} target - Element for which to calculate the content rectangle. * @returns {DOMRectInit} */ function getHTMLElementContentRect(target) { // Client width & height properties can't be // used exclusively as they provide rounded values. var clientWidth = target.clientWidth, clientHeight = target.clientHeight; // By this condition we can catch all non-replaced inline, hidden and // detached elements. Though elements with width & height properties less // than 0.5 will be discarded as well. // // Without it we would need to implement separate methods for each of // those cases and it's not possible to perform a precise and performance // effective test for hidden elements. E.g. even jQuery's ':visible' filter // gives wrong results for elements with width & height less than 0.5. if (!clientWidth && !clientHeight) { return emptyRect; } var styles = getWindowOf(target).getComputedStyle(target); var paddings = getPaddings(styles); var horizPad = paddings.left + paddings.right; var vertPad = paddings.top + paddings.bottom; // Computed styles of width & height are being used because they are the // only dimensions available to JS that contain non-rounded values. It could // be possible to utilize the getBoundingClientRect if only it's data wasn't // affected by CSS transformations let alone paddings, borders and scroll bars. var width = toFloat(styles.width), height = toFloat(styles.height); // Width & height include paddings and borders when the 'border-box' box // model is applied (except for IE). if (styles.boxSizing === 'border-box') { // Following conditions are required to handle Internet Explorer which // doesn't include paddings and borders to computed CSS dimensions. // // We can say that if CSS dimensions + paddings are equal to the "client" // properties then it's either IE, and thus we don't need to subtract // anything, or an element merely doesn't have paddings/borders styles. if (Math.round(width + horizPad) !== clientWidth) { width -= getBordersSize(styles, 'left', 'right') + horizPad; } if (Math.round(height + vertPad) !== clientHeight) { height -= getBordersSize(styles, 'top', 'bottom') + vertPad; } } // Following steps can't be applied to the document's root element as its // client[Width/Height] properties represent viewport area of the window. // Besides, it's as well not necessary as the itself neither has // rendered scroll bars nor it can be clipped. if (!isDocumentElement(target)) { // In some browsers (only in Firefox, actually) CSS width & height // include scroll bars size which can be removed at this step as scroll // bars are the only difference between rounded dimensions + paddings // and "client" properties, though that is not always true in Chrome. var vertScrollbar = Math.round(width + horizPad) - clientWidth; var horizScrollbar = Math.round(height + vertPad) - clientHeight; // Chrome has a rather weird rounding of "client" properties. // E.g. for an element with content width of 314.2px it sometimes gives // the client width of 315px and for the width of 314.7px it may give // 314px. And it doesn't happen all the time. So just ignore this delta // as a non-relevant. if (Math.abs(vertScrollbar) !== 1) { width -= vertScrollbar; } if (Math.abs(horizScrollbar) !== 1) { height -= horizScrollbar; } } return createRectInit(paddings.left, paddings.top, width, height); } /** * Checks whether provided element is an instance of the SVGGraphicsElement. * * @param {Element} target - Element to be checked. * @returns {boolean} */ var isSVGGraphicsElement = (function () { // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement // interface. if (typeof SVGGraphicsElement !== 'undefined') { return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; }; } // If it's so, then check that element is at least an instance of the // SVGElement and that it has the "getBBox" method. // eslint-disable-next-line no-extra-parens return function (target) { return (target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === 'function'); }; })(); /** * Checks whether provided element is a document element (). * * @param {Element} target - Element to be checked. * @returns {boolean} */ function isDocumentElement(target) { return target === getWindowOf(target).document.documentElement; } /** * Calculates an appropriate content rectangle for provided html or svg element. * * @param {Element} target - Element content rectangle of which needs to be calculated. * @returns {DOMRectInit} */ function getContentRect(target) { if (!isBrowser) { return emptyRect; } if (isSVGGraphicsElement(target)) { return getSVGContentRect(target); } return getHTMLElementContentRect(target); } /** * Creates rectangle with an interface of the DOMRectReadOnly. * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly * * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions. * @returns {DOMRectReadOnly} */ function createReadOnlyRect(_a) { var x = _a.x, y = _a.y, width = _a.width, height = _a.height; // If DOMRectReadOnly is available use it as a prototype for the rectangle. var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object; var rect = Object.create(Constr.prototype); // Rectangle's properties are not writable and non-enumerable. defineConfigurable(rect, { x: x, y: y, width: width, height: height, top: y, right: x + width, bottom: height + y, left: x }); return rect; } /** * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates. * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit * * @param {number} x - X coordinate. * @param {number} y - Y coordinate. * @param {number} width - Rectangle's width. * @param {number} height - Rectangle's height. * @returns {DOMRectInit} */ function createRectInit(x, y, width, height) { return { x: x, y: y, width: width, height: height }; } /** * Class that is responsible for computations of the content rectangle of * provided DOM element and for keeping track of it's changes. */ var ResizeObservation = /** @class */ (function () { /** * Creates an instance of ResizeObservation. * * @param {Element} target - Element to be observed. */ function ResizeObservation(target) { /** * Broadcasted width of content rectangle. * * @type {number} */ this.broadcastWidth = 0; /** * Broadcasted height of content rectangle. * * @type {number} */ this.broadcastHeight = 0; /** * Reference to the last observed content rectangle. * * @private {DOMRectInit} */ this.contentRect_ = createRectInit(0, 0, 0, 0); this.target = target; } /** * Updates content rectangle and tells whether it's width or height properties * have changed since the last broadcast. * * @returns {boolean} */ ResizeObservation.prototype.isActive = function () { var rect = getContentRect(this.target); this.contentRect_ = rect; return (rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight); }; /** * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data * from the corresponding properties of the last observed content rectangle. * * @returns {DOMRectInit} Last observed content rectangle. */ ResizeObservation.prototype.broadcastRect = function () { var rect = this.contentRect_; this.broadcastWidth = rect.width; this.broadcastHeight = rect.height; return rect; }; return ResizeObservation; }()); var ResizeObserverEntry = /** @class */ (function () { /** * Creates an instance of ResizeObserverEntry. * * @param {Element} target - Element that is being observed. * @param {DOMRectInit} rectInit - Data of the element's content rectangle. */ function ResizeObserverEntry(target, rectInit) { var contentRect = createReadOnlyRect(rectInit); // According to the specification following properties are not writable // and are also not enumerable in the native implementation. // // Property accessors are not being used as they'd require to define a // private WeakMap storage which may cause memory leaks in browsers that // don't support this type of collections. defineConfigurable(this, { target: target, contentRect: contentRect }); } return ResizeObserverEntry; }()); var ResizeObserverSPI = /** @class */ (function () { /** * Creates a new instance of ResizeObserver. * * @param {ResizeObserverCallback} callback - Callback function that is invoked * when one of the observed elements changes it's content dimensions. * @param {ResizeObserverController} controller - Controller instance which * is responsible for the updates of observer. * @param {ResizeObserver} callbackCtx - Reference to the public * ResizeObserver instance which will be passed to callback function. */ function ResizeObserverSPI(callback, controller, callbackCtx) { /** * Collection of resize observations that have detected changes in dimensions * of elements. * * @private {Array} */ this.activeObservations_ = []; /** * Registry of the ResizeObservation instances. * * @private {Map} */ this.observations_ = new MapShim(); if (typeof callback !== 'function') { throw new TypeError('The callback provided as parameter 1 is not a function.'); } this.callback_ = callback; this.controller_ = controller; this.callbackCtx_ = callbackCtx; } /** * Starts observing provided element. * * @param {Element} target - Element to be observed. * @returns {void} */ ResizeObserverSPI.prototype.observe = function (target) { if (!arguments.length) { throw new TypeError('1 argument required, but only 0 present.'); } // Do nothing if current environment doesn't have the Element interface. if (typeof Element === 'undefined' || !(Element instanceof Object)) { return; } if (!(target instanceof getWindowOf(target).Element)) { throw new TypeError('parameter 1 is not of type "Element".'); } var observations = this.observations_; // Do nothing if element is already being observed. if (observations.has(target)) { return; } observations.set(target, new ResizeObservation(target)); this.controller_.addObserver(this); // Force the update of observations. this.controller_.refresh(); }; /** * Stops observing provided element. * * @param {Element} target - Element to stop observing. * @returns {void} */ ResizeObserverSPI.prototype.unobserve = function (target) { if (!arguments.length) { throw new TypeError('1 argument required, but only 0 present.'); } // Do nothing if current environment doesn't have the Element interface. if (typeof Element === 'undefined' || !(Element instanceof Object)) { return; } if (!(target instanceof getWindowOf(target).Element)) { throw new TypeError('parameter 1 is not of type "Element".'); } var observations = this.observations_; // Do nothing if element is not being observed. if (!observations.has(target)) { return; } observations.delete(target); if (!observations.size) { this.controller_.removeObserver(this); } }; /** * Stops observing all elements. * * @returns {void} */ ResizeObserverSPI.prototype.disconnect = function () { this.clearActive(); this.observations_.clear(); this.controller_.removeObserver(this); }; /** * Collects observation instances the associated element of which has changed * it's content rectangle. * * @returns {void} */ ResizeObserverSPI.prototype.gatherActive = function () { var _this = this; this.clearActive(); this.observations_.forEach(function (observation) { if (observation.isActive()) { _this.activeObservations_.push(observation); } }); }; /** * Invokes initial callback function with a list of ResizeObserverEntry * instances collected from active resize observations. * * @returns {void} */ ResizeObserverSPI.prototype.broadcastActive = function () { // Do nothing if observer doesn't have active observations. if (!this.hasActive()) { return; } var ctx = this.callbackCtx_; // Create ResizeObserverEntry instance for every active observation. var entries = this.activeObservations_.map(function (observation) { return new ResizeObserverEntry(observation.target, observation.broadcastRect()); }); this.callback_.call(ctx, entries, ctx); this.clearActive(); }; /** * Clears the collection of active observations. * * @returns {void} */ ResizeObserverSPI.prototype.clearActive = function () { this.activeObservations_.splice(0); }; /** * Tells whether observer has active observations. * * @returns {boolean} */ ResizeObserverSPI.prototype.hasActive = function () { return this.activeObservations_.length > 0; }; return ResizeObserverSPI; }()); // Registry of internal observers. If WeakMap is not available use current shim // for the Map collection as it has all required methods and because WeakMap // can't be fully polyfilled anyway. var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim(); /** * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation * exposing only those methods and properties that are defined in the spec. */ var ResizeObserver = /** @class */ (function () { /** * Creates a new instance of ResizeObserver. * * @param {ResizeObserverCallback} callback - Callback that is invoked when * dimensions of the observed elements change. */ function ResizeObserver(callback) { if (!(this instanceof ResizeObserver)) { throw new TypeError('Cannot call a class as a function.'); } if (!arguments.length) { throw new TypeError('1 argument required, but only 0 present.'); } var controller = ResizeObserverController.getInstance(); var observer = new ResizeObserverSPI(callback, controller, this); observers.set(this, observer); } return ResizeObserver; }()); // Expose public methods of ResizeObserver. [ 'observe', 'unobserve', 'disconnect' ].forEach(function (method) { ResizeObserver.prototype[method] = function () { var _a; return (_a = observers.get(this))[method].apply(_a, arguments); }; }); var index = (function () { // Export existing implementation if available. if (typeof global$1.ResizeObserver !== 'undefined') { return global$1.ResizeObserver; } return ResizeObserver; })(); /* harmony default export */ __webpack_exports__["default"] = (index); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), /***/ "./node_modules/shallowequal/index.js": /*!********************************************!*\ !*** ./node_modules/shallowequal/index.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { // module.exports = function shallowEqual(objA, objB, compare, compareContext) { var ret = compare ? compare.call(compareContext, objA, objB) : void 0; if (ret !== void 0) { return !!ret; } if (objA === objB) { return true; } if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); // Test for A's keys different from B. for (var idx = 0; idx < keysA.length; idx++) { var key = keysA[idx]; if (!bHasOwnProperty(key)) { return false; } var valueA = objA[key]; var valueB = objB[key]; ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; if (ret === false || (ret === void 0 && valueA !== valueB)) { return false; } } return true; }; /***/ }), /***/ "./node_modules/simple-swizzle/index.js": /*!**********************************************!*\ !*** ./node_modules/simple-swizzle/index.js ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var isArrayish = __webpack_require__(/*! is-arrayish */ "./node_modules/is-arrayish/index.js"); var concat = Array.prototype.concat; var slice = Array.prototype.slice; var swizzle = module.exports = function swizzle(args) { var results = []; for (var i = 0, len = args.length; i < len; i++) { var arg = args[i]; if (isArrayish(arg)) { // http://jsperf.com/javascript-array-concat-vs-push/98 results = concat.call(results, slice.call(arg)); } else { results.push(arg); } } return results; }; swizzle.wrap = function (fn) { return function () { return fn(swizzle(arguments)); }; }; /***/ }), /***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": /*!****************************************************************************!*\ !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var isOldIE = function isOldIE() { var memo; return function memorize() { if (typeof memo === 'undefined') { // Test for IE <= 9 as proposed by Browserhacks // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 // Tests for existence of standard globals is to allow style-loader // to operate correctly into non-standard environments // @see https://github.com/webpack-contrib/style-loader/issues/177 memo = Boolean(window && document && document.all && !window.atob); } return memo; }; }(); var getTarget = function getTarget() { var memo = {}; return function memorize(target) { if (typeof memo[target] === 'undefined') { var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { try { // This will throw an exception if access to iframe is blocked // due to cross-origin restrictions styleTarget = styleTarget.contentDocument.head; } catch (e) { // istanbul ignore next styleTarget = null; } } memo[target] = styleTarget; } return memo[target]; }; }(); var stylesInDom = []; function getIndexByIdentifier(identifier) { var result = -1; for (var i = 0; i < stylesInDom.length; i++) { if (stylesInDom[i].identifier === identifier) { result = i; break; } } return result; } function modulesToDom(list, options) { var idCountMap = {}; var identifiers = []; for (var i = 0; i < list.length; i++) { var item = list[i]; var id = options.base ? item[0] + options.base : item[0]; var count = idCountMap[id] || 0; var identifier = "".concat(id, " ").concat(count); idCountMap[id] = count + 1; var index = getIndexByIdentifier(identifier); var obj = { css: item[1], media: item[2], sourceMap: item[3] }; if (index !== -1) { stylesInDom[index].references++; stylesInDom[index].updater(obj); } else { stylesInDom.push({ identifier: identifier, updater: addStyle(obj, options), references: 1 }); } identifiers.push(identifier); } return identifiers; } function insertStyleElement(options) { var style = document.createElement('style'); var attributes = options.attributes || {}; if (typeof attributes.nonce === 'undefined') { var nonce = true ? __webpack_require__.nc : undefined; if (nonce) { attributes.nonce = nonce; } } Object.keys(attributes).forEach(function (key) { style.setAttribute(key, attributes[key]); }); if (typeof options.insert === 'function') { options.insert(style); } else { var target = getTarget(options.insert || 'head'); if (!target) { throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); } target.appendChild(style); } return style; } function removeStyleElement(style) { // istanbul ignore if if (style.parentNode === null) { return false; } style.parentNode.removeChild(style); } /* istanbul ignore next */ var replaceText = function replaceText() { var textStore = []; return function replace(index, replacement) { textStore[index] = replacement; return textStore.filter(Boolean).join('\n'); }; }(); function applyToSingletonTag(style, index, remove, obj) { var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE /* istanbul ignore if */ if (style.styleSheet) { style.styleSheet.cssText = replaceText(index, css); } else { var cssNode = document.createTextNode(css); var childNodes = style.childNodes; if (childNodes[index]) { style.removeChild(childNodes[index]); } if (childNodes.length) { style.insertBefore(cssNode, childNodes[index]); } else { style.appendChild(cssNode); } } } function applyToTag(style, options, obj) { var css = obj.css; var media = obj.media; var sourceMap = obj.sourceMap; if (media) { style.setAttribute('media', media); } else { style.removeAttribute('media'); } if (sourceMap && btoa) { css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); } // For old IE /* istanbul ignore if */ if (style.styleSheet) { style.styleSheet.cssText = css; } else { while (style.firstChild) { style.removeChild(style.firstChild); } style.appendChild(document.createTextNode(css)); } } var singleton = null; var singletonCounter = 0; function addStyle(obj, options) { var style; var update; var remove; if (options.singleton) { var styleIndex = singletonCounter++; style = singleton || (singleton = insertStyleElement(options)); update = applyToSingletonTag.bind(null, style, styleIndex, false); remove = applyToSingletonTag.bind(null, style, styleIndex, true); } else { style = insertStyleElement(options); update = applyToTag.bind(null, style, options); remove = function remove() { removeStyleElement(style); }; } update(obj); return function updateStyle(newObj) { if (newObj) { if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { return; } update(obj = newObj); } else { remove(); } }; } module.exports = function (list, options) { options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of '; }; }; /* takes a css factory function and outputs an element factory */ var wrapAsElement = function wrapAsElement(css, names) { return function () { var _props; var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props[SC_VERSION_ATTR] = "4.4.0", _props); var nonce = getNonce(); if (nonce) { // $FlowFixMe props.nonce = nonce; } // eslint-disable-next-line react/no-danger return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } })); }; }; var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) { return function () { return Object.keys(markers); }; }; /* speedy tags utilise insertRule */ var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) { var names = Object.create(null); var markers = Object.create(null); var sizes = []; var extractImport = getImportRuleTag !== undefined; /* indicates whether getImportRuleTag was called */ var usedImportRuleTag = false; var insertMarker = function insertMarker(id) { var prev = markers[id]; if (prev !== undefined) { return prev; } markers[id] = sizes.length; sizes.push(0); resetIdNames(names, id); return markers[id]; }; var insertRules = function insertRules(id, cssRules, name) { var marker = insertMarker(id); var sheet = sheetForTag(el); var insertIndex = addUpUntilIndex(sizes, marker); var injectedRules = 0; var importRules = []; var cssRulesSize = cssRules.length; for (var i = 0; i < cssRulesSize; i += 1) { var cssRule = cssRules[i]; var mayHaveImport = extractImport; /* @import rules are reordered to appear first */ if (mayHaveImport && cssRule.indexOf('@import') !== -1) { importRules.push(cssRule); } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) { mayHaveImport = false; injectedRules += 1; } } if (extractImport && importRules.length > 0) { usedImportRuleTag = true; // $FlowFixMe getImportRuleTag().insertRules(id + '-import', importRules); } sizes[marker] += injectedRules; /* add up no of injected rules */ addNameForId(names, id, name); }; var removeRules = function removeRules(id) { var marker = markers[id]; if (marker === undefined) return; // $FlowFixMe if (el.isConnected === false) return; var size = sizes[marker]; var sheet = sheetForTag(el); var removalIndex = addUpUntilIndex(sizes, marker) - 1; deleteRules(sheet, removalIndex, size); sizes[marker] = 0; resetIdNames(names, id); if (extractImport && usedImportRuleTag) { // $FlowFixMe getImportRuleTag().removeRules(id + '-import'); } }; var css = function css() { var _sheetForTag = sheetForTag(el), cssRules = _sheetForTag.cssRules; var str = ''; // eslint-disable-next-line guard-for-in for (var id in markers) { str += makeTextMarker(id); var marker = markers[id]; var end = addUpUntilIndex(sizes, marker); var size = sizes[marker]; for (var i = end - size; i < end; i += 1) { var rule = cssRules[i]; if (rule !== undefined) { str += rule.cssText; } } } return str; }; return { clone: function clone() { throw new StyledComponentsError(5); }, css: css, getIds: getIdsFromMarkersFactory(markers), hasNameForId: hasNameForId(names), insertMarker: insertMarker, insertRules: insertRules, removeRules: removeRules, sealed: false, styleTag: el, toElement: wrapAsElement(css, names), toHTML: wrapAsHtmlTag(css, names) }; }; var makeTextNode = function makeTextNode(targetDocument, id) { return targetDocument.createTextNode(makeTextMarker(id)); }; var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) { var names = Object.create(null); var markers = Object.create(null); var extractImport = getImportRuleTag !== undefined; /* indicates whether getImportRuleTag was called */ var usedImportRuleTag = false; var insertMarker = function insertMarker(id) { var prev = markers[id]; if (prev !== undefined) { return prev; } markers[id] = makeTextNode(el.ownerDocument, id); el.appendChild(markers[id]); names[id] = Object.create(null); return markers[id]; }; var insertRules = function insertRules(id, cssRules, name) { var marker = insertMarker(id); var importRules = []; var cssRulesSize = cssRules.length; for (var i = 0; i < cssRulesSize; i += 1) { var rule = cssRules[i]; var mayHaveImport = extractImport; if (mayHaveImport && rule.indexOf('@import') !== -1) { importRules.push(rule); } else { mayHaveImport = false; var separator = i === cssRulesSize - 1 ? '' : ' '; marker.appendData('' + rule + separator); } } addNameForId(names, id, name); if (extractImport && importRules.length > 0) { usedImportRuleTag = true; // $FlowFixMe getImportRuleTag().insertRules(id + '-import', importRules); } }; var removeRules = function removeRules(id) { var marker = markers[id]; if (marker === undefined) return; /* create new empty text node and replace the current one */ var newMarker = makeTextNode(el.ownerDocument, id); el.replaceChild(newMarker, marker); markers[id] = newMarker; resetIdNames(names, id); if (extractImport && usedImportRuleTag) { // $FlowFixMe getImportRuleTag().removeRules(id + '-import'); } }; var css = function css() { var str = ''; // eslint-disable-next-line guard-for-in for (var id in markers) { str += markers[id].data; } return str; }; return { clone: function clone() { throw new StyledComponentsError(5); }, css: css, getIds: getIdsFromMarkersFactory(markers), hasNameForId: hasNameForId(names), insertMarker: insertMarker, insertRules: insertRules, removeRules: removeRules, sealed: false, styleTag: el, toElement: wrapAsElement(css, names), toHTML: wrapAsHtmlTag(css, names) }; }; var makeServerTag = function makeServerTag(namesArg, markersArg) { var names = namesArg === undefined ? Object.create(null) : namesArg; var markers = markersArg === undefined ? Object.create(null) : markersArg; var insertMarker = function insertMarker(id) { var prev = markers[id]; if (prev !== undefined) { return prev; } return markers[id] = ['']; }; var insertRules = function insertRules(id, cssRules, name) { var marker = insertMarker(id); marker[0] += cssRules.join(' '); addNameForId(names, id, name); }; var removeRules = function removeRules(id) { var marker = markers[id]; if (marker === undefined) return; marker[0] = ''; resetIdNames(names, id); }; var css = function css() { var str = ''; // eslint-disable-next-line guard-for-in for (var id in markers) { var cssForId = markers[id][0]; if (cssForId) { str += makeTextMarker(id) + cssForId; } } return str; }; var clone = function clone() { var namesClone = cloneNames(names); var markersClone = Object.create(null); // eslint-disable-next-line guard-for-in for (var id in markers) { markersClone[id] = [markers[id][0]]; } return makeServerTag(namesClone, markersClone); }; var tag = { clone: clone, css: css, getIds: getIdsFromMarkersFactory(markers), hasNameForId: hasNameForId(names), insertMarker: insertMarker, insertRules: insertRules, removeRules: removeRules, sealed: false, styleTag: null, toElement: wrapAsElement(css, names), toHTML: wrapAsHtmlTag(css, names) }; return tag; }; var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) { if (IS_BROWSER && !forceServer) { var el = makeStyleTag(target, tagEl, insertBefore); if (DISABLE_SPEEDY) { return makeBrowserTag(el, getImportRuleTag); } else { return makeSpeedyTag(el, getImportRuleTag); } } return makeServerTag(); }; var rehydrate = function rehydrate(tag, els, extracted) { /* add all extracted components to the new tag */ for (var i = 0, len = extracted.length; i < len; i += 1) { var _extracted$i = extracted[i], componentId = _extracted$i.componentId, cssFromDOM = _extracted$i.cssFromDOM; var cssRules = splitByRules(cssFromDOM); tag.insertRules(componentId, cssRules); } /* remove old HTMLStyleElements, since they have been rehydrated */ for (var _i = 0, _len = els.length; _i < _len; _i += 1) { var el = els[_i]; if (el.parentNode) { el.parentNode.removeChild(el); } } }; // var SPLIT_REGEX = /\s+/; /* determine the maximum number of components before tags are sharded */ var MAX_SIZE = void 0; if (IS_BROWSER) { /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */ MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000; } else { /* for servers we do not need to shard at all */ MAX_SIZE = -1; } var sheetRunningId = 0; var master = void 0; var StyleSheet = function () { /* a map from ids to tags */ /* deferred rules for a given id */ /* this is used for not reinjecting rules via hasNameForId() */ /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */ /* a list of tags belonging to this StyleSheet */ /* a tag for import rules */ /* current capacity until a new tag must be created */ /* children (aka clones) of this StyleSheet inheriting all and future injections */ function StyleSheet() { var _this = this; var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null; var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; classCallCheck(this, StyleSheet); this.getImportRuleTag = function () { var importRuleTag = _this.importRuleTag; if (importRuleTag !== undefined) { return importRuleTag; } var firstTag = _this.tags[0]; var insertBefore = true; return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore); }; sheetRunningId += 1; this.id = sheetRunningId; this.forceServer = forceServer; this.target = forceServer ? null : target; this.tagMap = {}; this.deferred = {}; this.rehydratedNames = {}; this.ignoreRehydratedNames = {}; this.tags = []; this.capacity = 1; this.clones = []; } /* rehydrate all SSR'd style tags */ StyleSheet.prototype.rehydrate = function rehydrate$$1() { if (!IS_BROWSER || this.forceServer) return this; var els = []; var extracted = []; var isStreamed = false; /* retrieve all of our SSR style elements from the DOM */ var nodes = document.querySelectorAll('style[' + SC_ATTR + '][' + SC_VERSION_ATTR + '="' + "4.4.0" + '"]'); var nodesSize = nodes.length; /* abort rehydration if no previous style tags were found */ if (!nodesSize) return this; for (var i = 0; i < nodesSize; i += 1) { var el = nodes[i]; /* check if style tag is a streamed tag */ if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR); /* retrieve all component names */ var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX); var elNamesSize = elNames.length; for (var j = 0, name; j < elNamesSize; j += 1) { name = elNames[j]; /* add rehydrated name to sheet to avoid re-adding styles */ this.rehydratedNames[name] = true; } /* extract all components and their CSS */ extracted.push.apply(extracted, extractComps(el.textContent)); /* store original HTMLStyleElement */ els.push(el); } /* abort rehydration if nothing was extracted */ var extractedSize = extracted.length; if (!extractedSize) return this; /* create a tag to be used for rehydration */ var tag = this.makeTag(null); rehydrate(tag, els, extracted); /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */ this.capacity = Math.max(1, MAX_SIZE - extractedSize); this.tags.push(tag); /* retrieve all component ids */ for (var _j = 0; _j < extractedSize; _j += 1) { this.tagMap[extracted[_j].componentId] = tag; } return this; }; /* retrieve a "master" instance of StyleSheet which is typically used when no other is available * The master StyleSheet is targeted by createGlobalStyle, keyframes, and components outside of any * StyleSheetManager's context */ /* reset the internal "master" instance */ StyleSheet.reset = function reset() { var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; master = new StyleSheet(undefined, forceServer).rehydrate(); }; /* adds "children" to the StyleSheet that inherit all of the parents' rules * while their own rules do not affect the parent */ StyleSheet.prototype.clone = function clone() { var sheet = new StyleSheet(this.target, this.forceServer); /* add to clone array */ this.clones.push(sheet); /* clone all tags */ sheet.tags = this.tags.map(function (tag) { var ids = tag.getIds(); var newTag = tag.clone(); /* reconstruct tagMap */ for (var i = 0; i < ids.length; i += 1) { sheet.tagMap[ids[i]] = newTag; } return newTag; }); /* clone other maps */ sheet.rehydratedNames = _extends({}, this.rehydratedNames); sheet.deferred = _extends({}, this.deferred); return sheet; }; /* force StyleSheet to create a new tag on the next injection */ StyleSheet.prototype.sealAllTags = function sealAllTags() { this.capacity = 1; this.tags.forEach(function (tag) { // eslint-disable-next-line no-param-reassign tag.sealed = true; }); }; StyleSheet.prototype.makeTag = function makeTag$$1(tag) { var lastEl = tag ? tag.styleTag : null; var insertBefore = false; return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag); }; /* get a tag for a given componentId, assign the componentId to one, or shard */ StyleSheet.prototype.getTagForId = function getTagForId(id) { /* simply return a tag, when the componentId was already assigned one */ var prev = this.tagMap[id]; if (prev !== undefined && !prev.sealed) { return prev; } var tag = this.tags[this.tags.length - 1]; /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */ this.capacity -= 1; if (this.capacity === 0) { this.capacity = MAX_SIZE; tag = this.makeTag(tag); this.tags.push(tag); } return this.tagMap[id] = tag; }; /* mainly for createGlobalStyle to check for its id */ StyleSheet.prototype.hasId = function hasId(id) { return this.tagMap[id] !== undefined; }; /* caching layer checking id+name to already have a corresponding tag and injected rules */ StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) { /* exception for rehydrated names which are checked separately */ if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) { return true; } var tag = this.tagMap[id]; return tag !== undefined && tag.hasNameForId(id, name); }; /* registers a componentId and registers it on its tag */ StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) { /* don't inject when the id is already registered */ if (this.tagMap[id] !== undefined) return; var clones = this.clones; for (var i = 0; i < clones.length; i += 1) { clones[i].deferredInject(id, cssRules); } this.getTagForId(id).insertMarker(id); this.deferred[id] = cssRules; }; /* injects rules for a given id with a name that will need to be cached */ StyleSheet.prototype.inject = function inject(id, cssRules, name) { var clones = this.clones; for (var i = 0; i < clones.length; i += 1) { clones[i].inject(id, cssRules, name); } var tag = this.getTagForId(id); /* add deferred rules for component */ if (this.deferred[id] !== undefined) { // Combine passed cssRules with previously deferred CSS rules // NOTE: We cannot mutate the deferred array itself as all clones // do the same (see clones[i].inject) var rules = this.deferred[id].concat(cssRules); tag.insertRules(id, rules, name); this.deferred[id] = undefined; } else { tag.insertRules(id, cssRules, name); } }; /* removes all rules for a given id, which doesn't remove its marker but resets it */ StyleSheet.prototype.remove = function remove(id) { var tag = this.tagMap[id]; if (tag === undefined) return; var clones = this.clones; for (var i = 0; i < clones.length; i += 1) { clones[i].remove(id); } /* remove all rules from the tag */ tag.removeRules(id); /* ignore possible rehydrated names */ this.ignoreRehydratedNames[id] = true; /* delete possible deferred rules */ this.deferred[id] = undefined; }; StyleSheet.prototype.toHTML = function toHTML() { return this.tags.map(function (tag) { return tag.toHTML(); }).join(''); }; StyleSheet.prototype.toReactElements = function toReactElements() { var id = this.id; return this.tags.map(function (tag, i) { var key = 'sc-' + id + '-' + i; return Object(react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"])(tag.toElement(), { key: key }); }); }; createClass(StyleSheet, null, [{ key: 'master', get: function get$$1() { return master || (master = new StyleSheet().rehydrate()); } /* NOTE: This is just for backwards-compatibility with jest-styled-components */ }, { key: 'instance', get: function get$$1() { return StyleSheet.master; } }]); return StyleSheet; }(); // var Keyframes = function () { function Keyframes(name, rules) { var _this = this; classCallCheck(this, Keyframes); this.inject = function (styleSheet) { if (!styleSheet.hasNameForId(_this.id, _this.name)) { styleSheet.inject(_this.id, _this.rules, _this.name); } }; this.toString = function () { throw new StyledComponentsError(12, String(_this.name)); }; this.name = name; this.rules = rules; this.id = 'sc-keyframes-' + name; } Keyframes.prototype.getName = function getName() { return this.name; }; return Keyframes; }(); // /** * inlined version of * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js */ var uppercasePattern = /([A-Z])/g; var msPattern = /^ms-/; /** * Hyphenates a camelcased CSS property name, for example: * * > hyphenateStyleName('backgroundColor') * < "background-color" * > hyphenateStyleName('MozTransition') * < "-moz-transition" * > hyphenateStyleName('msTransition') * < "-ms-transition" * * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix * is converted to `-ms-`. * * @param {string} string * @return {string} */ function hyphenateStyleName(string) { return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); } // // Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js function addUnitIfNeeded(name, value) { // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133 // $FlowFixMe if (value == null || typeof value === 'boolean' || value === '') { return ''; } if (typeof value === 'number' && value !== 0 && !(name in _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__["default"])) { return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers } return String(value).trim(); } // /** * It's falsish not falsy because 0 is allowed. */ var isFalsish = function isFalsish(chunk) { return chunk === undefined || chunk === null || chunk === false || chunk === ''; }; var objToCssArray = function objToCssArray(obj, prevKey) { var rules = []; var keys = Object.keys(obj); keys.forEach(function (key) { if (!isFalsish(obj[key])) { if (isPlainObject(obj[key])) { rules.push.apply(rules, objToCssArray(obj[key], key)); return rules; } else if (isFunction(obj[key])) { rules.push(hyphenateStyleName(key) + ':', obj[key], ';'); return rules; } rules.push(hyphenateStyleName(key) + ': ' + addUnitIfNeeded(key, obj[key]) + ';'); } return rules; }); return prevKey ? [prevKey + ' {'].concat(rules, ['}']) : rules; }; function flatten(chunk, executionContext, styleSheet) { if (Array.isArray(chunk)) { var ruleSet = []; for (var i = 0, len = chunk.length, result; i < len; i += 1) { result = flatten(chunk[i], executionContext, styleSheet); if (result === null) continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result); } return ruleSet; } if (isFalsish(chunk)) { return null; } /* Handle other components */ if (isStyledComponent(chunk)) { return '.' + chunk.styledComponentId; } /* Either execute or defer the function */ if (isFunction(chunk)) { if (isStatelessFunction(chunk) && executionContext) { var _result = chunk(executionContext); if ( true && Object(react_is__WEBPACK_IMPORTED_MODULE_4__["isElement"])(_result)) { // eslint-disable-next-line no-console console.warn(getComponentName(chunk) + ' is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.'); } return flatten(_result, executionContext, styleSheet); } else return chunk; } if (chunk instanceof Keyframes) { if (styleSheet) { chunk.inject(styleSheet); return chunk.getName(); } else return chunk; } /* Handle objects */ return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString(); } // function css(styles) { for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { interpolations[_key - 1] = arguments[_key]; } if (isFunction(styles) || isPlainObject(styles)) { // $FlowFixMe return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations))); } // $FlowFixMe return flatten(interleave(styles, interpolations)); } // function constructWithOptions(componentConstructor, tag) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT; if (!Object(react_is__WEBPACK_IMPORTED_MODULE_4__["isValidElementType"])(tag)) { throw new StyledComponentsError(1, String(tag)); } /* This is callable directly as a template function */ // $FlowFixMe: Not typed to avoid destructuring arguments var templateFunction = function templateFunction() { return componentConstructor(tag, options, css.apply(undefined, arguments)); }; /* If config methods are called, wrap up a new template function and merge options */ templateFunction.withConfig = function (config) { return constructWithOptions(componentConstructor, tag, _extends({}, options, config)); }; /* Modify/inject new props at runtime */ templateFunction.attrs = function (attrs) { return constructWithOptions(componentConstructor, tag, _extends({}, options, { attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean) })); }; return templateFunction; } // // Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js function murmurhash(c) { for (var e = c.length | 0, a = e | 0, d = 0, b; e >= 4;) { b = c.charCodeAt(d) & 255 | (c.charCodeAt(++d) & 255) << 8 | (c.charCodeAt(++d) & 255) << 16 | (c.charCodeAt(++d) & 255) << 24, b = 1540483477 * (b & 65535) + ((1540483477 * (b >>> 16) & 65535) << 16), b ^= b >>> 24, b = 1540483477 * (b & 65535) + ((1540483477 * (b >>> 16) & 65535) << 16), a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16) ^ b, e -= 4, ++d; } switch (e) { case 3: a ^= (c.charCodeAt(d + 2) & 255) << 16; case 2: a ^= (c.charCodeAt(d + 1) & 255) << 8; case 1: a ^= c.charCodeAt(d) & 255, a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16); } a ^= a >>> 13; a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16); return (a ^ a >>> 15) >>> 0; } // /* eslint-disable no-bitwise */ /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised * counterparts */ var charsLength = 52; /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */ var getAlphabeticChar = function getAlphabeticChar(code) { return String.fromCharCode(code + (code > 25 ? 39 : 97)); }; /* input a number, usually a hash and convert it to base-52 */ function generateAlphabeticName(code) { var name = ''; var x = void 0; /* get a char and divide by alphabet-length */ for (x = code; x > charsLength; x = Math.floor(x / charsLength)) { name = getAlphabeticChar(x % charsLength) + name; } return getAlphabeticChar(x % charsLength) + name; } // function hasFunctionObjectKey(obj) { // eslint-disable-next-line guard-for-in, no-restricted-syntax for (var key in obj) { if (isFunction(obj[key])) { return true; } } return false; } function isStaticRules(rules, attrs) { for (var i = 0; i < rules.length; i += 1) { var rule = rules[i]; // recursive case if (Array.isArray(rule) && !isStaticRules(rule, attrs)) { return false; } else if (isFunction(rule) && !isStyledComponent(rule)) { // functions are allowed to be static if they're just being // used to get the classname of a nested styled component return false; } } if (attrs.some(function (x) { return isFunction(x) || hasFunctionObjectKey(x); })) return false; return true; } // /* combines hashStr (murmurhash) and nameGenerator for convenience */ var hasher = function hasher(str) { return generateAlphabeticName(murmurhash(str)); }; /* ComponentStyle is all the CSS-specific stuff, not the React-specific stuff. */ var ComponentStyle = function () { function ComponentStyle(rules, attrs, componentId) { classCallCheck(this, ComponentStyle); this.rules = rules; this.isStatic = false && false; this.componentId = componentId; if (!StyleSheet.master.hasId(componentId)) { StyleSheet.master.deferredInject(componentId, []); } } /* * Flattens a rule set into valid CSS * Hashes it, wraps the whole chunk in a .hash1234 {} * Returns the hash to be injected on render() * */ ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) { var isStatic = this.isStatic, componentId = this.componentId, lastClassName = this.lastClassName; if (IS_BROWSER && isStatic && typeof lastClassName === 'string' && styleSheet.hasNameForId(componentId, lastClassName)) { return lastClassName; } var flatCSS = flatten(this.rules, executionContext, styleSheet); var name = hasher(this.componentId + flatCSS.join('')); if (!styleSheet.hasNameForId(componentId, name)) { styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name, undefined, componentId), name); } this.lastClassName = name; return name; }; ComponentStyle.generateName = function generateName(str) { return hasher(str); }; return ComponentStyle; }(); // var LIMIT = 200; var createWarnTooManyClasses = (function (displayName) { var generatedClasses = {}; var warningSeen = false; return function (className) { if (!warningSeen) { generatedClasses[className] = true; if (Object.keys(generatedClasses).length >= LIMIT) { // Unable to find latestRule in test environment. /* eslint-disable no-console, prefer-template */ console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. \n' + 'Consider using the attrs method, together with a style object for frequently changed styles.\n' + 'Example:\n' + ' const Component = styled.div.attrs(props => ({\n' + ' style: {\n' + ' background: props.background,\n' + ' },\n' + ' }))`width: 100%;`\n\n' + ' '); warningSeen = true; generatedClasses = {}; } } }; }); // var determineTheme = (function (props, fallbackTheme) { var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT; // Props should take precedence over ThemeProvider, which should take precedence over // defaultProps, but React automatically puts defaultProps on props. /* eslint-disable react/prop-types, flowtype-errors/show-errors */ var isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false; var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme; /* eslint-enable */ return theme; }); // var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g; var dashesAtEnds = /(^-|-$)/g; /** * TODO: Explore using CSS.escape when it becomes more available * in evergreen browsers. */ function escape(str) { return str // Replace all possible CSS selectors .replace(escapeRegex, '-') // Remove extraneous hyphens at the start and end .replace(dashesAtEnds, ''); } // function isTag(target) { return typeof target === 'string' && ( true ? target.charAt(0) === target.charAt(0).toLowerCase() : undefined); } // function generateDisplayName(target) { // $FlowFixMe return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')'; } var _TYPE_STATICS; var REACT_STATICS = { childContextTypes: true, contextTypes: true, defaultProps: true, displayName: true, getDerivedStateFromProps: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[react_is__WEBPACK_IMPORTED_MODULE_4__["ForwardRef"]] = { $$typeof: true, render: true }, _TYPE_STATICS); var defineProperty$1 = Object.defineProperty, getOwnPropertyNames = Object.getOwnPropertyNames, _Object$getOwnPropert = Object.getOwnPropertySymbols, getOwnPropertySymbols = _Object$getOwnPropert === undefined ? function () { return []; } : _Object$getOwnPropert, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getPrototypeOf = Object.getPrototypeOf, objectPrototype = Object.prototype; var arrayPrototype = Array.prototype; function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } var keys = arrayPrototype.concat(getOwnPropertyNames(sourceComponent), // $FlowFixMe getOwnPropertySymbols(sourceComponent)); var targetStatics = TYPE_STATICS[targetComponent.$$typeof] || REACT_STATICS; var sourceStatics = TYPE_STATICS[sourceComponent.$$typeof] || REACT_STATICS; var i = keys.length; var descriptor = void 0; var key = void 0; // eslint-disable-next-line no-plusplus while (i--) { key = keys[i]; if ( // $FlowFixMe !KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && // $FlowFixMe !(targetStatics && targetStatics[key])) { descriptor = getOwnPropertyDescriptor(sourceComponent, key); if (descriptor) { try { // Avoid failures from read-only properties defineProperty$1(targetComponent, key, descriptor); } catch (e) { /* fail silently */ } } } } return targetComponent; } return targetComponent; } // function isDerivedReactComponent(fn) { return !!(fn && fn.prototype && fn.prototype.isReactComponent); } // // Helper to call a given function, only once var once = (function (cb) { var called = false; return function () { if (!called) { called = true; cb.apply(undefined, arguments); } }; }); // var ThemeContext = Object(react__WEBPACK_IMPORTED_MODULE_2__["createContext"])(); var ThemeConsumer = ThemeContext.Consumer; /** * Provide a theme to an entire react component tree via context */ var ThemeProvider = function (_Component) { inherits(ThemeProvider, _Component); function ThemeProvider(props) { classCallCheck(this, ThemeProvider); var _this = possibleConstructorReturn(this, _Component.call(this, props)); _this.getContext = Object(memoize_one__WEBPACK_IMPORTED_MODULE_5__["default"])(_this.getContext.bind(_this)); _this.renderInner = _this.renderInner.bind(_this); return _this; } ThemeProvider.prototype.render = function render() { if (!this.props.children) return null; return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( ThemeContext.Consumer, null, this.renderInner ); }; ThemeProvider.prototype.renderInner = function renderInner(outerTheme) { var context = this.getContext(this.props.theme, outerTheme); return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( ThemeContext.Provider, { value: context }, this.props.children ); }; /** * Get the theme from the props, supporting both (outerTheme) => {} * as well as object notation */ ThemeProvider.prototype.getTheme = function getTheme(theme, outerTheme) { if (isFunction(theme)) { var mergedTheme = theme(outerTheme); if ( true && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === 'undefined' ? 'undefined' : _typeof(mergedTheme)) !== 'object')) { throw new StyledComponentsError(7); } return mergedTheme; } if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') { throw new StyledComponentsError(8); } return _extends({}, outerTheme, theme); }; ThemeProvider.prototype.getContext = function getContext(theme, outerTheme) { return this.getTheme(theme, outerTheme); }; return ThemeProvider; }(react__WEBPACK_IMPORTED_MODULE_2__["Component"]); // var CLOSING_TAG_R = /^\s*<\/[a-z]/i; var ServerStyleSheet = function () { function ServerStyleSheet() { classCallCheck(this, ServerStyleSheet); /* The master sheet might be reset, so keep a reference here */ this.masterSheet = StyleSheet.master; this.instance = this.masterSheet.clone(); this.sealed = false; } /** * Mark the ServerStyleSheet as being fully emitted and manually GC it from the * StyleSheet singleton. */ ServerStyleSheet.prototype.seal = function seal() { if (!this.sealed) { /* Remove sealed StyleSheets from the master sheet */ var index = this.masterSheet.clones.indexOf(this.instance); this.masterSheet.clones.splice(index, 1); this.sealed = true; } }; ServerStyleSheet.prototype.collectStyles = function collectStyles(children) { if (this.sealed) { throw new StyledComponentsError(2); } return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( StyleSheetManager, { sheet: this.instance }, children ); }; ServerStyleSheet.prototype.getStyleTags = function getStyleTags() { this.seal(); return this.instance.toHTML(); }; ServerStyleSheet.prototype.getStyleElement = function getStyleElement() { this.seal(); return this.instance.toReactElements(); }; ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) { var _this = this; { throw new StyledComponentsError(3); } /* the tag index keeps track of which tags have already been emitted */ var instance = this.instance; var instanceTagIndex = 0; var streamAttr = SC_STREAM_ATTR + '="true"'; var transformer = new stream.Transform({ transform: function appendStyleChunks(chunk, /* encoding */_, callback) { var tags = instance.tags; var html = ''; /* retrieve html for each new style tag */ for (; instanceTagIndex < tags.length; instanceTagIndex += 1) { var tag = tags[instanceTagIndex]; html += tag.toHTML(streamAttr); } /* force our StyleSheets to emit entirely new tags */ instance.sealAllTags(); var renderedHtml = chunk.toString(); /* prepend style html to chunk, unless the start of the chunk is a closing tag in which case append right after that */ if (CLOSING_TAG_R.test(renderedHtml)) { var endOfClosingTag = renderedHtml.indexOf('>'); this.push(renderedHtml.slice(0, endOfClosingTag + 1) + html + renderedHtml.slice(endOfClosingTag + 1)); } else this.push(html + renderedHtml); callback(); } }); readableStream.on('end', function () { return _this.seal(); }); readableStream.on('error', function (err) { _this.seal(); // forward the error to the transform stream transformer.emit('error', err); }); return readableStream.pipe(transformer); }; return ServerStyleSheet; }(); // var StyleSheetContext = Object(react__WEBPACK_IMPORTED_MODULE_2__["createContext"])(); var StyleSheetConsumer = StyleSheetContext.Consumer; var StyleSheetManager = function (_Component) { inherits(StyleSheetManager, _Component); function StyleSheetManager(props) { classCallCheck(this, StyleSheetManager); var _this = possibleConstructorReturn(this, _Component.call(this, props)); _this.getContext = Object(memoize_one__WEBPACK_IMPORTED_MODULE_5__["default"])(_this.getContext); return _this; } StyleSheetManager.prototype.getContext = function getContext(sheet, target) { if (sheet) { return sheet; } else if (target) { return new StyleSheet(target); } else { throw new StyledComponentsError(4); } }; StyleSheetManager.prototype.render = function render() { var _props = this.props, children = _props.children, sheet = _props.sheet, target = _props.target; return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( StyleSheetContext.Provider, { value: this.getContext(sheet, target) }, true ? react__WEBPACK_IMPORTED_MODULE_2___default.a.Children.only(children) : undefined ); }; return StyleSheetManager; }(react__WEBPACK_IMPORTED_MODULE_2__["Component"]); true ? StyleSheetManager.propTypes = { sheet: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.instanceOf(StyleSheet), prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.instanceOf(ServerStyleSheet)]), target: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.shape({ appendChild: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.func.isRequired }) } : undefined; // var THEME_PROP_REGEX = /\.theme[.[]/; var identifiers = {}; /* We depend on components having unique IDs */ function generateId(_ComponentStyle, _displayName, parentComponentId) { var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName); /** * This ensures uniqueness if two components happen to share * the same displayName. */ var nr = (identifiers[displayName] || 0) + 1; identifiers[displayName] = nr; var componentId = displayName + '-' + _ComponentStyle.generateName(displayName + nr); return parentComponentId ? parentComponentId + '-' + componentId : componentId; } // $FlowFixMe var StyledComponent = function (_Component) { inherits(StyledComponent, _Component); function StyledComponent() { classCallCheck(this, StyledComponent); var _this = possibleConstructorReturn(this, _Component.call(this)); _this.attrs = {}; _this.renderOuter = _this.renderOuter.bind(_this); _this.renderInner = _this.renderInner.bind(_this); if (true) { _this.warnInnerRef = once(function (displayName) { return ( // eslint-disable-next-line no-console console.warn('The "innerRef" API has been removed in styled-components v4 in favor of React 16 ref forwarding, use "ref" instead like a typical component. "innerRef" was detected on component "' + displayName + '".') ); }); _this.warnAttrsFnObjectKeyDeprecated = once(function (key, displayName) { return ( // eslint-disable-next-line no-console console.warn('Functions as object-form attrs({}) keys are now deprecated and will be removed in a future version of styled-components. Switch to the new attrs(props => ({})) syntax instead for easier and more powerful composition. The attrs key in question is "' + key + '" on component "' + displayName + '".', '\n ' + new Error().stack) ); }); _this.warnNonStyledComponentAttrsObjectKey = once(function (key, displayName) { return ( // eslint-disable-next-line no-console console.warn('It looks like you\'ve used a non styled-component as the value for the "' + key + '" prop in an object-form attrs constructor of "' + displayName + '".\n' + 'You should use the new function-form attrs constructor which avoids this issue: attrs(props => ({ yourStuff }))\n' + "To continue using the deprecated object syntax, you'll need to wrap your component prop in a function to make it available inside the styled component (you'll still get the deprecation warning though.)\n" + ('For example, { ' + key + ': () => InnerComponent } instead of { ' + key + ': InnerComponent }')) ); }); } return _this; } StyledComponent.prototype.render = function render() { return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( StyleSheetConsumer, null, this.renderOuter ); }; StyledComponent.prototype.renderOuter = function renderOuter() { var styleSheet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : StyleSheet.master; this.styleSheet = styleSheet; // No need to subscribe a static component to theme changes, it won't change anything if (this.props.forwardedComponent.componentStyle.isStatic) return this.renderInner(); return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( ThemeConsumer, null, this.renderInner ); }; StyledComponent.prototype.renderInner = function renderInner(theme) { var _props$forwardedCompo = this.props.forwardedComponent, componentStyle = _props$forwardedCompo.componentStyle, defaultProps = _props$forwardedCompo.defaultProps, displayName = _props$forwardedCompo.displayName, foldedComponentIds = _props$forwardedCompo.foldedComponentIds, styledComponentId = _props$forwardedCompo.styledComponentId, target = _props$forwardedCompo.target, usesTheme = _props$forwardedCompo.usesTheme; var generatedClassName = void 0; var rawTheme = void 0; if (componentStyle.isStatic) { generatedClassName = this.generateAndInjectStyles(EMPTY_OBJECT, this.props); } else { rawTheme = determineTheme(this.props, theme, defaultProps); generatedClassName = this.generateAndInjectStyles(rawTheme || EMPTY_OBJECT, this.props); if ( true && usesTheme && !rawTheme) { console.error('Component \'' + // $FlowFixMe displayName + '\' (.' + styledComponentId + ') references the \'theme\' prop in its styles but no theme was provided via prop or .'); } } var elementToBeCreated = this.props.as || this.attrs.as || target; var isTargetTag = isTag(elementToBeCreated); var propsForElement = {}; var computedProps = _extends({}, this.props, this.attrs); var key = void 0; // eslint-disable-next-line guard-for-in for (key in computedProps) { if ( true && key === 'innerRef' && isTargetTag) { this.warnInnerRef(displayName); } if (key === 'forwardedComponent' || key === 'as') { continue; } else if (key === 'forwardedRef') propsForElement.ref = computedProps[key];else if (key === 'forwardedAs') propsForElement.as = computedProps[key];else if (!isTargetTag || Object(_emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_7__["default"])(key)) { // Don't pass through non HTML tags through to HTML elements propsForElement[key] = computedProps[key]; } } if (this.props.style && this.attrs.style) { propsForElement.style = _extends({}, this.attrs.style, this.props.style); } propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, this.props.className, this.attrs.className).filter(Boolean).join(' '); return Object(react__WEBPACK_IMPORTED_MODULE_2__["createElement"])(elementToBeCreated, propsForElement); }; StyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props, attrs) { var _this2 = this; var context = _extends({}, props, { theme: theme }); if (!attrs.length) return context; this.attrs = {}; attrs.forEach(function (attrDef) { var resolvedAttrDef = attrDef; var attrDefWasFn = false; var attr = void 0; var key = void 0; if (isFunction(resolvedAttrDef)) { // $FlowFixMe resolvedAttrDef = resolvedAttrDef(context); attrDefWasFn = true; } /* eslint-disable guard-for-in */ // $FlowFixMe for (key in resolvedAttrDef) { attr = resolvedAttrDef[key]; if (!attrDefWasFn) { if (isFunction(attr) && !isDerivedReactComponent(attr) && !isStyledComponent(attr)) { if (true) { _this2.warnAttrsFnObjectKeyDeprecated(key, props.forwardedComponent.displayName); } attr = attr(context); if ( true && react__WEBPACK_IMPORTED_MODULE_2___default.a.isValidElement(attr)) { _this2.warnNonStyledComponentAttrsObjectKey(key, props.forwardedComponent.displayName); } } } _this2.attrs[key] = attr; context[key] = attr; } /* eslint-enable */ }); return context; }; StyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) { var _props$forwardedCompo2 = props.forwardedComponent, attrs = _props$forwardedCompo2.attrs, componentStyle = _props$forwardedCompo2.componentStyle, warnTooManyClasses = _props$forwardedCompo2.warnTooManyClasses; // statically styled-components don't need to build an execution context object, // and shouldn't be increasing the number of class names if (componentStyle.isStatic && !attrs.length) { return componentStyle.generateAndInjectStyles(EMPTY_OBJECT, this.styleSheet); } var className = componentStyle.generateAndInjectStyles(this.buildExecutionContext(theme, props, attrs), this.styleSheet); if ( true && warnTooManyClasses) warnTooManyClasses(className); return className; }; return StyledComponent; }(react__WEBPACK_IMPORTED_MODULE_2__["Component"]); function createStyledComponent(target, options, rules) { var isTargetStyledComp = isStyledComponent(target); var isClass = !isTag(target); var _options$displayName = options.displayName, displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName, _options$componentId = options.componentId, componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId, _options$ParentCompon = options.ParentComponent, ParentComponent = _options$ParentCompon === undefined ? StyledComponent : _options$ParentCompon, _options$attrs = options.attrs, attrs = _options$attrs === undefined ? EMPTY_ARRAY : _options$attrs; var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId; // fold the underlying StyledComponent attrs up (implicit extend) var finalAttrs = // $FlowFixMe isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs; var componentStyle = new ComponentStyle(isTargetStyledComp ? // fold the underlying StyledComponent rules up (implicit extend) // $FlowFixMe target.componentStyle.rules.concat(rules) : rules, finalAttrs, styledComponentId); /** * forwardRef creates a new interim component, which we'll take advantage of * instead of extending ParentComponent to create _another_ interim class */ var WrappedStyledComponent = void 0; var forwardRef = function forwardRef(props, ref) { return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(ParentComponent, _extends({}, props, { forwardedComponent: WrappedStyledComponent, forwardedRef: ref })); }; forwardRef.displayName = displayName; WrappedStyledComponent = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef(forwardRef); WrappedStyledComponent.displayName = displayName; // $FlowFixMe WrappedStyledComponent.attrs = finalAttrs; // $FlowFixMe WrappedStyledComponent.componentStyle = componentStyle; // $FlowFixMe WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? // $FlowFixMe Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY; // $FlowFixMe WrappedStyledComponent.styledComponentId = styledComponentId; // fold the underlying StyledComponent target up since we folded the styles // $FlowFixMe WrappedStyledComponent.target = isTargetStyledComp ? target.target : target; // $FlowFixMe WrappedStyledComponent.withComponent = function withComponent(tag) { var previousComponentId = options.componentId, optionsToCopy = objectWithoutProperties(options, ['componentId']); var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag))); var newOptions = _extends({}, optionsToCopy, { attrs: finalAttrs, componentId: newComponentId, ParentComponent: ParentComponent }); return createStyledComponent(tag, newOptions, rules); }; // $FlowFixMe Object.defineProperty(WrappedStyledComponent, 'defaultProps', { get: function get$$1() { return this._foldedDefaultProps; }, set: function set$$1(obj) { // $FlowFixMe this._foldedDefaultProps = isTargetStyledComp ? Object(merge_anything__WEBPACK_IMPORTED_MODULE_8__["default"])(target.defaultProps, obj) : obj; } }); if (true) { // $FlowFixMe WrappedStyledComponent.usesTheme = componentStyle.rules.some(function (x) { return isFunction(x) && THEME_PROP_REGEX.test(x.toString()); }); // $FlowFixMe WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName); } // $FlowFixMe WrappedStyledComponent.toString = function () { return '.' + WrappedStyledComponent.styledComponentId; }; if (isClass) { hoistNonReactStatics(WrappedStyledComponent, target, { // all SC-specific things should not be hoisted attrs: true, componentStyle: true, displayName: true, foldedComponentIds: true, styledComponentId: true, target: true, withComponent: true }); } return WrappedStyledComponent; } // // Thanks to ReactDOMFactories for this handy list! var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan']; // var styled = function styled(tag) { return constructWithOptions(createStyledComponent, tag); }; // Shorthands for all valid HTML Elements domElements.forEach(function (domElement) { styled[domElement] = styled(domElement); }); // var GlobalStyle = function () { function GlobalStyle(rules, componentId) { classCallCheck(this, GlobalStyle); this.rules = rules; this.componentId = componentId; this.isStatic = isStaticRules(rules, EMPTY_ARRAY); if (!StyleSheet.master.hasId(componentId)) { StyleSheet.master.deferredInject(componentId, []); } } GlobalStyle.prototype.createStyles = function createStyles(executionContext, styleSheet) { var flatCSS = flatten(this.rules, executionContext, styleSheet); var css = stringifyRules(flatCSS, ''); styleSheet.inject(this.componentId, css); }; GlobalStyle.prototype.removeStyles = function removeStyles(styleSheet) { var componentId = this.componentId; if (styleSheet.hasId(componentId)) { styleSheet.remove(componentId); } }; // TODO: overwrite in-place instead of remove+create? GlobalStyle.prototype.renderStyles = function renderStyles(executionContext, styleSheet) { this.removeStyles(styleSheet); this.createStyles(executionContext, styleSheet); }; return GlobalStyle; }(); // // place our cache into shared context so it'll persist between HMRs if (IS_BROWSER) { window.scCGSHMRCache = {}; } function createGlobalStyle(strings) { for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { interpolations[_key - 1] = arguments[_key]; } var rules = css.apply(undefined, [strings].concat(interpolations)); var id = 'sc-global-' + murmurhash(JSON.stringify(rules)); var style = new GlobalStyle(rules, id); var GlobalStyleComponent = function (_React$Component) { inherits(GlobalStyleComponent, _React$Component); function GlobalStyleComponent(props) { classCallCheck(this, GlobalStyleComponent); var _this = possibleConstructorReturn(this, _React$Component.call(this, props)); var _this$constructor = _this.constructor, globalStyle = _this$constructor.globalStyle, styledComponentId = _this$constructor.styledComponentId; if (IS_BROWSER) { window.scCGSHMRCache[styledComponentId] = (window.scCGSHMRCache[styledComponentId] || 0) + 1; } /** * This fixes HMR compatibility. Don't ask me why, but this combination of * caching the closure variables via statics and then persisting the statics in * state works across HMR where no other combination did. ¯\_(ツ)_/¯ */ _this.state = { globalStyle: globalStyle, styledComponentId: styledComponentId }; return _this; } GlobalStyleComponent.prototype.componentWillUnmount = function componentWillUnmount() { if (window.scCGSHMRCache[this.state.styledComponentId]) { window.scCGSHMRCache[this.state.styledComponentId] -= 1; } /** * Depending on the order "render" is called this can cause the styles to be lost * until the next render pass of the remaining instance, which may * not be immediate. */ if (window.scCGSHMRCache[this.state.styledComponentId] === 0) { this.state.globalStyle.removeStyles(this.styleSheet); } }; GlobalStyleComponent.prototype.render = function render() { var _this2 = this; if ( true && react__WEBPACK_IMPORTED_MODULE_2___default.a.Children.count(this.props.children)) { // eslint-disable-next-line no-console console.warn('The global style component ' + this.state.styledComponentId + ' was given child JSX. createGlobalStyle does not render children.'); } return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( StyleSheetConsumer, null, function (styleSheet) { _this2.styleSheet = styleSheet || StyleSheet.master; var globalStyle = _this2.state.globalStyle; if (globalStyle.isStatic) { globalStyle.renderStyles(STATIC_EXECUTION_CONTEXT, _this2.styleSheet); return null; } else { return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( ThemeConsumer, null, function (theme) { // $FlowFixMe var defaultProps = _this2.constructor.defaultProps; var context = _extends({}, _this2.props); if (typeof theme !== 'undefined') { context.theme = determineTheme(_this2.props, theme, defaultProps); } globalStyle.renderStyles(context, _this2.styleSheet); return null; } ); } } ); }; return GlobalStyleComponent; }(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component); GlobalStyleComponent.globalStyle = style; GlobalStyleComponent.styledComponentId = id; return GlobalStyleComponent; } // var replaceWhitespace = function replaceWhitespace(str) { return str.replace(/\s|\\n/g, ''); }; function keyframes(strings) { /* Warning if you've used keyframes on React Native */ if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { // eslint-disable-next-line no-console console.warn('`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.'); } for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { interpolations[_key - 1] = arguments[_key]; } var rules = css.apply(undefined, [strings].concat(interpolations)); var name = generateAlphabeticName(murmurhash(replaceWhitespace(JSON.stringify(rules)))); return new Keyframes(name, stringifyRules(rules, name, '@keyframes')); } // var withTheme = (function (Component$$1) { var WithTheme = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef(function (props, ref) { return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( ThemeConsumer, null, function (theme) { // $FlowFixMe var defaultProps = Component$$1.defaultProps; var themeProp = determineTheme(props, theme, defaultProps); if ( true && themeProp === undefined) { // eslint-disable-next-line no-console console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "' + getComponentName(Component$$1) + '"'); } return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(Component$$1, _extends({}, props, { theme: themeProp, ref: ref })); } ); }); hoistNonReactStatics(WithTheme, Component$$1); WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')'; return WithTheme; }); // /* eslint-disable */ var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = { StyleSheet: StyleSheet }; // /* Warning if you've imported this file on React Native */ if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { // eslint-disable-next-line no-console console.warn("It looks like you've imported 'styled-components' on React Native.\n" + "Perhaps you're looking to import 'styled-components/native'?\n" + 'Read more about this at https://www.styled-components.com/docs/basics#react-native'); } /* Warning if there are several instances of styled-components */ if ( true && typeof window !== 'undefined' && typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Node.js') === -1 && navigator.userAgent.indexOf('jsdom') === -1) { window['__styled-components-init__'] = window['__styled-components-init__'] || 0; if (window['__styled-components-init__'] === 1) { // eslint-disable-next-line no-console console.warn("It looks like there are several instances of 'styled-components' initialized in this application. " + 'This may cause dynamic styles not rendering properly, errors happening during rehydration process ' + 'and makes your application bigger without a good reason.\n\n' + 'See https://s-c.sh/2BAXzed for more info.'); } window['__styled-components-init__'] += 1; } // /* harmony default export */ __webpack_exports__["default"] = (styled); //# sourceMappingURL=styled-components.browser.esm.js.map /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"))) /***/ }), /***/ "./node_modules/stylis-rule-sheet/index.js": /*!*************************************************!*\ !*** ./node_modules/stylis-rule-sheet/index.js ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { (function (factory) { true ? (module['exports'] = factory()) : undefined }(function () { 'use strict' return function (insertRule) { var delimiter = '/*|*/' var needle = delimiter+'}' function toSheet (block) { if (block) try { insertRule(block + '}') } catch (e) {} } return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) { switch (context) { // property case 1: // @import if (depth === 0 && content.charCodeAt(0) === 64) return insertRule(content+';'), '' break // selector case 2: if (ns === 0) return content + delimiter break // at-rule case 3: switch (ns) { // @font-face, @page case 102: case 112: return insertRule(selectors[0]+content), '' default: return content + (at === 0 ? delimiter : '') } case -2: content.split(needle).forEach(toSheet) } } } })) /***/ }), /***/ "./node_modules/stylis/stylis.min.js": /*!*******************************************!*\ !*** ./node_modules/stylis/stylis.min.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { !function(e){ true?module.exports=e(null):undefined}(function e(a){"use strict";var r=/^\0+/g,c=/[\0\r\f]/g,s=/: */g,t=/zoo|gra/,i=/([,: ])(transform)/g,f=/,+\s*(?![^(]*[)])/g,n=/ +\s*(?![^(]*[)])/g,l=/ *[\0] */g,o=/,\r+?/g,h=/([\t\r\n ])*\f?&/g,u=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,d=/\W+/g,b=/@(k\w+)\s*(\S*)\s*/,p=/::(place)/g,k=/:(read-only)/g,g=/\s+(?=[{\];=:>])/g,A=/([[}=:>])\s+/g,C=/(\{[^{]+?);(?=\})/g,w=/\s{2,}/g,v=/([^\(])(:+) */g,m=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,$=/([\s\S]*?);/g,y=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,j=/stretch|:\s*\w+\-(?:conte|avail)/,z=/([^-])(image-set\()/,N="-webkit-",S="-moz-",F="-ms-",W=59,q=125,B=123,D=40,E=41,G=91,H=93,I=10,J=13,K=9,L=64,M=32,P=38,Q=45,R=95,T=42,U=44,V=58,X=39,Y=34,Z=47,_=62,ee=43,ae=126,re=0,ce=12,se=11,te=107,ie=109,fe=115,ne=112,le=111,oe=105,he=99,ue=100,de=112,be=1,pe=1,ke=0,ge=1,Ae=1,Ce=1,we=0,ve=0,me=0,xe=[],$e=[],ye=0,Oe=null,je=-2,ze=-1,Ne=0,Se=1,Fe=2,We=3,qe=0,Be=1,De="",Ee="",Ge="";function He(e,a,s,t,i){for(var f,n,o=0,h=0,u=0,d=0,g=0,A=0,C=0,w=0,m=0,$=0,y=0,O=0,j=0,z=0,R=0,we=0,$e=0,Oe=0,je=0,ze=s.length,Je=ze-1,Re="",Te="",Ue="",Ve="",Xe="",Ye="";R0)Te=Te.replace(c,"");if(Te.trim().length>0){switch(C){case M:case K:case W:case J:case I:break;default:Te+=s.charAt(R)}C=W}}if(1===$e)switch(C){case B:case q:case W:case Y:case X:case D:case E:case U:$e=0;case K:case J:case I:case M:break;default:for($e=0,je=R,g=C,R--,C=W;je0)++R,C=g;case B:je=ze}}switch(C){case B:for(g=(Te=Te.trim()).charCodeAt(0),y=1,je=++R;R0)Te=Te.replace(c,"");switch(A=Te.charCodeAt(1)){case ue:case ie:case fe:case Q:f=a;break;default:f=xe}if(je=(Ue=He(a,f,Ue,A,i+1)).length,me>0&&0===je)je=Te.length;if(ye>0)if(f=Ie(xe,Te,Oe),n=Pe(We,Ue,f,a,pe,be,je,A,i,t),Te=f.join(""),void 0!==n)if(0===(je=(Ue=n.trim()).length))A=0,Ue="";if(je>0)switch(A){case fe:Te=Te.replace(x,Me);case ue:case ie:case Q:Ue=Te+"{"+Ue+"}";break;case te:if(Ue=(Te=Te.replace(b,"$1 $2"+(Be>0?De:"")))+"{"+Ue+"}",1===Ae||2===Ae&&Le("@"+Ue,3))Ue="@"+N+Ue+"@"+Ue;else Ue="@"+Ue;break;default:if(Ue=Te+Ue,t===de)Ve+=Ue,Ue=""}else Ue="";break;default:Ue=He(a,Ie(a,Te,Oe),Ue,t,i+1)}Xe+=Ue,O=0,$e=0,z=0,we=0,Oe=0,j=0,Te="",Ue="",C=s.charCodeAt(++R);break;case q:case W:if((je=(Te=(we>0?Te.replace(c,""):Te).trim()).length)>1){if(0===z)if((g=Te.charCodeAt(0))===Q||g>96&&g<123)je=(Te=Te.replace(" ",":")).length;if(ye>0)if(void 0!==(n=Pe(Se,Te,a,e,pe,be,Ve.length,t,i,t)))if(0===(je=(Te=n.trim()).length))Te="\0\0";switch(g=Te.charCodeAt(0),A=Te.charCodeAt(1),g){case re:break;case L:if(A===oe||A===he){Ye+=Te+s.charAt(R);break}default:if(Te.charCodeAt(je-1)===V)break;Ve+=Ke(Te,g,A,Te.charCodeAt(2))}}O=0,$e=0,z=0,we=0,Oe=0,Te="",C=s.charCodeAt(++R)}}switch(C){case J:case I:if(h+d+u+o+ve===0)switch($){case E:case X:case Y:case L:case ae:case _:case T:case ee:case Z:case Q:case V:case U:case W:case B:case q:break;default:if(z>0)$e=1}if(h===Z)h=0;else if(ge+O===0&&t!==te&&Te.length>0)we=1,Te+="\0";if(ye*qe>0)Pe(Ne,Te,a,e,pe,be,Ve.length,t,i,t);be=1,pe++;break;case W:case q:if(h+d+u+o===0){be++;break}default:switch(be++,Re=s.charAt(R),C){case K:case M:if(d+o+h===0)switch(w){case U:case V:case K:case M:Re="";break;default:if(C!==M)Re=" "}break;case re:Re="\\0";break;case ce:Re="\\f";break;case se:Re="\\v";break;case P:if(d+h+o===0&&ge>0)Oe=1,we=1,Re="\f"+Re;break;case 108:if(d+h+o+ke===0&&z>0)switch(R-z){case 2:if(w===ne&&s.charCodeAt(R-3)===V)ke=w;case 8:if(m===le)ke=m}break;case V:if(d+h+o===0)z=R;break;case U:if(h+u+d+o===0)we=1,Re+="\r";break;case Y:case X:if(0===h)d=d===C?0:0===d?C:d;break;case G:if(d+h+u===0)o++;break;case H:if(d+h+u===0)o--;break;case E:if(d+h+o===0)u--;break;case D:if(d+h+o===0){if(0===O)switch(2*w+3*m){case 533:break;default:y=0,O=1}u++}break;case L:if(h+u+d+o+z+j===0)j=1;break;case T:case Z:if(d+o+u>0)break;switch(h){case 0:switch(2*C+3*s.charCodeAt(R+1)){case 235:h=Z;break;case 220:je=R,h=T}break;case T:if(C===Z&&w===T&&je+2!==R){if(33===s.charCodeAt(je+2))Ve+=s.substring(je,R+1);Re="",h=0}}}if(0===h){if(ge+d+o+j===0&&t!==te&&C!==W)switch(C){case U:case ae:case _:case ee:case E:case D:if(0===O){switch(w){case K:case M:case I:case J:Re+="\0";break;default:Re="\0"+Re+(C===U?"":"\0")}we=1}else switch(C){case D:if(z+7===R&&108===w)z=0;O=++y;break;case E:if(0==(O=--y))we=1,Re+="\0"}break;case K:case M:switch(w){case re:case B:case q:case W:case U:case ce:case K:case M:case I:case J:break;default:if(0===O)we=1,Re+="\0"}}if(Te+=Re,C!==M&&C!==K)$=C}}m=w,w=C,R++}if(je=Ve.length,me>0)if(0===je&&0===Xe.length&&0===a[0].length==false)if(t!==ie||1===a.length&&(ge>0?Ee:Ge)===a[0])je=a.join(",").length+2;if(je>0){if(f=0===ge&&t!==te?function(e){for(var a,r,s=0,t=e.length,i=Array(t);s1)continue;if(u=n.charCodeAt(n.length-1),d=r.charCodeAt(0),a="",0!==o)switch(u){case T:case ae:case _:case ee:case M:case D:break;default:a=" "}switch(d){case P:r=a+Ee;case ae:case _:case ee:case M:case E:case D:break;case G:r=a+r+Ee;break;case V:switch(2*r.charCodeAt(1)+3*r.charCodeAt(2)){case 530:if(Ce>0){r=a+r.substring(8,h-1);break}default:if(o<1||f[o-1].length<1)r=a+Ee+r}break;case U:a="";default:if(h>1&&r.indexOf(":")>0)r=a+r.replace(v,"$1"+Ee+"$2");else r=a+r+Ee}n+=r}i[s]=n.replace(c,"").trim()}return i}(a):a,ye>0)if(void 0!==(n=Pe(Fe,Ve,f,e,pe,be,je,t,i,t))&&0===(Ve=n).length)return Ye+Ve+Xe;if(Ve=f.join(",")+"{"+Ve+"}",Ae*ke!=0){if(2===Ae&&!Le(Ve,2))ke=0;switch(ke){case le:Ve=Ve.replace(k,":"+S+"$1")+Ve;break;case ne:Ve=Ve.replace(p,"::"+N+"input-$1")+Ve.replace(p,"::"+S+"$1")+Ve.replace(p,":"+F+"input-$1")+Ve}ke=0}}return Ye+Ve+Xe}function Ie(e,a,r){var c=a.trim().split(o),s=c,t=c.length,i=e.length;switch(i){case 0:case 1:for(var f=0,n=0===i?"":e[0]+" ";f0&&ge>0)return s.replace(u,"$1").replace(h,"$1"+Ge);break;default:return e.trim()+s.replace(h,"$1"+e.trim())}default:if(r*ge>0&&s.indexOf("\f")>0)return s.replace(h,(e.charCodeAt(0)===V?"":"$1")+e.trim())}return e+s}function Ke(e,a,r,c){var l,o=0,h=e+";",u=2*a+3*r+4*c;if(944===u)return function(e){var a=e.length,r=e.indexOf(":",9)+1,c=e.substring(0,r).trim(),s=e.substring(r,a-1).trim();switch(e.charCodeAt(9)*Be){case 0:break;case Q:if(110!==e.charCodeAt(10))break;default:for(var t=s.split((s="",f)),i=0,r=0,a=t.length;iL&&h<90||h>96&&h<123||h===R||h===Q&&l.charCodeAt(1)!==Q))switch(isNaN(parseFloat(l))+(-1!==l.indexOf("("))){case 1:switch(l){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:l+=De}}o[r++]=l}s+=(0===i?"":",")+o.join(" ")}}if(s=c+s+";",1===Ae||2===Ae&&Le(s,1))return N+s+s;return s}(h);else if(0===Ae||2===Ae&&!Le(h,1))return h;switch(u){case 1015:return 97===h.charCodeAt(10)?N+h+h:h;case 951:return 116===h.charCodeAt(3)?N+h+h:h;case 963:return 110===h.charCodeAt(5)?N+h+h:h;case 1009:if(100!==h.charCodeAt(4))break;case 969:case 942:return N+h+h;case 978:return N+h+S+h+h;case 1019:case 983:return N+h+S+h+F+h+h;case 883:if(h.charCodeAt(8)===Q)return N+h+h;if(h.indexOf("image-set(",11)>0)return h.replace(z,"$1"+N+"$2")+h;return h;case 932:if(h.charCodeAt(4)===Q)switch(h.charCodeAt(5)){case 103:return N+"box-"+h.replace("-grow","")+N+h+F+h.replace("grow","positive")+h;case 115:return N+h+F+h.replace("shrink","negative")+h;case 98:return N+h+F+h.replace("basis","preferred-size")+h}return N+h+F+h+h;case 964:return N+h+F+"flex-"+h+h;case 1023:if(99!==h.charCodeAt(8))break;return l=h.substring(h.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),N+"box-pack"+l+N+h+F+"flex-pack"+l+h;case 1005:return t.test(h)?h.replace(s,":"+N)+h.replace(s,":"+S)+h:h;case 1e3:switch(o=(l=h.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(o)){case 226:l=h.replace(m,"tb");break;case 232:l=h.replace(m,"tb-rl");break;case 220:l=h.replace(m,"lr");break;default:return h}return N+h+F+l+h;case 1017:if(-1===h.indexOf("sticky",9))return h;case 975:switch(o=(h=e).length-10,u=(l=(33===h.charCodeAt(o)?h.substring(0,o):h).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(l.charCodeAt(8)<111)break;case 115:h=h.replace(l,N+l)+";"+h;break;case 207:case 102:h=h.replace(l,N+(u>102?"inline-":"")+"box")+";"+h.replace(l,N+l)+";"+h.replace(l,F+l+"box")+";"+h}return h+";";case 938:if(h.charCodeAt(5)===Q)switch(h.charCodeAt(6)){case 105:return l=h.replace("-items",""),N+h+N+"box-"+l+F+"flex-"+l+h;case 115:return N+h+F+"flex-item-"+h.replace(y,"")+h;default:return N+h+F+"flex-line-pack"+h.replace("align-content","").replace(y,"")+h}break;case 973:case 989:if(h.charCodeAt(3)!==Q||122===h.charCodeAt(4))break;case 931:case 953:if(true===j.test(e))if(115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0))return Ke(e.replace("stretch","fill-available"),a,r,c).replace(":fill-available",":stretch");else return h.replace(l,N+l)+h.replace(l,S+l.replace("fill-",""))+h;break;case 962:if(h=N+h+(102===h.charCodeAt(5)?F+h:"")+h,r+c===211&&105===h.charCodeAt(13)&&h.indexOf("transform",10)>0)return h.substring(0,h.indexOf(";",27)+1).replace(i,"$1"+N+"$2")+h}return h}function Le(e,a){var r=e.indexOf(1===a?":":"{"),c=e.substring(0,3!==a?r:10),s=e.substring(r+1,e.length-1);return Oe(2!==a?c:c.replace(O,"$1"),s,a)}function Me(e,a){var r=Ke(a,a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2));return r!==a+";"?r.replace($," or ($1)").substring(4):"("+a+")"}function Pe(e,a,r,c,s,t,i,f,n,l){for(var o,h=0,u=a;h0)De=s.replace(d,t===G?"":"-");if(t=1,1===ge)Ge=s;else Ee=s;var i,f=[Ge];if(ye>0)if(void 0!==(i=Pe(ze,r,f,f,pe,be,0,0,0,0))&&"string"==typeof i)r=i;var n=He(xe,f,r,0,0);if(ye>0)if(void 0!==(i=Pe(je,n,f,f,pe,be,n.length,0,0,0))&&"string"!=typeof(n=i))t=0;return De="",Ge="",Ee="",ke=0,pe=1,be=1,we*t==0?n:n.replace(c,"").replace(g,"").replace(A,"$1").replace(C,"$1").replace(w," ")}if(Te.use=function e(a){switch(a){case void 0:case null:ye=$e.length=0;break;default:if("function"==typeof a)$e[ye++]=a;else if("object"==typeof a)for(var r=0,c=a.length;r= 0; var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); if (needsAlphaFormat) { // Special case for "transparent", all other non-alpha formats // will return rgba when there is transparency. if (format === "name" && this._a === 0) { return this.toName(); } return this.toRgbString(); } if (format === "rgb") { formattedString = this.toRgbString(); } if (format === "prgb") { formattedString = this.toPercentageRgbString(); } if (format === "hex" || format === "hex6") { formattedString = this.toHexString(); } if (format === "hex3") { formattedString = this.toHexString(true); } if (format === "hex4") { formattedString = this.toHex8String(true); } if (format === "hex8") { formattedString = this.toHex8String(); } if (format === "name") { formattedString = this.toName(); } if (format === "hsl") { formattedString = this.toHslString(); } if (format === "hsv") { formattedString = this.toHsvString(); } return formattedString || this.toHexString(); }, clone: function() { return tinycolor(this.toString()); }, _applyModification: function(fn, args) { var color = fn.apply(null, [this].concat([].slice.call(args))); this._r = color._r; this._g = color._g; this._b = color._b; this.setAlpha(color._a); return this; }, lighten: function() { return this._applyModification(lighten, arguments); }, brighten: function() { return this._applyModification(brighten, arguments); }, darken: function() { return this._applyModification(darken, arguments); }, desaturate: function() { return this._applyModification(desaturate, arguments); }, saturate: function() { return this._applyModification(saturate, arguments); }, greyscale: function() { return this._applyModification(greyscale, arguments); }, spin: function() { return this._applyModification(spin, arguments); }, _applyCombination: function(fn, args) { return fn.apply(null, [this].concat([].slice.call(args))); }, analogous: function() { return this._applyCombination(analogous, arguments); }, complement: function() { return this._applyCombination(complement, arguments); }, monochromatic: function() { return this._applyCombination(monochromatic, arguments); }, splitcomplement: function() { return this._applyCombination(splitcomplement, arguments); }, triad: function() { return this._applyCombination(triad, arguments); }, tetrad: function() { return this._applyCombination(tetrad, arguments); } }; // If input is an object, force 1 into "1.0" to handle ratios properly // String input requires "1.0" as input, so 1 will be treated as 1 tinycolor.fromRatio = function(color, opts) { if (typeof color == "object") { var newColor = {}; for (var i in color) { if (color.hasOwnProperty(i)) { if (i === "a") { newColor[i] = color[i]; } else { newColor[i] = convertToPercentage(color[i]); } } } color = newColor; } return tinycolor(color, opts); }; // Given a string or object, convert that input to RGB // Possible string inputs: // // "red" // "#f00" or "f00" // "#ff0000" or "ff0000" // "#ff000000" or "ff000000" // "rgb 255 0 0" or "rgb (255, 0, 0)" // "rgb 1.0 0 0" or "rgb (1, 0, 0)" // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" // function inputToRGB(color) { var rgb = { r: 0, g: 0, b: 0 }; var a = 1; var s = null; var v = null; var l = null; var ok = false; var format = false; if (typeof color == "string") { color = stringInputToObject(color); } if (typeof color == "object") { if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { rgb = rgbToRgb(color.r, color.g, color.b); ok = true; format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { s = convertToPercentage(color.s); v = convertToPercentage(color.v); rgb = hsvToRgb(color.h, s, v); ok = true; format = "hsv"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { s = convertToPercentage(color.s); l = convertToPercentage(color.l); rgb = hslToRgb(color.h, s, l); ok = true; format = "hsl"; } if (color.hasOwnProperty("a")) { a = color.a; } } a = boundAlpha(a); return { ok: ok, format: color.format || format, r: mathMin(255, mathMax(rgb.r, 0)), g: mathMin(255, mathMax(rgb.g, 0)), b: mathMin(255, mathMax(rgb.b, 0)), a: a }; } // Conversion Functions // -------------------- // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: // // `rgbToRgb` // Handle bounds / percentage checking to conform to CSS color spec // // *Assumes:* r, g, b in [0, 255] or [0, 1] // *Returns:* { r, g, b } in [0, 255] function rgbToRgb(r, g, b){ return { r: bound01(r, 255) * 255, g: bound01(g, 255) * 255, b: bound01(b, 255) * 255 }; } // `rgbToHsl` // Converts an RGB color value to HSL. // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] // *Returns:* { h, s, l } in [0,1] function rgbToHsl(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); var max = mathMax(r, g, b), min = mathMin(r, g, b); var h, s, l = (max + min) / 2; if(max == min) { h = s = 0; // achromatic } else { var d = max - min; s = l > 0.5 ? d / (2 - max - min) : d / (max + min); switch(max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h, s: s, l: l }; } // `hslToRgb` // Converts an HSL color value to RGB. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] // *Returns:* { r, g, b } in the set [0, 255] function hslToRgb(h, s, l) { var r, g, b; h = bound01(h, 360); s = bound01(s, 100); l = bound01(l, 100); function hue2rgb(p, q, t) { if(t < 0) t += 1; if(t > 1) t -= 1; if(t < 1/6) return p + (q - p) * 6 * t; if(t < 1/2) return q; if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; return p; } if(s === 0) { r = g = b = l; // achromatic } else { var q = l < 0.5 ? l * (1 + s) : l + s - l * s; var p = 2 * l - q; r = hue2rgb(p, q, h + 1/3); g = hue2rgb(p, q, h); b = hue2rgb(p, q, h - 1/3); } return { r: r * 255, g: g * 255, b: b * 255 }; } // `rgbToHsv` // Converts an RGB color value to HSV // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] // *Returns:* { h, s, v } in [0,1] function rgbToHsv(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); var max = mathMax(r, g, b), min = mathMin(r, g, b); var h, s, v = max; var d = max - min; s = max === 0 ? 0 : d / max; if(max == min) { h = 0; // achromatic } else { switch(max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h, s: s, v: v }; } // `hsvToRgb` // Converts an HSV color value to RGB. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] // *Returns:* { r, g, b } in the set [0, 255] function hsvToRgb(h, s, v) { h = bound01(h, 360) * 6; s = bound01(s, 100); v = bound01(v, 100); var i = Math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod]; return { r: r * 255, g: g * 255, b: b * 255 }; } // `rgbToHex` // Converts an RGB color to hex // Assumes r, g, and b are contained in the set [0, 255] // Returns a 3 or 6 character hex function rgbToHex(r, g, b, allow3Char) { var hex = [ pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ]; // Return a 3 character hex if possible if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); } return hex.join(""); } // `rgbaToHex` // Converts an RGBA color plus alpha transparency to hex // Assumes r, g, b are contained in the set [0, 255] and // a in [0, 1]. Returns a 4 or 8 character rgba hex function rgbaToHex(r, g, b, a, allow4Char) { var hex = [ pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)), pad2(convertDecimalToHex(a)) ]; // Return a 4 character hex if possible if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); } return hex.join(""); } // `rgbaToArgbHex` // Converts an RGBA color to an ARGB Hex8 string // Rarely used, but required for "toFilter()" function rgbaToArgbHex(r, g, b, a) { var hex = [ pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ]; return hex.join(""); } // `equals` // Can be called with any tinycolor input tinycolor.equals = function (color1, color2) { if (!color1 || !color2) { return false; } return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); }; tinycolor.random = function() { return tinycolor.fromRatio({ r: mathRandom(), g: mathRandom(), b: mathRandom() }); }; // Modification Functions // ---------------------- // Thanks to less.js for some of the basics here // function desaturate(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.s -= amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } function saturate(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.s += amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } function greyscale(color) { return tinycolor(color).desaturate(100); } function lighten (color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.l += amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } function brighten(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var rgb = tinycolor(color).toRgb(); rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100)))); rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100)))); rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100)))); return tinycolor(rgb); } function darken (color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.l -= amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. // Values outside of this range will be wrapped into this range. function spin(color, amount) { var hsl = tinycolor(color).toHsl(); var hue = (hsl.h + amount) % 360; hsl.h = hue < 0 ? 360 + hue : hue; return tinycolor(hsl); } // Combination Functions // --------------------- // Thanks to jQuery xColor for some of the ideas behind these // function complement(color) { var hsl = tinycolor(color).toHsl(); hsl.h = (hsl.h + 180) % 360; return tinycolor(hsl); } function triad(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) ]; } function tetrad(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) ]; } function splitcomplement(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) ]; } function analogous(color, results, slices) { results = results || 6; slices = slices || 30; var hsl = tinycolor(color).toHsl(); var part = 360 / slices; var ret = [tinycolor(color)]; for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { hsl.h = (hsl.h + part) % 360; ret.push(tinycolor(hsl)); } return ret; } function monochromatic(color, results) { results = results || 6; var hsv = tinycolor(color).toHsv(); var h = hsv.h, s = hsv.s, v = hsv.v; var ret = []; var modification = 1 / results; while (results--) { ret.push(tinycolor({ h: h, s: s, v: v})); v = (v + modification) % 1; } return ret; } // Utility Functions // --------------------- tinycolor.mix = function(color1, color2, amount) { amount = (amount === 0) ? 0 : (amount || 50); var rgb1 = tinycolor(color1).toRgb(); var rgb2 = tinycolor(color2).toRgb(); var p = amount / 100; var rgba = { r: ((rgb2.r - rgb1.r) * p) + rgb1.r, g: ((rgb2.g - rgb1.g) * p) + rgb1.g, b: ((rgb2.b - rgb1.b) * p) + rgb1.b, a: ((rgb2.a - rgb1.a) * p) + rgb1.a }; return tinycolor(rgba); }; // Readability Functions // --------------------- // false // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false tinycolor.isReadable = function(color1, color2, wcag2) { var readability = tinycolor.readability(color1, color2); var wcag2Parms, out; out = false; wcag2Parms = validateWCAG2Parms(wcag2); switch (wcag2Parms.level + wcag2Parms.size) { case "AAsmall": case "AAAlarge": out = readability >= 4.5; break; case "AAlarge": out = readability >= 3; break; case "AAAsmall": out = readability >= 7; break; } return out; }; // `mostReadable` // Given a base color and a list of possible foreground or background // colors for that base, returns the most readable color. // Optionally returns Black or White if the most readable color is unreadable. // *Example* // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255" // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff" // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3" // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff" tinycolor.mostReadable = function(baseColor, colorList, args) { var bestColor = null; var bestScore = 0; var readability; var includeFallbackColors, level, size ; args = args || {}; includeFallbackColors = args.includeFallbackColors ; level = args.level; size = args.size; for (var i= 0; i < colorList.length ; i++) { readability = tinycolor.readability(baseColor, colorList[i]); if (readability > bestScore) { bestScore = readability; bestColor = tinycolor(colorList[i]); } } if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) { return bestColor; } else { args.includeFallbackColors=false; return tinycolor.mostReadable(baseColor,["#fff", "#000"],args); } }; // Big List of Colors // ------------------ // var names = tinycolor.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "00f", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", burntsienna: "ea7e5d", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "0ff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "f0f", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "663399", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" }; // Make it easy to access colors via `hexNames[hex]` var hexNames = tinycolor.hexNames = flip(names); // Utilities // --------- // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` function flip(o) { var flipped = { }; for (var i in o) { if (o.hasOwnProperty(i)) { flipped[o[i]] = i; } } return flipped; } // Return a valid alpha value [0,1] with all invalid values being set to 1 function boundAlpha(a) { a = parseFloat(a); if (isNaN(a) || a < 0 || a > 1) { a = 1; } return a; } // Take input from [0, n] and return it as [0, 1] function bound01(n, max) { if (isOnePointZero(n)) { n = "100%"; } var processPercent = isPercentage(n); n = mathMin(max, mathMax(0, parseFloat(n))); // Automatically convert percentage into number if (processPercent) { n = parseInt(n * max, 10) / 100; } // Handle floating point rounding errors if ((Math.abs(n - max) < 0.000001)) { return 1; } // Convert into [0, 1] range if it isn't already return (n % max) / parseFloat(max); } // Force a number between 0 and 1 function clamp01(val) { return mathMin(1, mathMax(0, val)); } // Parse a base-16 hex value into a base-10 integer function parseIntFromHex(val) { return parseInt(val, 16); } // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 // function isOnePointZero(n) { return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; } // Check to see if string passed in is a percentage function isPercentage(n) { return typeof n === "string" && n.indexOf('%') != -1; } // Force a hex value to have 2 characters function pad2(c) { return c.length == 1 ? '0' + c : '' + c; } // Replace a decimal with it's percentage value function convertToPercentage(n) { if (n <= 1) { n = (n * 100) + "%"; } return n; } // Converts a decimal to a hex value function convertDecimalToHex(d) { return Math.round(parseFloat(d) * 255).toString(16); } // Converts a hex value to a decimal function convertHexToDecimal(h) { return (parseIntFromHex(h) / 255); } var matchers = (function() { // var CSS_INTEGER = "[-\\+]?\\d+%?"; // var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; // Actual matching. // Parentheses and commas are optional, but not required. // Whitespace can take the place of commas or opening paren var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; return { CSS_UNIT: new RegExp(CSS_UNIT), rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ }; })(); // `isValidCSSUnit` // Take in a single string / number and check to see if it looks like a CSS unit // (see `matchers` above for definition). function isValidCSSUnit(color) { return !!matchers.CSS_UNIT.exec(color); } // `stringInputToObject` // Permissive string parsing. Take in a number of formats, and output an object // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` function stringInputToObject(color) { color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); var named = false; if (names[color]) { color = names[color]; named = true; } else if (color == 'transparent') { return { r: 0, g: 0, b: 0, a: 0, format: "name" }; } // Try to match string input using regular expressions. // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] // Just return an object and let the conversion functions handle that. // This way the result will be the same whether the tinycolor is initialized with string or object. var match; if ((match = matchers.rgb.exec(color))) { return { r: match[1], g: match[2], b: match[3] }; } if ((match = matchers.rgba.exec(color))) { return { r: match[1], g: match[2], b: match[3], a: match[4] }; } if ((match = matchers.hsl.exec(color))) { return { h: match[1], s: match[2], l: match[3] }; } if ((match = matchers.hsla.exec(color))) { return { h: match[1], s: match[2], l: match[3], a: match[4] }; } if ((match = matchers.hsv.exec(color))) { return { h: match[1], s: match[2], v: match[3] }; } if ((match = matchers.hsva.exec(color))) { return { h: match[1], s: match[2], v: match[3], a: match[4] }; } if ((match = matchers.hex8.exec(color))) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), a: convertHexToDecimal(match[4]), format: named ? "name" : "hex8" }; } if ((match = matchers.hex6.exec(color))) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), format: named ? "name" : "hex" }; } if ((match = matchers.hex4.exec(color))) { return { r: parseIntFromHex(match[1] + '' + match[1]), g: parseIntFromHex(match[2] + '' + match[2]), b: parseIntFromHex(match[3] + '' + match[3]), a: convertHexToDecimal(match[4] + '' + match[4]), format: named ? "name" : "hex8" }; } if ((match = matchers.hex3.exec(color))) { return { r: parseIntFromHex(match[1] + '' + match[1]), g: parseIntFromHex(match[2] + '' + match[2]), b: parseIntFromHex(match[3] + '' + match[3]), format: named ? "name" : "hex" }; } return false; } function validateWCAG2Parms(parms) { // return valid WCAG2 parms for isReadable. // If input parms are invalid, return {"level":"AA", "size":"small"} var level, size; parms = parms || {"level":"AA", "size":"small"}; level = (parms.level || "AA").toUpperCase(); size = (parms.size || "small").toLowerCase(); if (level !== "AA" && level !== "AAA") { level = "AA"; } if (size !== "small" && size !== "large") { size = "small"; } return {"level":level, "size":size}; } // Node: Export function if ( true && module.exports) { module.exports = tinycolor; } // AMD/requirejs: Define the module else if (true) { !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return tinycolor;}).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } // Browser: Expose to window else {} })(Math); /***/ }), /***/ "./node_modules/tinygradient/tinygradient.js": /*!***************************************************!*\ !*** ./node_modules/tinygradient/tinygradient.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! * TinyGradient 0.4.3 * Copyright 2014-2018 Damien "Mistic" Sorel (http://www.strangeplanet.fr) * Licensed under MIT (http://opensource.org/licenses/MIT) */ (function (root, factory) { if ( true && module.exports) { module.exports = factory(__webpack_require__(/*! tinycolor2 */ "./node_modules/tinycolor2/tinycolor.js")); } else if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! tinycolor2 */ "./node_modules/tinycolor2/tinycolor.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }(this, function (tinycolor) { "use strict"; var RGBA_MAX = {r: 256, g: 256, b: 256, a: 1}; var HSVA_MAX = {h: 360, s: 1, v: 1, a: 1}; /** * Linearly compute the step size between start and end (not normalized) * @param {Object} start - rgba or hsva * @param {Object} end - rgba or hsva * @param {int} steps - number of desired steps * @return {Object} rgba or hsva */ function stepize(start, end, steps) { var step = {}; for (var k in start) { if (start.hasOwnProperty(k)) { step[k] = steps === 0 ? 0 : (end[k] - start[k]) / steps; } } return step; } /** * Compute the final step color * @param {Object} step - rgba or hsva from `stepize` * @param {Object} start - rgba or hsva * @param {int} i - color index * @param {Object} max - rgba or hsva of maximum values for each channel * @return {Object} rgba or hsva */ function interpolate(step, start, i, max) { var color = {}; for (var k in start) { if (start.hasOwnProperty(k)) { color[k] = step[k] * i + start[k]; color[k] = color[k] < 0 ? color[k] + max[k] : ( max[k] !== 1 ? color[k] % max[k] : color[k] ); } } return color; } /** * Generate gradient with RGBa interpolation * @param {Object} stop1 * @param {Object} stop2 * @param {int} steps * @return {tinycolor[]} color1 included, color2 excluded */ function interpolateRgb(stop1, stop2, steps) { var start = stop1.color.toRgb(), end = stop2.color.toRgb(), gradient = [stop1.color], step = stepize(start, end, steps), color; for (var i = 1; i < steps; i++) { color = interpolate(step, start, i, RGBA_MAX); gradient.push(tinycolor(color)); } return gradient; } /** * Generate gradient with HSVa interpolation * @param {Object} stop1 * @param {Object} stop2 * @param {int} steps * @param {Boolean} trigonometric - true to step in trigonometric order * @return {tinycolor[]} color1 included, color2 excluded */ function interpolateHsv(stop1, stop2, steps, trigonometric) { var start = stop1.color.toHsv(), end = stop2.color.toHsv(), gradient = [stop1.color], step = stepize(start, end, steps), diff, color; // recompute hue if ((start.h <= end.h && !trigonometric) || (start.h >= end.h && trigonometric)) { diff = end.h - start.h; } else if (trigonometric) { diff = 360 - end.h + start.h; } else { diff = 360 - start.h + end.h; } step.h = Math.pow(-1, trigonometric ? 1 : 0) * Math.abs(diff) / steps; for (var i = 1; i < steps; i++) { color = interpolate(step, start, i, HSVA_MAX); gradient.push(tinycolor(color)); } return gradient; } /** * Compute substeps between each stops * @param {Object[]} stops * @param {int} steps * @return {int[]} */ function computeSubsteps(stops, steps) { var l = stops.length; // validation steps = parseInt(steps); if (isNaN(steps) || steps < 2) { throw new Error('Invalid number of steps (< 2)'); } if (steps < l) { throw new Error('Number of steps cannot be inferior to number of stops'); } // compute substeps from stop positions var substeps = []; for (var i = 1; i < l; i++) { var step = (steps - 1) * (stops[i].pos - stops[i - 1].pos); substeps.push(Math.max(1, Math.round(step))); } // adjust number of steps var totalSubsteps = 1; for (var n = l - 1; n--;) totalSubsteps += substeps[n]; while (totalSubsteps !== steps) { if (totalSubsteps < steps) { var min = Math.min.apply(null, substeps); substeps[substeps.indexOf(min)]++; totalSubsteps++; } else { var max = Math.max.apply(null, substeps); substeps[substeps.indexOf(max)]--; totalSubsteps--; } } return substeps; } /** * Compute the color at a specific position * @param {Object[]} stops * @param {float} pos * @param {string} method * @param {Object} max * @returns {tinycolor} */ function computeAt(stops, pos, method, max) { if (pos < 0 || pos > 1) { throw new Error('Position must be between 0 and 1'); } var start, end; for (var i = 0, l = stops.length; i < l - 1; i++) { if (pos >= stops[i].pos && pos < stops[i + 1].pos) { start = stops[i]; end = stops[i + 1]; break; } } if (!start) { start = end = stops[stops.length - 1]; } var step = stepize(start.color[method](), end.color[method](), (end.pos - start.pos) * 100); var color = interpolate(step, start.color[method](), Math.round((pos - start.pos) * 100), max); return tinycolor(color); } /** * @class tinygradient * @param {*} stops */ var TinyGradient = function (stops) { // varargs if (arguments.length === 1) { if (!(arguments[0] instanceof Array)) { throw new Error('"stops" is not an array'); } stops = arguments[0]; } else { stops = Array.prototype.slice.call(arguments); } // if we are called as a function, call using new instead if (!(this instanceof TinyGradient)) { return new TinyGradient(stops); } // validation if (stops.length < 2) { throw new Error('Invalid number of stops (< 2)'); } var havingPositions = stops[0].pos !== undefined, l = stops.length, p = -1; // create tinycolor objects and clean positions this.stops = stops.map(function (stop, i) { var hasPosition = stop.pos !== undefined; if (havingPositions ^ hasPosition) { throw new Error('Cannot mix positionned and not posionned color stops'); } if (hasPosition) { stop = { color: tinycolor(stop.color), pos : stop.pos }; if (stop.pos < 0 || stop.pos > 1) { throw new Error('Color stops positions must be between 0 and 1'); } else if (stop.pos <= p) { throw new Error('Color stops positions are not ordered'); } p = stop.pos; } else { stop = { color: tinycolor(stop), pos : i / (l - 1) }; } return stop; }); if (this.stops[0].pos !== 0) { this.stops.unshift({ color: this.stops[0].color, pos : 0 }); } if (this.stops[this.stops.length - 1].pos !== 1) { this.stops.push({ color: this.stops[this.stops.length - 1].color, pos : 1 }); } }; /** * Return new instance with reversed stops * @return {tinygradient} */ TinyGradient.prototype.reverse = function () { var stops = []; this.stops.forEach(function (stop) { stops.push({ color: stop.color, pos : 1 - stop.pos }); }); return new TinyGradient(stops.reverse()); }; /** * Generate gradient with RGBa interpolation * @param {int} steps * @return {tinycolor[]} */ TinyGradient.prototype.rgb = function (steps) { var substeps = computeSubsteps(this.stops, steps), gradient = []; for (var i = 0, l = this.stops.length; i < l - 1; i++) { gradient = gradient.concat(interpolateRgb(this.stops[i], this.stops[i + 1], substeps[i])); } gradient.push(this.stops[l - 1].color); return gradient; }; /** * Generate gradient with HSVa interpolation * @param {int} steps * @param {Boolean|String} [mode=false] * - false to step in clockwise * - true to step in trigonometric order * - 'short' to use the shortest way * - 'long' to use the longest way * @return {tinycolor[]} */ TinyGradient.prototype.hsv = function (steps, mode) { var substeps = computeSubsteps(this.stops, steps), trigonometric = mode === true, parametrized = typeof mode === 'string', gradient = [], start, end, trig; for (var i = 0, l = this.stops.length; i < l - 1; i++) { start = this.stops[i].color.toHsv(); end = this.stops[i + 1].color.toHsv(); if (parametrized) { trig = (start.h < end.h && end.h - start.h < 180) || (start.h > end.h && start.h - end.h > 180); } // rgb interpolation if one of the steps in grayscale if (start.s === 0 || end.s === 0) { gradient = gradient.concat(interpolateRgb(this.stops[i], this.stops[i + 1], substeps[i])); } else { gradient = gradient.concat(interpolateHsv(this.stops[i], this.stops[i + 1], substeps[i], (mode === 'long' && trig) || (mode === 'short' && !trig) || (!parametrized && trigonometric) )); } } gradient.push(this.stops[l - 1].color); return gradient; }; /** * Generate CSS3 command (no prefix) for this gradient * @param {String} [mode=linear] - 'linear' or 'radial' * @param {String} [direction] - default is 'to right' or 'ellipse at center' * @return {String} */ TinyGradient.prototype.css = function (mode, direction) { mode = mode || 'linear'; direction = direction || (mode === 'linear' ? 'to right' : 'ellipse at center'); var css = mode + '-gradient(' + direction; this.stops.forEach(function (stop) { css += ', ' + stop.color.toRgbString() + ' ' + (stop.pos * 100) + '%'; }); css += ')'; return css; }; /** * Returns the color at specific position with RGBa interpolation * @param {float} pos, between 0 and 1 * @return {tinycolor} */ TinyGradient.prototype.rgbAt = function (pos) { return computeAt(this.stops, pos, 'toRgb', RGBA_MAX); }; /** * Returns the color at specific position with HSVa interpolation * @param {float} pos, between 0 and 1 * @return {tinycolor} */ TinyGradient.prototype.hsvAt = function (pos) { return computeAt(this.stops, pos, 'toHsv', HSVA_MAX); }; var STATIC_FNS = { 'rgb' : 1, 'hsv' : 2, 'css' : 2, 'rgbAt': 1, 'hsvAt': 1 }; Object.keys(STATIC_FNS).forEach(function (fn) { TinyGradient[fn] = function () { var colors = Array.prototype.slice.call(arguments); var args = colors.splice(-STATIC_FNS[fn]); var gradient = new TinyGradient(colors); return gradient[fn].apply(gradient, args); }; }); // export return TinyGradient; })); /***/ }), /***/ "./node_modules/warning/warning.js": /*!*****************************************!*\ !*** ./node_modules/warning/warning.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var __DEV__ = "development" !== 'production'; var warning = function() {}; if (__DEV__) { var printWarning = function printWarning(format, args) { var len = arguments.length; args = new Array(len > 1 ? len - 1 : 0); for (var key = 1; key < len; key++) { args[key - 1] = arguments[key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function() { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} } warning = function(condition, format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (!condition) { printWarning.apply(null, [format].concat(args)); } }; } module.exports = warning; /***/ }), /***/ "./node_modules/webpack/buildin/global.js": /*!***********************************!*\ !*** (webpack)/buildin/global.js ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || new Function("return this")(); } catch (e) { // This works if the window reference is available if (typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /***/ "./src/components/BooleanSwitch.react.js": /*!***********************************************!*\ !*** ./src/components/BooleanSwitch.react.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _ToggleSwitch_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ToggleSwitch.react */ "./src/components/ToggleSwitch.react.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * A switch component that toggles * between on and off. */ var BooleanSwitch = /*#__PURE__*/ function (_Component) { _inherits(BooleanSwitch, _Component); function BooleanSwitch(props) { var _this; _classCallCheck(this, BooleanSwitch); _this = _possibleConstructorReturn(this, _getPrototypeOf(BooleanSwitch).call(this, props)); _this.state = { on: props.persisted_props == 'on' ? localStorage.getItem(props.id) == null ? props.on : localStorage.getItem(props.id) == 'true' : props.on }; _this.setPropsOverride = _this.setPropsOverride.bind(_assertThisInitialized(_this)); return _this; } _createClass(BooleanSwitch, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { if (newProps.on !== this.state.on) this.setState({ on: newProps.on }); } }, { key: "setPropsOverride", value: function setPropsOverride(_ref) { var value = _ref.value; this.setState({ on: value }); if (this.props.setProps) this.props.setProps({ on: value }); } }, { key: "render", value: function render() { var _this$props = this.props, color = _this$props.color, theme = _this$props.theme; var filteredProps = Object(ramda__WEBPACK_IMPORTED_MODULE_3__["omit"])(['persisted_props'], this.props); if (this.props.persisted_props == 'on' && this.props.id != null) { localStorage.setItem(this.props.id, this.state.on); } return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ToggleSwitch_react__WEBPACK_IMPORTED_MODULE_5__["default"], _extends({}, filteredProps, { value: this.state.on, setProps: this.setPropsOverride, booleanSwitch: true, color: color || theme.primary })); } }]); return BooleanSwitch; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); BooleanSwitch.defaultProps = { on: false, vertical: false, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_4__["light"], labelPosition: 'top', persisted_props: ['on'], persistence_type: 'local' }; BooleanSwitch.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Whether or not the switch is on */ on: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Color to highlight active switch background */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * If true, switch will be vertical instead * of horizontal */ vertical: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * If true, switch cannot be clicked */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root object. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when * switch is toggled. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `on` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['on'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['local', 'session', 'memory']), /** * size of the switch */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number }; var ThemedBooleanSwitch = Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(BooleanSwitch); ThemedBooleanSwitch.defaultProps = BooleanSwitch.defaultProps; /* harmony default export */ __webpack_exports__["default"] = (ThemedBooleanSwitch); /***/ }), /***/ "./src/components/ColorPicker.react.js": /*!*********************************************!*\ !*** ./src/components/ColorPicker.react.js ***! \*********************************************/ /*! exports provided: default, defaultProps, propTypes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ColorPicker; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultProps", function() { return defaultProps; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "propTypes", function() { return propTypes; }); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var RealColorPicker = Object(react__WEBPACK_IMPORTED_MODULE_1__["lazy"])(function () { return __webpack_require__.e(/*! import() | colorpicker */ "async-colorpicker").then(__webpack_require__.bind(null, /*! ../fragments/ColorPicker.react */ "./src/fragments/ColorPicker.react.js")); }); /** * A color picker. */ var ColorPicker = /*#__PURE__*/ function (_Component) { _inherits(ColorPicker, _Component); function ColorPicker() { _classCallCheck(this, ColorPicker); return _possibleConstructorReturn(this, _getPrototypeOf(ColorPicker).apply(this, arguments)); } _createClass(ColorPicker, [{ key: "render", value: function render() { return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1__["Suspense"], { fallback: null }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(RealColorPicker, this.props)); } }]); return ColorPicker; }(react__WEBPACK_IMPORTED_MODULE_1__["Component"]); ColorPicker.defaultProps = { size: 225, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_2__["light"], labelPosition: 'top', persisted_props: ['value'], persistence_type: 'local' }; ColorPicker.propTypes = { /** * The ID used to identify the color picker in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Color value of the picker */ value: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ /** * Hex string */ hex: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * RGB/RGBA object */ rbg: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ r: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, g: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, b: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, a: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number }) }), /** * If true, color cannot be picked. */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * Size (width) of the component in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string })]), /** * Where the indicator label is positioned */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element */ className: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Dash-assigned callback that gets fired when * the color picker's value changes */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func, /** * Style to apply to the root component element */ style: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['local', 'session', 'memory']) }; var defaultProps = ColorPicker.defaultProps; var propTypes = ColorPicker.propTypes; /***/ }), /***/ "./src/components/DarkThemeProvider.react.js": /*!***************************************************!*\ !*** ./src/components/DarkThemeProvider.react.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /** * DarkThemeProvider is a component that is placed at the root of * the component tree to make all components match the dark theme */ function DarkThemeProvider(props) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(styled_components__WEBPACK_IMPORTED_MODULE_2__["ThemeProvider"], { theme: props.theme || _styled_constants__WEBPACK_IMPORTED_MODULE_3__["dark"] }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, props.children)); } DarkThemeProvider.propTypes = { /** * The children of this component */ children: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node), prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node]), /** * Theme object to override with a custom theme */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Highlight color */ primary: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Supporting color */ secondary: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Color used for UI details, like borders */ detail: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * True for Dark mode, false for Light */ dark: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool }) }; /* harmony default export */ __webpack_exports__["default"] = (DarkThemeProvider); /***/ }), /***/ "./src/components/Gauge.react.js": /*!***************************************!*\ !*** ./src/components/Gauge.react.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _helpers_GaugeSvg_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/GaugeSvg.react */ "./src/helpers/GaugeSvg.react.js"); /* harmony import */ var _styled_Gauge_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/Gauge.styled */ "./src/styled/Gauge.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/CurrentValue.styled */ "./src/styled/CurrentValue.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _styled_Tank_styled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styled/Tank.styled */ "./src/styled/Tank.styled.js"); /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../helpers/util */ "./src/helpers/util.js"); /* harmony import */ var _helpers_logarithm__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../helpers/logarithm */ "./src/helpers/logarithm.js"); /* harmony import */ var _helpers_scale__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../helpers/scale */ "./src/helpers/scale.js"); /* harmony import */ var _helpers_colorRanges__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../helpers/colorRanges */ "./src/helpers/colorRanges.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); /* harmony import */ var conic_gradient__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! conic-gradient */ "./node_modules/conic-gradient/conic-gradient.js"); /* harmony import */ var conic_gradient__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(conic_gradient__WEBPACK_IMPORTED_MODULE_14__); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * A Gauge component that points to * a value between some range. */ var Gauge = function Gauge(props) { var max = props.max, min = props.min, showCurrentValue = props.showCurrentValue, units = props.units, logarithmic = props.logarithmic, base = props.base, id = props.id, className = props.className, style = props.style, theme = props.theme, digits = props.digits; var warningPara = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(null); var color = Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_12__["convertInRange"])(props.color, max, min ? min : 0); var colorValue = props.textColor || Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_12__["getColorValue"])(color); var rawValue = props.value != null ? props.value : min; var dirtyValue = logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_10__["default"].compute(rawValue) : rawValue; var currentDisplayValue = dirtyValue; var value = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_9__["sanitizeRangeValue"])({ min: min, max: max, value: dirtyValue }); var formatter = logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_10__["default"].generateLogFormatter({ base: base, isSVG: true }) : null; var scale = Object(_helpers_scale__WEBPACK_IMPORTED_MODULE_11__["default"])(_objectSpread({}, props, { formatter: formatter })); var progress = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_9__["computeProgress"])({ min: min, max: max, value: value, progressionTarget: 1 }); var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_13__["getClassName"])('gauge', theme); var currentValue = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_6__["default"], { className: elementName + '__current-value', valueColor: colorValue, units: units, valueSize: (props.size + 32) * 13.3333 / 100, css: 'transform: translateY(-150%); top: 0;' }, logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_10__["default"].formatValue(currentDisplayValue, base) : currentDisplayValue.toFixed(digits)); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_13__["getFilteredProps"])(props); Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () { var currValue = logarithmic ? Math.pow(base || 10, currentDisplayValue) : currentDisplayValue; var maximum = logarithmic ? Math.pow(base || 10, max) : max; var minimum = logarithmic ? Math.pow(base || 10, min) : min; if (currValue > maximum) { var str = ''; warningPara.current.innerHTML = props.exceedMessage ? typeof props.exceedMessage == 'string' ? props.exceedMessage : props.exceedMessage(currValue, maximum) || str : str; } else if (currValue < minimum) { var _str = ''; warningPara.current.innerHTML = props.lagingMessage ? typeof props.lagingMessage == 'string' ? props.lagingMessage : props.lagingMessage(currValue, minimum) || _str : _str; } else { warningPara.current.innerHTML = ''; } }, [currentDisplayValue]); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_8__["ExceededWarning"], { ref: warningPara }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], _extends({ className: elementName + '__label' }, filteredProps, { labelCSS: props.labelPosition === 'top' ? null : 'transform: translateY(-80px);' }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Gauge_styled__WEBPACK_IMPORTED_MODULE_4__["default"], { color: colorValue }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_helpers_GaugeSvg_react__WEBPACK_IMPORTED_MODULE_3__["default"], _extends({ className: elementName + '__gauge' }, _objectSpread({}, filteredProps, { scale: scale, progress: progress, color: color }))), showCurrentValue && currentValue))); }; Gauge.defaultProps = { min: 0, max: 10, base: 10, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_7__["light"], labelPosition: 'top', digits: 1, size: 208 }; Gauge.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of gauge. If logarithmic, the displayed * value will be the logarithm of the inputted value. */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The size (diameter) of the gauge in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The minimum value of the gauge. If logarithmic, * represents the minimum exponent. */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the gauge. If logarithmic, * represents the maximum exponent. */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Base to be used in logarithmic scale. */ base: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If set to true, a logarithmic scale will be * used. */ logarithmic: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * If true, the current value of the gauge * will be displayed */ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Number of digits for current value */ digits: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Label for the current value */ units: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Value to start the scale from. Defaults * to min. */ start: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label for the mark */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Style object with label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]) }), /** * Color configuration for the gauge's track. */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Color used for gauge's track/indicator */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Color ranges configuration. */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Color used for current value text and other minor accents */ "default": prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Display ranges as a gradient between given colors. */ gradient: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Define multiple color ranges on the gauge's track. * The key determines the color of the range and * the value is the start,end of the range itself. * Ranges must be contiguous along the entirety * of the gauge's range of values. */ ranges: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number)])) }) })]), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Warning message when value exceed max */ exceedMessage: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]), /** * Warning message when value is laging from min */ lagingMessage: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]), /** * text color for theme */ textColor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(Gauge)); /***/ }), /***/ "./src/components/GraduatedBar.react.js": /*!**********************************************!*\ !*** ./src/components/GraduatedBar.react.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_colorRanges__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/colorRanges */ "./src/helpers/colorRanges.js"); /* harmony import */ var _styled_GraduatedBar_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/GraduatedBar.styled */ "./src/styled/GraduatedBar.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var valueColor = function valueColor(value, color) { var entry = Object.entries(color.ranges).filter(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), range = _ref2[1]; return value >= range[0] && value <= range[1]; })[0]; return entry && entry[0]; }; /** * A graduated bar component that displays * a value within some range as a * percentage. */ var GraduatedBar = function GraduatedBar(props) { var step = props.step, min = props.min, max = props.max, label = props.label, labelPosition = props.labelPosition, id = props.id, className = props.className, color = props.color, size = props.size, style = props.style, showCurrentValue = props.showCurrentValue, vertical = props.vertical, theme = props.theme; var value = props.value || min; var gradient = null; var progressBlocks = []; var normalizedValue = Math.max(Math.min(max, value), min); if (color.gradient && Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_4__["isContiguous"])({ color: color, min: min, max: max })) { gradient = Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_4__["getGradientObject"])({ color: color, min: min, max: max }); } var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getClassName"])('graduatedbar', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getFilteredProps"])(props); for (var i = min; i < normalizedValue; i += step) { var blockProps = _objectSpread({}, filteredProps, { color: Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_4__["getColorValue"])(color) }); if (color.ranges && valueColor(i, color)) { blockProps = _objectSpread({}, filteredProps, { color: valueColor(i, color) }); } progressBlocks.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_GraduatedBar_styled__WEBPACK_IMPORTED_MODULE_5__["Block"], _extends({ className: elementName + '__progressBlock', key: i, progress: i / (max - min), gradient: gradient }, blockProps))); } var percent = normalizedValue / (max - min) * 100; if (!isFinite(percent)) percent = 0; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_6__["default"], { className: elementName + '__label', label: label, labelPosition: labelPosition }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_GraduatedBar_styled__WEBPACK_IMPORTED_MODULE_5__["Container"], { vertical: vertical, size: size }, progressBlocks, showCurrentValue && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_GraduatedBar_styled__WEBPACK_IMPORTED_MODULE_5__["Value"], { className: elementName + '__currentvalue', vertical: vertical }, percent.toFixed(0), "%")))); }; GraduatedBar.defaultProps = { min: 0, max: 10, size: 250, step: 0.5, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_3__["light"], labelPosition: 'top', color: _styled_constants__WEBPACK_IMPORTED_MODULE_3__["light"].primary }; GraduatedBar.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of the graduated bar */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Color configuration for the graduated bar's * progress blocks. */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Color used for graduated bar's track/indicator */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Color ranges configuration. */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Fallback color to use when color.ranges * has gaps. */ "default": prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Display ranges as a gradient between given colors. * Requires color.ranges to be contiguous along * the entirety of the graduated bar's range of values. */ gradient: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Define multiple color ranges on the graduated bar's track. * The key determines the color of the range and * the value is the start,end of the range itself. */ ranges: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number) }) })]), /** * The size (length) of the graduated bar in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If true, will display bar vertically instead of horizontally */ vertical: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * The minimum value of the graduated bar */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the graduated bar */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Value by which progress blocks appear */ step: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If true, the current percentage * of the bar will be displayed */ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(GraduatedBar)); /***/ }), /***/ "./src/components/Indicator.react.js": /*!*******************************************!*\ !*** ./src/components/Indicator.react.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! color */ "./node_modules/color/index.js"); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(color__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/shared/Indicator.styled */ "./src/styled/shared/Indicator.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); /** * A boolean indicator LED. */ var Indicator = function Indicator(props) { var id = props.id, className = props.className, color = props.color, size = props.size, width = props.width, height = props.height, value = props.value, style = props.style, theme = props.theme; var bg = color__WEBPACK_IMPORTED_MODULE_2___default()(color).desaturate(0.2).lighten(0.2).rgb().toString(); var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getClassName"])('indicator', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getFilteredProps"])(props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], filteredProps, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_4__["default"], { className: elementName + '__indicator' + (props.value ? '--on' : '--off'), size: size, width: width, height: height, rectangular: width && height, main: true, on: value, primary: color, secondary: !theme.dark ? bg : null }))); }; Indicator.defaultProps = { color: _styled_constants__WEBPACK_IMPORTED_MODULE_6__["colors"].DARKER_PRIMARY, size: 15, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_6__["light"], labelPosition: 'top' }; Indicator.propTypes = { /** * The ID used to identify the indicator in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * If true, indicator is illuminated */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Color of the indicator */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Size of the component. Either use this or width and height */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Width of the component. Set both width and height for a rectangular indicator */ width: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Height of the component. Set both width and height for a rectangular indicator */ height: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the indicator label is positioned */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom', 'right', 'left']), /** * Class to apply to the root component element */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_3__["withTheme"])(Indicator)); /***/ }), /***/ "./src/components/Joystick.react.js": /*!******************************************!*\ !*** ./src/components/Joystick.react.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var nipplejs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! nipplejs */ "./node_modules/nipplejs/dist/nipplejs.js"); /* harmony import */ var nipplejs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(nipplejs__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * A joystick. */ var Joystick = /*#__PURE__*/ function (_Component) { _inherits(Joystick, _Component); function Joystick(props) { var _this; _classCallCheck(this, Joystick); _this = _possibleConstructorReturn(this, _getPrototypeOf(Joystick).call(this, props)); _this.lastAngle = 0; return _this; } _createClass(Joystick, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; var _this$props = this.props, size = _this$props.size, setProps = _this$props.setProps; this.manager = nipplejs__WEBPACK_IMPORTED_MODULE_3___default.a.create({ mode: 'static', color: 'grey', size: size, position: { left: '50%', top: '50%' }, zone: this.zoneRef }); this.manager.on('move', function (e, data) { var degree = data.angle.degree, force = data.force; _this2.lastAngle = degree; if (setProps) { setProps({ angle: degree, force: force }); } }); this.manager.on('end', function () { if (setProps) { setProps({ angle: _this2.lastAngle, force: 0 }); } }); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.manager.destroy(); } }, { key: "render", value: function render() { var _this3 = this; var _this$props2 = this.props, id = _this$props2.id, className = _this$props2.className, style = _this$props2.style, size = _this$props2.size, theme = _this$props2.theme; var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_6__["getClassName"])('joystick', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_6__["getFilteredProps"])(this.props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], _extends({ className: elementName + '__label' }, filteredProps), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: elementName + '__joystick', ref: function ref(_ref) { return _this3.zoneRef = _ref; }, style: { position: 'relative', width: size + 'px', height: size + 'px' } }))); } }]); return Joystick; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); Joystick.defaultProps = { size: 100, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_4__["light"], labelPosition: 'top' }; Joystick.propTypes = { /** * The ID used to identify the Joystick in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Joystick angle in degrees, 0 = right, 90 = up, 180 = left, 270 = down */ angle: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Joystick force: distance between cursor and center in big-circle radii */ force: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Size (width) of the component in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the indicator label is positioned */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Dash-assigned callback that gets fired when * the color picker's value changes */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Style to apply to the root component element */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(Joystick)); /***/ }), /***/ "./src/components/Knob.react.js": /*!**************************************!*\ !*** ./src/components/Knob.react.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _helpers_KnobSvg_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/KnobSvg.react */ "./src/helpers/KnobSvg.react.js"); /* harmony import */ var _styled_Knob_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/Knob.styled */ "./src/styled/Knob.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/CurrentValue.styled */ "./src/styled/CurrentValue.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/util */ "./src/helpers/util.js"); /* harmony import */ var _helpers_colorRanges__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../helpers/colorRanges */ "./src/helpers/colorRanges.js"); /* harmony import */ var _helpers_scale__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../helpers/scale */ "./src/helpers/scale.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var RESET_START_ANGLE = -1; var valueToDeg = function valueToDeg(_ref) { var min = _ref.min, max = _ref.max, value = _ref.value; return Object(_helpers_util__WEBPACK_IMPORTED_MODULE_8__["computeProgress"])({ min: min, max: max, value: value, progressionTarget: _styled_constants__WEBPACK_IMPORTED_MODULE_7__["TRACK_TOTAL_DEG"] }); }; var degToValue = function degToValue(_ref2) { var min = _ref2.min, max = _ref2.max, deg = _ref2.deg; return Object(_helpers_util__WEBPACK_IMPORTED_MODULE_8__["computeProgress"])({ min: 0, max: _styled_constants__WEBPACK_IMPORTED_MODULE_7__["TRACK_TOTAL_DEG"], value: deg, progressionTarget: max - min }) + min; }; /** * A knob component that can be turned * to a value between some range. */ var Knob = /*#__PURE__*/ function (_Component) { _inherits(Knob, _Component); function Knob(props) { var _this; _classCallCheck(this, Knob); _this = _possibleConstructorReturn(this, _getPrototypeOf(Knob).call(this, props)); var currentDeg = valueToDeg({ min: props.min, max: props.max, value: props.value != null ? props.value : props.min }); _this.state = { min: props.min, max: props.max, value: props.value || props.min, scale: Object(_helpers_scale__WEBPACK_IMPORTED_MODULE_10__["default"])(props), isDragging: false, startAngle: RESET_START_ANGLE, rotation: currentDeg, currentDeg: currentDeg }; _this.onMouseDown = _this.onMouseDown.bind(_assertThisInitialized(_this)); _this.onMouseUp = _this.onMouseUp.bind(_assertThisInitialized(_this)); _this.onMouseMove = _this.onMouseMove.bind(_assertThisInitialized(_this)); _this.setValue = _this.setValue.bind(_assertThisInitialized(_this)); return _this; } _createClass(Knob, [{ key: "noop", value: function noop() {} }, { key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { if (typeof newProps.value !== 'undefined') this.setState({ value: newProps.value }); if (this.state.max != newProps.max) { this.setState({ max: newProps.max instanceof Number ? newProps.max : this.state.max }); } if (this.state.min != newProps.min) { this.setState({ min: newProps.min instanceof Number ? newProps.min : this.state.min }); } } }, { key: "componentDidMount", value: function componentDidMount() { window.addEventListener('mouseup', this.onMouseUp, false); // eslint-disable-next-line __webpack_require__(/*! conic-gradient */ "./node_modules/conic-gradient/conic-gradient.js"); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { window.removeEventListener('mouseup', this.onMouseUp, false); } }, { key: "onMouseDown", value: function onMouseDown() { this.setState({ isDragging: true }); } }, { key: "onMouseUp", value: function onMouseUp() { if (this.state.isDragging) { this.setState(function (state) { return { rotation: state.currentDeg, isDragging: false, startAngle: RESET_START_ANGLE }; }); } } }, { key: "onMouseMove", value: function onMouseMove(e) { if (!this.state.isDragging) { return; } var _this$props = this.props, min = _this$props.min, max = _this$props.max; var rotation = this.state.rotation; var startAngle = this.state.startAngle; if (e.touches) { e = e.touches[0]; } var rect = this.knobElement.getBoundingClientRect(); var centerX = rect.width / 2 + rect.left; var centerY = rect.height / 2 + rect.top; var radians = Math.atan2(e.clientX - centerX, e.clientY - centerY); var angle = radians * (180 / Math.PI); if (e.clientX - centerX >= 0) { angle = Math.abs(360 - angle) + 180; } else { angle = angle - 180; } angle = Math.abs(angle); if (startAngle === RESET_START_ANGLE) { startAngle = angle; this.setState({ startAngle: startAngle }); } var tmp = Math.floor(angle - startAngle + rotation); tmp = Math.min(tmp, _styled_constants__WEBPACK_IMPORTED_MODULE_7__["TRACK_TOTAL_DEG"]); tmp = Math.max(tmp, 0); this.setState({ currentDeg: tmp }); this.setValue(Object(_helpers_util__WEBPACK_IMPORTED_MODULE_8__["roundToDecimal"])(degToValue({ min: min, max: max, deg: tmp }), 2)); } }, { key: "setValue", value: function setValue(value) { this.setState({ value: value }); if (this.props.setProps) this.props.setProps({ value: value }); } }, { key: "render", value: function render() { var _this2 = this; var _this$props2 = this.props, min = _this$props2.min, max = _this$props2.max, _this$props2$value = _this$props2.value, value = _this$props2$value === void 0 ? this.props.min : _this$props2$value; var _this$props3 = this.props, id = _this$props3.id, className = _this$props3.className, labelPosition = _this$props3.labelPosition, color = _this$props3.color, style = _this$props3.style, disabled = _this$props3.disabled, theme = _this$props3.theme, textColor = _this$props3.textColor; var progress = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_8__["computeProgress"])({ min: min, max: max, value: value > min && value < max ? value : (min + max) / 2, progressionTarget: 1 }); var colorValue = textColor || Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_9__["getColorValue"])(color); var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_11__["getClassName"])('knob', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_11__["getFilteredProps"])(this.props); var currentValue = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_6__["default"], { className: elementName + '__current-value', valueColor: colorValue, valueSize: Math.min((this.props.size + 32) * 13.3333 / 100, 32), units: false, css: 'transform: translateY(0%); top: 0;' }, value.toFixed(this.props.digits))); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], _extends({ className: elementName + '__label' }, filteredProps, { labelCSS: labelPosition === 'top' ? null : 'transform: translateY(-40px);' }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Knob_styled__WEBPACK_IMPORTED_MODULE_4__["default"], { className: elementName + '__container', colorValue: colorValue, color: Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_9__["getColorValue"])(color) }, this.props.showCurrentValue && currentValue, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_helpers_KnobSvg_react__WEBPACK_IMPORTED_MODULE_3__["default"], _extends({ progress: progress }, filteredProps, this.state, { min: this.props.min != this.state.min ? this.props.min : this.state.min, max: this.props.max != this.state.max ? this.props.max : this.state.max, value: value > min && value < max ? value : (min + max) / 2, scale: Object(_helpers_scale__WEBPACK_IMPORTED_MODULE_10__["default"])(this.props), currentDeg: valueToDeg({ min: this.props.min, max: this.props.max, value: value > min && value < max ? value : (min + max) / 2 }), refFunc: function refFunc(ele) { return _this2.knobElement = ele; }, onMouseDown: disabled ? this.noop : this.onMouseDown, onMouseUp: disabled ? this.noop : this.onMouseUp, onMouseMove: disabled ? this.noop : this.onMouseMove }))))); } }]); return Knob; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); Knob.defaultProps = { min: 0, max: 10, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_7__["light"], labelPosition: 'top', persisted_props: ['value'], persistence_type: 'local', size: 114 }; Knob.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of knob */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Color configuration for the knob's track. */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Color used for knob's track/indicator */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Color ranges configuration. */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Color used for current value text and other minor accents */ "default": prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Display ranges as a gradient between given colors. */ gradient: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Define multiple color ranges on the knob's track. * The key determines the color of the range and * the value is the start,end of the range itself. * Ranges must be contiguous along the entirety * of the knob's range of values. */ ranges: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number) }) })]), /** * The size (diameter) of the knob in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The minimum value of the knob */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the knob */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If true, knob cannot be moved. */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the knob label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Value to start the scale from. Defaults * to min. */ start: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label for the mark */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Style object with label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]) }), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when selected * value changes. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['local', 'session', 'memory']), /** * show current value of knob */ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * text color of scale */ textColor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * number of digits to show after decimal places */ digits: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number }; var ThemedKnob = Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(Knob); ThemedKnob.defaultProps = Knob.defaultProps; /* harmony default export */ __webpack_exports__["default"] = (ThemedKnob); /***/ }), /***/ "./src/components/LEDDisplay.react.js": /*!********************************************!*\ !*** ./src/components/LEDDisplay.react.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _helpers_LEDDisplaySvg_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/LEDDisplaySvg.react */ "./src/helpers/LEDDisplaySvg.react.js"); /* harmony import */ var _styled_LEDDisplay_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/LEDDisplay.styled */ "./src/styled/LEDDisplay.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); var VALID_INPUT = /^(\-)?((\.|:)?[0-9])*$/; var isValidInput = VALID_INPUT.test.bind(VALID_INPUT); /** * A 7-bar LED display component. */ var LEDDisplay = function LEDDisplay(props) { var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getClassName"])('leddisplay', props.theme); var digits = isValidInput(props.value) ? extractDigits(props, elementName) : null; var led = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_LEDDisplay_styled__WEBPACK_IMPORTED_MODULE_4__["LEDContainer"], { backgroundColor: props.backgroundColor }, digits); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getFilteredProps"])(props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: props.id, className: elementName + (props.className ? ' ' + props.className : ''), style: props.style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], filteredProps, digits ? led : 'Invalid Input')); }; function extractDigits(_ref, elementName) { var value = _ref.value, color = _ref.color, backgroundColor = _ref.backgroundColor, theme = _ref.theme, size = _ref.size; var digitStack = value.toString().split('').reverse(); var formattedDigits = []; addLeadingZeroIfNeeded(digitStack); var currKey = 0; while (digitStack.length) { var currDigit = digitStack.pop(); var nextDigit = digitStack.pop(); formattedDigits.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_helpers_LEDDisplaySvg_react__WEBPACK_IMPORTED_MODULE_3__["Digit"], { className: elementName + '__digit', theme: theme, key: currKey++, value: currDigit, hasColon: nextDigit === ':', hasDecimal: nextDigit === '.', color: color, backgroundColor: backgroundColor, size: size })); if (nextDigit && nextDigit !== '.' && nextDigit !== ':') digitStack.push(nextDigit); } return formattedDigits; } function addLeadingZeroIfNeeded(digits) { var isNegative = false; if (digits[digits.length - 1] === '-') { isNegative = true; digits.pop(); } var leadingDigit = digits[digits.length - 1]; if (['.', ':'].includes(leadingDigit)) digits.push('0'); if (isNegative) digits.push('-'); } LEDDisplay.defaultProps = { color: _styled_constants__WEBPACK_IMPORTED_MODULE_6__["colors"].PRIMARY, backgroundColor: '#fff', size: 42, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_6__["light"], labelPosition: 'top' }; LEDDisplay.propTypes = { /** * The ID used to identify the display in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Value to be displayed. A number or a string * containing only digits (0-9), periods, and colons, * and possibly starting with a minus sign. */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]), /** * Color of the display */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Color of the display's background */ backgroundColor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Size of the display */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the display label is positioned */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(LEDDisplay)); /***/ }), /***/ "./src/components/NumericInput.react.js": /*!**********************************************!*\ !*** ./src/components/NumericInput.react.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); /* harmony import */ var _helpers_NumericInput__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../helpers/NumericInput */ "./src/helpers/NumericInput.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * A numeric input component that can be * set to a value between some range. */ var NumericInput = /*#__PURE__*/ function (_Component) { _inherits(NumericInput, _Component); function NumericInput(props) { var _this; _classCallCheck(this, NumericInput); _this = _possibleConstructorReturn(this, _getPrototypeOf(NumericInput).call(this, props)); _this.state = { value: props.value || props.min }; _this.setValue = _this.setValue.bind(_assertThisInitialized(_this)); return _this; } _createClass(NumericInput, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { if (newProps.value !== this.state.value) this.setState({ value: newProps.value }); } }, { key: "setValue", value: function setValue(value) { if (value != null && value >= this.props.min && value <= this.props.max) { this.setState({ value: value }); if (this.props.setProps) this.props.setProps({ value: value }); } } }, { key: "render", value: function render() { var _this$props = this.props, size = _this$props.size, theme = _this$props.theme, style = _this$props.style, className = _this$props.className, id = _this$props.id, disabled = _this$props.disabled, min = _this$props.min, max = _this$props.max; var buttonStyle = { background: 'none', boxShadow: 'none', border: 'none', color: theme.secondary, cursor: 'pointer' }; var padding = Math.max(this.state.value ? 16 - 2 * this.state.value.toString().length : 16, 10); var inputStyle = { borderRadius: 3, border: theme.dark ? 'none' : "1px solid ".concat(_styled_constants__WEBPACK_IMPORTED_MODULE_4__["colors"].GREY), outline: 'none', paddingRight: padding, paddingLeft: padding, paddingTop: 8, paddingBottom: 8, width: size || 56, color: theme.dark ? '#fff' : _styled_constants__WEBPACK_IMPORTED_MODULE_4__["colors"].OFF_WHITE, backgroundColor: theme.dark ? '#22272a' : '#fff', fontSize: 14, boxSizing: 'border-box' }; var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_5__["getClassName"])('numericinput', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_5__["getFilteredProps"])(this.props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_3__["default"], _extends({ className: elementName + '__label' }, filteredProps), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_helpers_NumericInput__WEBPACK_IMPORTED_MODULE_6__["default"], { className: elementName + '__input', disabled: disabled, style: { input: inputStyle, 'input:not(.form-control)': inputStyle, btn: buttonStyle, 'btn:hover': buttonStyle, 'btn:active': buttonStyle, 'input:disabled': { opacity: 0.65, cursor: 'not-allowed' } }, min: min, max: max, value: this.state.value, onChange: this.setValue, mobile: false }))); } }]); return NumericInput; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); NumericInput.defaultProps = { min: 0, max: 10, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_4__["light"], labelPosition: 'top', persisted_props: ['value'], persistence_type: 'local', style: { display: 'flex', justifyContent: 'center' } }; NumericInput.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of numeric input */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The size (length) of the numeric input in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The minimum value of the numeric input */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the numeric input */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If true, numeric input cannot changed. */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the numeric input label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when selected * value changes. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['local', 'session', 'memory']) }; var ThemedNumericInput = Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(NumericInput); ThemedNumericInput.defaultProps = NumericInput.defaultProps; /* harmony default export */ __webpack_exports__["default"] = (ThemedNumericInput); /***/ }), /***/ "./src/components/PowerButton.react.js": /*!*********************************************!*\ !*** ./src/components/PowerButton.react.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_PowerButton_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/PowerButton.styled */ "./src/styled/PowerButton.styled.js"); /* harmony import */ var _helpers_PowerButtonSvg_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/PowerButtonSvg.react */ "./src/helpers/PowerButtonSvg.react.js"); /* harmony import */ var _styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/Indicator.styled */ "./src/styled/shared/Indicator.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * A power button component can be * turned on and off. */ var PowerButton = /*#__PURE__*/ function (_Component) { _inherits(PowerButton, _Component); function PowerButton(props) { var _this; _classCallCheck(this, PowerButton); _this = _possibleConstructorReturn(this, _getPrototypeOf(PowerButton).call(this, props)); _this.state = { on: _this.props.on }; _this.onClick = _this.onClick.bind(_assertThisInitialized(_this)); return _this; } _createClass(PowerButton, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { if (newProps.on !== this.state.on) this.setState({ on: newProps.on }); } }, { key: "onClick", value: function onClick() { var newOnValue = !this.state.on; this.setState({ on: newOnValue }); if (this.props.setProps) this.props.setProps({ on: newOnValue }); } }, { key: "render", value: function render() { var _this$props = this.props, id = _this$props.id, size = _this$props.size, className = _this$props.className, color = _this$props.color, disabled = _this$props.disabled, style = _this$props.style, theme = _this$props.theme; var INDICATOR_SIZE = size / 10 * 1.25; var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_8__["getClassName"])('powerbutton', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_8__["getFilteredProps"])(this.props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_6__["default"], _extends({ className: elementName + '__label' }, filteredProps), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_PowerButton_styled__WEBPACK_IMPORTED_MODULE_3__["Container"], { className: elementName + '__container' }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_PowerButton_styled__WEBPACK_IMPORTED_MODULE_3__["Button"], { className: elementName + '__button', on: this.state.on, color: color, size: size, disabled: disabled, onClick: this.onClick, style: this.state.on ? this.props.onButtonStyle : this.props.offButtonStyle }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_helpers_PowerButtonSvg_react__WEBPACK_IMPORTED_MODULE_4__["default"], { on: this.state.on, color: color, size: size * 0.3 })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_5__["default"], { className: elementName + '__indicator', on: this.state.on, primary: color, main: true, size: INDICATOR_SIZE })))); } }]); return PowerButton; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); PowerButton.defaultProps = { on: false, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_7__["light"], size: 48, labelPosition: 'top', persisted_props: ['on'], persistence_type: 'local' }; PowerButton.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Whether or not the power button is on */ on: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * The indicator color to display when power button is on */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The size (diameter) of the power button in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If true, power button cannot be clicked */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the button. To control styling, pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the button label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * style to apply on switch on button */ onButtonStyle: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * style to apply on switch off button */ offButtonStyle: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when * button is clicked. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `on` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['on'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['local', 'session', 'memory']) }; var ThemedPowerButton = Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(PowerButton); ThemedPowerButton.defaultProps = PowerButton.defaultProps; /* harmony default export */ __webpack_exports__["default"] = (ThemedPowerButton); /***/ }), /***/ "./src/components/PrecisionInput.react.js": /*!************************************************!*\ !*** ./src/components/PrecisionInput.react.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_PrecisionInput_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/PrecisionInput.styled */ "./src/styled/PrecisionInput.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); /* harmony import */ var _helpers_NumericInput__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../helpers/NumericInput */ "./src/helpers/NumericInput.js"); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var defaultRootStyles = { display: 'flex', flexDirection: 'column', justifyContent: 'space-between', alignItems: 'center' }; /** * A numeric input component that converts * an input value to the desired precision. */ var PrecisionInput = /*#__PURE__*/ function (_Component) { _inherits(PrecisionInput, _Component); function PrecisionInput(props) { var _this; _classCallCheck(this, PrecisionInput); _this = _possibleConstructorReturn(this, _getPrototypeOf(PrecisionInput).call(this, props)); _this.formatPrecision = _this.formatPrecision.bind(_assertThisInitialized(_this)); _this.setTempValue = _this.setTempValue.bind(_assertThisInitialized(_this)); _this.blur = _this.blur.bind(_assertThisInitialized(_this)); _this.setValue = _this.setValue.bind(_assertThisInitialized(_this)); _this.toggleInput = _this.toggleInput.bind(_assertThisInitialized(_this)); _this.state = { value: props.value != null ? _this.formatPrecision(props.value) : _this.formatPrecision(props.min), isInput: false, tempValue: null }; return _this; } _createClass(PrecisionInput, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { if (newProps.value != null && newProps.value !== this.state.value) this.setState({ value: this.formatPrecision(newProps.value) }); } }, { key: "formatPrecision", value: function formatPrecision(value) { return Number(Number(value.toPrecision(this.props.precision))); } }, { key: "setValue", value: function setValue(value) { if (value != null && value >= this.props.min && value <= this.props.max) { var newValue = this.formatPrecision(value); this.setState({ value: newValue }); if (this.props.setProps) { this.props.setProps({ value: newValue }); } } } }, { key: "toggleInput", value: function toggleInput() { if (this.props.disabled) return; var isInput = !this.state.isInput; this.setState({ isInput: isInput }); if (isInput) { this.setState({ tempValue: this.state.value }); } } }, { key: "setTempValue", value: function setTempValue(tempValue) { this.setState({ tempValue: tempValue }); } }, { key: "blur", value: function blur() { if (this.state.tempValue != null) { this.setValue(this.state.tempValue); } this.setState({ tempValue: null }); this.toggleInput(); } }, { key: "render", value: function render() { var _this$props = this.props, id = _this$props.id, className = _this$props.className, style = _this$props.style, size = _this$props.size, theme = _this$props.theme, disabled = _this$props.disabled, precision = _this$props.precision, min = _this$props.min, max = _this$props.max; var buttonStyle = { background: 'none', boxShadow: 'none', border: 'none', color: theme.secondary, cursor: 'pointer' }; var MINIMUM_PADDING = 10; var dynamicPadding = this.state.value ? 16 - 2 * this.state.value.toString().length : 16; var padding = Math.max(dynamicPadding, MINIMUM_PADDING); var inputStyle = { borderRadius: 3, border: theme.dark ? 'none' : "1px solid ".concat(_styled_constants__WEBPACK_IMPORTED_MODULE_5__["colors"].GREY), outline: 'none', paddingRight: padding, paddingLeft: padding, paddingTop: 4, paddingBottom: 4, width: size || 56 + precision * 20, height: 36, backgroundColor: theme.dark ? '#22272a' : '#fff', color: theme.dark ? '#fff' : '#000', fontSize: 14, lineHeight: 14, boxSizing: 'border-box' }; var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_6__["getClassName"])('precisioninput', theme.dark); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_6__["getFilteredProps"])(this.props); var precisionElement; if (this.state.isInput) { precisionElement = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_helpers_NumericInput__WEBPACK_IMPORTED_MODULE_7__["default"], { autoFocus: true, className: elementName + '__input', disabled: disabled, style: { input: inputStyle, 'input:not(.form-control)': inputStyle, btn: buttonStyle, 'btn:hover': buttonStyle, 'btn:active': buttonStyle, 'input:disabled': { opacity: 0.65, cursor: 'not-allowed' } }, min: min, max: max, value: this.state.tempValue, onChange: this.setTempValue, onBlur: this.blur }); } else { precisionElement = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(PrecisionOutput, { elementName: elementName + '__output', value: this.state.value, size: size, onClick: this.toggleInput, color: theme.dark ? '#fff' : _styled_constants__WEBPACK_IMPORTED_MODULE_5__["colors"].OFF_WHITE }); } return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: Object.assign({}, defaultRootStyles, style) }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_4__["default"], _extends({ className: elementName + '__label' }, filteredProps), precisionElement)); } }]); return PrecisionInput; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); var toScientificNotation = function toScientificNotation(value) { var scientificNum = Number(value).toExponential(); return scientificNum.replace('+', ''); }; var mergeLeadingNegative = function mergeLeadingNegative(digits) { if (digits[0] === '-') { digits.shift(); var leading = digits.shift(); digits.unshift("-".concat(leading)); } return digits; }; var PrecisionOutput = function PrecisionOutput(_ref) { var value = _ref.value, onClick = _ref.onClick, size = _ref.size, elementName = _ref.elementName; var _toScientificNotation = toScientificNotation(value).split('e'), _toScientificNotation2 = _slicedToArray(_toScientificNotation, 2), characteristic = _toScientificNotation2[0], mantissa = _toScientificNotation2[1]; var characteristicDigits = mergeLeadingNegative(characteristic.split('')); var mantissaDigits = mergeLeadingNegative(mantissa.split('')); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_PrecisionInput_styled__WEBPACK_IMPORTED_MODULE_3__["Container"], { size: size, onClick: onClick, className: elementName }, characteristicDigits.map(function (digit, i) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_PrecisionInput_styled__WEBPACK_IMPORTED_MODULE_3__["Digit"], { className: elementName + '__digit', key: "d".concat(i) }, digit); }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_PrecisionInput_styled__WEBPACK_IMPORTED_MODULE_3__["ExponentialDigit"], { className: elementName + '__exp' }, "E"), mantissaDigits.map(function (digit, i) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_PrecisionInput_styled__WEBPACK_IMPORTED_MODULE_3__["ExponentialDigit"], { className: elementName + '__expdigit', key: "e".concat(i) }, digit); })); }; PrecisionInput.defaultProps = { min: 0, max: Number.MAX_SAFE_INTEGER, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_5__["light"], labelPosition: 'top', precision: 2, persisted_props: ['value'], persistence_type: 'local' }; PrecisionInput.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of numeric input */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The size (length) of the numeric input in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The minimum value of the numeric input */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the numeric input */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Number of significant figures */ precision: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired, /** * If true, numeric input cannot be changed. */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the scientific notation. To control styling, * pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the numeric input label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when selected * value changes. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['local', 'session', 'memory']) }; var ThemedPrecisionInput = Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(PrecisionInput); ThemedPrecisionInput.defaultProps = PrecisionInput.defaultProps; /* harmony default export */ __webpack_exports__["default"] = (ThemedPrecisionInput); /***/ }), /***/ "./src/components/Slider.react.js": /*!****************************************!*\ !*** ./src/components/Slider.react.js ***! \****************************************/ /*! exports provided: default, defaultProps, propTypes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Slider; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultProps", function() { return defaultProps; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "propTypes", function() { return propTypes; }); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _fragments_Slider_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../fragments/Slider.react */ "./src/fragments/Slider.react.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } // const RealSlider = lazy(() => import(/* webpackChunkName: "slider" */ '../fragments/Slider.react')); /** * A slider component with support for * a target value. */ var Slider = /*#__PURE__*/ function (_Component) { _inherits(Slider, _Component); function Slider() { _classCallCheck(this, Slider); return _possibleConstructorReturn(this, _getPrototypeOf(Slider).apply(this, arguments)); } _createClass(Slider, [{ key: "render", value: function render() { return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1__["Suspense"], { fallback: null }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_fragments_Slider_react__WEBPACK_IMPORTED_MODULE_3__["default"], this.props)); } }]); return Slider; }(react__WEBPACK_IMPORTED_MODULE_1__["Component"]); Slider.defaultProps = { theme: _styled_constants__WEBPACK_IMPORTED_MODULE_2__["light"], targets: {}, updatemode: 'mouseup', color: _styled_constants__WEBPACK_IMPORTED_MODULE_2__["colors"].DARKER_PRIMARY, min: 0, size: 265, labelPosition: 'bottom', persisted_props: ['value'], persistence_type: 'local', style: { display: 'flex', justifyContent: 'center' } }; Slider.propTypes = { /** * The ID used to identify this component in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, /** * Marks on the slider. * The key determines the position, * and the value determines what will show. * If you want to set the style of a specific mark point, * the value should be an object which * contains style and label properties. */ marks: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ number: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([ /** * The label of the mark */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * The style and label of the mark */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string })]) }), /** * Color configuration for the slider's track. */ color: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([ /** * Color used for slider's track/indicator */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Color ranges configuration. */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ /** * Fallback color to use when color.ranges * has gaps. */ "default": prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Display ranges as a gradient between given colors. * Requires color.ranges to be contiguous along * the entirety of the gauge's range of values. */ gradient: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * Define multiple color ranges on the slider's track. * The key determines the color of the range and * the value is the start,end of the range itself. */ ranges: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ color: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number) }) })]), /** * The value of the input. */ value: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * Additional CSS class for the root DOM node. */ className: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['top', 'bottom']), /** * If true, the handles can't be moved. */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * When the step value is greater than 1, * you can set the dots to true if you want to * render the slider with dots. * * Note: dots are disabled automatically when * using color.ranges */ dots: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * If the value is true, it means a continuous * value is included. Otherwise, it is an independent value. */ included: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * Minimum allowed value of the slider. */ min: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * Maximum allowed value of the slider. */ max: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * Value by which increments or decrements are made. */ step: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * If true, the slider will be vertical. */ vertical: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * Size of the slider in pixels. */ size: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * Targets on the slider. * The key determines the position, * and the value determines what will show. * If you want to set the style of a specific target point, * the value should be an object which * contains style and label properties. */ targets: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ number: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([ /** * The label of the mark */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * The style and label of the mark */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, label: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, color: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, style: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object })]) }), /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, /** * Configuration of the slider handle's label. * Passing falsy value will disable the label. */ handleLabel: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([ /** * The label of the handle */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * The style and label of the handle */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, label: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, color: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, style: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object })]), /** * Determines when the component should update * its value. If `mouseup`, then the slider * will only trigger its value when the user has * finished dragging the slider. If `drag`, then * the slider will update its value continuously * as it is being dragged. * Only use `drag` if your updates are fast. */ updatemode: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['mouseup', 'drag']), /** * Dash-assigned callback that gets fired when the value changes. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['local', 'session', 'memory']), /** * make slider same size of its parent */ fullSize: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool }; var defaultProps = Slider.defaultProps; var propTypes = Slider.propTypes; /***/ }), /***/ "./src/components/StopButton.react.js": /*!********************************************!*\ !*** ./src/components/StopButton.react.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_StopButton_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/StopButton.styled */ "./src/styled/StopButton.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); /** * A Stop button component */ var StopButton = function StopButton(props) { var id = props.id, className = props.className, style = props.style, size = props.size, disabled = props.disabled, children = props.children, n_clicks = props.n_clicks, buttonText = props.buttonText, theme = props.theme; var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_5__["getClassName"])('stopbutton', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_5__["getFilteredProps"])(props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_4__["default"], filteredProps, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_StopButton_styled__WEBPACK_IMPORTED_MODULE_3__["Button"], { className: elementName + '__button', size: size, disabled: disabled, onClick: function onClick() { if (props.setProps) props.setProps({ n_clicks: n_clicks + 1 }); } }, children || buttonText))); }; StopButton.defaultProps = { buttonText: 'Stop', n_clicks: 0, size: 92, labelPosition: 'top' }; StopButton.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The size (width) of the stop button in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Text displayed in the button */ buttonText: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Number of times the button was clicked */ n_clicks: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If true, button cannot be pressesd. */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * The children of the button. */ children: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the button. * To control styling, pass an object with label and * style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when the * button is clicked. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(StopButton)); /***/ }), /***/ "./src/components/Tank.react.js": /*!**************************************!*\ !*** ./src/components/Tank.react.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/Tank.styled */ "./src/styled/Tank.styled.js"); /* harmony import */ var _styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/CurrentValue.styled */ "./src/styled/CurrentValue.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _helpers_logarithm__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/logarithm */ "./src/helpers/logarithm.js"); /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/util */ "./src/helpers/util.js"); /* harmony import */ var _helpers_scale__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/scale */ "./src/helpers/scale.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * A Tank component that fills to * a value between some range. */ var Tank = function Tank(props) { var min = props.min, max = props.max, showCurrentValue = props.showCurrentValue, units = props.units, className = props.className, id = props.id, style = props.style, color = props.color, logarithmic = props.logarithmic, base = props.base, height = props.height, width = props.width, theme = props.theme; var warningPara = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(null); var dirtyValue = logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_6__["default"].compute(props.value, base) : props.value; var currentDisplayValue = dirtyValue; var value = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_7__["sanitizeRangeValue"])({ min: min, max: max, value: dirtyValue }); var colorValue = props.textColor || color; var percentageFill = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_7__["computeProgress"])({ min: min, max: max, value: value }); var formatter = logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_6__["default"].generateLogFormatter({ base: base }) : null; var scale = Object(_helpers_scale__WEBPACK_IMPORTED_MODULE_8__["default"])(_objectSpread({}, props, { formatter: formatter })); var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_9__["getClassName"])('tank', theme); var currentValueStyle = props.currentValueStyle || (theme.dark ? { 'color': 'white' } : { 'color': 'black' }); var renderTicks = function renderTicks() { return Object.entries(scale).map(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), k = _ref2[0], v = _ref2[1]; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__["Tick"], { className: elementName + '__tick', key: k, color: colorValue, xPosition: Object(_helpers_util__WEBPACK_IMPORTED_MODULE_7__["computeProgress"])({ min: min, max: max, value: k }) }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "tick" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "label" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: v && v.style ? v.style : null }, v && v.label || v))); }); }; var scaleContainer = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__["TickContainer"], { xPositioned: scale }, renderTicks()); var currentValue = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_4__["default"], { units: units, valueColor: colorValue, customStyle: currentValueStyle }, logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_6__["default"].formatValue(currentDisplayValue, base) : currentDisplayValue); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_9__["getFilteredProps"])(props); Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () { var currValue = logarithmic ? Math.pow(base || 10, currentDisplayValue) : currentDisplayValue; var maximum = logarithmic ? Math.pow(base || 10, max) : max; var minimum = logarithmic ? Math.pow(base || 10, min) : min; if (currValue > maximum) { var str = ''; warningPara.current.innerHTML = props.exceedMessage ? typeof props.exceedMessage == 'string' ? props.exceedMessage : props.exceedMessage(currValue, maximum) || str : str; } else if (currValue < minimum) { var _str = ''; warningPara.current.innerHTML = props.lagingMessage ? typeof props.lagingMessage == 'string' ? props.lagingMessage : props.lagingMessage(currValue, minimum) || _str : _str; } else { warningPara.current.innerHTML = ''; } }, [currentDisplayValue]); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: elementName + (className ? ' ' + className : ''), id: id, style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__["ExceededWarning"], { ref: warningPara }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], _extends({ className: elementName + '__label' }, filteredProps), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__["Container"], null, scaleContainer, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__["TankContainer"], { className: elementName + '__container', height: height, width: width }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__["TankFill"], { className: elementName + '__fill', color: color, height: "".concat(percentageFill, "%") }), showCurrentValue && currentValue)))); }; Tank.defaultProps = { min: 0, max: 10, height: 192, width: 112, base: 10, labelPosition: 'top', theme: _styled_constants__WEBPACK_IMPORTED_MODULE_10__["light"] }; Tank.propTypes = { /** * The ID used to identify this component in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of tank. If logarithmic, the displayed value * will be the logarithm of the inputted value. */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The height of the tank in pixels */ height: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The width of the tank in pixels */ width: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The color of tank fill */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * text style of current value */ currentValueStyle: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * The minimum value of the tank. If logarithmic, * represents minimum exponent. */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the tank. If logarithmic, * represents the maximum exponent. */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Base to be used in logarithmic scale. */ base: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If set to true, a logarithmic scale will be * used. */ logarithmic: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * If true, the current value of the tank * will be displayed */ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Label for the current value */ units: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Value to start the scale from. Defaults * to min. */ start: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label for the mark */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Style object with label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]) }), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Warning message when value exceed max */ exceedMessage: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]), /** * Warning message when value is laging from min */ lagingMessage: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]), /** * text color */ textColor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(Tank)); /***/ }), /***/ "./src/components/Thermometer.react.js": /*!*********************************************!*\ !*** ./src/components/Thermometer.react.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_Thermometer_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/Thermometer.styled */ "./src/styled/Thermometer.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_Tank_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/Tank.styled */ "./src/styled/Tank.styled.js"); /* harmony import */ var _styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/CurrentValue.styled */ "./src/styled/CurrentValue.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_logarithm__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/logarithm */ "./src/helpers/logarithm.js"); /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../helpers/util */ "./src/helpers/util.js"); /* harmony import */ var _helpers_scale__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../helpers/scale */ "./src/helpers/scale.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * A thermometer component that * fills to a value between some * range */ var Thermometer = function Thermometer(props) { var min = props.min, max = props.max, id = props.id, className = props.className, style = props.style, logarithmic = props.logarithmic, base = props.base, showCurrentValue = props.showCurrentValue, units = props.units, theme = props.theme, color = props.color, height = props.height, width = props.width; var dirtyValue = logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_8__["default"].compute(props.value, base) : props.value; var value = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_9__["sanitizeRangeValue"])({ min: min, max: max, value: dirtyValue }); var formatter = logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_8__["default"].generateLogFormatter({ base: base }) : null; var scale = Object(_helpers_scale__WEBPACK_IMPORTED_MODULE_10__["default"])(_objectSpread({}, props, { formatter: formatter })); var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_11__["getClassName"])('thermometer', theme); var renderTicks = function renderTicks() { return Object.entries(scale).map(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), k = _ref2[0], v = _ref2[1]; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_5__["Tick"], { className: elementName + '__tick', key: k, xPosition: Object(_helpers_util__WEBPACK_IMPORTED_MODULE_9__["computeProgress"])({ min: min, max: max, value: k }) }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "tick" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "label", style: v && v.style ? v.style : null }, v && v.label || v)); }); }; var scaleContainer = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_5__["TickContainer"], { xPositioned: scale }, renderTicks()); var currentValue = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Thermometer_styled__WEBPACK_IMPORTED_MODULE_3__["CurrentValueContainer"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_6__["default"], { className: elementName + '__currentvalue', valueColor: color, units: units, css: 'top: 0;' }, logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_8__["default"].formatValue(value, base) : value.toFixed(1))); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_11__["getFilteredProps"])(props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_4__["default"], _extends({ className: elementName + '__label' }, filteredProps, { labelCSS: props.labelPosition === 'top' ? null : 'transform: translateY(-30px);' }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Thermometer_styled__WEBPACK_IMPORTED_MODULE_3__["ThermometerContainer"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_5__["Container"], { thermometer: true, xPositioned: scale }, scaleContainer, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_5__["TankContainer"], { thermometer: true, className: elementName + '__container', height: height, width: width }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_5__["TankFill"], { thermometer: true, className: elementName + '__fill', color: color, height: "".concat(Object(_helpers_util__WEBPACK_IMPORTED_MODULE_9__["computeProgress"])({ min: min, max: max, value: value }), "%") }), theme.dark ? null : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Thermometer_styled__WEBPACK_IMPORTED_MODULE_3__["Bulb"], { on: value !== min, color: color }))), showCurrentValue && currentValue))); }; Thermometer.defaultProps = { min: 0, max: 10, height: 192, width: 20, base: 10, labelPosition: 'top', theme: _styled_constants__WEBPACK_IMPORTED_MODULE_7__["light"] }; Thermometer.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of thermometer. If logarthmic, the value * displayed will be the logarithm of the inputted value. */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The height of the thermometer in pixels */ height: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The width of the thermometer in pixels */ width: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The color of the thermometer fill/current value text */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The minimum value of the thermometer. If logarithmic, * represents the minimum exponent. */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the thermometer. If logarithmic, * represents the maximum exponent. */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Base to be used in logarithmic scale. */ base: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If set to true, a logarithmic scale will be * used. */ logarithmic: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * If true, the current value of the * thermometer will be displayed */ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Label for the current value */ units: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Value to start the scale from. Defaults * to min. */ start: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label for the mark */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Style object with label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]) }), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(Thermometer)); /***/ }), /***/ "./src/components/ToggleSwitch.react.js": /*!**********************************************!*\ !*** ./src/components/ToggleSwitch.react.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/shared/Indicator.styled */ "./src/styled/shared/Indicator.styled.js"); /* harmony import */ var _styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/ToggleSwitch.styled */ "./src/styled/ToggleSwitch.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function getLabelProps(label) { if (_typeof(label) === 'object') { return { children: label.label, style: label.style }; } return { children: label, style: {} }; } /** * A switch component that toggles between * two values. */ var ToggleSwitch = /*#__PURE__*/ function (_Component) { _inherits(ToggleSwitch, _Component); function ToggleSwitch(props) { var _this; _classCallCheck(this, ToggleSwitch); _this = _possibleConstructorReturn(this, _getPrototypeOf(ToggleSwitch).call(this, props)); _this.state = { value: props.value }; _this.click = _this.click.bind(_assertThisInitialized(_this)); return _this; } _createClass(ToggleSwitch, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { if (newProps.value !== this.state.value) this.setState({ value: newProps.value }); } }, { key: "click", value: function click() { if (!this.props.disabled) { var newValue = !this.state.value; this.setState({ value: newValue }); if (this.props.setProps) this.props.setProps({ value: newValue }); } } }, { key: "render", value: function render() { var _this$props = this.props, id = _this$props.id, className = _this$props.className, style = _this$props.style, label = _this$props.label, labelPosition = _this$props.labelPosition, booleanSwitch = _this$props.booleanSwitch, theme = _this$props.theme, color = _this$props.color, vertical = _this$props.vertical, disabled = _this$props.disabled; var size = this.props.size || 45; var SwitchContainer = _styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["ButtonContainer"]; var Switch = _styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["Button"]; if (theme.dark && !booleanSwitch) { SwitchContainer = _styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["DarkSwitchContainer"]; Switch = _styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["DarkSwitch"]; } var indicatorSize = size / 10 * 1.25; var doubleLabel = Array.isArray(label); var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getClassName"])(booleanSwitch ? 'booleanswitch' : 'toggleswitch', theme.dark); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getFilteredProps"])(this.props); var switchCore = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["Wrapper"], { className: elementName, rotate: vertical ? -90 : 0, size: size }, !booleanSwitch && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_3__["default"], { className: elementName + '__indicator' + (this.state.value ? '--off' : '--on'), on: this.state.value, size: indicatorSize, primary: color }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(SwitchContainer, { className: elementName + '__background', onClick: this.click, size: size, color: color, on: this.state.value, booleanSwitch: booleanSwitch }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Switch, { className: elementName + '__button', disabled: disabled, on: this.state.value, size: size, booleanSwitch: booleanSwitch })), !booleanSwitch && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_3__["default"], { className: elementName + '__indicator' + (this.state.value ? '--on' : '--off'), main: true, on: this.state.value, size: indicatorSize, primary: color })); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: className, style: style }, doubleLabel ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["RowContainer"], filteredProps, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["RowLabel"], _extends({ className: elementName + '__label', position: vertical ? 'bottom' : 'left' }, getLabelProps(label[0]))), switchCore, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["RowLabel"], _extends({ className: elementName + '__label', position: vertical ? 'top' : 'right' }, getLabelProps(label[1])))) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], { className: elementName + '__label', label: label, labelPosition: labelPosition }, switchCore)); } }]); return ToggleSwitch; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); ToggleSwitch.defaultProps = { value: false, vertical: false, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_6__["light"], labelPosition: 'top', persisted_props: ['value'], persistence_type: 'local' }; ToggleSwitch.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The state of the switch */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * The size of the switch */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Color to highlight button/indicator */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * If true, switch will be vertical instead * of horizontal */ vertical: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * If true, switch cannot be clicked */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string }), /** * Multiple labels for both toggle states. The label at index 0 will be left * (or bottom if the switch is vertical), and the label at index 0 will be * on the right (or top if vertical) */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]))]), /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root object. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when * switch is toggled. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['local', 'session', 'memory']) }; var ThemedToggleSwitch = Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(ToggleSwitch); ThemedToggleSwitch.defaultProps = ToggleSwitch.defaultProps; /* harmony default export */ __webpack_exports__["default"] = (ThemedToggleSwitch); /***/ }), /***/ "./src/fragments/Slider.react.js": /*!***************************************!*\ !*** ./src/fragments/Slider.react.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var rc_slider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-slider */ "./node_modules/rc-slider/es/index.js"); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var deep_equal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! deep-equal */ "./node_modules/deep-equal/index.js"); /* harmony import */ var deep_equal__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(deep_equal__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _helpers_colorRanges__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers/colorRanges */ "./src/helpers/colorRanges.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var rc_slider_assets_index_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-slider/assets/index.css */ "./node_modules/rc-slider/assets/index.css"); /* harmony import */ var rc_slider_assets_index_css__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(rc_slider_assets_index_css__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _styled_Slider_styled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styled/Slider.styled */ "./src/styled/Slider.styled.js"); /* harmony import */ var _components_Slider_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../components/Slider.react */ "./src/components/Slider.react.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } var renderHandle = function renderHandle(props) { var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, isTarget = _ref.isTarget, showLabel = _ref.showLabel; var label = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Slider_styled__WEBPACK_IMPORTED_MODULE_8__["Label"], _extends({ isTarget: isTarget }, props), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "label" }, props.label), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "value" }, props.value)); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Slider_styled__WEBPACK_IMPORTED_MODULE_8__["HandleContainer"], _extends({ isTarget: isTarget }, props), showLabel && label, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Slider_styled__WEBPACK_IMPORTED_MODULE_8__["Handle"], _extends({ isTarget: isTarget, showLabel: showLabel }, props))); }; var getTrackStyle = function getTrackStyle(props) { if (!props.color.ranges || !Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_5__["isContiguous"])(props)) { var colorValue = Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_5__["getColorValue"])(props.color); return { trackStyle: { backgroundColor: colorValue }, activeDotStyle: props.theme.dark ? { background: colorValue, boxShadow: "0 0 6px 1px ".concat(colorValue) } : { borderColor: colorValue } }; } return { railStyle: { backgroundImage: "".concat(Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_5__["getLinearGradientCSS"])(props), ", linear-gradient(0deg, #000, #000)"), backgroundBlendMode: props.theme.dark ? 'none' : 'overlay' }, trackStyle: { mixBlendMode: 'overlay', background: props.theme.dark ? '#fff' : '#000' }, dotStyle: { display: 'none' } }; }; /** * A slider component with support for * a target value. */ var Slider = /*#__PURE__*/ function (_Component) { _inherits(Slider, _Component); function Slider(props) { var _this; _classCallCheck(this, Slider); _this = _possibleConstructorReturn(this, _getPrototypeOf(Slider).call(this, props)); _this.state = { value: props.value != null ? props.value : props.min, trackStyle: getTrackStyle(props) }; _this.onChange = _this.onChange.bind(_assertThisInitialized(_this)); _this.onAfterChange = _this.onAfterChange.bind(_assertThisInitialized(_this)); _this.renderSliderHandle = _this.renderSliderHandle.bind(_assertThisInitialized(_this)); _this.renderTargets = _this.renderTargets.bind(_assertThisInitialized(_this)); _this.calcLabelOffset = _this.calcLabelOffset.bind(_assertThisInitialized(_this)); return _this; } _createClass(Slider, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { var updates = {}; var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_10__["getFilteredProps"])(this.props); if (typeof newProps.value !== 'undefined' && newProps.value !== this.state.value) { updates.value = newProps.value; } if (!deep_equal__WEBPACK_IMPORTED_MODULE_4___default()(newProps.color, this.props.color)) { updates.trackStyle = getTrackStyle(_objectSpread({}, filteredProps, {}, newProps)); } this.setState(updates); } }, { key: "onChange", value: function onChange(value) { var _this$props = this.props, updatemode = _this$props.updatemode, setProps = _this$props.setProps; if (!this.props.value || updatemode !== 'drag') { this.setState({ value: value }); } if (updatemode === 'drag') { if (setProps) setProps({ value: value }); } } }, { key: "onAfterChange", value: function onAfterChange(value) { var _this$props2 = this.props, updatemode = _this$props2.updatemode, setProps = _this$props2.setProps; if (updatemode === 'mouseup') { if (setProps) setProps({ value: value }); } } }, { key: "renderSliderHandle", value: function renderSliderHandle(props) { var handleLabel = this.props.handleLabel; var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_10__["getFilteredProps"])(this.props); var handleProps = _objectSpread({}, filteredProps, {}, props); if (!handleLabel) { return renderHandle(handleProps); } var value = handleLabel.showCurrentValue && this.state.value; handleProps = _objectSpread({}, handleProps, { value: value, label: handleLabel.label || (handleLabel instanceof Object ? ' ' : handleLabel), color: handleLabel.color || Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_5__["getColorValue"])(this.props.color), style: handleLabel.style }); return renderHandle(handleProps, { showLabel: true }); } }, { key: "renderTargets", value: function renderTargets() { var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_10__["getFilteredProps"])(this.props); return Object.entries(this.props.targets).reduce(function (acc, _ref2) { var _ref3 = _slicedToArray(_ref2, 2), k = _ref3[0], v = _ref3[1]; var props = _objectSpread({}, filteredProps, { label: v.label || v, value: v.showCurrentValue && k, color: v.color, style: v.style }); var Handle = renderHandle(props, { isTarget: true, showLabel: !!v }); // use rc-slider's props.marks format acc[k] = { style: _styled_Slider_styled__WEBPACK_IMPORTED_MODULE_8__["targetStyles"], label: Handle }; return acc; }, {}); } }, { key: "calcLabelOffset", value: function calcLabelOffset(_ref4) { var vertical = _ref4.vertical, labelPosition = _ref4.labelPosition, marks = _ref4.marks, targets = _ref4.targets, handleLabel = _ref4.handleLabel; if (vertical) return null; if (labelPosition === 'bottom') { return "transform: translateY(".concat(marks ? 20 : 0, "px);"); } var showingCurrentValue = false; Object.values(targets).map(function (target) { if (target.showCurrentValue) showingCurrentValue = true; }); if (handleLabel && handleLabel.showCurrentValue) { showingCurrentValue = true; } return "transform: translateY(".concat(showingCurrentValue ? -38 : -16, "px);"); } }, { key: "render", value: function render() { var value = this.state.value; var _this$props3 = this.props, className = _this$props3.className, id = _this$props3.id, theme = _this$props3.theme, label = _this$props3.label, size = _this$props3.size, vertical = _this$props3.vertical, style = _this$props3.style, marks = _this$props3.marks; var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_10__["getClassName"])('slider', theme.dark); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_10__["getFilteredProps"])(this.props); var cssStyle = this.props.vertical ? _objectSpread({}, style, { marginLeft: '45px' }) : _objectSpread({}, style, { marginTop: '45px' }); cssStyle = this.props.fullSize ? this.props.vertical ? _objectSpread({}, cssStyle, { height: '100%' }) : _objectSpread({}, cssStyle, { width: '100%' }) : cssStyle; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, style: cssStyle, className: elementName + (className ? ' ' + className : '') }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_6__["default"], _extends({ className: elementName + '__label', labelCSS: label ? this.calcLabelOffset(this.props) : null }, filteredProps), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Slider_styled__WEBPACK_IMPORTED_MODULE_8__["SliderContainer"], { fullSize: this.props.fullSize, size: size, vertical: vertical }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(rc_slider__WEBPACK_IMPORTED_MODULE_1__["default"], _extends({ className: elementName + '__slider', onChange: this.onChange, onAfterChange: this.onAfterChange, value: value, handle: this.renderSliderHandle, marks: _objectSpread({}, marks, {}, this.renderTargets()) }, this.state.trackStyle, Object(ramda__WEBPACK_IMPORTED_MODULE_3__["omit"])(['setProps', 'updatemode', 'value', 'marks'], filteredProps)))))); } }]); return Slider; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); Slider.defaultProps = _components_Slider_react__WEBPACK_IMPORTED_MODULE_9__["defaultProps"]; Slider.propTypes = _components_Slider_react__WEBPACK_IMPORTED_MODULE_9__["propTypes"]; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(Slider)); /***/ }), /***/ "./src/helpers/GaugeSvg.react.js": /*!***************************************!*\ !*** ./src/helpers/GaugeSvg.react.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styled/shared/DarkGradient */ "./src/styled/shared/DarkGradient.js"); /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/util */ "./src/helpers/util.js"); /* harmony import */ var _shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./shared/TrackSvg */ "./src/helpers/shared/TrackSvg.js"); var lightNeedleKnob = function lightNeedleKnob(_ref) { var CX = _ref.CX, CY = _ref.CY; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { className: "needle-knob", cx: CX, cy: CY, r: "14", fill: "#fff" }); }; var darkNeedleKnob = function darkNeedleKnob(_ref2) { var CX = _ref2.CX, CY = _ref2.CY; var id = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_3__["getRandomInt"])(); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "needle-knob-edge-".concat(id), strokeWidth: "2px", fill: "none", cx: CX, cy: CY, r: "14" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "needle-knob-".concat(id), className: "needle-knob", cx: CX, cy: CY, r: "14" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#141414", xlinkHref: "#needle-knob-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#l)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#needle-knob-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#m)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#needle-knob-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#141414", filter: "url(#n)", xlinkHref: "#needle-knob-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "#000000", xlinkHref: "#needle-knob-edge-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#p)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#needle-knob-edge-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#q)", strokeOpacity: ".4", xlinkHref: "#needle-knob-edge-".concat(id) })); }; var darkTrack = function darkTrack(props, dimensions) { var progress = props.progress; var CX = dimensions.CX, CY = dimensions.CY, GAUGE_RAD = dimensions.GAUGE_RAD, CIRCLE_CIR = dimensions.CIRCLE_CIR, GAP_ARC_LENGTH = dimensions.GAP_ARC_LENGTH, TRACK_ARC_LENGTH = dimensions.TRACK_ARC_LENGTH; var id = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_3__["getRandomInt"])(); var colorValue = props.color && (typeof props.color === 'string' ? props.color : props.color["default"]); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "gauge-track-".concat(id), className: "track", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH, strokeWidth: "6", transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "gauge-track-progress-".concat(id), className: "track progress", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH + (1 - progress) * TRACK_ARC_LENGTH, strokeWidth: "6", transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "black", filter: "url(#a)", xlinkHref: "#gauge-track-".concat(id) }), props.color && props.color.ranges && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "#15181A", xlinkHref: "#gauge-track-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#c)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#gauge-track-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "black", filter: "url(#d)", xlinkHref: "#gauge-track-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "black", filter: "url(#e)", xlinkHref: "#gauge-track-progress-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: colorValue || '#ABE2FB', xlinkHref: "#gauge-track-progress-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#g)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#gauge-track-progress-".concat(id) }), props.color && props.color.ranges && Object(_shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__["colorRangesTrack"])(props, dimensions)); }; var needle = function needle(needleRotation, _ref3) { var CX = _ref3.CX, CY = _ref3.CY, SCALE_RAD = _ref3.SCALE_RAD; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("line", { className: "needle", x1: CX, y1: CY, x2: CX + SCALE_RAD, y2: CY, transform: "rotate(".concat(needleRotation || 0, " ").concat(CX, " ").concat(CY, ")"), strokeLinecap: "round" }); }; var defs = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_2__["default"]); var GaugeSvg = function GaugeSvg(props) { var progress = props.progress, min = props.min, max = props.max, step = props.step, scale = props.scale; var dimensions = calcDimensions(props); var scaleItems = Object(_shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__["drawScale"])({ min: min, max: max, step: step, scale: scale }, dimensions); var knob = props.theme.dark ? darkNeedleKnob(dimensions) : lightNeedleKnob(dimensions); var track = props.theme.dark ? darkTrack(props, dimensions) : Object(_shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__["lightTrack"])(props, dimensions); var needleRotation = 270 * progress - 225; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { width: dimensions.SVG_WIDTH, height: dimensions.SVG_WIDTH, viewBox: "0 0 ".concat(dimensions.SVG_WIDTH, " ").concat(dimensions.SVG_WIDTH) }, props.theme.dark && defs, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { className: "scale" }, scaleItems), needle(needleRotation, dimensions), knob, track); }; GaugeSvg.defaultProps = { theme: _styled_constants__WEBPACK_IMPORTED_MODULE_1__["light"], size: 208 }; /* harmony default export */ __webpack_exports__["default"] = (GaugeSvg); // private helpers function calcDimensions(_ref4) { var size = _ref4.size; var OFFSET = 8; var d = {}; d.SVG_WIDTH = size + 32; d.CY = ~~(d.SVG_WIDTH / 2); d.CX = ~~(d.SVG_WIDTH / 2); d.GAUGE_RAD = size / 2; d.SCALE_RAD = d.GAUGE_RAD - OFFSET; d.CIRCLE_CIR = 2 * Math.PI * d.GAUGE_RAD; d.GAP_ARC_LENGTH = 90 / 360 * (2 * Math.PI * d.GAUGE_RAD); d.TRACK_ARC_LENGTH = d.CIRCLE_CIR - d.GAP_ARC_LENGTH; d.SCALE_TICK_OUTER_RAD = d.SCALE_RAD; d.SCALE_TICK_INNER_RAD = d.SCALE_TICK_OUTER_RAD - 6; d.SCALE_TEXT_RAD = d.SCALE_TICK_INNER_RAD - 8; d.IS_GAUGE = true; return d; } /***/ }), /***/ "./src/helpers/KnobSvg.react.js": /*!**************************************!*\ !*** ./src/helpers/KnobSvg.react.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styled/shared/DarkGradient */ "./src/styled/shared/DarkGradient.js"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util */ "./src/helpers/util.js"); /* harmony import */ var _shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./shared/TrackSvg */ "./src/helpers/shared/TrackSvg.js"); /* harmony import */ var _colorRanges__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./colorRanges */ "./src/helpers/colorRanges.js"); var START_ANGLE_OFFSET = -225; var lightKnob = function lightKnob(newAngle, _ref) { var CX = _ref.CX, CY = _ref.CY, KNOB_RAD = _ref.KNOB_RAD; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { transform: "translate(".concat(CX, " ").concat(CY, ") rotate(").concat(newAngle, ")") }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { className: "base", cx: "0", cy: "0", r: KNOB_RAD, fill: "#fff" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { className: "indent", cx: KNOB_RAD * (2 / 3), cy: "0", r: KNOB_RAD / 6, fill: "#fff" })); }; var darkKnob = function darkKnob(color, newAngle, _ref2) { var CX = _ref2.CX, CY = _ref2.CY, KNOB_RAD = _ref2.KNOB_RAD; var id = Object(_util__WEBPACK_IMPORTED_MODULE_3__["getRandomInt"])(); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { transform: "translate(".concat(CX, " ").concat(CY, ")") }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "base-edge-".concat(id), strokeWidth: "2px", fill: "none", d: "M-".concat(KNOB_RAD, ",0a").concat(KNOB_RAD, ",").concat(KNOB_RAD, " 0 1,0 ").concat(KNOB_RAD * 2, ",0a").concat(KNOB_RAD, ",").concat(KNOB_RAD, " 0 1,0 -").concat(KNOB_RAD * 2, ",0") }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "base-".concat(id), className: "base", cx: "0", cy: "0", r: KNOB_RAD }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("rect", { id: "indent-".concat(id), width: "8", height: "2", x: KNOB_RAD - 16, y: "0", rx: "1" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#141414", xlinkHref: "#base-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#l)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#base-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#m)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#base-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#141414", filter: "url(#n)", xlinkHref: "#base-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "#000000", xlinkHref: "#base-edge-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#p)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#base-edge-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#q)", strokeOpacity: ".4", xlinkHref: "#base-edge-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { transform: "rotate(".concat(newAngle, ")") }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "black", filter: "url(#r)", xlinkHref: "#indent-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: Object(_colorRanges__WEBPACK_IMPORTED_MODULE_5__["getColorValue"])(color) || '#ABE2FB', xlinkHref: "#indent-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "black", filter: "url(#t)", xlinkHref: "#indent-".concat(id) }))); }; var darkTrack = function darkTrack(props, dimensions) { var progress = props.progress; var CX = dimensions.CX, CY = dimensions.CY, GAUGE_RAD = dimensions.GAUGE_RAD, CIRCLE_CIR = dimensions.CIRCLE_CIR, GAP_ARC_LENGTH = dimensions.GAP_ARC_LENGTH, TRACK_ARC_LENGTH = dimensions.TRACK_ARC_LENGTH; var id = Object(_util__WEBPACK_IMPORTED_MODULE_3__["getRandomInt"])(); var hasColorRanges = props.color && props.color.ranges; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "knob-track-".concat(id), className: "track", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH, strokeWidth: "6", transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "knob-track-progress-".concat(id), className: "track progress", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH + (1 - progress) * TRACK_ARC_LENGTH, strokeWidth: "6", transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "#15181A", filter: "url(#a)", xlinkHref: "#knob-track-".concat(id) }), hasColorRanges && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "#15181A", xlinkHref: "#knob-track-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#c)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#knob-track-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "#15181A", filter: "url(#d)", xlinkHref: "#knob-track-".concat(id) }), !hasColorRanges && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "black", filter: "url(#e)", xlinkHref: "#knob-track-progress-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#g)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#knob-track-progress-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: Object(_colorRanges__WEBPACK_IMPORTED_MODULE_5__["getColorValue"])(props.color) || '#ABE2FB', xlinkHref: "#knob-track-progress-".concat(id) }), props.color && props.color.ranges && Object(_shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__["colorRangesTrack"])(props, dimensions)); }; var KnobSvg = function KnobSvg(props) { var theme = props.theme, currentDeg = props.currentDeg, disabled = props.disabled, color = props.color; var newAngle = currentDeg + START_ANGLE_OFFSET; var dimensions = calcDimensions(props); var knob = theme.dark ? darkKnob(color, newAngle, dimensions) : lightKnob(newAngle, dimensions); var track = theme.dark ? darkTrack(props, dimensions) : Object(_shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__["lightTrack"])(props, dimensions); var scaleElements = Object(_shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__["drawScale"])(props, dimensions); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { width: dimensions.SVG_WIDTH, height: dimensions.SVG_WIDTH, viewBox: "0 0 ".concat(dimensions.SVG_WIDTH, " ").concat(dimensions.SVG_WIDTH) }, theme.dark && _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_2__["default"], react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { className: "scale" }, scaleElements), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { ref: props.refFunc, onMouseDown: props.onMouseDown, onMouseUp: props.onMouseUp, onMouseMove: props.onMouseMove, onTouchStart: props.onMouseDown, onTouchEnd: props.onMouseUp, onTouchMove: props.onMouseMove, className: "knob ".concat(disabled ? 'disabled' : '') }, knob), track); }; KnobSvg.defaultProps = { theme: _styled_constants__WEBPACK_IMPORTED_MODULE_1__["light"], size: 144 }; /* harmony default export */ __webpack_exports__["default"] = (KnobSvg); // private helpers function calcDimensions(_ref3) { var size = _ref3.size; var OFFSET = 36; var d = {}; d.SVG_WIDTH = size + 80; d.CY = ~~(d.SVG_WIDTH / 2); d.CX = ~~(d.SVG_WIDTH / 2); d.GAUGE_RAD = size / 2; d.SCALE_RAD = d.GAUGE_RAD + OFFSET; d.KNOB_RAD = d.GAUGE_RAD - 12; d.CIRCLE_CIR = 2 * Math.PI * d.GAUGE_RAD; d.GAP_ARC_LENGTH = 90 / 360 * (2 * Math.PI * d.GAUGE_RAD); d.TRACK_ARC_LENGTH = d.CIRCLE_CIR - d.GAP_ARC_LENGTH; d.SCALE_TICK_OUTER_RAD = d.SCALE_RAD - 27; d.SCALE_TICK_INNER_RAD = d.SCALE_TICK_OUTER_RAD - 0.5; d.SCALE_TEXT_RAD = d.SCALE_RAD - 20; return d; } /***/ }), /***/ "./src/helpers/LEDDisplaySvg.react.js": /*!********************************************!*\ !*** ./src/helpers/LEDDisplaySvg.react.js ***! \********************************************/ /*! exports provided: Digit, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Digit", function() { return Digit; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! color */ "./node_modules/color/index.js"); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(color__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _styled_LEDDisplay_styled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styled/LEDDisplay.styled */ "./src/styled/LEDDisplay.styled.js"); /* harmony import */ var _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/shared/DarkGradient */ "./src/styled/shared/DarkGradient.js"); var DIGITS = { 0: ['A', 'B', 'C', 'D', 'E', 'F'], 1: ['B', 'C'], 2: ['A', 'B', 'G', 'E', 'D'], 3: ['A', 'B', 'G', 'C', 'D'], 4: ['F', 'G', 'B', 'C'], 5: ['A', 'F', 'G', 'C', 'D'], 6: ['A', 'F', 'G', 'C', 'D', 'E'], 7: ['A', 'B', 'C'], 8: ['A', 'B', 'C', 'D', 'E', 'F', 'G'], 9: ['A', 'B', 'C', 'D', 'F', 'G'], '-': ['G'] }; // See the following link for segment mappings: // https://en.wikipedia.org/wiki/Seven-segment_display#/media/File:7_segment_display_labeled.svg var LIGHT_SEGMENTS = { A: { base: 'M3.778 3.778L6.555 1h16.667L26 3.778l-2.778 2.778H6.555L3.778 3.778z', stroke: 'M3.778 3.778L6.555 1h16.667L26 3.778l-2.778 2.778H6.555L3.778 3.778z' }, B: { base: 'M26 3.778l2.778 2.777v16.667L26 26l-2.778-2.778V6.555L26 3.778z', stroke: 'M26 3.778l2.778 2.777v16.667L26 26l-2.778-2.778V6.555L26 3.778z' }, C: { base: 'M26 26l2.778 2.778v16.666L26 48.222l-2.778-2.778V28.778L26 26z', stroke: 'M26 26l2.778 2.778v16.666L26 48.222l-2.778-2.778V28.778L26 26z' }, D: { base: 'M26 48.222L23.222 51H6.555l-2.777-2.778 2.777-2.778h16.667L26 48.222z', stroke: 'M26 48.222L23.222 51H6.555l-2.777-2.778 2.777-2.778h16.667L26 48.222z' }, E: { base: 'M3.778 48.222L1 45.444V28.778L3.778 26l2.778 2.778v16.666l-2.778 2.778z', stroke: 'M3.778 48.222L1 45.444V28.778L3.778 26l2.778 2.778v16.666l-2.778 2.778z' }, F: { base: 'M3.778 26L1 23.222V6.555l2.778-2.777 2.778 2.777v16.667L3.778 26z', stroke: 'M3.778 26L1 23.222V6.555l2.778-2.777 2.778 2.777v16.667L3.778 26z' }, G: { base: 'M3.778 26l2.777-2.778h16.667L26 26l-2.778 2.778H6.555L3.778 26z', stroke: 'M3.778 26l2.777-2.778h16.667L26 26l-2.778 2.778H6.555L3.778 26z' } }; var LightSegment = function LightSegment(_ref) { var _ref$paths = _ref.paths, base = _ref$paths.base, stroke = _ref$paths.stroke, fillColor = _ref.fillColor, strokeColor = _ref.strokeColor; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { fill: fillColor, fillRule: "evenodd", d: base, clipRule: "evenodd" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { stroke: strokeColor, strokeWidth: ".75", d: stroke })); }; var LightDecimal = function LightDecimal(_ref2) { var fillColor = _ref2.fillColor, strokeColor = _ref2.strokeColor; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { transform: "translate(29 46)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { cx: "3", cy: "3", r: "3", fill: fillColor }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { cx: "3", cy: "3", r: "3", stroke: strokeColor, strokeWidth: ".75" })); }; var LightColon = function LightColon(_ref3) { var fillColor = _ref3.fillColor, strokeColor = _ref3.strokeColor; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { transform: "translate(32 36)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { cx: "3", cy: "3", r: "3", fill: fillColor }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { cx: "3", cy: "3", r: "3", stroke: strokeColor, strokeWidth: ".75" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { transform: "translate(32 9)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { cx: "3", cy: "3", r: "3", fill: fillColor }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { cx: "3", cy: "3", r: "3", stroke: strokeColor, strokeWidth: ".75" }))); }; var LightDigit = function LightDigit(_ref4) { var value = _ref4.value, hasColon = _ref4.hasColon, hasDecimal = _ref4.hasDecimal, color = _ref4.color, backgroundColor = _ref4.backgroundColor, size = _ref4.size, className = _ref4.className; var inactiveSegmentFill = color__WEBPACK_IMPORTED_MODULE_1___default()(backgroundColor).darken(0.2).fade(0.85); var activeSegments = DIGITS[value].map(function (letter) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LightSegment, { key: letter, fillColor: color, strokeColor: backgroundColor, paths: LIGHT_SEGMENTS[letter] }); }); var inactiveSegments = ['A', 'B', 'C', 'D', 'E', 'F', 'G'].map(function (letter) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LightSegment, { key: letter, fillColor: inactiveSegmentFill, strokeColor: backgroundColor, paths: LIGHT_SEGMENTS[letter] }); }); var width = hasColon ? size : size * (6 / 7); var height = size * (9 / 7); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: className }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fill: "none", style: { transform: "scale(".concat(Number(size) / 42, ")") } }, inactiveSegments, activeSegments, hasColon && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LightColon, { fillColor: color, strokeColor: backgroundColor }), hasDecimal && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LightDecimal, { fillColor: color, strokeColor: backgroundColor })))); }; var DarkDigit = function DarkDigit(_ref5) { var value = _ref5.value, hasColon = _ref5.hasColon, hasDecimal = _ref5.hasDecimal, color = _ref5.color, size = _ref5.size, className = _ref5.className; var segments = DIGITS[value].map(function (letter) { return _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_3__["DARK_SEGMENTS"][letter]; }); var width = hasColon ? size : size * (6 / 7); var height = size * (9 / 7); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_LEDDisplay_styled__WEBPACK_IMPORTED_MODULE_2__["DarkDigitContainer"], { className: className, color: color }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", width: width, height: height }, _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_3__["darkLEDDefs"], react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fill: "none", fillRule: "evenodd", filter: "url(#darkLED-a)", style: { transform: "scale(".concat(Number(size) / 42, ")") } }, segments, hasColon && _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_3__["darkColon"], hasDecimal && _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_3__["darkDecimal"]))); }; var Digit = function Digit(props) { return props.theme.dark ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DarkDigit, props) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LightDigit, props); }; /* harmony default export */ __webpack_exports__["default"] = (Digit); /***/ }), /***/ "./src/helpers/NumericInput.js": /*!*************************************!*\ !*** ./src/helpers/NumericInput.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react_numeric_input__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-numeric-input */ "./node_modules/react-numeric-input/index.js"); /* harmony import */ var react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_numeric_input__WEBPACK_IMPORTED_MODULE_0__); react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.UNSAFE_componentWillMount = react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.componentWillMount; react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.UNSAFE_componentWillReceiveProps = react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.componentWillReceiveProps; react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.UNSAFE_componentWillUpdate = react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.componentWillUpdate; delete react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.componentWillMount; delete react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.componentWillReceiveProps; delete react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.componentWillUpdate; /* harmony default export */ __webpack_exports__["default"] = (react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "./src/helpers/PowerButtonSvg.react.js": /*!*********************************************!*\ !*** ./src/helpers/PowerButtonSvg.react.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); var PowerButtonSvg = function PowerButtonSvg(_ref) { var color = _ref.color, theme = _ref.theme, on = _ref.on, size = _ref.size; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 14 14" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { fill: on ? color || theme.primary : theme.secondary, fillRule: "evenodd", d: "M24.5173333,14.68 C25.2764482,15.3271143 25.8799978,16.1111065 26.328,17.032 C26.7760022,17.9777825 27,18.9671059 27,20 C27,21.2693397 26.6826698,22.4453279 26.048,23.528 C25.4257747,24.5857831 24.5857831,25.4257747 23.528,26.048 C22.4453279,26.6826698 21.2693397,27 20,27 C18.7306603,27 17.5546721,26.6826698 16.472,26.048 C15.4142169,25.4257747 14.5742253,24.5857831 13.952,23.528 C13.3173302,22.4453279 13,21.2693397 13,20 C13,18.9671059 13.2302199,17.9777825 13.6906667,17.032 C14.1262244,16.1111065 14.7235518,15.3271143 15.4826667,14.68 L16.5653333,15.7626667 C15.9555525,16.2728914 15.4764462,16.8888853 15.128,17.6106667 C14.7546648,18.3697816 14.568,19.1662181 14.568,20 C14.568,20.9955605 14.8106642,21.9102181 15.296,22.744 C15.7813358,23.5653374 16.4346626,24.2186642 17.256,24.704 C18.0897819,25.1893358 19.0044395,25.432 20,25.432 C20.9955605,25.432 21.9102181,25.1893358 22.744,24.704 C23.5653374,24.2186642 24.2186642,23.5653374 24.704,22.744 C25.1893358,21.9102181 25.432,20.9955605 25.432,20 C25.432,19.1537735 25.2546684,18.3666703 24.9,17.6386667 C24.5453316,16.910663 24.056892,16.2977803 23.4346667,15.8 L24.5173333,14.68 Z M20.7653333,13 L20.7653333,20.7653333 L19.2346667,20.7653333 L19.2346667,13 L20.7653333,13 Z", transform: "translate(-13 -13)" })); }; PowerButtonSvg.defaultProps = { theme: _styled_constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; /* harmony default export */ __webpack_exports__["default"] = (PowerButtonSvg); /***/ }), /***/ "./src/helpers/classNameGenerator.js": /*!*******************************************!*\ !*** ./src/helpers/classNameGenerator.js ***! \*******************************************/ /*! exports provided: getClassName, getFilteredProps */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClassName", function() { return getClassName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFilteredProps", function() { return getFilteredProps; }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); var getClassName = function getClassName(componentName, theme) { return 'daq-' + componentName + (theme && theme.dark ? '--dark' : '--light'); }; var getFilteredProps = function getFilteredProps(props) { return Object(ramda__WEBPACK_IMPORTED_MODULE_0__["omit"])(['className', 'id', 'setProps', 'style'], props); }; /***/ }), /***/ "./src/helpers/colorRanges.js": /*!************************************!*\ !*** ./src/helpers/colorRanges.js ***! \************************************/ /*! exports provided: isContiguous, toOneDArray, convertInRange, getSortedEntries, getGradientObject, getLinearGradientCSS, getColorValue, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContiguous", function() { return isContiguous; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toOneDArray", function() { return toOneDArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertInRange", function() { return convertInRange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSortedEntries", function() { return getSortedEntries; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGradientObject", function() { return getGradientObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLinearGradientCSS", function() { return getLinearGradientCSS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getColorValue", function() { return getColorValue; }); /* harmony import */ var tinygradient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tinygradient */ "./node_modules/tinygradient/tinygradient.js"); /* harmony import */ var tinygradient__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tinygradient__WEBPACK_IMPORTED_MODULE_0__); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var isContiguous = function isContiguous(_ref) { var color = _ref.color, min = _ref.min, max = _ref.max; var ranges = toOneDArray(Object.values(color.ranges)); ranges.sort(function (r1, r2) { return r1[0] - r2[0]; }); // color ranges start at min and end at max if (ranges[0][0] !== min || ranges[ranges.length - 1][1] !== max) return false; // color ranges are contiguous for (var i = 0; i < ranges.length - 1; i++) { if (ranges[i][1] !== ranges[i + 1][0]) return false; } return true; }; var toOneDArray = function toOneDArray(ranges) { var arr = []; for (var i = 0; i < ranges.length; i++) { if (ranges[i][0] instanceof Array) { for (var j = 0; j < ranges[i].length; j++) { arr.push(ranges[i][j]); } } else { arr.push(ranges[i]); } } return arr; }; var convertInRange = function convertInRange(color, max, min) { /* * The function will check color and range attribute. * if range attribute is provided, it will check for unequal range values. * args: color, max and min props from the gauge component * example 1: * input: color -> {"red":[1, 10], "green":[10, 50]}, max -> 40, min -> 0 * output: {"red":[0, 10], "green":[10, 40]} * if color is underfined */ if (!color) { return color; } // if ranges is not passed with color if (color.ranges == null) { return color; } else { var ranges = _objectSpread({}, color.ranges); // get a flat array of ranges var rangeArr = getRangeArray(ranges); rangeArr.sort(function (a1, a2) { return a1 - a2; }); var maxArr = []; var minArr = []; manageRange({ ranges: ranges, max: max, min: min, rangeArr: rangeArr, minArr: minArr, maxArr: maxArr }); for (var i = 0; i < minArr.length; i++) { if (minArr[i]['subKey']) { ranges[minArr[i]['subKey']][minArr[i]['key']][minArr[i]['index']] = min; } else { ranges[minArr[i]['key']][minArr[i]['index']] = min; } } for (var _i = 0; _i < maxArr.length; _i++) { if (maxArr[_i]['subKey']) { ranges[maxArr[_i]['subKey']][maxArr[_i]['key']][maxArr[_i]['index']] = max; } else { ranges[maxArr[_i]['key']][maxArr[_i]['index']] = max; } } color.ranges = ranges; return _objectSpread({}, color); } }; var manageRange = function manageRange(_ref2) { var ranges = _ref2.ranges, _ref2$subKey = _ref2.subKey, subKey = _ref2$subKey === void 0 ? undefined : _ref2$subKey, max = _ref2.max, min = _ref2.min, rangeArr = _ref2.rangeArr, _ref2$minArr = _ref2.minArr, minArr = _ref2$minArr === void 0 ? [] : _ref2$minArr, _ref2$maxArr = _ref2.maxArr, maxArr = _ref2$maxArr === void 0 ? [] : _ref2$maxArr; for (var i in ranges) { if (ranges[i][0] instanceof Array) { manageRange({ ranges: ranges[i], subKey: i, max: max, min: min, rangeArr: rangeArr, minArr: minArr, maxArr: maxArr }); continue; } if (ranges[i][0] > max) { maxArr.push({ key: i, subKey: subKey, index: 0 }); } if (ranges[i][1] > max) { maxArr.push({ key: i, subKey: subKey, index: 1 }); } if (ranges[i][0] < min) { minArr.push({ key: i, subKey: subKey, index: 0 }); } if (ranges[i][1] < min) { minArr.push({ key: i, subKey: subKey, index: 1 }); } if (rangeArr[0] == ranges[i][0] && ranges[i][0] > min) { ranges[i][0] = min; } if (rangeArr[0] == ranges[i][1] && ranges[i][1] > min) { ranges[i][1] = min; } if (rangeArr[rangeArr.length - 1] == ranges[i][0] && ranges[i][0] < max) { ranges[i][0] = max; } if (rangeArr[rangeArr.length - 1] == ranges[i][1] && ranges[i][1] < max) { ranges[i][1] = max; } } }; var getRangeArray = function getRangeArray(ranges) { /* * convert range passed in colors to flat array * example -> ranges = {"red":[0, 1], "green":[1, 10]} * output -> arr = [0, 1, 1, 10] */ var arr = []; for (var i in ranges) { if (ranges[i][0] instanceof Array) { for (var j in ranges[i]) { arr = [].concat(_toConsumableArray(arr), _toConsumableArray(ranges[i][j])); } } else { arr = [].concat(_toConsumableArray(arr), _toConsumableArray(ranges[i])); } } return arr; }; var getSortedEntries = function getSortedEntries(scale) { var arr = Object.entries(scale); var arr1 = []; for (var i = 0; i < arr.length; i++) { var key = arr[i][0]; if (arr[i][1][0] instanceof Array) { for (var j = 0; j < arr[i][1].length; j++) { arr1.push([key, arr[i][1][j]]); } } else { arr1.push([key, arr[i][1]]); } } var entries = arr1; entries.sort(function (_ref3, _ref4) { var _ref5 = _slicedToArray(_ref3, 2), r1 = _ref5[1]; var _ref6 = _slicedToArray(_ref4, 2), r2 = _ref6[1]; return r1[0] - r2[0]; }); return entries; }; var getGradientObject = function getGradientObject(_ref7) { var color = _ref7.color, min = _ref7.min, max = _ref7.max; var currentPos = 0; var stops = getSortedEntries(color.ranges).map(function (_ref8) { var _ref9 = _slicedToArray(_ref8, 2), colorValue = _ref9[0], range = _ref9[1]; var rangeLength = (range[1] - range[0]) * 1.0 / (max - min); var start = currentPos; var end = currentPos + rangeLength; currentPos = end; return { color: colorValue, pos: start }; }); return tinygradient__WEBPACK_IMPORTED_MODULE_0___default()(stops); }; var getLinearGradientCSS = function getLinearGradientCSS(_ref10) { var color = _ref10.color, min = _ref10.min, max = _ref10.max, _ref10$vertical = _ref10.vertical, vertical = _ref10$vertical === void 0 ? false : _ref10$vertical; var currentPercentage = 0; var stops = getSortedEntries(color.ranges).map(function (_ref11, i) { var _ref12 = _slicedToArray(_ref11, 2), colorValue = _ref12[0], range = _ref12[1]; var rangeLength = (range[1] - range[0]) * 1.0 / (max - min) * 100; var start = currentPercentage; var end = currentPercentage + rangeLength; currentPercentage = end; if (color.gradient) { return i === 0 ? colorValue : "".concat(colorValue, " ").concat(start, "%"); } return i === 0 ? "".concat(colorValue, ", ").concat(colorValue, " ").concat(end, "%") : "".concat(colorValue, " ").concat(start, "%, ").concat(colorValue, " ").concat(end, "%"); }); stops.unshift(vertical ? 'to top' : 'to right'); return "linear-gradient(".concat(stops.join(', '), ")"); }; var getColorValue = function getColorValue(color) { return color && (typeof color === 'string' ? color : color["default"]); }; /* harmony default export */ __webpack_exports__["default"] = ({ isContiguous: isContiguous, getSortedEntries: getSortedEntries, getLinearGradientCSS: getLinearGradientCSS, getColorValue: getColorValue }); /***/ }), /***/ "./src/helpers/logarithm.js": /*!**********************************!*\ !*** ./src/helpers/logarithm.js ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ "./src/helpers/util.js"); function _templateObject() { var data = _taggedTemplateLiteral(["\n font-size: 0.9em;\n margin-left: -10px;\n\n & sup {\n font-size: 0.6em;\n }\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } function compute(value) { var base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10; if (base === 'e') base = Math.exp(1); return Math.log(value) / Math.log(base); } function generateLogFormatter(_ref) { var _ref$base = _ref.base, base = _ref$base === void 0 ? 10 : _ref$base, _ref$isSVG = _ref.isSVG, isSVG = _ref$isSVG === void 0 ? false : _ref$isSVG; return function (value) { return isSVG ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tspan", null, base, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tspan", { dy: "-6px" }, value)) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, base, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("sup", null, value)); }; } function genLogMarks(_ref2, isSVG) { var min = _ref2.min, max = _ref2.max, _ref2$step = _ref2.step, step = _ref2$step === void 0 ? 1 : _ref2$step, _ref2$base = _ref2.base, base = _ref2$base === void 0 ? 10 : _ref2$base, marks = _ref2.marks; // if no marks given, compute default marks if (!marks) { var curr = min; marks = {}; while (curr <= max) { marks[curr] = true; curr += step; } } Object.keys(marks).forEach(function (key) { if (typeof marks[key] !== 'boolean') { // custom mark label, do not format return; } marks[key] = isSVG ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tspan", null, base, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tspan", { dy: "-6px" }, key)) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, base, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("sup", null, key)); }); return marks; } function formatValue(value, base) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Value, null, "~", base, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("sup", null, Object(_util__WEBPACK_IMPORTED_MODULE_2__["roundToDecimal"])(value, 2))); } var Value = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject()); /* harmony default export */ __webpack_exports__["default"] = ({ compute: compute, generateLogFormatter: generateLogFormatter, formatValue: formatValue, genLogMarks: genLogMarks }); /***/ }), /***/ "./src/helpers/scale.js": /*!******************************!*\ !*** ./src/helpers/scale.js ***! \******************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return generateScale; }); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./src/helpers/util.js"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } // magic numbers var DEFAULT_NUM_INTERVALS = 10; var DEFAULT_LABEL_INTERVAL = 2; function generateScale(input) { var config = processInput(input); var scale = _objectSpread({}, config.custom); if (config.onlyRenderCustom) { return scale; } scale[config.min] = config.formatter(config.min); scale[config.max] = config.formatter(config.max); var curr = config.start; var markCount = 0; while (curr <= config.max) { var needsLabel = markCount % config.labelInterval === 0; var currValue = Number(Object(_util__WEBPACK_IMPORTED_MODULE_0__["decimalify"])(curr, config.interval)); var alreadyMarked = typeof scale[currValue] !== 'undefined'; curr += config.interval; markCount++; if (alreadyMarked) continue; var label = needsLabel ? config.formatter(currValue) : null; scale[currValue] = label; } return scale; } // private function processInput(_ref) { var min = _ref.min, max = _ref.max, _ref$scale = _ref.scale, scale = _ref$scale === void 0 ? {} : _ref$scale, formatter = _ref.formatter; var config = {}; var START_FLAG = scale.start != null; var INTERVAL_FLAG = scale.interval != null; var LABEL_INTERVAL_FLAG = scale.labelInterval != null; config.min = min; config.max = max; config.start = START_FLAG ? scale.start : min; config.interval = INTERVAL_FLAG ? scale.interval : computeInterval(config.start, max); config.labelInterval = LABEL_INTERVAL_FLAG ? scale.labelInterval : DEFAULT_LABEL_INTERVAL; config.custom = scale.custom || {}; config.formatter = formatter || identityFunc; var noConfigPassed = !START_FLAG && !INTERVAL_FLAG && !LABEL_INTERVAL_FLAG; var customTicks = Object.keys(config.custom).length; config.onlyRenderCustom = customTicks && noConfigPassed; config.start = config.start != min ? min : config.start; return config; } function identityFunc(x) { return x; } function computeInterval(min, max) { var ROUND_TO_WHOLE = Math.ceil; var ROUND_TO_FRACTION = function ROUND_TO_FRACTION(x) { return Number(x.toFixed(2)); }; var range = Math.abs(max - min) * 1.0; var intervalEstimate = range / DEFAULT_NUM_INTERVALS; var interval = intervalEstimate > 1 ? ROUND_TO_WHOLE(intervalEstimate) : ROUND_TO_FRACTION(intervalEstimate); return interval; } /***/ }), /***/ "./src/helpers/shared/TrackSvg.js": /*!****************************************!*\ !*** ./src/helpers/shared/TrackSvg.js ***! \****************************************/ /*! exports provided: colorRangesTrack, lightTrack, drawScale */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorRangesTrack", function() { return colorRangesTrack; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lightTrack", function() { return lightTrack; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawScale", function() { return drawScale; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../helpers/util */ "./src/helpers/util.js"); /* harmony import */ var _helpers_colorRanges__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../helpers/colorRanges */ "./src/helpers/colorRanges.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../styled/constants */ "./src/styled/constants.js"); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var colorRangesTrack = function colorRangesTrack(props, dimensions) { // const { max } = props; var CX = dimensions.CX, CY = dimensions.CY, GAUGE_RAD = dimensions.GAUGE_RAD, CIRCLE_CIR = dimensions.CIRCLE_CIR, GAP_ARC_LENGTH = dimensions.GAP_ARC_LENGTH; var TRACK_ARC_DEG = 270; var GAP_ARC_DEG = 90; var GRADIENT_BLEND = 25; if (!Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_2__["isContiguous"])(props)) return null; // set colors start from 0 if negative value is present var deepColorCopy = JSON.parse(JSON.stringify(props.color)); var _setColorRangeStartFr = setColorRangeStartFromZero(_objectSpread({}, deepColorCopy), props.max), color = _setColorRangeStartFr.color, max = _setColorRangeStartFr.max; // calculate stops var stops = Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_2__["getSortedEntries"])(color.ranges).map(function (_ref, i) { var _ref2 = _slicedToArray(_ref, 2), colorValue = _ref2[0], range = _ref2[1]; var startDeg = range[0] * 1.0 / max * TRACK_ARC_DEG + GAP_ARC_DEG; var endDeg = range[1] * 1.0 / max * TRACK_ARC_DEG + GAP_ARC_DEG; if (color.gradient) { // no transition between black band and first color if (i === 0) { return "".concat(colorValue, " 0"); } return "".concat(colorValue, " ").concat(startDeg + GRADIENT_BLEND, "deg, ").concat(colorValue, " ").concat(endDeg - GRADIENT_BLEND, "deg"); } return "".concat(colorValue, " ").concat(startDeg, "deg, ").concat(colorValue, " ").concat(endDeg, "deg"); }); stops.unshift(["black ".concat(GAP_ARC_DEG, "deg")]); // add black band for bottom gap if (typeof window === 'undefined') { return null; } if (!window.ConicGradient) { // eslint-disable-next-line __webpack_require__(/*! conic-gradient */ "./node_modules/conic-gradient/conic-gradient.js"); // globally sets ConicGradient } var ConicGradient = window.ConicGradient; var gradient = new ConicGradient({ stops: stops.join(', '), size: 400 }); // unique id for each track var id = "colorRangesImage-".concat(Object(_helpers_util__WEBPACK_IMPORTED_MODULE_1__["getRandomInt"])()); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("pattern", { id: id, patternUnits: "userSpaceOnUse", width: "100%", height: "100%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("image", { xlinkHref: gradient.dataURL, width: "100%", height: "100%" }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { className: "color-ranges", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", stroke: "url(#".concat(id, ")"), strokeWidth: "6px", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH, transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") })); }; var lightTrack = function lightTrack(props, dimensions) { var color = props.color, progress = props.progress; var CX = dimensions.CX, CY = dimensions.CY, GAUGE_RAD = dimensions.GAUGE_RAD, CIRCLE_CIR = dimensions.CIRCLE_CIR, GAP_ARC_LENGTH = dimensions.GAP_ARC_LENGTH, TRACK_ARC_LENGTH = dimensions.TRACK_ARC_LENGTH; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { className: "track", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH, strokeWidth: "6", transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { className: "track progress", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH + (1 - progress) * TRACK_ARC_LENGTH, strokeWidth: "6", transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") }), color && color.ranges && colorRangesTrack(props, dimensions)); }; var getScaleString = function getScaleString(v) { if (!v) return ''; // is jsx element? if (v.props) return v.props.children[0] + ' '; return v && v.label || v; }; var drawScale = function drawScale(_ref3, _ref4) { var min = _ref3.min, max = _ref3.max, step = _ref3.step, scale = _ref3.scale; var CX = _ref4.CX, CY = _ref4.CY, SCALE_TICK_OUTER_RAD = _ref4.SCALE_TICK_OUTER_RAD, SCALE_TICK_INNER_RAD = _ref4.SCALE_TICK_INNER_RAD, SCALE_TEXT_RAD = _ref4.SCALE_TEXT_RAD, IS_GAUGE = _ref4.IS_GAUGE; var START_ANGLE_OFFSET = -225; var DEFAULT_LONGEST_STRING = 3; var scaleItems = []; var count = 0; var offset = (Math.max(Object(_helpers_util__WEBPACK_IMPORTED_MODULE_1__["longestString"])(Object.values(scale).map(getScaleString)).length, DEFAULT_LONGEST_STRING) || DEFAULT_LONGEST_STRING) * 2; var sr1 = SCALE_TICK_OUTER_RAD; var sr2 = SCALE_TICK_INNER_RAD; var srT = IS_GAUGE ? SCALE_TEXT_RAD - offset : SCALE_TEXT_RAD + offset; Object.keys(scale).forEach(function (key) { var markValue = scale[key]; var degreesProgressed = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_1__["computeProgress"])({ min: min, max: max, value: key, progressionTarget: _styled_constants__WEBPACK_IMPORTED_MODULE_3__["TRACK_TOTAL_DEG"] }); var markAngle = START_ANGLE_OFFSET + degreesProgressed; if (markValue !== null) { // draw full mark var sx1 = CX + sr1 * Math.cos(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var sy1 = CY + sr1 * Math.sin(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var sx2 = CX + sr2 * Math.cos(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var sy2 = CY + sr2 * Math.sin(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var sxT = CX + srT * Math.cos(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var syT = CY + srT * Math.sin(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]) + 4; scaleItems.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("line", { key: "line".concat(count), className: "tick", x1: sx1, y1: sy1, x2: sx2, y2: sy2, strokeLinecap: "round" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("text", { key: "text".concat(count), x: sxT, y: syT, textAnchor: "middle", style: markValue && markValue.style ? markValue.style : null }, markValue && markValue.label || markValue)); } else { // draw mini mark var _sx = CX + sr1 * Math.cos(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var _sy = CY + sr1 * Math.sin(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var _sx2 = CX + (sr2 + 3) * Math.cos(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var _sy2 = CY + (sr2 + 3) * Math.sin(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); scaleItems.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("line", { key: "line".concat(count), className: "tick", x1: _sx, y1: _sy, x2: _sx2, y2: _sy2, strokeLinecap: "round" })); } count++; }); return scaleItems; }; var setColorRangeStartFromZero = function setColorRangeStartFromZero(color, max) { var ranges = _objectSpread({}, color.ranges); var minimum = Infinity; for (var i in ranges) { if (ranges[i][0] instanceof Array) { for (var j = 0; j < ranges[i].length; j++) { if (ranges[i][j][0] < minimum) { minimum = ranges[i][j][0]; } if (ranges[i][j][1] < minimum) { minimum = ranges[i][j][1]; } } continue; } if (ranges[i][0] < minimum) { minimum = ranges[i][0]; } if (ranges[i][1] < minimum) { minimum = ranges[i][1]; } } if (minimum < 0) { for (var _i2 in ranges) { if (ranges[_i2][0] instanceof Array) { for (var _j = 0; _j < ranges[_i2].length; _j++) { ranges[_i2][_j][0] = ranges[_i2][_j][0] - minimum; ranges[_i2][_j][1] = ranges[_i2][_j][1] - minimum; } continue; } ranges[_i2][0] = ranges[_i2][0] - minimum; ranges[_i2][1] = ranges[_i2][1] - minimum; } max = max - minimum; } color = _objectSpread({}, color, { ranges: ranges }); return { color: color, max: max }; }; /***/ }), /***/ "./src/helpers/util.js": /*!*****************************!*\ !*** ./src/helpers/util.js ***! \*****************************/ /*! exports provided: longestString, decimalify, sanitizeRangeValue, computeProgress, roundToDecimal, getRandomInt, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "longestString", function() { return longestString; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decimalify", function() { return decimalify; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitizeRangeValue", function() { return sanitizeRangeValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeProgress", function() { return computeProgress; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "roundToDecimal", function() { return roundToDecimal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRandomInt", function() { return getRandomInt; }); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var longestString = function longestString(arr) { return arr.sort(function (a, b) { return b.length - a.length; })[0]; }; var decimalify = function decimalify() { var num = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; var step = arguments.length > 1 ? arguments[1] : undefined; if (isNaN(num)) { return num; } // eslint-disable-next-line var _step$toString$split = step.toString().split('.'), _step$toString$split2 = _slicedToArray(_step$toString$split, 2), characteristic = _step$toString$split2[0], mantissa = _step$toString$split2[1]; var numDecimalPoints = mantissa ? mantissa.length : 0; return num.toFixed(numDecimalPoints); }; var sanitizeRangeValue = function sanitizeRangeValue(_ref) { var min = _ref.min, max = _ref.max, value = _ref.value; if (value == null) return min; if (value < min) { return min; } else if (value > max) { return max; } else { return value; } }; var computeProgress = function computeProgress(_ref2) { var min = _ref2.min, max = _ref2.max, value = _ref2.value, _ref2$progressionTarg = _ref2.progressionTarget, progressionTarget = _ref2$progressionTarg === void 0 ? 100 : _ref2$progressionTarg; value = Number(value); var adjustedValue = Math.abs(value - min) * 1.0; var range = Math.abs(max - min); return adjustedValue / range * progressionTarget; }; var roundToDecimal = function roundToDecimal(value, decimals) { return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals); }; var getRandomInt = function getRandomInt() { var min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 9999; return Math.floor(Math.random() * (max - min + 1)) + min; }; /* harmony default export */ __webpack_exports__["default"] = ({ decimalify: decimalify, sanitizeRangeValue: sanitizeRangeValue, computeProgress: computeProgress, longestString: longestString, roundToDecimal: roundToDecimal, getRandomInt: getRandomInt }); /***/ }), /***/ "./src/index.js": /*!**********************!*\ !*** ./src/index.js ***! \**********************/ /*! exports provided: BooleanSwitch, ColorPicker, Gauge, GraduatedBar, Indicator, Knob, LEDDisplay, NumericInput, PowerButton, PrecisionInput, StopButton, Slider, Tank, Thermometer, ToggleSwitch, DarkThemeProvider, Joystick */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _components_BooleanSwitch_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/BooleanSwitch.react */ "./src/components/BooleanSwitch.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BooleanSwitch", function() { return _components_BooleanSwitch_react__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _components_ColorPicker_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/ColorPicker.react */ "./src/components/ColorPicker.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPicker", function() { return _components_ColorPicker_react__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _components_Gauge_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/Gauge.react */ "./src/components/Gauge.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Gauge", function() { return _components_Gauge_react__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _components_GraduatedBar_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/GraduatedBar.react */ "./src/components/GraduatedBar.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GraduatedBar", function() { return _components_GraduatedBar_react__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _components_Indicator_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/Indicator.react */ "./src/components/Indicator.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Indicator", function() { return _components_Indicator_react__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _components_Knob_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/Knob.react */ "./src/components/Knob.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Knob", function() { return _components_Knob_react__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _components_LEDDisplay_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/LEDDisplay.react */ "./src/components/LEDDisplay.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LEDDisplay", function() { return _components_LEDDisplay_react__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _components_NumericInput_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/NumericInput.react */ "./src/components/NumericInput.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericInput", function() { return _components_NumericInput_react__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _components_PowerButton_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/PowerButton.react */ "./src/components/PowerButton.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PowerButton", function() { return _components_PowerButton_react__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _components_PrecisionInput_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./components/PrecisionInput.react */ "./src/components/PrecisionInput.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PrecisionInput", function() { return _components_PrecisionInput_react__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _components_StopButton_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./components/StopButton.react */ "./src/components/StopButton.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StopButton", function() { return _components_StopButton_react__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _components_Slider_react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./components/Slider.react */ "./src/components/Slider.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return _components_Slider_react__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _components_Tank_react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./components/Tank.react */ "./src/components/Tank.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tank", function() { return _components_Tank_react__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _components_Thermometer_react__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./components/Thermometer.react */ "./src/components/Thermometer.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Thermometer", function() { return _components_Thermometer_react__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _components_ToggleSwitch_react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./components/ToggleSwitch.react */ "./src/components/ToggleSwitch.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToggleSwitch", function() { return _components_ToggleSwitch_react__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _components_DarkThemeProvider_react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./components/DarkThemeProvider.react */ "./src/components/DarkThemeProvider.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DarkThemeProvider", function() { return _components_DarkThemeProvider_react__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _components_Joystick_react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./components/Joystick.react */ "./src/components/Joystick.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Joystick", function() { return _components_Joystick_react__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* eslint-disable import/prefer-default-export */ /***/ }), /***/ "./src/styled/CurrentValue.styled.js": /*!*******************************************!*\ !*** ./src/styled/CurrentValue.styled.js ***! \*******************************************/ /*! exports provided: Value, ValueLabel, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Value", function() { return Value; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValueLabel", function() { return ValueLabel; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject6() { var data = _taggedTemplateLiteral(["\n margin-top: -4px;\n text-transform: uppercase;\n font-size: 8px;\n color: #535d63;\n"]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n font-size: ", "px;\n "]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.4);\n "]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n font-size: 1em;\n color: ", ";\n ", ";\n ", "\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n ", ";\n "]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n\n top: 50%;\n transform: translateY(-50%);\n text-align: center;\n font-size: 32px;\n ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var ValueContainer = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject(), function (props) { return props.css ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject2(), props.css) : ''; }); var Value = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject3(), function (_ref) { var theme = _ref.theme, color = _ref.color; return color || (theme.dark ? '#000' : color || theme.primary); }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject4()) : ''; }, function (_ref3) { var fontSize = _ref3.fontSize; return fontSize ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject5(), fontSize) : ''; }); Value.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_2__["light"] }; var ValueLabel = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].label(_templateObject6()); /* harmony default export */ __webpack_exports__["default"] = (function (props) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ValueContainer, { css: props.css }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Value, { fontSize: props.valueSize, color: props.valueColor, style: props.customStyle }, props.children), props.units ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ValueLabel, null, props.units) : null); }); /***/ }), /***/ "./src/styled/Gauge.styled.js": /*!************************************!*\ !*** ./src/styled/Gauge.styled.js ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); function _templateObject2() { var data = _taggedTemplateLiteral(["\n & .needle-knob {\n stroke: ", ";\n stroke-width: 2;\n }\n\n & .track {\n stroke: ", ";\n }\n\n & .track.progress {\n stroke: ", ";\n }\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n & svg {\n text-align: center;\n }\n\n & circle {\n user-select: none;\n }\n\n & .scale {\n font-size: 12px;\n\n fill: ", ";\n user-select: none;\n }\n\n & .tick {\n stroke: ", ";\n stroke-width: 2;\n }\n\n & .tick.small {\n stroke: #2b2f32;\n }\n\n & .needle {\n stroke: ", ";\n stroke-width: 3;\n }\n\n ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject(), function (_ref) { var theme = _ref.theme, color = _ref.color; return color || (theme.dark ? '#000' : '#5b6268'); }, function (props) { return props.theme.detail; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? '#000' : '#5b6268'; }, function (_ref3) { var theme = _ref3.theme; return !theme.dark && lightTheme; }); var lightTheme = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2(), function (_ref4) { var theme = _ref4.theme; return theme.secondary; }, function (props) { return props.theme.secondary; }, function (_ref5) { var color = _ref5.color, theme = _ref5.theme; return color || theme.primary; }); Container.defaultProps = { theme: _styled_constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; /* harmony default export */ __webpack_exports__["default"] = (Container); /***/ }), /***/ "./src/styled/GraduatedBar.styled.js": /*!*******************************************!*\ !*** ./src/styled/GraduatedBar.styled.js ***! \*******************************************/ /*! exports provided: Container, Block, Value */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Container", function() { return Container; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Block", function() { return Block; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Value", function() { return Value; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject13() { var data = _taggedTemplateLiteral(["\n font-size: 11px;\n right: auto;\n "]); _templateObject13 = function _templateObject13() { return data; }; return data; } function _templateObject12() { var data = _taggedTemplateLiteral(["\n position: absolute;\n right: 4%;\n top: 50%;\n transform: translateY(-50%);\n\n ", ";\n"]); _templateObject12 = function _templateObject12() { return data; }; return data; } function _templateObject11() { var data = _taggedTemplateLiteral(["\n background-color: ", ";\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.5) 0%,\n rgba(0, 0, 0, 0.4) 100%\n );\n background-blend-mode: overlay;\n "]); _templateObject11 = function _templateObject11() { return data; }; return data; } function _templateObject10() { var data = _taggedTemplateLiteral(["\n ", " box-shadow: ", ";\n"]); _templateObject10 = function _templateObject10() { return data; }; return data; } function _templateObject9() { var data = _taggedTemplateLiteral(["\n height: ", ";\n width: ", ";\n margin: ", ";\n "]); _templateObject9 = function _templateObject9() { return data; }; return data; } function _templateObject8() { var data = _taggedTemplateLiteral(["\n background-color: ", ";\n "]); _templateObject8 = function _templateObject8() { return data; }; return data; } function _templateObject7() { var data = _taggedTemplateLiteral(["\n background-image: linear-gradient(", ", ", ", ", ");\n "]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteral(["\n display: block;\n box-sizing: border-box;\n\n ", "\n\n ", "\n\n ", ";\n"]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n background-color: ", ";\n"]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);\n padding: 3px;\n color: #fff;\n border: none;\n border-radius: 0px;\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n flex-direction: row;\n width: ", ";\n height: 30px;\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n flex-direction: column-reverse;\n width: 30px;\n height: ", ";\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n ", ";\n ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject(), function (_ref) { var vertical = _ref.vertical; return vertical ? verticalContainer : horizontalContainer; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? darkContainer : lightContainer; }); Container.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var verticalContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2(), function (_ref3) { var size = _ref3.size; return "".concat(size, "px"); }); var horizontalContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3(), function (_ref4) { var size = _ref4.size; return "".concat(size, "px"); }); var darkContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject4()); var lightContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject5(), function (props) { return props.theme.secondary; }); var Block = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject6(), function (_ref5) { var gradient = _ref5.gradient, progress = _ref5.progress, color = _ref5.color, theme = _ref5.theme, max = _ref5.max, min = _ref5.min, step = _ref5.step, size = _ref5.size, vertical = _ref5.vertical; if (gradient) { var TOTAL_STEPS = (max - min) / step; var STEP_SIZE = size / TOTAL_STEPS; var STEP_SIZE_PERCENT = STEP_SIZE / size; var start = gradient.rgbAt(progress).toString(); var end = gradient.rgbAt(progress + STEP_SIZE_PERCENT).toString(); return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject7(), vertical ? 'to top' : 'to right', start, end); } return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject8(), color || theme.primary); }, function (props) { var TOTAL_STEPS = (props.max - props.min) / props.step; var STEP_SIZE = props.size / TOTAL_STEPS; var MARGIN = STEP_SIZE >= 10 ? STEP_SIZE * 0.05 : 0.5; var BOX_SIZE = STEP_SIZE - 2 * MARGIN; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject9(), props.vertical ? "".concat(BOX_SIZE, "px") : '100%', props.vertical ? '100%' : "".concat(BOX_SIZE, "px"), props.vertical ? "".concat(MARGIN, "px 0") : "0 ".concat(MARGIN, "px")); }, function (_ref6) { var theme = _ref6.theme; return theme.dark && darkBlock; }); Block.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var darkBlock = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject10(), function (_ref7) { var color = _ref7.color, theme = _ref7.theme, gradient = _ref7.gradient; if (gradient) return; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject11(), color || theme.primary); }, function (_ref8) { var color = _ref8.color, theme = _ref8.theme; return "2px 2px 6px 1px rgba(0, 0, 0, 0.45), inset 1px 1px 2px 0 rgba(255, 255, 255, 0.3),\n 1px 1px 1px 0px rgba(0, 0, 0, 0.6), 0 0 3px 0px ".concat(color || theme.primary); }); var Value = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject12(), function (_ref9) { var vertical = _ref9.vertical; return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject13()) : ''; }); /***/ }), /***/ "./src/styled/Knob.styled.js": /*!***********************************!*\ !*** ./src/styled/Knob.styled.js ***! \***********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject3() { var data = _taggedTemplateLiteral(["\n & .scale {\n fill: #fff;\n }\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n & .scale {\n fill: #5b6268;\n }\n\n & .track {\n stroke: #e6e6e6;\n }\n\n & .knob .base,\n .knob .indent {\n stroke: #e6e6e6;\n stroke-width: 2;\n }\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-direction: column;\n & svg {\n text-align: center;\n }\n\n & circle {\n user-select: none;\n }\n\n & .scale {\n font-size: 12px;\n user-select: none;\n fill: ", " !important;\n }\n\n & .tick {\n stroke: ", ";\n stroke-width: 2;\n }\n\n & .knob {\n cursor: pointer;\n }\n\n & .disabled {\n opacity: ", ";\n cursor: not-allowed;\n }\n\n & .track.progress {\n stroke: ", ";\n }\n\n ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject(), function (_ref) { var colorValue = _ref.colorValue; return colorValue || 'black'; }, function (props) { return props.theme.detail; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? 1 : 0.65; }, function (_ref3) { var color = _ref3.color, theme = _ref3.theme; return color || theme.primary; }, function (_ref4) { var theme = _ref4.theme; return theme.dark ? darkTheme : lightTheme; }); var lightTheme = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2()); var darkTheme = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3()); Container.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; /* harmony default export */ __webpack_exports__["default"] = (Container); /***/ }), /***/ "./src/styled/LEDDisplay.styled.js": /*!*****************************************!*\ !*** ./src/styled/LEDDisplay.styled.js ***! \*****************************************/ /*! exports provided: LEDContainer, DarkDigitContainer, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LEDContainer", function() { return LEDContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DarkDigitContainer", function() { return DarkDigitContainer; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject5() { var data = _taggedTemplateLiteral(["\n & .darkLED-fill {\n fill: ", ";\n }\n"]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n border-radius: 3px;\n padding: 12px 8px 12px 14px;\n border: 1px solid ", ";\n background: ", ";\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n padding: 12px 8px 4px 16px;\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n background-color: ", ";\n "]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: inline-flex;\n flex-direction: row;\n ", ";\n ", "\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var LEDContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject(), function (_ref) { var theme = _ref.theme; return theme.dark ? darkLEDContainer : lightLEDContainer; }, function (_ref2) { var backgroundColor = _ref2.backgroundColor; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2(), backgroundColor); }); var darkLEDContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3()); var lightLEDContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject4(), function (_ref3) { var theme = _ref3.theme; return theme.detail; }, function (_ref4) { var backgroundColor = _ref4.backgroundColor; return backgroundColor; }); LEDContainer.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var DarkDigitContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject5(), function (_ref5) { var color = _ref5.color; return color; }); /* harmony default export */ __webpack_exports__["default"] = (LEDContainer); /***/ }), /***/ "./src/styled/PowerButton.styled.js": /*!******************************************!*\ !*** ./src/styled/PowerButton.styled.js ***! \******************************************/ /*! exports provided: Container, Button */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Container", function() { return Container; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return Button; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); function _templateObject7() { var data = _taggedTemplateLiteral(["\n box-shadow: 0 0 8px 2px ", ";\n "]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n "]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n ", " border-radius: 100%;\n padding: 0;\n margin-bottom: 8px;\n\n &::before,\n &::after {\n left: 4%;\n border-radius: 100%;\n transition: all 0.1s ease-in;\n }\n\n &::before {\n top: 8%;\n width: 86%;\n height: 86%;\n }\n\n &::after {\n top: 4%;\n width: 92%;\n height: 92%;\n\n ", ";\n }\n\n &:hover::before {\n background-color: rgba(0, 0, 0, 0.8);\n }\n\n &:hover::after {\n box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.66);\n }\n\n &:focus::after,\n &:active::after {\n box-shadow: ", ";\n }\n"]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n "]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n border-radius: 50%;\n box-sizing: border-box;\n background: #fff;\n border: 1px solid ", ";\n ", " margin-bottom: ", ";\n padding: 0;\n\n &:focus,\n &:hover {\n border-color: ", ";\n }\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n cursor: pointer;\n outline: none;\n display: flex;\n justify-content: center;\n align-items: center;\n\n &:disabled {\n opacity: ", ";\n cursor: not-allowed;\n }\n\n ", ";\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n\n & svg {\n margin: 0 auto;\n }\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["default"])('div')(_templateObject()); var Button = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].button(_templateObject2(), function (_ref) { var theme = _ref.theme; return theme.dark ? 1 : 0.65; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? darkTheme : lightTheme; }); var lightTheme = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3(), function (props) { return props.theme.secondary; }, function (_ref3) { var size = _ref3.size; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject4(), size, size); }, function (_ref4) { var size = _ref4.size; return "".concat(size * 0.0625, "px"); }, function (props) { return props.theme.secondary; }); var darkTheme = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject5(), function (_ref5) { var size = _ref5.size; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject6(), size, size); }, function (_ref6) { var on = _ref6.on, color = _ref6.color, theme = _ref6.theme; return on ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject7(), color || theme.primary) : ''; }, function (_ref7) { var on = _ref7.on, color = _ref7.color, theme = _ref7.theme; return on ? "0 0 8px 2px ".concat(color || theme.primary) : '0 0 3px 0 rgba(0,0,0,0.66)'; }); Button.defaultProps = { theme: _styled_constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; /***/ }), /***/ "./src/styled/PrecisionInput.styled.js": /*!*********************************************!*\ !*** ./src/styled/PrecisionInput.styled.js ***! \*********************************************/ /*! exports provided: Container, Digit, ExponentialDigit */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Container", function() { return Container; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Digit", function() { return Digit; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExponentialDigit", function() { return ExponentialDigit; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); function _templateObject9() { var data = _taggedTemplateLiteral(["\n background: #f2f2f2;\n "]); _templateObject9 = function _templateObject9() { return data; }; return data; } function _templateObject8() { var data = _taggedTemplateLiteral(["\n color: ", ";\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.9),\n 0 0 9px ", ";\n "]); _templateObject8 = function _templateObject8() { return data; }; return data; } function _templateObject7() { var data = _taggedTemplateLiteral(["\n border: none;\n ", ";\n"]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteral(["\n color: #15181a;\n border-right: 1px solid #f2f2f2;\n"]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n border-right: 1px solid rgba(0, 0, 0, 0.4);\n color: #fff;\n"]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n padding: 8px 6px;\n box-sizing: border-box;\n display: inline-block;\n font-size: 14px;\n line-height: 16px;\n text-align: center;\n\n ", ";\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n background: #ffffff;\n border-radius: 2px;\n border: 1px solid #d3d3d3;\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n margin: 0 auto;\n display: flex;\n justify-content: flex-end;\n width: ", ";\n cursor: text;\n\n ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject(), function (_ref) { var size = _ref.size; return "".concat(size, "px") || false; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? darkContainer : lightContainer; }); var darkContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2()); var lightContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3()); var Digit = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject4(), function (_ref3) { var theme = _ref3.theme; return theme.dark ? darkDigit : lightDigit; }); var darkDigit = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject5()); var lightDigit = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject6()); var ExponentialDigit = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["default"])(Digit)(_templateObject7(), function (_ref4) { var theme = _ref4.theme; return theme.dark ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject8(), function (_ref5) { var color = _ref5.color, theme = _ref5.theme; return color || theme.primary; }, function (_ref6) { var color = _ref6.color, theme = _ref6.theme; return color || theme.primary; }) : Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject9()); }); /***/ }), /***/ "./src/styled/Slider.styled.js": /*!*************************************!*\ !*** ./src/styled/Slider.styled.js ***! \*************************************/ /*! exports provided: SliderContainer, HandleContainer, Handle, targetStyles, Label, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SliderContainer", function() { return SliderContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HandleContainer", function() { return HandleContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Handle", function() { return Handle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "targetStyles", function() { return targetStyles; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Label", function() { return Label; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _shared_DarkGradient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shared/DarkGradient */ "./src/styled/shared/DarkGradient.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject32() { var data = _taggedTemplateLiteral(["\n transform: translate(-50%, ", "px);\n "]); _templateObject32 = function _templateObject32() { return data; }; return data; } function _templateObject31() { var data = _taggedTemplateLiteral(["\n transform: translate(", "px, -50%);\n "]); _templateObject31 = function _templateObject31() { return data; }; return data; } function _templateObject30() { var data = _taggedTemplateLiteral(["\n top: 0;\n "]); _templateObject30 = function _templateObject30() { return data; }; return data; } function _templateObject29() { var data = _taggedTemplateLiteral(["\n right: 0;\n "]); _templateObject29 = function _templateObject29() { return data; }; return data; } function _templateObject28() { var data = _taggedTemplateLiteral(["\n color: ", ";\n\n ", " ", ";\n"]); _templateObject28 = function _templateObject28() { return data; }; return data; } function _templateObject27() { var data = _taggedTemplateLiteral(["\n transform: translate(-50%, ", "px);\n "]); _templateObject27 = function _templateObject27() { return data; }; return data; } function _templateObject26() { var data = _taggedTemplateLiteral(["\n transform: translate(", "px, -50%);\n "]); _templateObject26 = function _templateObject26() { return data; }; return data; } function _templateObject25() { var data = _taggedTemplateLiteral(["\n color: ", ";\n\n ", ";\n"]); _templateObject25 = function _templateObject25() { return data; }; return data; } function _templateObject24() { var data = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n\n &:hover {\n border: 1px solid ", ";\n }\n"]); _templateObject24 = function _templateObject24() { return data; }; return data; } function _templateObject23() { var data = _taggedTemplateLiteral(["\n /* remove dark-gradient.css styles */\n box-shadow: none !important;\n\n background: #101010;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.3) -50%, rgba(0, 0, 0, 0.7) 100%);\n"]); _templateObject23 = function _templateObject23() { return data; }; return data; } function _templateObject22() { var data = _taggedTemplateLiteral(["\n /* remove rc-slider-handle styles */\n margin: 0 !important;\n width: auto;\n height: auto;\n\n user-select: none;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n background: #fff;\n font-size: 12px;\n padding: 2px 4px;\n border-radius: 3px;\n\n & .label {\n font-size: 8px;\n font-weight: 600;\n }\n\n & .value {\n font-size: 20px;\n line-height: 1.1;\n }\n\n ", " ", ";\n"]); _templateObject22 = function _templateObject22() { return data; }; return data; } function _templateObject21() { var data = _taggedTemplateLiteral(["\n transform: translate(", "%, ", "%) rotate(", "deg);\n "]); _templateObject21 = function _templateObject21() { return data; }; return data; } function _templateObject20() { var data = _taggedTemplateLiteral(["\n & path {\n stroke: ", ";\n }\n "]); _templateObject20 = function _templateObject20() { return data; }; return data; } function _templateObject19() { var data = _taggedTemplateLiteral(["\n & .dark-handle-custom-fill {\n fill: ", ";\n }\n "]); _templateObject19 = function _templateObject19() { return data; }; return data; } function _templateObject18() { var data = _taggedTemplateLiteral(["\n ", " ", ";\n"]); _templateObject18 = function _templateObject18() { return data; }; return data; } function _templateObject17() { var data = _taggedTemplateLiteral(["\n transform: translate(", "%, ", "%) rotate(", "deg);\n "]); _templateObject17 = function _templateObject17() { return data; }; return data; } function _templateObject16() { var data = _taggedTemplateLiteral(["\n bottom: 0;\n left: 0;\n "]); _templateObject16 = function _templateObject16() { return data; }; return data; } function _templateObject15() { var data = _taggedTemplateLiteral(["\n top: 0;\n right: 0;\n "]); _templateObject15 = function _templateObject15() { return data; }; return data; } function _templateObject14() { var data = _taggedTemplateLiteral(["\n & path {\n stroke: ", ";\n }\n "]); _templateObject14 = function _templateObject14() { return data; }; return data; } function _templateObject13() { var data = _taggedTemplateLiteral(["\n & .dark-handle-custom-fill {\n fill: ", ";\n }\n "]); _templateObject13 = function _templateObject13() { return data; }; return data; } function _templateObject12() { var data = _taggedTemplateLiteral(["\n position: absolute;\n\n ", "\n\n ", "\n\n ", ";\n"]); _templateObject12 = function _templateObject12() { return data; }; return data; } function _templateObject11() { var data = _taggedTemplateLiteral(["\n /* remove rc-slider-handle styles */\n width: auto;\n height: auto;\n border-radius: unset;\n border: none;\n background: none !important;\n margin: 0 !important;\n\n /* remove rc-slider-handle styles */\n box-shadow: none !important;\n\n ", ";\n"]); _templateObject11 = function _templateObject11() { return data; }; return data; } function _templateObject10() { var data = _taggedTemplateLiteral(["\n /* remove rc-slider-handle styles */\n width: auto;\n height: auto;\n border-radius: unset;\n border: none;\n background: none;\n margin: 0 !important;\n\n ", ";\n"]); _templateObject10 = function _templateObject10() { return data; }; return data; } function _templateObject9() { var data = _taggedTemplateLiteral(["\n left: ", "%;\n "]); _templateObject9 = function _templateObject9() { return data; }; return data; } function _templateObject8() { var data = _taggedTemplateLiteral(["\n left: 3px;\n bottom: ", "%;\n "]); _templateObject8 = function _templateObject8() { return data; }; return data; } function _templateObject7() { var data = _taggedTemplateLiteral(["\n z-index: 1;\n\n ", ";\n"]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteral(["\n bottom: 12px;\n "]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n right: 9px;\n "]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n ", ";\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n position: absolute;\n\n /* remove rc-slider-handle styles */\n width: auto;\n height: auto;\n border-radius: unset;\n border: none;\n background: none;\n margin: 0 !important;\n\n ", ";\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n box-shadow: none !important;\n "]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n ", ";\n\n & .rc-slider-disabled,\n .rc-slider-disabled .rc-slider-handle {\n background-color: unset !important;\n }\n\n & .rc-slider-track {\n ", ";\n }\n\n /* remove rc-slider-dot styles, which overlap with the marker */\n & .rc-slider-dot {\n background: none !important;\n border: none;\n height: unset !important;\n width: unset !important;\n }\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var SliderContainer = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject(), function (_ref) { var vertical = _ref.vertical, size = _ref.size, fullSize = _ref.fullSize; if (fullSize) return vertical ? 'height: 100%;' : 'width: 100%;'; if (size) return vertical ? "height: ".concat(size, "px;") : "width: ".concat(size, "px"); }, function (_ref2) { var theme = _ref2.theme; return theme.dark && Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject2()); }); var HandleContainer = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject3(), function (_ref3) { var isTarget = _ref3.isTarget; return isTarget ? targetHandleContainer : sliderHandleContainer; }); var targetHandleContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject4(), function (_ref4) { var vertical = _ref4.vertical; return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject5()) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject6()); }); var sliderHandleContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject7(), function (_ref5) { var vertical = _ref5.vertical, offset = _ref5.offset; return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject8(), offset) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject9(), offset); }); var UnstyledLightHandle = function UnstyledLightHandle(_ref6) { var className = _ref6.className; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { className: className, width: "6", height: "18", viewBox: "0 0 6 18", version: "1.1", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M 4.61171 15.9753L 5.33436 2.96765C 5.40881 1.62753 4.34219 0.5 3 0.5C 1.65781 0.5 0.591189 1.62753 0.66564 2.96765L 1.38829 15.9753C 1.43581 16.8307 2.14329 17.5 3 17.5C 3.85671 17.5 4.56419 16.8307 4.61171 15.9753Z", strokeMiterlimit: "8", fill: "#fff" })); }; var Handle = function Handle(props) { return props.theme.dark ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DarkHandle, props) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LightHandle, props); }; var LightHandle = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["default"])(UnstyledLightHandle)(_templateObject10(), function (_ref7) { var isTarget = _ref7.isTarget; return isTarget ? targetHandle : sliderHandle; }); var DarkHandle = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["default"])(_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_2__["UnstyledDarkHandle"])(_templateObject11(), function (_ref8) { var isTarget = _ref8.isTarget; return isTarget ? targetHandle : sliderHandle; }); var targetHandle = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject12(), function (_ref9) { var theme = _ref9.theme, color = _ref9.color; return theme.dark ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject13(), color || theme.detail) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject14(), color || theme.detail); }, function (_ref10) { var vertical = _ref10.vertical; return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject15()) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject16()); }, function (_ref11) { var vertical = _ref11.vertical, theme = _ref11.theme; var deltaX = -50; var deltaY = 55; var rotation = 0; if (vertical) { deltaX = theme.dark ? 40 : 0; deltaY = -50; rotation = 270; } return Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject17(), deltaX, deltaY, rotation); }); var sliderHandle = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject18(), function (_ref12) { var theme = _ref12.theme, color = _ref12.color; return theme.dark ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject19(), color || theme.primary) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject20(), color || theme.primary); }, function (_ref13) { var vertical = _ref13.vertical; var deltaX = -50; var deltaY = -40; var rotation = 0; if (vertical) { deltaX = -2; deltaY = -50; rotation = 270; } return Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject21(), deltaX, deltaY, rotation); }); var targetStyles = { width: 'auto', marginLeft: 0, marginBottom: 0, textAlign: 'center', border: 'none', boxShadow: 'none' }; var Label = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject22(), function (_ref14) { var theme = _ref14.theme; return theme.dark ? darkLabel : lightLabel; }, function (_ref15) { var isTarget = _ref15.isTarget; return isTarget ? targetLabel : sliderLabel; }); var darkLabel = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject23()); var lightLabel = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject24(), _constants__WEBPACK_IMPORTED_MODULE_3__["colors"].GREY, _constants__WEBPACK_IMPORTED_MODULE_3__["colors"].GREY); var targetLabel = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject25(), function (_ref16) { var color = _ref16.color, theme = _ref16.theme; return color || theme.detail; }, function (_ref17) { var vertical = _ref17.vertical; var offset = vertical ? -9 : -5; return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject26(), offset) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject27(), offset); }); var sliderLabel = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject28(), function (_ref18) { var color = _ref18.color, theme = _ref18.theme; return color || theme.primary; }, function (_ref19) { var vertical = _ref19.vertical; return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject29()) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject30()); }, function (_ref20) { var vertical = _ref20.vertical, label = _ref20.label, value = _ref20.value; var offset = label && (value || value === 0) ? -44 : -22; if (vertical) { offset = -3; } return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject31(), offset) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject32(), offset); }); /* harmony default export */ __webpack_exports__["default"] = ({ SliderContainer: SliderContainer, Handle: Handle, targetStyles: targetStyles, Label: Label }); /***/ }), /***/ "./src/styled/StopButton.styled.js": /*!*****************************************!*\ !*** ./src/styled/StopButton.styled.js ***! \*****************************************/ /*! exports provided: Button, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return Button; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject3() { var data = _taggedTemplateLiteral(["\n color: #ff6e6e;\n background-color: #22272a;\n\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.9), 0 0 9px #ff6e6e;\n\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n\n display: block;\n box-sizing: border-box;\n border: none;\n border-radius: 2px;\n font-weight: bold;\n font-size: 12px;\n text-transform: uppercase;\n padding: 0;\n width: ", ";\n height: ", ";\n text-align: center;\n cursor: pointer;\n letter-spacing: 0.1;\n line-height: 1;\n\n background-color: #22272a;\n color: #ff1a1a;\n\n &::before,\n &::after {\n transition: all 0.1s ease-in;\n background-color: #e03a3a;\n }\n\n &:hover::before,\n &:hover::after {\n background-color: #e64545;\n }\n\n &:active::before,\n &:active::after {\n background-color: #c72121;\n }\n\n &:hover::after,\n &:active::after,\n &:focus::after {\n box-shadow: none;\n }\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n color: white;\n background-color: #ff5e5e;\n\n display: block;\n box-sizing: border-box;\n border: none;\n border-radius: 2px;\n font-weight: bold;\n font-size: 12px;\n text-transform: uppercase;\n padding: 0;\n width: ", ";\n min-height: ", ";\n text-align: center;\n cursor: pointer;\n letter-spacing: 0.1;\n line-height: 1;\n\n &:hover,\n &:focus,\n &:active {\n color: #fff;\n }\n\n &:hover {\n background-color: #ff8585;\n }\n\n &:active {\n background-color: #e64545;\n }\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n outline: none;\n transition: all 0.1s ease-in;\n ", ";\n\n &:disabled {\n opacity: ", ";\n cursor: not-allowed;\n }\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Button = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].button(_templateObject(), function (_ref) { var theme = _ref.theme; return theme.dark ? darkButton : lightButton; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? 1 : 0.65; }); Button.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var lightButton = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2(), function (_ref3) { var size = _ref3.size; return "".concat(size, "px"); }, function (_ref4) { var size = _ref4.size; return "".concat(size * 0.42, "px"); }); var darkButton = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3(), function (_ref5) { var size = _ref5.size; return "".concat(size, "px"); }, function (_ref6) { var size = _ref6.size; return "".concat(size * 0.42, "px"); }); /* harmony default export */ __webpack_exports__["default"] = (Button); /***/ }), /***/ "./src/styled/Tank.styled.js": /*!***********************************!*\ !*** ./src/styled/Tank.styled.js ***! \***********************************/ /*! exports provided: TankContainer, TankFill, TickContainer, Tick, Container, ExceededWarning */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TankContainer", function() { return TankContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TankFill", function() { return TankFill; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TickContainer", function() { return TickContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tick", function() { return Tick; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Container", function() { return Container; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExceededWarning", function() { return ExceededWarning; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! color */ "./node_modules/color/index.js"); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(color__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject13() { var data = _taggedTemplateLiteral(["\n color: #dc3545;\n font-size: 0.8rem;\n text-align: center;\n display: block;\n"]); _templateObject13 = function _templateObject13() { return data; }; return data; } function _templateObject12() { var data = _taggedTemplateLiteral(["\n margin-top: 8px;\n margin-left: ", ";\n "]); _templateObject12 = function _templateObject12() { return data; }; return data; } function _templateObject11() { var data = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n\n ", ";\n"]); _templateObject11 = function _templateObject11() { return data; }; return data; } function _templateObject10() { var data = _taggedTemplateLiteral(["\n position: absolute;\n bottom: ", ";\n "]); _templateObject10 = function _templateObject10() { return data; }; return data; } function _templateObject9() { var data = _taggedTemplateLiteral(["\n ", " display: flex;\n align-items: center;\n justify-content: flex-end;\n height: 18px;\n color: ", ";\n & .label {\n font-size: 12px;\n text-align: right;\n margin-right: 4px;\n white-space: nowrap;\n }\n\n & .tick {\n height: 1px;\n width: ", "px;\n background: ", ";\n }\n"]); _templateObject9 = function _templateObject9() { return data; }; return data; } function _templateObject8() { var data = _taggedTemplateLiteral(["\n direction: rtl;\n "]); _templateObject8 = function _templateObject8() { return data; }; return data; } function _templateObject7() { var data = _taggedTemplateLiteral(["\n position: relative;\n ", " display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin-right: 4px;\n margin-top: -6px;\n margin-bottom: -6px;\n"]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteral(["\n background: ", ";\n"]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n background: ", ";\n background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 30%, rgba(255, 255, 255, 0.7) 100%);\n background-blend-mode: overlay;\n box-shadow: 0 0 6px 1px\n ", ";\n"]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n position: absolute;\n bottom: 0;\n width: 100%;\n height: ", ";\n\n border-radius: ", ";\n border-radius: 0px;\n\n ", ";\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n background: ", ";\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n position: relative;\n width: ", ";\n height: ", ";\n z-index: 2;\n border-radius: ", ";\n\n ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var TankContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject(), function (_ref) { var width = _ref.width; return "".concat(width, "px"); }, function (_ref2) { var height = _ref2.height; return "".concat(height, "px"); }, function (_ref3) { var thermometer = _ref3.thermometer; return thermometer ? '40px' : '0'; }, function (_ref4) { var theme = _ref4.theme; return theme.dark ? darkTankContainer : lightTankContainer; }); TankContainer.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_2__["light"] }; var darkTankContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2()); var lightTankContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3(), function (props) { return props.theme.secondary; }); var TankFill = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject4(), function (_ref5) { var height = _ref5.height; return height || 0; }, function (_ref6) { var thermometer = _ref6.thermometer; return thermometer ? '40px' : '0'; }, function (_ref7) { var theme = _ref7.theme; return theme.dark ? darkTankFill : lightTankFill; }); TankFill.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_2__["light"] }; var darkTankFill = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject5(), function (_ref8) { var color = _ref8.color, theme = _ref8.theme; return color || theme.primary; }, function (_ref9) { var color = _ref9.color, theme = _ref9.theme; return color__WEBPACK_IMPORTED_MODULE_1___default()(color || theme.primary).alpha(0.7).string(); }); var lightTankFill = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject6(), function (_ref10) { var color = _ref10.color, theme = _ref10.theme; return color || theme.primary; }); var TickContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject7(), function (_ref11) { var xPositioned = _ref11.xPositioned; return xPositioned && Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject8()); }); var Tick = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject9(), function (_ref12) { var xPosition = _ref12.xPosition; return xPosition || xPosition === 0 ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject10(), "calc(".concat(xPosition, "% - ").concat(xPosition / 100.0 * 18, "px)")) : ''; }, function (props) { return props.color || (props.theme.dark ? '#ddd' : '#000'); }, function (props) { return props.width || 4; }, function (props) { return props.theme.detail; }); Tick.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_2__["light"] }; var Container = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject11(), function (_ref13) { var thermometer = _ref13.thermometer; return thermometer ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject12(), function (_ref14) { var xPositioned = _ref14.xPositioned; return xPositioned ? '-4px' : '-24px'; }) : ''; }); var ExceededWarning = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].span(_templateObject13()); /***/ }), /***/ "./src/styled/Thermometer.styled.js": /*!******************************************!*\ !*** ./src/styled/Thermometer.styled.js ***! \******************************************/ /*! exports provided: ThermometerContainer, Bulb, CurrentValueContainer */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThermometerContainer", function() { return ThermometerContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bulb", function() { return Bulb; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CurrentValueContainer", function() { return CurrentValueContainer; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject3() { var data = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n flex-direction: column;\n align-items: center;\n text-align: center;\n\n & > div {\n margin-top: 56px;\n line-height: 28px;\n }\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n border-radius: 50%;\n background-color: ", ";\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n bottom: -", "px;\n z-index: -1;\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var WIDTH = 20; var ThermometerContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject()); var Bulb = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject2(), 1.5 * WIDTH, 1.5 * WIDTH, function (props) { return props.on ? props.color || props.theme.primary : props.theme.secondary; }, WIDTH); Bulb.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var CurrentValueContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject3()); CurrentValueContainer.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; /***/ }), /***/ "./src/styled/ToggleSwitch.styled.js": /*!*******************************************!*\ !*** ./src/styled/ToggleSwitch.styled.js ***! \*******************************************/ /*! exports provided: Wrapper, ButtonContainer, Button, DarkSwitchContainer, DarkSwitch, RowContainer, RowLabel */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Wrapper", function() { return Wrapper; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonContainer", function() { return ButtonContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return Button; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DarkSwitchContainer", function() { return DarkSwitchContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DarkSwitch", function() { return DarkSwitch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainer", function() { return RowContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowLabel", function() { return RowLabel; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); /* harmony import */ var _shared_Label_styled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shared/Label.styled */ "./src/styled/shared/Label.styled.js"); function _templateObject20() { var data = _taggedTemplateLiteral(["\n margin: 0;\n ", "\n ", "\n ", "\n ", "\n"]); _templateObject20 = function _templateObject20() { return data; }; return data; } function _templateObject19() { var data = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-around;\n flex-direction: ", ";\n"]); _templateObject19 = function _templateObject19() { return data; }; return data; } function _templateObject18() { var data = _taggedTemplateLiteral(["linear-gradient(135deg, rgba(0,0,0,0) 0%, rgba(255,255,255,1) 100%),\n linear-gradient(90deg, rgba(0,0,0,0.6) 40%, rgba(255,255,255,0) 100%)"]); _templateObject18 = function _templateObject18() { return data; }; return data; } function _templateObject17() { var data = _taggedTemplateLiteral(["linear-gradient(135deg, rgba(255,255,255,0.7) 20%, rgba(0,0,0,0) 100%),\n linear-gradient(90deg, rgba(255,255,255,0) 40%, rgba(0,0,0,0.8) 100%)"]); _templateObject17 = function _templateObject17() { return data; }; return data; } function _templateObject16() { var data = _taggedTemplateLiteral(["\n margin-right: ", "px;\n "]); _templateObject16 = function _templateObject16() { return data; }; return data; } function _templateObject15() { var data = _taggedTemplateLiteral(["\n margin-left: ", "px;\n "]); _templateObject15 = function _templateObject15() { return data; }; return data; } function _templateObject14() { var data = _taggedTemplateLiteral(["radial-gradient(farthest-corner at 0px 0px, rgba(256,255,255,1) 5%, rgba(0,0,0,0.6) 90%)"]); _templateObject14 = function _templateObject14() { return data; }; return data; } function _templateObject13() { var data = _taggedTemplateLiteral(["radial-gradient(farthest-corner at 0px 0px, rgba(256,255,255,1) 5%, rgba(0,0,0,0.6) 90%)"]); _templateObject13 = function _templateObject13() { return data; }; return data; } function _templateObject12() { var data = _taggedTemplateLiteral(["\n display: block;\n position: relative;\n margin: 0;\n transition: all 100ms ease-in-out;\n outline: none;\n background: #161616;\n height: ", ";\n width: ", ";\n background-blend-mode: overlay;\n background-color: #111;\n background-image: ;\n background-image: ", ";\n box-shadow: 1px 1px 3px 0px rgba(0, 0, 0, 0.9);\n border-radius: 2px;\n\n &:disabled {\n cursor: not-allowed;\n }\n\n &:hover::after,\n &:active::after,\n &:focus::after {\n box-shadow: none;\n }\n\n &::before {\n content: none;\n }\n\n &::after {\n transition: all 100ms ease-in-out;\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 4%;\n height: 92%;\n width: 92%;\n margin: 0 auto;\n ", " background-color: #161616;\n background-blend-mode: overlay;\n background-image: ", ";\n border-radius: 2px;\n }\n\n &:hover::after {\n background-color: #181818;\n }\n"]); _templateObject12 = function _templateObject12() { return data; }; return data; } function _templateObject11() { var data = _taggedTemplateLiteral(["\n display: flex;\n padding: 2px 4px;\n cursor: pointer;\n border-radius: 1px;\n margin: 0 8px;\n\n background: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.1) 100%);\n box-shadow: inset 0 0 8px -1px #000000, inset 0 0 8px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.9), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n"]); _templateObject11 = function _templateObject11() { return data; }; return data; } function _templateObject10() { var data = _taggedTemplateLiteral(["\n background-color: #141414;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.5) -20%, rgba(0, 0, 0, 0.7) 100%);\n box-shadow: inset 0 0 1px 0 rgba(52, 52, 52, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.2),\n 1px 1px 2px 0px rgba(0, 0, 0, 0.7);\n\n &:hover {\n background-color: rgba(0, 0, 0, 0.7);\n }\n\n &::before,\n &::after {\n content: none;\n }\n"]); _templateObject10 = function _templateObject10() { return data; }; return data; } function _templateObject9() { var data = _taggedTemplateLiteral(["\n border: none;\n border: 1px solid ", ";\n width: ", "px;\n height: ", "px;\n transform: translateX(", "px);\n "]); _templateObject9 = function _templateObject9() { return data; }; return data; } function _templateObject8() { var data = _taggedTemplateLiteral(["\n background: white;\n border-radius: 50%;\n display: block;\n padding: 0;\n margin: 0;\n transition: all 100ms ease-in-out;\n outline: none;\n ", " &:focus, &:active, &:hover {\n border: none;\n border: ", ";\n }\n\n &:disabled {\n opacity: ", ";\n cursor: not-allowed;\n }\n\n ", ";\n"]); _templateObject8 = function _templateObject8() { return data; }; return data; } function _templateObject7() { var data = _taggedTemplateLiteral(["\n background: ", ";\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.3) 100%);\n box-shadow: inset 0 0 8px -1px #000000, inset 0 0 8px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.9), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n"]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteral(["\n background: ", ";\n"]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n width: ", "px;\n cursor: pointer;\n padding: ", "px;\n border-radius: ", "px;\n margin-left: ", "px;\n margin-right: ", "px;\n "]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n height: auto;\n display: flex;\n transition: all 0.1s ease-in;\n\n ", " ", ";\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n height: ", "px;\n "]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n transform: rotate(", "deg);\n "]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-around;\n align-items: center;\n ", ";\n ", "\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Wrapper = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["default"])('div')(_templateObject(), function (_ref) { var rotate = _ref.rotate; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2(), parseInt(rotate, 10)); }, function (_ref2) { var rotate = _ref2.rotate, size = _ref2.size; return rotate == -90 ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3(), size) : ''; }); var ButtonContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["default"])('div')(_templateObject4(), function (_ref3) { var size = _ref3.size; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject5(), size, 0.05 * size, size, 0.05 * size, 0.05 * size); }, function (_ref4) { var theme = _ref4.theme; return theme.dark ? darkContainer : lightContainer; }); ButtonContainer.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var lightContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject6(), function (_ref5) { var on = _ref5.on, theme = _ref5.theme, color = _ref5.color; return on ? color || theme.secondary : theme.secondary; }); var darkContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject7(), function (_ref6) { var on = _ref6.on, theme = _ref6.theme, color = _ref6.color; return on ? color || theme.secondary : '#22272a'; }); var Button = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].button(_templateObject8(), function (_ref7) { var size = _ref7.size, on = _ref7.on, theme = _ref7.theme; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject9(), theme.dark ? 'none' : theme.detail, size / 2, size / 2, on ? size - size / 2 : 0); }, function (_ref8) { var theme = _ref8.theme; return theme.dark ? 'none' : "1px solid ".concat(theme.detail); }, function (_ref9) { var theme = _ref9.theme; return theme.dark ? 1 : 0.65; }, function (_ref10) { var theme = _ref10.theme; return theme.dark ? darkButton : null; }); Button.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var darkButton = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject10()); var DarkSwitchContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject11()); var DarkSwitch = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].button(_templateObject12(), function (_ref11) { var size = _ref11.size; return "".concat(size * 0.72, "px"); }, function (_ref12) { var size = _ref12.size; return "".concat(size * 1.44, "px"); }, function (_ref13) { var on = _ref13.on; return on ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject13()) : Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject14()); }, function (_ref14) { var size = _ref14.size, on = _ref14.on; var margin = size * 0.08; return on ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject15(), margin) : Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject16(), margin); }, function (_ref15) { var on = _ref15.on; return on ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject17()) : Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject18()); }); var RowContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject19(), function (props) { return props.vertical ? 'column-reverse' : 'row'; }); var RowLabel = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["default"])(_shared_Label_styled__WEBPACK_IMPORTED_MODULE_2__["default"])(_templateObject20(), function (_ref16) { var position = _ref16.position, theme = _ref16.theme; return position === 'right' ? "margin-left: ".concat(theme.dark ? 12 : 8, "px;") : ''; }, function (_ref17) { var position = _ref17.position, theme = _ref17.theme; return position === 'left' ? "margin-right: ".concat(theme.dark ? 12 : 8, "px;") : ''; }, function (_ref18) { var position = _ref18.position, theme = _ref18.theme; return position === 'top' ? "margin-bottom: ".concat(theme.dark ? 34 : 20, "px;") : ''; }, function (_ref19) { var position = _ref19.position, theme = _ref19.theme; return position === 'bottom' ? "margin-top: ".concat(theme.dark ? 34 : 20, "px;") : ''; }); RowLabel.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; /***/ }), /***/ "./src/styled/constants.js": /*!*********************************!*\ !*** ./src/styled/constants.js ***! \*********************************/ /*! exports provided: colors, TRACK_TOTAL_DEG, RADIAN, light, dark, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colors", function() { return colors; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TRACK_TOTAL_DEG", function() { return TRACK_TOTAL_DEG; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RADIAN", function() { return RADIAN; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "light", function() { return light; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dark", function() { return dark; }); var colors = { PRIMARY: '#ABE2FB', SECONDARY: '#E6E6E6', DARKER_PRIMARY: '#87ceeb', OFF_WHITE: '#15181A', GREY: '#D3D3D3', RED: '#FF5E5E', DARK_GREY: '#535D63' }; var TRACK_TOTAL_DEG = 270.0; var RADIAN = Math.PI / 180.0; var light = { primary: colors.PRIMARY, secondary: colors.SECONDARY, detail: colors.GREY, dark: false }; var dark = { primary: colors.PRIMARY, secondary: colors.DARK_GREY, detail: colors.DARK_GREY, dark: true }; /* harmony default export */ __webpack_exports__["default"] = ({ dark: dark, light: light, colors: colors }); /***/ }), /***/ "./src/styled/shared/DarkGradient.js": /*!*******************************************!*\ !*** ./src/styled/shared/DarkGradient.js ***! \*******************************************/ /*! exports provided: UnstyledDarkHandle, darkLEDDefs, DARK_SEGMENTS, darkDecimal, darkColon, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnstyledDarkHandle", function() { return UnstyledDarkHandle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darkLEDDefs", function() { return darkLEDDefs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DARK_SEGMENTS", function() { return DARK_SEGMENTS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darkDecimal", function() { return darkDecimal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darkColon", function() { return darkColon; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var UnstyledDarkHandle = function UnstyledDarkHandle(_ref) { var className = _ref.className; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { className: className, xmlns: "http://www.w3.org/2000/svg", width: "10", height: "22" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fill: "none" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { filter: "url(#filter0_di)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { className: "dark-handle-custom-fill", fill: "#101010", d: "M4.886 1H3.114a2 2 0 0 0-1.997 2.11l.778 14A2 2 0 0 0 3.892 19h.216a2 2 0 0 0 1.997-1.89l.778-14A2 2 0 0 0 4.886 1z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { style: { mixBlendMode: 'overlay' }, fill: "url(#paint0_linear)", d: "M3.886 0H2.114A2 2 0 0 0 .117 2.11l.778 14A2 2 0 0 0 2.892 18h.216a2 2 0 0 0 1.997-1.89l.778-14A2 2 0 0 0 3.886 0z", transform: "translate(1 1)" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { style: { mixBlendMode: 'overlay' }, fill: "url(#paint1_radial)", d: "M3.886 0H2.114A2 2 0 0 0 .117 2.11l.778 14A2 2 0 0 0 2.892 18h.216a2 2 0 0 0 1.997-1.89l.778-14A2 2 0 0 0 3.886 0z", transform: "translate(1 1)" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fillRule: "evenodd", clipRule: "evenodd" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { className: "dark-handle-custom-fill", fill: "#101010", d: "M3.114 1h1.772a2 2 0 0 1 1.997 2.11l-.778 14A2 2 0 0 1 4.108 19h-.216a2 2 0 0 1-1.997-1.89l-.778-14A2 2 0 0 1 3.114 1zm.333 1h1.105A2 2 0 0 1 6.55 4.11l-.673 12.115a1.88 1.88 0 0 1-3.752 0L1.45 4.11A2 2 0 0 1 3.447 2z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { style: { mixBlendMode: 'overlay' }, fill: "url(#paint2_linear)", d: "M2 0h1.772a2 2 0 0 1 1.997 2.11l-.778 14A2 2 0 0 1 2.994 18h-.216A2 2 0 0 1 .78 16.11l-.778-14A2 2 0 0 1 2 0zm.333 1h1.105a2 2 0 0 1 1.997 2.11l-.673 12.115a1.88 1.88 0 0 1-3.753 0L.337 3.11A2 2 0 0 1 2.333 1z", transform: "translate(1.114 1)" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { fill: "url(#paint3_radial)", fillOpacity: ".4", d: "M2 0h1.772a2 2 0 0 1 1.997 2.11l-.778 14A2 2 0 0 1 2.994 18h-.216A2 2 0 0 1 .78 16.11l-.778-14A2 2 0 0 1 2 0zm.333 1h1.105a2 2 0 0 1 1.997 2.11l-.673 12.115a1.88 1.88 0 0 1-3.753 0L.337 3.11A2 2 0 0 1 2.333 1z", transform: "translate(1.114 1)" }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "filter0_di", width: "9.772", height: "22", x: ".114", y: "0", colorInterpolationFilters: "sRGB", filterUnits: "userSpaceOnUse" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "SourceAlpha", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: "1", dy: "1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { stdDeviation: "1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feBlend", { in2: "BackgroundImageFix", result: "effect1_dropShadow" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feBlend", { "in": "SourceGraphic", in2: "effect1_dropShadow", result: "shape" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "SourceAlpha", result: "hardAlpha", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { stdDeviation: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { in2: "hardAlpha", k2: "-1", k3: "1", operator: "arithmetic" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { values: "0 0 0 0 0.204294 0 0 0 0 0.204294 0 0 0 0 0.204294 0 0 0 0.395267 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feBlend", { in2: "shape", result: "effect2_innerShadow" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("linearGradient", { id: "paint0_linear", x2: "1", gradientTransform: "matrix(4.19709 12.8041 -4.26804 12.5913 .947 2.739)", gradientUnits: "userSpaceOnUse" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { stopColor: "#fff", stopOpacity: ".55" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "1", stopOpacity: ".01" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "paint1_radial", cx: ".5", cy: ".5", r: ".5", gradientTransform: "matrix(8.55956 25.5096 -8.50319 25.6787 .868 -23.103)", gradientUnits: "userSpaceOnUse" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { stopColor: "#fff", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "1", stopOpacity: ".5" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("linearGradient", { id: "paint2_linear", x2: "1", gradientTransform: "matrix(0 18 -5.77167 0 2.886 0)", gradientUnits: "userSpaceOnUse" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { stopColor: "#fff", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "1", stopOpacity: ".01" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "paint3_radial", cx: ".5", cy: ".5", r: ".5", gradientTransform: "matrix(0 36 -11.5433 0 8.658 -18)", gradientUnits: "userSpaceOnUse" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { stopColor: "#fff", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "1", stopOpacity: ".5" })))); }; var darkGradientDefs = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("linearGradient", { id: "l", x1: "15.78%", x2: "85.732%", y1: "15.214%", y2: "86.348%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".55" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopColor: "#000000", stopOpacity: "0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "m", cx: "14.944%", cy: "13.839%", r: "100.544%", fx: "14.944%", fy: "13.839%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopColor: "#000000", stopOpacity: ".5" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "n", width: "101.7%", height: "101.7%", x: "-.8%", y: "-.8%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { "in": "SourceAlpha", result: "shadowBlurInner1", stdDeviation: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "shadowBlurInner1", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 0.204294218 0 0 0 0 0.204294218 0 0 0 0 0.204294218 0 0 0 0.39526721 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "r", width: "550%", height: "218.8%", x: "-225%", y: "-56.2%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dy: ".5", "in": "SourceAlpha", result: "shadowOffsetOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowOffsetOuter1", result: "shadowMatrixOuter1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.46 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { "in": "SourceAlpha", result: "shadowOffsetOuter2" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { "in": "shadowOffsetOuter2", result: "shadowBlurOuter2", stdDeviation: "1.5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowBlurOuter2", result: "shadowMatrixOuter2", values: "0 0 0 0 0.529411765 0 0 0 0 0.807843137 0 0 0 0 0.921568627 0 0 0 0.4512851 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMerge", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMergeNode", { "in": "shadowMatrixOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMergeNode", { "in": "shadowMatrixOuter2" }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "t", width: "425%", height: "187.5%", x: "-162.5%", y: "-40.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dy: ".5", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("linearGradient", { id: "p", x1: "0%", x2: "0%", y1: "100%", y2: "100%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopColor: "#000000", stopOpacity: "0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "q", cy: "0%", r: "100%", fx: "0%", fy: "0%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopColor: "#000000", stopOpacity: ".5" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "a", width: "100.4%", height: "100.5%", x: "-.1%", y: "-.1%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMorphology", { "in": "SourceAlpha", operator: "dilate", radius: ".05", result: "shadowSpreadOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".1", dy: ".1", "in": "shadowSpreadOuter1", result: "shadowOffsetOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowOffsetOuter1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.11291327 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "d", width: "102.5%", height: "102.8%", x: "-1.1%", y: "-1.3%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { "in": "SourceAlpha", result: "shadowBlurInner1", stdDeviation: ".25" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { "in": "shadowBlurInner1", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", result: "shadowMatrixInner1", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { "in": "SourceAlpha", result: "shadowBlurInner2", stdDeviation: "1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { "in": "shadowBlurInner2", result: "shadowOffsetInner2" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner2", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner2" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner2", result: "shadowMatrixInner2", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMerge", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMergeNode", { "in": "shadowMatrixInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMergeNode", { "in": "shadowMatrixInner2" }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("linearGradient", { id: "c", x1: "50%", x2: "50%", y1: "0%", y2: "100%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopColor: "#323a3e", stopOpacity: ".2" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "e", width: "171%", height: "117.7%", x: "-35.5%", y: "-8.8%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { "in": "SourceAlpha", result: "shadowOffsetOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { "in": "shadowOffsetOuter1", result: "shadowBlurOuter1", stdDeviation: "2" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowBlurOuter1", values: "0 0 0 0 0.529411765 0 0 0 0 0.807843137 0 0 0 0 0.921568627 0 0 0 0.5 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "g", cx: "90.826%", cy: "1.233%", r: "154.848%", fx: "90.826%", fy: "1.233%", gradientTransform: "scale(1 .24903) rotate(72.947 .883 .03)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".7" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopColor: "#000000" }))); var darkLEDDefs = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-a", width: "111.8%", height: "107.8%", x: "-2.9%", y: "-2%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: "1", dy: "1", "in": "SourceAlpha", result: "shadowOffsetOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { "in": "shadowOffsetOuter1", result: "shadowBlurOuter1", stdDeviation: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowBlurOuter1", result: "shadowMatrixOuter1", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMerge", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMergeNode", { "in": "shadowMatrixOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMergeNode", { "in": "SourceGraphic" }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "darkLED-c", cx: "0%", cy: "0%", r: "141.421%", fx: "0%", fy: "0%", gradientTransform: "matrix(.22147 .22147 -.0503 .97517 0 0)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopOpacity: ".6" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("linearGradient", { id: "darkLED-d", x1: "0%", y1: "0%", y2: "100%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopOpacity: "0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-b", d: "M5.71 5.181L3.308 2.778 5.71.375h16.357l2.403 2.403-2.403 2.403z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-e", width: "101.2%", height: "105.2%", x: "-.6%", y: "-2.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "darkLED-g", cx: "0%", cy: "0%", r: "141.421%", fx: "0%", fy: "0%", gradientTransform: "matrix(.22147 .22147 -.97517 .0503 0 0)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopOpacity: ".6" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-f", d: "M22.597 5.71L25 3.308l2.403 2.402v16.357L25 24.47l-2.403-2.403z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-h", width: "105.2%", height: "101.2%", x: "-2.6%", y: "-.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "darkLED-j", cx: "0%", cy: "0%", r: "141.421%", fx: "0%", fy: "0%", gradientTransform: "scale(1 .22711) rotate(77.204)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopOpacity: ".6" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-i", d: "M22.597 27.933L25 25.53l2.403 2.403v16.356L25 46.692l-2.403-2.403z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-k", width: "105.2%", height: "101.2%", x: "-2.6%", y: "-.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-l", d: "M22.067 44.819l2.403 2.403-2.403 2.403H5.71l-2.402-2.403 2.402-2.403z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-m", width: "101.2%", height: "105.2%", x: "-.6%", y: "-2.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-n", d: "M5.181 44.289l-2.403 2.403-2.403-2.403V27.933l2.403-2.403 2.403 2.403z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-o", width: "105.2%", height: "101.2%", x: "-2.6%", y: "-.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-p", d: "M5.181 22.067L2.778 24.47.375 22.067V5.71l2.403-2.402L5.181 5.71z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-q", width: "105.2%", height: "101.2%", x: "-2.6%", y: "-.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-r", d: "M5.71 27.403L3.308 25l2.402-2.403h16.357L24.47 25l-2.403 2.403z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-s", width: "101.2%", height: "105.2%", x: "-.6%", y: "-2.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "darkLED-u", cx: "0%", cy: "0%", r: "141.421%", fx: "0%", fy: "0%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopOpacity: ".6" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-t", d: "M31 50.625a2.625 2.625 0 1 1 0-5.25 2.625 2.625 0 0 1 0 5.25z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-y", d: "M35,40.625 C33.5502525,40.625 32.375,39.4497475 32.375,38 C32.375,36.5502525 33.5502525,35.375 35,35.375 C36.4497475,35.375 37.625,36.5502525 37.625,38 C37.625,39.4497475 36.4497475,40.625 35,40.625 Z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-v", width: "104.8%", height: "104.8%", x: "-2.4%", y: "-2.4%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-w", d: "M35,13.625 C33.5502525,13.625 32.375,12.4497475 32.375,11 C32.375,9.55025253 33.5502525,8.375 35,8.375 C36.4497475,8.375 37.625,9.55025253 37.625,11 C37.625,12.4497475 36.4497475,13.625 35,13.625 Z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-x", width: "104.8%", height: "104.8%", x: "-2.4%", y: "-2.4%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" }))); var A = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-b" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-c)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-b" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-b" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-e)", xlinkHref: "#darkLED-b" })); var B = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-f" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-g)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-f" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-f" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-h)", xlinkHref: "#darkLED-f" })); var C = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-i" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-j)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-i" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-i" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-k)", xlinkHref: "#darkLED-i" })); var D = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-l" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-c)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-l" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-l" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-m)", xlinkHref: "#darkLED-l" })); var E = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-n" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-j)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-n" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-n" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-o)", xlinkHref: "#darkLED-n" })); var F = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-p" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-g)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-p" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-p" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-q)", xlinkHref: "#darkLED-p" })); var G = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-r" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-c)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-r" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-r" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-s)", xlinkHref: "#darkLED-r" })); // See the following link for segment mappings: // https://en.wikipedia.org/wiki/Seven-segment_display#/media/File:7_segment_display_labeled.svg var DARK_SEGMENTS = { A: A, B: B, C: C, D: D, E: E, F: F, G: G }; var darkDecimal = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fill: "none", fillRule: "evenodd", filter: "url(#darkLED-a)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fillRule: "nonzero" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", fillRule: "evenodd", xlinkHref: "#darkLED-t" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-u)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-t" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-t" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-v)", xlinkHref: "#darkLED-t" }))); var darkColon = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fillRule: "nonzero" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", fillRule: "evenodd", xlinkHref: "#darkLED-y" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-u)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-y" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-y" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "black", filter: "url(#darkLED-v)", xlinkHref: "#darkLED-y" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fillRule: "nonzero" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", fillRule: "evenodd", xlinkHref: "#darkLED-w" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-u)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-w" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-w" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "black", filter: "url(#darkLED-x)", xlinkHref: "#darkLED-w" }))); /* harmony default export */ __webpack_exports__["default"] = (darkGradientDefs); /***/ }), /***/ "./src/styled/shared/Indicator.styled.js": /*!***********************************************!*\ !*** ./src/styled/shared/Indicator.styled.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants */ "./src/styled/constants.js"); function _templateObject4() { var data = _taggedTemplateLiteral(["\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.1) 0%,\n rgba(0, 0, 0, 0.5) 100%\n );\n background-blend-mode: overlay;\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.5), inset 0 0 4px 0 rgba(0, 0, 0, 0.6),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.9), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n "]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n box-shadow: 0 0 8px 2px ", ", 1px 1px 0px 0px rgba(0, 0, 0, 0.9),\n -1px -1px 0px 0px rgba(255, 255, 255, 0.1);\n "]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n background-color: ", ";\n ", "\n ", "\n "]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n border-radius: ", ";\n transition: all 100ms ease-in-out;\n ", "\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Indicator = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["default"])('div')(_templateObject(), function (_ref) { var rectangular = _ref.rectangular; return rectangular ? '0' : '50%'; }, function (props) { var color = props.main ? props.on ? props.primary || props.theme.primary : props.secondary || props.theme.secondary : props.on ? props.theme.secondary : props.primary || props.theme.primary; return Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject2(), props.width || props.height || props.size, props.height || props.width || props.size, color, props.border ? "border: 1px solid ".concat(props.on ? color : '#F8F4F4', ";") : '', props.theme.dark ? props.on && props.main || !props.on && !props.main ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject3(), color) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject4()) : ''); }); Indicator.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_2__["light"] }; Indicator.propTypes = { /** * Size of the indicator */ size: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * Theme for styling the component */ theme: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, /** * Add border for off */ border: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * Color to display when on */ primary: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Color to display when off */ secondary: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string }; /* harmony default export */ __webpack_exports__["default"] = (Indicator); /***/ }), /***/ "./src/styled/shared/Label.styled.js": /*!*******************************************!*\ !*** ./src/styled/shared/Label.styled.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); function _templateObject4() { var data = _taggedTemplateLiteral(["\n ", "\n "]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n margin-top: 8px;\n "]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n margin-bottom: 8px;\n "]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: block;\n font-size: 14px;\n ", "\n ", "\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } /* harmony default export */ __webpack_exports__["default"] = (styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].label(_templateObject(), function (_ref) { var position = _ref.position; return position === 'top' ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2()) : Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3()); }, function (props) { return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject4(), props.css); })); /***/ }), /***/ "./src/styled/shared/LabelContainer.styled.js": /*!****************************************************!*\ !*** ./src/styled/shared/LabelContainer.styled.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _Label_styled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Label.styled */ "./src/styled/shared/Label.styled.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-around;\n flex-direction: column;\n ", "\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject(), function (_ref) { var fullSize = _ref.fullSize; if (fullSize) return 'width: 100%;'; return ''; }); function LabelContainer(props) { var labelText = props.label; var customLabelStyle = {}; if (_typeof(props.label) === 'object') { labelText = props.label.label; customLabelStyle = props.label.style; } var labelElement = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Label_styled__WEBPACK_IMPORTED_MODULE_2__["default"], { style: customLabelStyle, css: props.labelCSS, position: props.labelPosition }, labelText && labelText.length ? labelText : ''); // if (labelText && labelText.length) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Container, { className: props.className, id: props.id, labelPosition: props.labelPosition, fullSize: props.fullSize }, props.labelPosition == 'top' && labelElement, props.children, props.labelPosition != 'top' && labelElement); // } // return
{props.children}
; } LabelContainer.defaultProps = { labelPosition: 'bottom' }; /* harmony default export */ __webpack_exports__["default"] = (LabelContainer); /***/ }), /***/ "prop-types": /*!****************************!*\ !*** external "PropTypes" ***! \****************************/ /*! no static exports found */ /***/ (function(module, exports) { (function() { module.exports = window["PropTypes"]; }()); /***/ }), /***/ "react": /*!************************!*\ !*** external "React" ***! \************************/ /*! no static exports found */ /***/ (function(module, exports) { (function() { module.exports = window["React"]; }()); /***/ }), /***/ "react-dom": /*!***************************!*\ !*** external "ReactDOM" ***! \***************************/ /*! no static exports found */ /***/ (function(module, exports) { (function() { module.exports = window["ReactDOM"]; }()); /***/ }) /******/ }); //# sourceMappingURL=dash_daq.dev.js.map ================================================ FILE: dash_daq/package-info.json ================================================ { "name": "dash-daq", "version": "0.6.0", "engines": { "node": ">=8" }, "description": "DAQ components for Dash", "repository": { "type": "git", "url": "git://github.com/plotly/dash-daq.git" }, "bugs": { "url": "https://github.com/plotly/dash-daq/issues" }, "homepage": "https://github.com/plotly/dash-daq", "main": "dash_daq/dash_daq.min.js", "author": "The Plotly Team ", "maintainer": "The Plotly Team ", "license": "MIT", "scripts": { "copy-lib": "copyfiles -u 1 lib/* dash_daq", "dash-demo": "python demo.py", "install-local": "pip install -e .", "lint": "eslint --fix --ignore-path .eslintignore src/", "start": "npm run build:dev", "build:js": "webpack --mode production", "build:js-dev": "webpack --mode development", "build:py": "python get_version_info.py && yarn copy-lib && dash-generate-components ./src/components dash_daq -p package-info.json", "build:r": "dash-generate-components ./src/components dash_daq -p package-info.json --r-prefix='daq'", "build": "npm run test && npm run lint && npm run build:js && npm run build:py && npm run build:r", "postbuild": "es-check es5 dash_daq/*.js", "build:dev": "npm run build:js-dev && npm run build:py", "build-tarball": "npm run build && python setup.py sdist", "test": "jest src/components/__tests__", "test-gauge": "jest src/components/__tests__/Gauge.test.js", "test:frontend-cov": "jest --coverage --silent", "test:watch": "jest --watch", "uninstall-local": "pip uninstall dash_daq -y", "prettier": "yarn prettier-src && yarn prettier-tests", "prettier-src": "prettier --single-quote --print-width=100 --write src/**/*.js", "prettier-tests": "prettier --single-quote --print-width=100 --write src/components/__tests__/**/*.js", "prettier-restage": "git update-index --again" }, "dependencies": { "color": "^3.0.0", "conic-gradient": "^1.0.0", "copyfiles": "^1.2.0", "dash-components-archetype": "^0.2.11", "deep-equal": "^1.0.1", "nipplejs": "^0.7.1", "prop-types": "^15.5.9", "ramda": "^0.25.0", "rc-slider": "^9.1.0", "react": "16.13.0", "react-color": "^2.18.0", "react-dom": "16.13.0", "react-numeric-input": "^2.2.3", "styled-components": "^4.4.0", "tinygradient": "^0.4.0", "webpack": "^4.41.0", "yarn": "^1.22.11" }, "devDependencies": { "@babel/core": "^7.6.0", "@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/preset-env": "^7.6.0", "@babel/preset-react": "^7.0.0", "@plotly/webpack-dash-dynamic-import": "^1.1.4", "babel-eslint": "^10.0.3", "babel-loader": "^8.0.6", "chalk": "^2.3.1", "css-loader": "^3.4.2", "dash-components-archetype-dev": "^0.2.11", "enzyme": "^3.10.0", "enzyme-adapter-react-16": "^1.14.0", "es-check": "^5.0.0", "fs-extra": "^5.0.0", "identity-obj-proxy": "^3.0.0", "jest": "^24.9.0", "jest-canvas-mock": "^2.1.1", "pre-commit": "^1.2.2", "prettier": "^1.10.2", "react-docgen": "^3.0.0", "react-docgen-markdown-renderer": "^1.0.2", "react-test-renderer": "^16.8.6", "sinon": "^4.3.0", "style-loader": "^1.1.3", "webpack-cli": "^3.3.9" }, "jest": { "coveragePathIgnorePatterns": [ "/src/styled", "/src/helpers" ], "testURL": "http://localhost", "setupFiles": [ "jest-canvas-mock" ], "moduleNameMapper": { "\\.css": "identity-obj-proxy" } }, "files": [ "dash_daq/*{.js,.map}" ], "pre-commit": [ "test", "prettier", "prettier-restage" ], "keywords": [ "dash", "daq", "components" ] } ================================================ FILE: demo/Demo.react.js ================================================ import React, { Component } from 'react'; import { colors } from '../src/styled/constants'; import { BooleanSwitch, ColorPicker, Gauge, GraduatedBar, Indicator, Knob, LEDDisplay, NumericInput, PowerButton, Slider, StopButton, PrecisionInput, Tank, Thermometer, ToggleSwitch, DarkThemeProvider, Joystick } from '../src'; class Demo extends Component { constructor() { super(); this.state = { value: 0, color: { hex: colors.PRIMARY }, on: false, power: true, dark: false, stop: false, vertical: false, slider: 40 }; this.updateValue = this.updateValue.bind(this); this.updateColor = this.updateColor.bind(this); this.updatePower = this.updatePower.bind(this); this.updateSlider = this.updateSlider.bind(this); this.toggle = this.toggle.bind(this); this.toggleDark = this.toggleDark.bind(this); this.stopPressed = this.stopPressed.bind(this); this.toggleVerticalSwitch = this.toggleVerticalSwitch.bind(this); } updateValue({ value }) { this.setState({ value }); } updateColor({ value }) { this.setState({ color: value }); } updatePower({ on }) { this.setState({ power: on }); } updateSlider({ value }) { this.setState({ slider: value }); } stopPressed() { this.setState({ stop: !this.state.stop }); } toggle() { this.setState(({ on }) => ({ on: !on })); } toggleDark() { this.setState(({ dark }) => ({ dark: !dark })); } toggleVerticalSwitch() { this.setState({ vertical: !this.state.vertical }); } render() { const components = (

Controls

null} />

Indicators

); return (
{this.state.dark ? ( ) : ( )}

dash_daq Demo

{this.state.dark && ( )} {!this.state.dark && ( )}
{!this.state.dark && components} {this.state.dark && {components}}
); } } export default Demo; ================================================ FILE: demo/index.html ================================================
================================================ FILE: demo/index.js ================================================ import React from 'react'; import ReactDOM from 'react-dom'; import Demo from './Demo.react'; // Fix for rendering React externally: // See https://github.com/gaearon/react-hot-loader/tree/v1.3.1/docs#usage-with-external-react const rootInstance = ReactDOM.render( , document.getElementById('react-demo-entry-point') ); /* eslint-disable */ require('react-hot-loader/Injection').RootInstanceProvider.injectProvider({ /* eslint-enable */ getRootInstances: function () { // Help React Hot Loader figure out the root component instances on the page: return [rootInstance]; } }); ================================================ FILE: demo.py ================================================ from packaging.version import Version import dash print(f"Dash Version: {dash.__version__}") if Version(dash.__version__).major >= 2: from dash import html from dash import dcc else: import dash_html_components as html import dash_core_components as dcc from dash.dependencies import Input, Output, State from dash_daq import ( Joystick, BooleanSwitch, ColorPicker, Gauge, GraduatedBar, Indicator, Knob, LEDDisplay, NumericInput, PowerButton, PrecisionInput, Slider, StopButton, Tank, Thermometer, ToggleSwitch, DarkThemeProvider, ) app = dash.Dash("") # TODO: styles are required app.config.suppress_callback_exceptions = True app.scripts.config.serve_locally = True ################ Set up shared layout ################ root_layout = html.Div([ # original dcc.Location(id='url', refresh=True), html.Div([ html.H1('dash_daq Dash Demo'), dcc.Link('Light Theme', href='/', refresh=True), dcc.Link('Dark Theme', href='/dark', refresh=True), ], style={'width': '80%', 'marginLeft': '10%', 'marginRight': '10%', 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'}), html.Hr(), html.Div([ html.Div(id="page-content"), html.Div( [ BooleanSwitch(id="hiddenBooleanSwitch"), Gauge(id="hiddenGauge"), GraduatedBar(id="hiddenGraduatedBar"), Indicator(id="hiddenIndicator"), Knob(id="hiddenKnob"), NumericInput(id="hiddenNumericInput"), PowerButton(id="hiddenPowerButton"), StopButton(id="hiddenStopButton"), Tank(id="hiddenTank"), Thermometer(id="hiddenThermometer"), ToggleSwitch(id="hiddenToggleSwitch"), DarkThemeProvider(), ], style={"display": "none"}, ), ])] ) ################ Set up light layout ################ controls = html.Div( [ Joystick(id="demojoystick", label="Joystick", labelPosition="bottom"), Knob(id="demoKnob", label="Knob", min=0, max=15, value=2), NumericInput(id="demoNumericInput", min=1, max=10000, value=100), BooleanSwitch(id="demoSwitch"), ToggleSwitch(id="demoToggleSwitch", value="false", vertical=True), StopButton(id="demoStopButton", n_clicks=0), PowerButton(id="demoPowerButton", on="false", onButtonStyle={ "backgroundColor": "red"}, offButtonStyle={"backgroundColor": "blue"}), Slider( id="demoSlider", min=0, max=100, size=200, value=40, marks={0: 0, 50: 50, 100: 100}, updatemode="drag", handleLabel={"label": "Current", "showCurrentValue": True}, targets={75: "Threshold"}, color={ "ranges": { "blue": [0, 50], "purple": [50, 100], }, "gradient": True, }, ), ColorPicker(id="demoColorPicker", value={"hex": "#ade2fa"}), PrecisionInput(id="demoPrecisionInput", precision=2, value=120), ], style={ "display": "flex", "flexDirection": "row", "alignItems": "center", "justifyContent": "space-between", }, ) def warning(x, y): return x+" "+y indicators = html.Div( [ html.Div( [ Gauge( id="demoGauge", label="Gauge", logarithmic=True, min=0, max=4, scale={"start": 0, "interval": 1, "labelInterval": 1}, value=1, showCurrentValue=True, color={"gradient": True, "default": "yellow", "ranges": {"red": [0, 2], "green": [2, 4]}} ), Tank( id="demoTank", label="Tank", min=0, max=10, value=2, showCurrentValue=True, scale={"custom": {0: "Low", 5: "Medium", 10: "High"}}, exceedMessage="Exceed", ), Thermometer( id="demoThermometer", label="Thermometer", min=0, max=10, value=2 ), GraduatedBar( id="demoGraduatedBar", label="GraduatedBar", min=0, max=100, value=40, ), LEDDisplay(id="demoLEDDisplay", value="-1.2", backgroundColor="#FFFFFF"), html.Div( [ html.Div( [ Indicator( id="demoBooleanIndicator", label="BooleanSwitch Indicator", labelPosition="top", value=True, ), ], style={"height": "75px"}, ), html.Div( [ Indicator( id="demoToggleIndicator", label="ToggleSwitch Indicator", labelPosition="top", value=False, ) ], style={"height": "75px"}, ), html.Div( [ Indicator( id="demoIndicator", label="Stop Button Indicator", labelPosition="top", value=True, ) ], style={"height": "75px"}, ), html.Div( [ Indicator( id="demoPowerIndicator", label="Power Indicator", labelPosition="top", value=False, ) ], style={"height": "75px"}, ), ], style={ "display": "flex", "flexDirection": "column", "alignItems": "center", "justifyContent": "space-between", }, ), ], style={ "display": "flex", "flexDirection": "row", "alignItems": "center", "justifyContent": "space-between", }, ) ] ) light_layout = html.Div( [ html.Link(href="https://codepen.io/plotly/pen/EQZeaW.css", rel="stylesheet"), html.Div([html.H2("Controls"), controls], style={"width": "80%"}), html.Br(), html.Br(), html.Div([html.H2("Indicators"), indicators], style={"width": "80%"}), ], style={ "width": "100%", "display": "flex", "flexDirection": "column", "alignItems": "center", "justifyContent": "center", }, ) ################ Set up dark layout ################ dark_controls = html.Div( [ Joystick( id="dark-demojoystick", label="Joystick", ), Knob(id="dark-demoKnob", label="Knob", min=0, max=10, value=2, showCurrentValue=True), NumericInput(id="dark-demoNumericInput", min=1, max=10000, value=100), BooleanSwitch(id="dark-demoSwitch"), ToggleSwitch(id="dark-demoToggleSwitch", value="false", vertical=True), StopButton(id="dark-demoStopButton", n_clicks=0), PowerButton(id="dark-demoPowerButton", on="false"), Slider( id="dark-demoSlider", min=0, max=100, size=200, value=40, marks={0: 0, 50: 50, 100: 100}, updatemode="drag", handleLabel={"label": "Current", "showCurrentValue": True}, targets={75: "Threshold"}, color={ "ranges": { "blue": [0, 50], "purple": [50, 100], }, "gradient": True, }, ), ColorPicker(id="dark-demoColorPicker", value={"hex": "#ade2fa"}), PrecisionInput(id="dark-demoPrecisionInput", precision=2, value=120), ], style={ "display": "flex", "flexDirection": "row", "alignItems": "center", "justifyContent": "space-between", }, ) dark_indicators = html.Div( [ html.Div( [ Gauge( id="dark-demoGauge", label="Gauge", logarithmic=True, min=0, max=4, color="red", scale={"start": 0, "interval": 1, "labelInterval": 1}, value=100, showCurrentValue=True, ), Tank( id="dark-demoTank", label="Tank", min=0, max=10, value=2, scale={"custom": {0: "Low", 5: "Medium", 10: "High"}}, # textColor="red", showCurrentValue=True ), Thermometer( id="dark-demoThermometer", label="Thermometer", min=0, max=10, value=2, ), GraduatedBar( id="dark-demoGraduatedBar", label="GraduatedBar", min=0, max=100, value=40, ), LEDDisplay(id="dark-demoLEDDisplay", value=1.2, backgroundColor="#FFFFFF"), html.Div( [ html.Div( [ Indicator( id="dark-demoBooleanIndicator", label="BooleanSwitch Indicator", labelPosition="top", value=True, ), ], style={"height": "75px"}, ), html.Div( [ Indicator( id="dark-demoToggleIndicator", label="ToggleSwitch Indicator", labelPosition="top", value=False, ) ], style={"height": "75px"}, ), html.Div( [ Indicator( id="dark-demoIndicator", label="Stop Button Indicator", labelPosition="top", value=True, ) ], style={"height": "75px"}, ), html.Div( [ Indicator( id="dark-demoPowerIndicator", label="Power Indicator", labelPosition="top", value=False, ) ], style={"height": "75px"}, ), ], style={ "display": "flex", "flexDirection": "column", "alignItems": "center", "justifyContent": "space-between", }, ), ], style={ # "background-color": "black", "display": "flex", "flexDirection": "row", "alignItems": "center", "justifyContent": "space-between", }, ) ] ) dark_layout = DarkThemeProvider( [ html.Link(href="https://codepen.io/anon/pen/BYEPbO.css", rel="stylesheet"), html.Div( [ html.Div([html.H2("Controls"), dark_controls], style={"width": "80%"}), html.Br(), html.Br(), html.Div( [html.H2("Indicators"), dark_indicators], style={"width": "80%"} ), ], style={ "width": "100%", "display": "flex", "flexDirection": "column", "alignItems": "center", "justifyContent": "center", }, ), ] ) app.layout = root_layout ################ Set up shared callbacks ############### @app.callback(Output("page-content", "children"), [Input("url", "pathname")]) def display_page(pathname): if pathname == "/dark": return dark_layout else: return light_layout ################ Set up light callbacks ################ @app.callback(Output("demoLEDDisplay", "value"), [Input("demoPrecisionInput", "value")]) def update_LEDDisplay(value): digits = str(value)[:2] return "-" + ".".join(digits) @app.callback(Output("demoGauge", "value"), [Input("demoNumericInput", "value")]) def update_gauge(value): return value @app.callback(Output("demoGauge", "color"), [Input("demoColorPicker", "value")]) def update_gauge_color(value): return value["hex"] @app.callback(Output("demoTank", "color"), [Input("demoColorPicker", "value")]) def update_tank_color(value): return value["hex"] @app.callback(Output("demoGraduatedBar", "color"), [Input("demoColorPicker", "value")]) def update_graduatedBar_color(value): return value["hex"] @app.callback(Output("demoThermometer", "color"), [Input("demoColorPicker", "value")]) def update_thermometer_color(value): return value["hex"] @app.callback(Output("demoTank", "value"), [Input("demoKnob", "value")]) def update_tank(value): return value @app.callback(Output("demoThermometer", "value"), [Input("demoKnob", "value")]) def update_thermometer(value): return value @app.callback(Output("demoGraduatedBar", "value"), [Input("demoSlider", "value")]) def update_graduated_bar(value): return value @app.callback(Output("demoBooleanIndicator", "value"), [Input("demoSwitch", "on")]) def update_boolean_indicator(on): return on @app.callback( Output("demoToggleIndicator", "value"), [ Input("demoToggleSwitch", "value")] ) def update_boolean_indicator(value): return value @app.callback( Output("demoIndicator", "value"), [Input("demoStopButton", "n_clicks")], [State("demoIndicator", "value")], ) def update_indicator(_, indicatorState): return not indicatorState @app.callback(Output("demoPowerIndicator", "value"), [Input("demoPowerButton", "on")]) def update_thermometer(on): return on ################ Set up dark callbacks ################ @app.callback( Output("dark-demoLEDDisplay", "value"), [Input("dark-demoPrecisionInput", "value")] ) def update_LEDDisplay(value): digits = str(value)[:2] return "-" + ".".join(digits) @app.callback( Output("dark-demoGauge", "value"), [Input("dark-demoNumericInput", "value")] ) def dark_update_gauge(value): return value @app.callback( Output("dark-demoGauge", "color"), [Input("dark-demoColorPicker", "value")] ) def dark_update_gauge_color(value): return value["hex"] @app.callback( Output("dark-demoTank", "color"), [Input("dark-demoColorPicker", "value")] ) def dark_update_tank_color(value): return value["hex"] @app.callback( Output("dark-demoGraduatedBar", "color"), [Input("dark-demoColorPicker", "value")] ) def dark_update_graduatedBar_color(value): return value["hex"] @app.callback( Output("dark-demoThermometer", "color"), [Input("dark-demoColorPicker", "value")] ) def dark_update_thermometer_color(value): return value["hex"] @app.callback(Output("dark-demoTank", "value"), [Input("dark-demoKnob", "value")]) def dark_update_tank(value): return value @app.callback( Output("dark-demoThermometer", "value"), [Input("dark-demoKnob", "value")] ) def dark_update_thermometer(value): return value @app.callback( Output("dark-demoGraduatedBar", "value"), [Input("dark-demoSlider", "value")] ) def dark_update_graduated_bar(value): return value @app.callback( Output("dark-demoBooleanIndicator", "value"), [Input("dark-demoSwitch", "on")] ) def dark_update_boolean_indicator(on): return on @app.callback( Output("dark-demoToggleIndicator", "value"), [Input("dark-demoToggleSwitch", "value")], ) def dark_update_boolean_indicator(value): return value @app.callback( Output("dark-demoIndicator", "value"), [Input("dark-demoStopButton", "n_clicks")], [State("dark-demoIndicator", "value")], ) def dark_update_indicator(_, indicatorState): return not indicatorState @app.callback( Output("dark-demoPowerIndicator", "value"), [Input("dark-demoPowerButton", "on")] ) def dark_update_thermometer(on): return on ################ Run Server ################ if __name__ == "__main__": app.run(debug=True) ================================================ FILE: get_version_info.py ================================================ import os import json import sys package_file = os.path.abspath(os.path.join(os.path.dirname(__file__), 'package.json')) with open(package_file) as f: package = json.load(f) package_info = dict( name=package['name'].replace(' ', '_').replace('-', '_'), version=package['version'], author=package['author'] ) package_info_file = os.path.abspath(os.path.join( os.path.dirname(__file__), os.path.join( 'dash_daq', 'package-info.json' ) )) with open(package_info_file, 'w') as f: f.write(json.dumps(package_info)) ================================================ FILE: inst/deps/async-colorpicker.js ================================================ (window.webpackJsonpdash_daq=window.webpackJsonpdash_daq||[]).push([[0],Array(157).concat([function(e,t,r){"use strict";r.r(t);var n=r(1),o=r.n(n),a=r(273),i=r(2),u=r(29),l=r.n(u),c=r(3);function f(){var e=_(["\n box-shadow: 0px 0px 8px 2px rgba(100,100,100,0.075),\n 0px 0px 32px 2px rgba(255,255,255,0.05),\n 1px 1px 0px 0px rgba(25,25,25,0.6),\n -1px -1px 0px 0px rgba(255,255,255,0.2) !important;\n\n & .chrome-picker > div:first-child {\n border-radius: 0 !important;\n }\n\n & .chrome-picker > div:nth-child(2) {\n background: #0a0a0a !important;\n border-top: 1px solid rgba(255,255,255,0.075);\n }\n\n ","\n ","\n ","\n"]);return f=function(){return e},e}function s(){var e=_(["\n & .chrome-picker input {\n font-family: unset !important;\n color: #fff !important;\n border-radius: 0px !important;\n background-color: #22272a !important;\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.05) 0%,\n rgba(0, 0, 0, 0.5) 100%\n ) !important;\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1) !important;\n }\n\n & .chrome-picker input:focus {\n outline: 0 !important;\n border: none !important;\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.2) 0%,\n rgba(0, 0, 0, 0.4) 100%\n ) !important;\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.6), inset 0 0 4px 0 rgba(0, 0, 0, 0.6),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.6), 1px 1px 0px 0px rgba(255, 255, 255, 0.1) !important;\n }\n"]);return s=function(){return e},e}function p(){var e=_(["\n .chrome-picker .flexbox-fix div:nth-child(2) > div:nth-child(2) > div {\n background: #fff !important;\n }\n"]);return p=function(){return e},e}function d(){var e=_(["\n box-shadow: inset 0 0 1px 0 rgba(52, 52, 52, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.2),\n 0 0 12px 4px "," !important;\n "]);return d=function(){return e},e}function h(){var e=_(["\n & .chrome-picker .hue-horizontal > div > div,\n .chrome-picker\n > div:nth-child(2)\n > div:nth-child(1)\n > div:nth-child(2)\n > div:nth-child(2)\n > div\n > div:nth-child(3)\n > div\n > div {\n border-radius: 100% !important;\n border: none !important;\n background: #101010 !important;\n background-image: linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.3) -50%,\n rgba(0, 0, 0, 0.7) 100%\n ) !important;\n transition: all 0.3s ease-in !important;\n ",";\n }\n"]);return h=function(){return e},e}function b(){var e=_(["\n border: 1px solid ",";\n "]);return b=function(){return e},e}function v(){var e=_(["\n border-radius: 3px !important;\n\n "," ",";\n"]);return v=function(){return e},e}function g(){var e=_(["\n border: 1px solid "," !important;\n "]);return g=function(){return e},e}function x(){var e=_(["\n & .chrome-picker .hue-horizontal > div > div,\n .chrome-picker\n > div:nth-child(2)\n > div:nth-child(1)\n > div:nth-child(2)\n > div:nth-child(2)\n > div\n > div:nth-child(3)\n > div\n > div {\n box-shadow: none !important;\n background-color: #fff;\n border-radius: 100% !important;\n ",";\n }\n"]);return x=function(){return e},e}function y(){var e=_(["\n width: ","px !important;\n "]);return y=function(){return e},e}function m(){var e=_(["\n opacity: ",";\n cursor: not-allowed !important;\n & .chrome-picker {\n pointer-events: none !important;\n }\n "]);return m=function(){return e},e}function w(){var e=_(["\n "," & .chrome-picker {\n font-family: unset !important;\n box-shadow: none !important;\n ",";\n }\n\n & .chrome-picker svg {\n background: unset !important;\n }\n\n & .chrome-picker svg:hover path {\n fill: ",";\n }\n\n ",";\n"]);return w=function(){return e},e}function _(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var j=i.c.div(w(),(function(e){var t=e.disabled,r=e.theme;return t&&Object(i.b)(m(),r.dark?1:.65)}),(function(e){var t=e.size;return Object(i.b)(y(),t)}),(function(e){var t=e.theme;return e.color||t.primary}),(function(e){return e.theme.dark?P:E})),O=Object(i.b)(x(),(function(e){var t=e.theme;return Object(i.b)(g(),t.detail)})),E=Object(i.b)(v(),O,(function(e){var t=e.theme;return Object(i.b)(b(),t.detail)})),C=Object(i.b)(h(),(function(e){var t=e.glow;return Object(i.b)(d(),t)})),k=Object(i.b)(p()),S=Object(i.b)(s()),P=Object(i.b)(f(),C,S,k);j.defaultProps={theme:c.e};var M=r(7),B=r(61),A=r(4);function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function R(){return(R=Object.assign||function(e){for(var t=1;t1?t-1:0),i=1;i=128?"#000":"#fff"},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}};t.default=t},function(e,t,r){var n=r(226),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,r){var n=r(177),o=r(277),a=r(278),i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},function(e,t,r){var n=r(303),o=r(306);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},function(e,t,r){var n=r(399),o=r(404);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,r){var n=r(265),o=r(467),a=r(505),i=r(164);e.exports=function(e,t){return(i(e)?n:a)(e,o(t,3))}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){var n=r(190),o=r(400),a=r(401),i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},function(e,t,r){var n=r(215),o=r(220);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},function(e,t,r){var n=r(166).Symbol;e.exports=n},function(e,t,r){var n=r(228),o=r(285),a=r(180);e.exports=function(e){return a(e)?n(e):o(e)}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,r){var n=r(233),o=r(198);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},function(e,t,r){var n=r(293),o=r(294),a=r(295),i=r(296),u=r(297);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,r){(function(e){var n=r(226),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&n.process,u=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,r(173)(e))},function(e,t){var r=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},function(e,t,r){var n=r(232)(Object.getPrototypeOf,Object);e.exports=n},function(e,t,r){var n=r(181),o=r(298),a=r(299),i=r(300),u=r(301),l=r(302);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=l,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,r){var n=r(169)(r(166),"Map");e.exports=n},function(e,t,r){var n=r(307),o=r(314),a=r(316),i=r(317),u=r(318);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t,r){(function(e){var n=r(162),o=r(427),a=t&&!t.nodeType&&t,i=a&&"object"==typeof e&&e&&!e.nodeType&&e,u=i&&i.exports===a?n.Buffer:void 0,l=(u?u.isBuffer:void 0)||o;e.exports=l}).call(this,r(173)(e))},function(e,t,r){var n=r(429),o=r(430),a=r(431),i=a&&a.isTypedArray,u=i?o(i):n;e.exports=u},function(e,t){var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&ef))return!1;var p=l.get(e),d=l.get(t);if(p&&d)return p==t&&d==e;var h=-1,b=!0,v=2&r?new n:void 0;for(l.set(e,t),l.set(t,e);++h=t||r<0||v&&e-h>=f}function w(){var e=o();if(m(e))return _(e);p=setTimeout(w,function(e){var r=t-(e-d);return v?u(r,f-(e-h)):r}(e))}function _(e){return p=void 0,g&&l?x(e):(l=c=void 0,s)}function j(){var e=o(),r=m(e);if(l=arguments,c=this,d=e,r){if(void 0===p)return y(d);if(v)return clearTimeout(p),p=setTimeout(w,t),x(d)}return void 0===p&&(p=setTimeout(w,t)),s}return t=a(t)||0,n(r)&&(b=!!r.leading,f=(v="maxWait"in r)?i(a(r.maxWait)||0,t):f,g="trailing"in r?!!r.trailing:g),j.cancel=function(){void 0!==p&&clearTimeout(p),h=0,l=d=c=p=void 0},j.flush=function(){return void 0===p?s:_(o())},j}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var n=Object.assign||function(e){for(var t=1;tf))return!1;var p=l.get(e),d=l.get(t);if(p&&d)return p==t&&d==e;var h=-1,b=!0,v=2&r?new n:void 0;for(l.set(e,t),l.set(t,e);++h0&&void 0!==arguments[0]?arguments[0]:[],r=[];return(0,i.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return r.push(e)})):(0,a.default)(t)?(0,o.default)(t,(function(e,t){!0===e&&r.push(t),r.push(t+"-"+e)})):(0,n.default)(t)&&r.push(t)})),r};t.default=l},function(e,t,r){var n=r(168),o=r(161),a=r(167);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==n(e)}},function(e,t,r){var n=r(177),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=n?n.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(e){}var o=i.call(e);return n&&(t?e[u]=r:delete e[u]),o}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t,r){var n=r(280)();e.exports=n},function(e,t){e.exports=function(e){return function(t,r,n){for(var o=-1,a=Object(t),i=n(t),u=i.length;u--;){var l=i[e?u:++o];if(!1===r(a[l],l,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var r=-1,n=Array(e);++r-1}},function(e,t,r){var n=r(182);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},function(e,t,r){var n=r(181);e.exports=function(){this.__data__=new n,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,r){var n=r(181),o=r(205),a=r(206);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(i)}return r.set(e,t),this.size=r.size,this}},function(e,t,r){var n=r(233),o=r(304),a=r(174),i=r(236),u=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,s=c.hasOwnProperty,p=RegExp("^"+f.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(n(e)?p:u).test(i(e))}},function(e,t,r){var n,o=r(305),a=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!a&&a in e}},function(e,t,r){var n=r(166)["__core-js_shared__"];e.exports=n},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,r){var n=r(308),o=r(181),a=r(205);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||o),string:new n}}},function(e,t,r){var n=r(309),o=r(310),a=r(311),i=r(312),u=r(313);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],r=e.default&&(0,o.default)(e.default)||{};return t.map((function(t){var o=e[t];return o&&(0,n.default)(o,(function(e,t){r[t]||(r[t]={}),r[t]=a({},r[t],o[t])})),t})),r};t.default=u},function(e,t,r){var n=r(353);e.exports=function(e){return n(e,5)}},function(e,t,r){var n=r(203),o=r(354),a=r(248),i=r(356),u=r(357),l=r(360),c=r(361),f=r(362),s=r(363),p=r(240),d=r(364),h=r(185),b=r(365),v=r(366),g=r(371),x=r(161),y=r(197),m=r(373),w=r(174),_=r(375),j=r(178),O=r(210),E={};E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E["[object Function]"]=E["[object WeakMap]"]=!1,e.exports=function e(t,r,C,k,S,P){var M,B=1&r,A=2&r,F=4&r;if(C&&(M=S?C(t,k,S,P):C(t)),void 0!==M)return M;if(!w(t))return t;var R=x(t);if(R){if(M=b(t),!B)return c(t,M)}else{var T=h(t),z="[object Function]"==T||"[object GeneratorFunction]"==T;if(y(t))return l(t,B);if("[object Object]"==T||"[object Arguments]"==T||z&&!S){if(M=A||z?{}:g(t),!B)return A?s(t,u(M,t)):f(t,i(M,t))}else{if(!E[T])return S?t:{};M=v(t,T,B)}}P||(P=new n);var H=P.get(t);if(H)return H;P.set(t,M),_(t)?t.forEach((function(n){M.add(e(n,r,C,n,t,P))})):m(t)&&t.forEach((function(n,o){M.set(o,e(n,r,C,o,t,P))}));var D=R?void 0:(F?A?d:p:A?O:j)(t);return o(D||t,(function(n,o){D&&(n=t[o=n]),a(M,o,e(n,r,C,o,t,P))})),M}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,a,c;u(this,n);for(var f=arguments.length,s=Array(f),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,a,c;u(this,n);for(var f=arguments.length,s=Array(f),p=0;p1&&void 0!==arguments[1])||arguments[1];r[e]=t};return 0===e&&n("first-child"),e===t-1&&n("last-child"),(0===e||e%2==0)&&n("even"),1===Math.abs(e%2)&&n("odd"),n("nth-child",e),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var n=Object.assign||function(e){for(var t=1;ti?1:Math.round(100*f/i)/100,t.a!==s)return{h:t.h,s:t.s,l:t.l,a:s,source:"rgb"}}else{var p=void 0;if(n!==(p=c<0?0:c>a?1:Math.round(100*c/a)/100))return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}return null}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={},o=t.render=function(e,t,r,n){if("undefined"==typeof document&&!n)return null;var o=n?new n:document.createElement("canvas");o.width=2*r,o.height=2*r;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),o.toDataURL()):null};t.get=function(e,t,r,a){var i=e+"-"+t+"-"+r+(a?"-server":"");if(n[i])return n[i];var u=o(e,t,r,a);return n[i]=u,u}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var n=function(){function e(e,t){for(var r=0;r-1)){var o=r.getArrowOffset(),a=38===e.keyCode?n+o:n-o;r.setUpdatedValue(a,e)}},r.handleDrag=function(e){if(r.props.dragLabel){var t=Math.round(r.props.value+e.movementX);t>=0&&t<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(t),e)}},r.handleMouseDown=function(e){r.props.dragLabel&&(e.preventDefault(),r.handleDrag(e),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},r}return function(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)}(t,e),n(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var r=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(r,t);var n,o=function(e){return String(e).indexOf("%")>-1}(t.target.value);this.setState({value:o?(n=e,n+"%"):e})}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(o.PureComponent||o.Component);t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var n=function(){function e(e,t){for(var r=0;ra)f=0;else{f=360*(-100*c/a+100)/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"rgb"}}else{var s=void 0;if(l<0)s=0;else if(l>o)s=359;else{s=360*(100*l/o)/100}if(r.h!==s)return{h:s,s:r.s,l:r.l,a:r.a,source:"rgb"}}return null}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var n=u(r(1)),o=u(r(0)),a=u(r(158)),i=u(r(160));function u(e){return e&&e.__esModule?e:{default:e}}var l=t.Raised=function(e){var t=e.zDepth,r=e.radius,o=e.background,u=e.children,l=e.styles,c=void 0===l?{}:l,f=(0,a.default)((0,i.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:r,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},c),{"zDepth-1":1===t});return n.default.createElement("div",{style:f.wrap},n.default.createElement("div",{style:f.bg}),n.default.createElement("div",{style:f.content},u))};l.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number,styles:o.default.object},l.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}},t.default=l},function(e,t,r){var n=r(213),o=r(253),a=r(255),i=r(418),u=r(163),l=r(260),c=r(259);e.exports=function e(t,r,f,s,p){t!==r&&a(r,(function(a,l){if(p||(p=new n),u(a))i(t,r,l,f,e,s,p);else{var d=s?s(c(t,l),a,l+"",t,r,p):void 0;void 0===d&&(d=a),o(t,l,d)}}),l)}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,r){var n=r(189),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},function(e,t,r){var n=r(189);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},function(e,t,r){var n=r(189);e.exports=function(e){return n(this.__data__,e)>-1}},function(e,t,r){var n=r(189);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},function(e,t,r){var n=r(188);e.exports=function(){this.__data__=new n,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,r){var n=r(188),o=r(214),a=r(216);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(i)}return r.set(e,t),this.size=r.size,this}},function(e,t,r){var n=r(215),o=r(402),a=r(163),i=r(252),u=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,s=c.hasOwnProperty,p=RegExp("^"+f.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(n(e)?p:u).test(i(e))}},function(e,t,r){var n=r(190),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=n?n.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(e){}var o=i.call(e);return n&&(t?e[u]=r:delete e[u]),o}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t,r){var n,o=r(403),a=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!a&&a in e}},function(e,t,r){var n=r(162)["__core-js_shared__"];e.exports=n},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,r){var n=r(406),o=r(188),a=r(214);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||o),string:new n}}},function(e,t,r){var n=r(407),o=r(408),a=r(409),i=r(410),u=r(411);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t1?r[a-1]:void 0,u=a>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(a--,i):void 0,u&&o(r[0],r[1],u)&&(i=a<3?void 0:i,a=1),t=Object(t);++n0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,r){var n=r(179),o=r(176),a=r(223),i=r(163);e.exports=function(e,t,r){if(!i(r))return!1;var u=typeof t;return!!("number"==u?o(r)&&a(t,r.length):"string"==u&&t in r)&&n(r[t],e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var n=function(){function e(e,t){for(var r=0;ro&&(l=o),c<0?c=0:c>a&&(c=a);var f=l/o,s=1-c/a;return{h:t.h,s:f,v:s,a:t.a,source:"rgb"}}},function(e,t,r){e.exports=r(455)},function(e,t,r){var n=r(456),o=r(264),a=r(461),i=r(164);e.exports=function(e,t){return(i(e)?n:o)(e,a(t))}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var e,t,r;l(this,n);for(var o=arguments.length,a=Array(o),i=0;i1&&(e.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),r.props.onChange({h:e.h||r.props.hsl.h,s:Number(e.s&&e.s||r.props.hsl.s),l:Number(e.l&&e.l||r.props.hsl.l),source:"hsl"},t))},r.showHighlight=function(e){e.currentTarget.style.background="#eee"},r.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?r.state={view:"rgb"}:r.state={view:e.view},r}return function(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)}(t,e),n(t,[{key:"render",value:function(){var e=this,t=(0,a.default)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),r=void 0;return"hex"===this.state.view?r=o.default.createElement("div",{style:t.fields,className:"flexbox-fix"},o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?r=o.default.createElement("div",{style:t.fields,className:"flexbox-fix"},o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),o.default.createElement("div",{style:t.alpha},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(r=o.default.createElement("div",{style:t.fields,className:"flexbox-fix"},o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),o.default.createElement("div",{style:t.field},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),o.default.createElement("div",{style:t.alpha},o.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),o.default.createElement("div",{style:t.wrap,className:"flexbox-fix"},r,o.default.createElement("div",{style:t.toggle},o.default.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},o.default.createElement(l.default,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(o.default.Component);f.defaultProps={view:"hex"},t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return i.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:r,width:a,height:l},f)},s),i.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChromePointer=void 0;var n=a(r(1)),o=a(r(158));function a(e){return e&&e.__esModule?e:{default:e}}var i=t.ChromePointer=function(){var e=(0,o.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return n.default.createElement("div",{style:e.picker})};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChromePointerCircle=void 0;var n=a(r(1)),o=a(r(158));function a(e){return e&&e.__esModule?e:{default:e}}var i=t.ChromePointerCircle=function(){var e=(0,o.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return n.default.createElement("div",{style:e.picker})};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Compact=void 0;var n=p(r(1)),o=p(r(0)),a=p(r(158)),i=p(r(172)),u=p(r(160)),l=p(r(165)),c=r(159),f=p(r(514)),s=p(r(515));function p(e){return e&&e.__esModule?e:{default:e}}var d=t.Compact=function(e){var t=e.onChange,r=e.onSwatchHover,o=e.colors,p=e.hex,d=e.rgb,h=e.styles,b=void 0===h?{}:h,v=e.className,g=void 0===v?"":v,x=(0,a.default)((0,u.default)({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},b)),y=function(e,r){e.hex?l.default.isValidHex(e.hex)&&t({hex:e.hex,source:"hex"},r):t(e,r)};return n.default.createElement(c.Raised,{style:x.Compact,styles:b},n.default.createElement("div",{style:x.compact,className:"compact-picker "+g},n.default.createElement("div",null,(0,i.default)(o,(function(e){return n.default.createElement(f.default,{key:e,color:e,active:e.toLowerCase()===p,onClick:y,onSwatchHover:r})})),n.default.createElement("div",{style:x.clear})),n.default.createElement(s.default,{hex:p,rgb:d,onChange:y})))};d.propTypes={colors:o.default.arrayOf(o.default.string),styles:o.default.object},d.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}},t.default=(0,c.ColorWrap)(d)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompactColor=void 0;var n=u(r(1)),o=u(r(158)),a=u(r(165)),i=r(159);function u(e){return e&&e.__esModule?e:{default:e}}var l=t.CompactColor=function(e){var t=e.color,r=e.onClick,u=void 0===r?function(){}:r,l=e.onSwatchHover,c=e.active,f=(0,o.default)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:a.default.getContrastingColor(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:c,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return n.default.createElement(i.Swatch,{style:f.color,color:t,onClick:u,onHover:l,focusStyle:{boxShadow:"0 0 4px "+t}},n.default.createElement("div",{style:f.dot}))};t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompactFields=void 0;var n=i(r(1)),o=i(r(158)),a=r(159);function i(e){return e&&e.__esModule?e:{default:e}}var u=t.CompactFields=function(e){var t=e.hex,r=e.rgb,i=e.onChange,u=(0,o.default)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),l=function(e,t){e.r||e.g||e.b?i({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},t):i({hex:e.hex,source:"hex"},t)};return n.default.createElement("div",{style:u.fields,className:"flexbox-fix"},n.default.createElement("div",{style:u.active}),n.default.createElement(a.EditableInput,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"hex",value:t,onChange:l}),n.default.createElement(a.EditableInput,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:r.r,onChange:l}),n.default.createElement(a.EditableInput,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:r.g,onChange:l}),n.default.createElement(a.EditableInput,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:r.b,onChange:l}))};t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Github=void 0;var n=f(r(1)),o=f(r(0)),a=f(r(158)),i=f(r(172)),u=f(r(160)),l=r(159),c=f(r(517));function f(e){return e&&e.__esModule?e:{default:e}}var s=t.Github=function(e){var t=e.width,r=e.colors,o=e.onChange,l=e.onSwatchHover,f=e.triangle,s=e.styles,p=void 0===s?{}:s,d=e.className,h=void 0===d?"":d,b=(0,a.default)((0,u.default)({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},p),{"hide-triangle":"hide"===f,"top-left-triangle":"top-left"===f,"top-right-triangle":"top-right"===f,"bottom-left-triangle":"bottom-left"===f,"bottom-right-triangle":"bottom-right"===f}),v=function(e,t){return o({hex:e,source:"hex"},t)};return n.default.createElement("div",{style:b.card,className:"github-picker "+h},n.default.createElement("div",{style:b.triangleShadow}),n.default.createElement("div",{style:b.triangle}),(0,i.default)(r,(function(e){return n.default.createElement(c.default,{color:e,key:e,onClick:v,onSwatchHover:l})})))};s.propTypes={width:o.default.oneOfType([o.default.string,o.default.number]),colors:o.default.arrayOf(o.default.string),triangle:o.default.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:o.default.object},s.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},t.default=(0,l.ColorWrap)(s)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GithubSwatch=void 0;var n=u(r(1)),o=r(158),a=u(o),i=r(159);function u(e){return e&&e.__esModule?e:{default:e}}var l=t.GithubSwatch=function(e){var t=e.hover,r=e.color,o=e.onClick,u=e.onSwatchHover,l={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},c=(0,a.default)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:l}},{hover:t});return n.default.createElement("div",{style:c.swatch},n.default.createElement(i.Swatch,{color:r,onClick:o,onHover:u,focusStyle:l}))};t.default=(0,o.handleHover)(l)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HuePicker=void 0;var n=Object.assign||function(e){for(var t=1;t.5});return n.default.createElement("div",{style:r.picker})};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopPointerCircle=void 0;var n=a(r(1)),o=a(r(158));function a(e){return e&&e.__esModule?e:{default:e}}var i=t.PhotoshopPointerCircle=function(){var e=(0,o.default)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return n.default.createElement("div",{style:e.pointer},n.default.createElement("div",{style:e.left},n.default.createElement("div",{style:e.leftInside})),n.default.createElement("div",{style:e.right},n.default.createElement("div",{style:e.rightInside})))};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopButton=void 0;var n=a(r(1)),o=a(r(158));function a(e){return e&&e.__esModule?e:{default:e}}var i=t.PhotoshopButton=function(e){var t=e.onClick,r=e.label,a=e.children,i=e.active,u=(0,o.default)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return n.default.createElement("div",{style:u.button,onClick:t},r||a)};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopPreviews=void 0;var n=a(r(1)),o=a(r(158));function a(e){return e&&e.__esModule?e:{default:e}}var i=t.PhotoshopPreviews=function(e){var t=e.rgb,r=e.currentColor,a=(0,o.default)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return n.default.createElement("div",null,n.default.createElement("div",{style:a.label},"new"),n.default.createElement("div",{style:a.swatches},n.default.createElement("div",{style:a.new}),n.default.createElement("div",{style:a.current})),n.default.createElement("div",{style:a.label},"current"))};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var n=Object.assign||function(e){for(var t=1;t100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},n))};return n.default.createElement("div",{style:f.fields,className:"flexbox-fix"},n.default.createElement("div",{style:f.double},n.default.createElement(i.EditableInput,{style:{input:f.input,label:f.label},label:"hex",value:l.replace("#",""),onChange:s})),n.default.createElement("div",{style:f.single},n.default.createElement(i.EditableInput,{style:{input:f.input,label:f.label},label:"r",value:r.r,onChange:s,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:f.single},n.default.createElement(i.EditableInput,{style:{input:f.input,label:f.label},label:"g",value:r.g,onChange:s,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:f.single},n.default.createElement(i.EditableInput,{style:{input:f.input,label:f.label},label:"b",value:r.b,onChange:s,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:f.alpha},n.default.createElement(i.EditableInput,{style:{input:f.input,label:f.label},label:"a",value:Math.round(100*r.a),onChange:s,dragLabel:"true",dragMax:"100"})))};t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var n=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return i.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:r,width:a,height:l},f)},s),i.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Twitter=void 0;var n=f(r(1)),o=f(r(0)),a=f(r(158)),i=f(r(172)),u=f(r(160)),l=f(r(165)),c=r(159);function f(e){return e&&e.__esModule?e:{default:e}}var s=t.Twitter=function(e){var t=e.onChange,r=e.onSwatchHover,o=e.hex,f=e.colors,s=e.width,p=e.triangle,d=e.styles,h=void 0===d?{}:d,b=e.className,v=void 0===b?"":b,g=(0,a.default)((0,u.default)({default:{card:{width:s,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},h),{"hide-triangle":"hide"===p,"top-left-triangle":"top-left"===p,"top-right-triangle":"top-right"===p}),x=function(e,r){l.default.isValidHex(e)&&t({hex:e,source:"hex"},r)};return n.default.createElement("div",{style:g.card,className:"twitter-picker "+v},n.default.createElement("div",{style:g.triangleShadow}),n.default.createElement("div",{style:g.triangle}),n.default.createElement("div",{style:g.body},(0,i.default)(f,(function(e,t){return n.default.createElement(c.Swatch,{key:t,color:e,hex:e,style:g.swatch,onClick:x,onHover:r,focusStyle:{boxShadow:"0 0 4px "+e}})})),n.default.createElement("div",{style:g.hash},"#"),n.default.createElement(c.EditableInput,{label:null,style:{input:g.input},value:o.replace("#",""),onChange:x}),n.default.createElement("div",{style:g.clear})))};s.propTypes={width:o.default.oneOfType([o.default.string,o.default.number]),triangle:o.default.oneOf(["hide","top-left","top-right"]),colors:o.default.arrayOf(o.default.string),styles:o.default.object},s.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}},t.default=(0,c.ColorWrap)(s)}])]); //# sourceMappingURL=async-colorpicker.js.map ================================================ FILE: inst/deps/bundle.js ================================================ this["dash_daq"] = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/lib/"; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /*!******************!*\ !*** ./index.js ***! \******************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _BooleanSwitch = __webpack_require__(/*! ./components/BooleanSwitch.react */ 1); Object.defineProperty(exports, 'BooleanSwitch', { enumerable: true, get: function get() { return _interopRequireDefault(_BooleanSwitch).default; } }); var _ColorPicker = __webpack_require__(/*! ./components/ColorPicker.react */ 24); Object.defineProperty(exports, 'ColorPicker', { enumerable: true, get: function get() { return _interopRequireDefault(_ColorPicker).default; } }); var _Gauge = __webpack_require__(/*! ./components/Gauge.react */ 413); Object.defineProperty(exports, 'Gauge', { enumerable: true, get: function get() { return _interopRequireDefault(_Gauge).default; } }); var _GraduatedBar = __webpack_require__(/*! ./components/GraduatedBar.react */ 425); Object.defineProperty(exports, 'GraduatedBar', { enumerable: true, get: function get() { return _interopRequireDefault(_GraduatedBar).default; } }); var _Indicator = __webpack_require__(/*! ./components/Indicator.react */ 427); Object.defineProperty(exports, 'Indicator', { enumerable: true, get: function get() { return _interopRequireDefault(_Indicator).default; } }); var _Knob = __webpack_require__(/*! ./components/Knob.react */ 428); Object.defineProperty(exports, 'Knob', { enumerable: true, get: function get() { return _interopRequireDefault(_Knob).default; } }); var _LEDDisplay = __webpack_require__(/*! ./components/LEDDisplay.react */ 431); Object.defineProperty(exports, 'LEDDisplay', { enumerable: true, get: function get() { return _interopRequireDefault(_LEDDisplay).default; } }); var _NumericInput = __webpack_require__(/*! ./components/NumericInput.react */ 434); Object.defineProperty(exports, 'NumericInput', { enumerable: true, get: function get() { return _interopRequireDefault(_NumericInput).default; } }); var _PowerButton = __webpack_require__(/*! ./components/PowerButton.react */ 436); Object.defineProperty(exports, 'PowerButton', { enumerable: true, get: function get() { return _interopRequireDefault(_PowerButton).default; } }); var _PrecisionInput = __webpack_require__(/*! ./components/PrecisionInput.react */ 439); Object.defineProperty(exports, 'PrecisionInput', { enumerable: true, get: function get() { return _interopRequireDefault(_PrecisionInput).default; } }); var _StopButton = __webpack_require__(/*! ./components/StopButton.react */ 441); Object.defineProperty(exports, 'StopButton', { enumerable: true, get: function get() { return _interopRequireDefault(_StopButton).default; } }); var _Slider = __webpack_require__(/*! ./components/Slider.react */ 443); Object.defineProperty(exports, 'Slider', { enumerable: true, get: function get() { return _interopRequireDefault(_Slider).default; } }); var _Tank = __webpack_require__(/*! ./components/Tank.react */ 928); Object.defineProperty(exports, 'Tank', { enumerable: true, get: function get() { return _interopRequireDefault(_Tank).default; } }); var _Thermometer = __webpack_require__(/*! ./components/Thermometer.react */ 930); Object.defineProperty(exports, 'Thermometer', { enumerable: true, get: function get() { return _interopRequireDefault(_Thermometer).default; } }); var _ToggleSwitch = __webpack_require__(/*! ./components/ToggleSwitch.react */ 19); Object.defineProperty(exports, 'ToggleSwitch', { enumerable: true, get: function get() { return _interopRequireDefault(_ToggleSwitch).default; } }); var _DarkThemeProvider = __webpack_require__(/*! ./components/DarkThemeProvider.react */ 932); Object.defineProperty(exports, 'DarkThemeProvider', { enumerable: true, get: function get() { return _interopRequireDefault(_DarkThemeProvider).default; } }); var _Joystick = __webpack_require__(/*! ./components/Joystick.react */ 933); Object.defineProperty(exports, 'Joystick', { enumerable: true, get: function get() { return _interopRequireDefault(_Joystick).default; } }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), /* 1 */ /*!*******************************************!*\ !*** ./components/BooleanSwitch.react.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var Component = _react.Component; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var withTheme = _styledComponents.withTheme; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; var _ToggleSwitch = __webpack_require__(/*! ./ToggleSwitch.react */ 19); var ToggleSwitch = _interopRequireDefault(_ToggleSwitch).default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * A switch component that toggles * between on and off. */ var BooleanSwitch = function (_Component) { _inherits(BooleanSwitch, _Component); function BooleanSwitch(props) { _classCallCheck(this, BooleanSwitch); var _this = _possibleConstructorReturn(this, (BooleanSwitch.__proto__ || Object.getPrototypeOf(BooleanSwitch)).call(this, props)); _this.state = { on: props.on }; _this.setPropsOverride = _this.setPropsOverride.bind(_this); return _this; } _createClass(BooleanSwitch, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(newProps) { if (newProps.on !== this.state.on) this.setState({ on: newProps.on }); } }, { key: 'setPropsOverride', value: function setPropsOverride(_ref) { var value = _ref.value; this.setState({ on: value }); if (this.props.setProps) this.props.setProps({ on: value }); } }, { key: 'render', value: function render() { return React.createElement(ToggleSwitch, _extends({}, this.props, { value: this.state.on, setProps: this.setPropsOverride, booleanSwitch: true, color: this.props.color || this.props.theme.primary })); } }]); return BooleanSwitch; }(Component); BooleanSwitch.defaultProps = { on: false, vertical: false, theme: light, labelPosition: 'top' }; BooleanSwitch.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * Whether or not the switch is on */ on: PropTypes.bool, /** * Color to highlight active switch background */ color: PropTypes.string, /** * If true, switch will be vertical instead * of horizontal */ vertical: PropTypes.bool, /** * If true, switch cannot be clicked */ disabled: PropTypes.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root object. */ style: PropTypes.object, /** * Dash-assigned callback that gets fired when * switch is toggled. */ setProps: PropTypes.func }; exports.default = withTheme(BooleanSwitch); /***/ }), /* 2 */ /*!************************!*\ !*** external "React" ***! \************************/ /***/ (function(module, exports) { (function() { module.exports = this["React"]; }()); /***/ }), /* 3 */ /*!********************************!*\ !*** ../~/prop-types/index.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (true) { var ReactIs = __webpack_require__(/*! react-is */ 4); // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ 6)(ReactIs.isElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = require('./factoryWithThrowingShims')(); } /***/ }), /* 4 */ /*!******************************!*\ !*** ../~/react-is/index.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; if (false) { module.exports = require('./cjs/react-is.production.min.js'); } else { module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ 5); } /***/ }), /* 5 */ /*!*************************************************!*\ !*** ../~/react-is/cjs/react-is.development.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { /** @license React v16.8.6 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; if (true) { (function() { 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); // The Symbol used to tag the ReactElement-like types. If there is no native Symbol // nor polyfill, then a plain number is used for performance. var hasSymbol = typeof Symbol === 'function' && Symbol.for; var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; function isValidElementType(type) { return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE); } /** * Forked from fbjs/warning: * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js * * Only change is we use console.warn instead of console.error, * and do nothing when 'console' is not supported. * This really simplifies the code. * --- * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var lowPriorityWarning = function () {}; { var printWarning = function (format) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.warn(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; lowPriorityWarning = function (condition, format) { if (format === undefined) { throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (!condition) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } printWarning.apply(undefined, [format].concat(args)); } }; } var lowPriorityWarning$1 = lowPriorityWarning; function typeOf(object) { if (typeof object === 'object' && object !== null) { var $$typeof = object.$$typeof; switch ($$typeof) { case REACT_ELEMENT_TYPE: var type = object.type; switch (type) { case REACT_ASYNC_MODE_TYPE: case REACT_CONCURRENT_MODE_TYPE: case REACT_FRAGMENT_TYPE: case REACT_PROFILER_TYPE: case REACT_STRICT_MODE_TYPE: case REACT_SUSPENSE_TYPE: return type; default: var $$typeofType = type && type.$$typeof; switch ($$typeofType) { case REACT_CONTEXT_TYPE: case REACT_FORWARD_REF_TYPE: case REACT_PROVIDER_TYPE: return $$typeofType; default: return $$typeof; } } case REACT_LAZY_TYPE: case REACT_MEMO_TYPE: case REACT_PORTAL_TYPE: return $$typeof; } } return undefined; } // AsyncMode is deprecated along with isAsyncMode var AsyncMode = REACT_ASYNC_MODE_TYPE; var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; var ContextConsumer = REACT_CONTEXT_TYPE; var ContextProvider = REACT_PROVIDER_TYPE; var Element = REACT_ELEMENT_TYPE; var ForwardRef = REACT_FORWARD_REF_TYPE; var Fragment = REACT_FRAGMENT_TYPE; var Lazy = REACT_LAZY_TYPE; var Memo = REACT_MEMO_TYPE; var Portal = REACT_PORTAL_TYPE; var Profiler = REACT_PROFILER_TYPE; var StrictMode = REACT_STRICT_MODE_TYPE; var Suspense = REACT_SUSPENSE_TYPE; var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated function isAsyncMode(object) { { if (!hasWarnedAboutDeprecatedIsAsyncMode) { hasWarnedAboutDeprecatedIsAsyncMode = true; lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); } } return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; } function isConcurrentMode(object) { return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; } function isContextConsumer(object) { return typeOf(object) === REACT_CONTEXT_TYPE; } function isContextProvider(object) { return typeOf(object) === REACT_PROVIDER_TYPE; } function isElement(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } function isForwardRef(object) { return typeOf(object) === REACT_FORWARD_REF_TYPE; } function isFragment(object) { return typeOf(object) === REACT_FRAGMENT_TYPE; } function isLazy(object) { return typeOf(object) === REACT_LAZY_TYPE; } function isMemo(object) { return typeOf(object) === REACT_MEMO_TYPE; } function isPortal(object) { return typeOf(object) === REACT_PORTAL_TYPE; } function isProfiler(object) { return typeOf(object) === REACT_PROFILER_TYPE; } function isStrictMode(object) { return typeOf(object) === REACT_STRICT_MODE_TYPE; } function isSuspense(object) { return typeOf(object) === REACT_SUSPENSE_TYPE; } exports.typeOf = typeOf; exports.AsyncMode = AsyncMode; exports.ConcurrentMode = ConcurrentMode; exports.ContextConsumer = ContextConsumer; exports.ContextProvider = ContextProvider; exports.Element = Element; exports.ForwardRef = ForwardRef; exports.Fragment = Fragment; exports.Lazy = Lazy; exports.Memo = Memo; exports.Portal = Portal; exports.Profiler = Profiler; exports.StrictMode = StrictMode; exports.Suspense = Suspense; exports.isValidElementType = isValidElementType; exports.isAsyncMode = isAsyncMode; exports.isConcurrentMode = isConcurrentMode; exports.isContextConsumer = isContextConsumer; exports.isContextProvider = isContextProvider; exports.isElement = isElement; exports.isForwardRef = isForwardRef; exports.isFragment = isFragment; exports.isLazy = isLazy; exports.isMemo = isMemo; exports.isPortal = isPortal; exports.isProfiler = isProfiler; exports.isStrictMode = isStrictMode; exports.isSuspense = isSuspense; })(); } /***/ }), /* 6 */ /*!**************************************************!*\ !*** ../~/prop-types/factoryWithTypeCheckers.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; var ReactIs = __webpack_require__(/*! react-is */ 4); var assign = __webpack_require__(/*! object-assign */ 7); var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ 8); var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ 9); var has = Function.call.bind(Object.prototype.hasOwnProperty); var printWarning = function() {}; if (true) { printWarning = function(text) { var message = 'Warning: ' + text; if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; } function emptyFunctionThatReturnsNull() { return null; } module.exports = function(isValidElement, throwOnDirectAccess) { /* global Symbol */ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. /** * Returns the iterator method function contained on the iterable object. * * Be sure to invoke the function with the iterable as context: * * var iteratorFn = getIteratorFn(myIterable); * if (iteratorFn) { * var iterator = iteratorFn.call(myIterable); * ... * } * * @param {?object} maybeIterable * @return {?function} */ function getIteratorFn(maybeIterable) { var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); if (typeof iteratorFn === 'function') { return iteratorFn; } } /** * Collection of methods that allow declaration and validation of props that are * supplied to React components. Example usage: * * var Props = require('ReactPropTypes'); * var MyArticle = React.createClass({ * propTypes: { * // An optional string prop named "description". * description: Props.string, * * // A required enum prop named "category". * category: Props.oneOf(['News','Photos']).isRequired, * * // A prop named "dialog" that requires an instance of Dialog. * dialog: Props.instanceOf(Dialog).isRequired * }, * render: function() { ... } * }); * * A more formal specification of how these methods are used: * * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) * decl := ReactPropTypes.{type}(.isRequired)? * * Each and every declaration produces a function with the same signature. This * allows the creation of custom validation functions. For example: * * var MyLink = React.createClass({ * propTypes: { * // An optional string or URI prop named "href". * href: function(props, propName, componentName) { * var propValue = props[propName]; * if (propValue != null && typeof propValue !== 'string' && * !(propValue instanceof URI)) { * return new Error( * 'Expected a string or an URI for ' + propName + ' in ' + * componentName * ); * } * } * }, * render: function() {...} * }); * * @internal */ var ANONYMOUS = '<>'; // Important! // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. var ReactPropTypes = { array: createPrimitiveTypeChecker('array'), bool: createPrimitiveTypeChecker('boolean'), func: createPrimitiveTypeChecker('function'), number: createPrimitiveTypeChecker('number'), object: createPrimitiveTypeChecker('object'), string: createPrimitiveTypeChecker('string'), symbol: createPrimitiveTypeChecker('symbol'), any: createAnyTypeChecker(), arrayOf: createArrayOfTypeChecker, element: createElementTypeChecker(), elementType: createElementTypeTypeChecker(), instanceOf: createInstanceTypeChecker, node: createNodeChecker(), objectOf: createObjectOfTypeChecker, oneOf: createEnumTypeChecker, oneOfType: createUnionTypeChecker, shape: createShapeTypeChecker, exact: createStrictShapeTypeChecker, }; /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ /*eslint-disable no-self-compare*/ function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } } /*eslint-enable no-self-compare*/ /** * We use an Error-like object for backward compatibility as people may call * PropTypes directly and inspect their output. However, we don't use real * Errors anymore. We don't inspect their stack anyway, and creating them * is prohibitively expensive if they are created too often, such as what * happens in oneOfType() for any type before the one that matched. */ function PropTypeError(message) { this.message = message; this.stack = ''; } // Make `instanceof Error` still work for returned errors. PropTypeError.prototype = Error.prototype; function createChainableTypeChecker(validate) { if (true) { var manualPropTypeCallCache = {}; var manualPropTypeWarningCount = 0; } function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { componentName = componentName || ANONYMOUS; propFullName = propFullName || propName; if (secret !== ReactPropTypesSecret) { if (throwOnDirectAccess) { // New behavior only for users of `prop-types` package var err = new Error( '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' ); err.name = 'Invariant Violation'; throw err; } else if (("development") !== 'production' && typeof console !== 'undefined') { // Old behavior for people using React.PropTypes var cacheKey = componentName + ':' + propName; if ( !manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors manualPropTypeWarningCount < 3 ) { printWarning( 'You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. 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.' ); manualPropTypeCallCache[cacheKey] = true; manualPropTypeWarningCount++; } } } if (props[propName] == null) { if (isRequired) { if (props[propName] === null) { return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); } return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); } return null; } else { return validate(props, propName, componentName, location, propFullName); } } var chainedCheckType = checkType.bind(null, false); chainedCheckType.isRequired = checkType.bind(null, true); return chainedCheckType; } function createPrimitiveTypeChecker(expectedType) { function validate(props, propName, componentName, location, propFullName, secret) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== expectedType) { // `propValue` being instance of, say, date/regexp, pass the 'object' // check, but we can offer a more precise error message here rather than // 'of type `object`'. var preciseType = getPreciseType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); } return null; } return createChainableTypeChecker(validate); } function createAnyTypeChecker() { return createChainableTypeChecker(emptyFunctionThatReturnsNull); } function createArrayOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); } var propValue = props[propName]; if (!Array.isArray(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); } for (var i = 0; i < propValue.length; i++) { var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); if (error instanceof Error) { return error; } } return null; } return createChainableTypeChecker(validate); } function createElementTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!isValidElement(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); } return null; } return createChainableTypeChecker(validate); } function createElementTypeTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!ReactIs.isValidElementType(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); } return null; } return createChainableTypeChecker(validate); } function createInstanceTypeChecker(expectedClass) { function validate(props, propName, componentName, location, propFullName) { if (!(props[propName] instanceof expectedClass)) { var expectedClassName = expectedClass.name || ANONYMOUS; var actualClassName = getClassName(props[propName]); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); } return null; } return createChainableTypeChecker(validate); } function createEnumTypeChecker(expectedValues) { if (!Array.isArray(expectedValues)) { if (true) { if (arguments.length > 1) { printWarning( 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' ); } else { printWarning('Invalid argument supplied to oneOf, expected an array.'); } } return emptyFunctionThatReturnsNull; } function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; for (var i = 0; i < expectedValues.length; i++) { if (is(propValue, expectedValues[i])) { return null; } } var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { var type = getPreciseType(value); if (type === 'symbol') { return String(value); } return value; }); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); } return createChainableTypeChecker(validate); } function createObjectOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); } var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); } for (var key in propValue) { if (has(propValue, key)) { var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error instanceof Error) { return error; } } } return null; } return createChainableTypeChecker(validate); } function createUnionTypeChecker(arrayOfTypeCheckers) { if (!Array.isArray(arrayOfTypeCheckers)) { true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; return emptyFunctionThatReturnsNull; } for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (typeof checker !== 'function') { printWarning( 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' ); return emptyFunctionThatReturnsNull; } } function validate(props, propName, componentName, location, propFullName) { for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { return null; } } return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); } return createChainableTypeChecker(validate); } function createNodeChecker() { function validate(props, propName, componentName, location, propFullName) { if (!isNode(props[propName])) { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); } return null; } return createChainableTypeChecker(validate); } function createShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } for (var key in shapeTypes) { var checker = shapeTypes[key]; if (!checker) { continue; } var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error) { return error; } } return null; } return createChainableTypeChecker(validate); } function createStrictShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } // We need to check all keys in case some are required but missing from // props. var allKeys = assign({}, props[propName], shapeTypes); for (var key in allKeys) { var checker = shapeTypes[key]; if (!checker) { return new PropTypeError( 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') ); } var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error) { return error; } } return null; } return createChainableTypeChecker(validate); } function isNode(propValue) { switch (typeof propValue) { case 'number': case 'string': case 'undefined': return true; case 'boolean': return !propValue; case 'object': if (Array.isArray(propValue)) { return propValue.every(isNode); } if (propValue === null || isValidElement(propValue)) { return true; } var iteratorFn = getIteratorFn(propValue); if (iteratorFn) { var iterator = iteratorFn.call(propValue); var step; if (iteratorFn !== propValue.entries) { while (!(step = iterator.next()).done) { if (!isNode(step.value)) { return false; } } } else { // Iterator will provide entry [k,v] tuples rather than values. while (!(step = iterator.next()).done) { var entry = step.value; if (entry) { if (!isNode(entry[1])) { return false; } } } } } else { return false; } return true; default: return false; } } function isSymbol(propType, propValue) { // Native Symbol. if (propType === 'symbol') { return true; } // falsy value can't be a Symbol if (!propValue) { return false; } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' if (propValue['@@toStringTag'] === 'Symbol') { return true; } // Fallback for non-spec compliant Symbols which are polyfilled. if (typeof Symbol === 'function' && propValue instanceof Symbol) { return true; } return false; } // Equivalent of `typeof` but with special handling for array and regexp. function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ // passes PropTypes.object. return 'object'; } if (isSymbol(propType, propValue)) { return 'symbol'; } return propType; } // This handles more types than `getPropType`. Only used for error messages. // See `createPrimitiveTypeChecker`. function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp) { return 'regexp'; } } return propType; } // Returns a string that is postfixed to a warning about an invalid type. // For example, "undefined" or "of type array" function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } } // Returns class name of the object, if any. function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; } ReactPropTypes.checkPropTypes = checkPropTypes; ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /* 7 */ /*!***********************************!*\ !*** ../~/object-assign/index.js ***! \***********************************/ /***/ (function(module, exports) { /* object-assign (c) Sindre Sorhus @license MIT */ 'use strict'; /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } module.exports = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; /***/ }), /* 8 */ /*!***************************************************!*\ !*** ../~/prop-types/lib/ReactPropTypesSecret.js ***! \***************************************************/ /***/ (function(module, exports) { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 9 */ /*!*****************************************!*\ !*** ../~/prop-types/checkPropTypes.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; var printWarning = function() {}; if (true) { var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ 8); var loggedTypeFailures = {}; var has = Function.call.bind(Object.prototype.hasOwnProperty); printWarning = function(text) { var message = 'Warning: ' + text; if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; } /** * Assert that the values match with the type specs. * Error messages are memorized and will only be shown once. * * @param {object} typeSpecs Map of name to a ReactPropType * @param {object} values Runtime values that need to be type-checked * @param {string} location e.g. "prop", "context", "child context" * @param {string} componentName Name of the component for error messages. * @param {?Function} getStack Returns the component stack. * @private */ function checkPropTypes(typeSpecs, values, location, componentName, getStack) { if (true) { for (var typeSpecName in typeSpecs) { if (has(typeSpecs, typeSpecName)) { var error; // Prop type validation may throw. In case they do, we don't want to // fail the render phase where it didn't fail before. So we log it. // After these have been cleaned up, we'll let them throw. try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. if (typeof typeSpecs[typeSpecName] !== 'function') { var err = Error( (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' ); err.name = 'Invariant Violation'; throw err; } error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); } catch (ex) { error = ex; } if (error && !(error instanceof Error)) { printWarning( (componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).' ); } if (error instanceof Error && !(error.message in loggedTypeFailures)) { // Only monitor this failure once because there tends to be a lot of the // same error. loggedTypeFailures[error.message] = true; var stack = getStack ? getStack() : ''; printWarning( 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') ); } } } } } /** * Resets warning cache when testing. * * @private */ checkPropTypes.resetWarningCache = function() { if (true) { loggedTypeFailures = {}; } } module.exports = checkPropTypes; /***/ }), /* 10 */ /*!********************************************************************!*\ !*** ../~/styled-components/dist/styled-components.browser.cjs.js ***! \********************************************************************/ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process, module) {'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var hyphenate = _interopDefault(__webpack_require__(/*! fbjs/lib/hyphenateStyleName */ 13)); var React = __webpack_require__(/*! react */ 2); var React__default = _interopDefault(React); var Stylis = _interopDefault(__webpack_require__(/*! stylis */ 15)); var _insertRulePlugin = _interopDefault(__webpack_require__(/*! stylis-rule-sheet */ 16)); var PropTypes = _interopDefault(__webpack_require__(/*! prop-types */ 3)); var hoistStatics = _interopDefault(__webpack_require__(/*! hoist-non-react-statics */ 17)); var reactIs = __webpack_require__(/*! react-is */ 4); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; var createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }; var objectWithoutProperties = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }; var possibleConstructorReturn = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }; // var isPlainObject = (function (x) { return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x.constructor === Object; }); // /** * Parse errors.md and turn it into a simple hash of code: message */ var ERRORS = true ? { "1": "Cannot create styled-component for component: %s.\n\n", "2": "Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n* Are you trying to reuse it across renders?\n* Are you accidentally calling collectStyles twice?\n\n", "3": "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n", "4": "The `StyleSheetManager` expects a valid target or sheet prop!\n\n* Does this error occur on the client and is your target falsy?\n* Does this error occur on the server and is the sheet falsy?\n\n", "5": "The clone method cannot be used on the client!\n\n* Are you running in a client-like environment on the server?\n* Are you trying to run SSR on the client?\n\n", "6": "Trying to insert a new style tag, but the given Node is unmounted!\n\n* Are you using a custom target that isn't mounted?\n* Does your document not have a valid head element?\n* Have you accidentally removed a style tag manually?\n\n", "7": "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n", "8": "ThemeProvider: Please make your \"theme\" prop an object.\n\n", "9": "Missing document ``\n\n", "10": "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n", "11": "A plain React class (%s) has been interpolated into styles, probably as a component selector (https://www.styled-components.com/docs/advanced#referring-to-other-components). Only styled-component classes can be targeted in this fashion." } : {}; /** * super basic version of sprintf */ function format() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var a = args[0]; var b = []; var c = void 0; for (c = 1; c < args.length; c += 1) { b.push(args[c]); } b.forEach(function (d) { a = a.replace(/%[a-z]/, d); }); return a; } /** * Create an error file out of errors.md for development and a simple web link to the full errors * in production mode. */ var StyledComponentsError = function (_Error) { inherits(StyledComponentsError, _Error); function StyledComponentsError(code) { classCallCheck(this, StyledComponentsError); for (var _len2 = arguments.length, interpolations = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { interpolations[_key2 - 1] = arguments[_key2]; } if (false) { var _this = possibleConstructorReturn(this, _Error.call(this, 'An error occurred. See https://github.com/styled-components/styled-components/blob/master/src/utils/errors.md#' + code + ' for more information. ' + (interpolations ? 'Additional arguments: ' + interpolations.join(', ') : ''))); } else { var _this = possibleConstructorReturn(this, _Error.call(this, format.apply(undefined, [ERRORS[code]].concat(interpolations)))); } return possibleConstructorReturn(_this); } return StyledComponentsError; }(Error); // var objToCss = function objToCss(obj, prevKey) { var css = Object.keys(obj).filter(function (key) { var chunk = obj[key]; return chunk !== undefined && chunk !== null && chunk !== false && chunk !== ''; }).map(function (key) { if (isPlainObject(obj[key])) return objToCss(obj[key], key); return hyphenate(key) + ': ' + obj[key] + ';'; }).join(' '); return prevKey ? prevKey + ' {\n ' + css + '\n}' : css; }; var flatten = function flatten(chunks, executionContext) { return chunks.reduce(function (ruleSet, chunk) { /* Remove falsey values */ if (chunk === undefined || chunk === null || chunk === false || chunk === '') { return ruleSet; } /* Flatten ruleSet */ if (Array.isArray(chunk)) { ruleSet.push.apply(ruleSet, flatten(chunk, executionContext)); return ruleSet; } /* Handle other components */ if (chunk.hasOwnProperty('styledComponentId')) { // $FlowFixMe not sure how to make this pass ruleSet.push('.' + chunk.styledComponentId); return ruleSet; } /* Either execute or defer the function */ if (typeof chunk === 'function') { if (executionContext) { var nextChunk = chunk(executionContext); /* Throw if a React Element was given styles */ if (React__default.isValidElement(nextChunk)) { var elementName = chunk.displayName || chunk.name; throw new StyledComponentsError(11, elementName); } ruleSet.push.apply(ruleSet, flatten([nextChunk], executionContext)); } else ruleSet.push(chunk); return ruleSet; } /* Handle objects */ ruleSet.push( // $FlowFixMe have to add %checks somehow to isPlainObject isPlainObject(chunk) ? objToCss(chunk) : chunk.toString()); return ruleSet; }, []); }; // var COMMENT_REGEX = /^\s*\/\/.*$/gm; // NOTE: This stylis instance is only used to split rules from SSR'd style tags var stylisSplitter = new Stylis({ global: false, cascade: true, keyframe: false, prefix: false, compress: false, semicolon: true }); var stylis = new Stylis({ global: false, cascade: true, keyframe: false, prefix: true, compress: false, semicolon: false // NOTE: This means "autocomplete missing semicolons" }); // Wrap `insertRulePlugin to build a list of rules, // and then make our own plugin to return the rules. This // makes it easier to hook into the existing SSR architecture var parsingRules = []; // eslint-disable-next-line consistent-return var returnRulesPlugin = function returnRulesPlugin(context) { if (context === -2) { var parsedRules = parsingRules; parsingRules = []; return parsedRules; } }; var parseRulesPlugin = _insertRulePlugin(function (rule) { parsingRules.push(rule); }); stylis.use([parseRulesPlugin, returnRulesPlugin]); stylisSplitter.use([parseRulesPlugin, returnRulesPlugin]); var stringifyRules = function stringifyRules(rules, selector, prefix) { var flatCSS = rules.join('').replace(COMMENT_REGEX, ''); // replace JS comments var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS; return stylis(prefix || !selector ? '' : selector, cssStr); }; var splitByRules = function splitByRules(css) { return stylisSplitter('', css); }; // function isStyledComponent(target) /* : %checks */{ return ( // $FlowFixMe TODO: flow for styledComponentId typeof target === 'function' && typeof target.styledComponentId === 'string' ); } // /* This function is DEPRECATED and will be removed on the next major version release. * It was needed to rehydrate all style blocks prepended to chunks before React * tries to rehydrate its HTML stream. Since the master StyleSheet will now detect * the use of streamed style tags and will perform the rehydration earlier when needed * this function will not be needed anymore */ function consolidateStreamedStyles() { if (true) { // eslint-disable-next-line no-console console.warn('styled-components automatically does streaming SSR rehydration now.\n' + 'Calling consolidateStreamedStyles manually is no longer necessary and a noop now.\n' + '- Please remove the consolidateStreamedStyles call from your client.'); } } // /* eslint-disable no-bitwise */ /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised * counterparts */ var charsLength = 52; /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */ var getAlphabeticChar = function getAlphabeticChar(code) { return String.fromCharCode(code + (code > 25 ? 39 : 97)); }; /* input a number, usually a hash and convert it to base-52 */ var generateAlphabeticName = function generateAlphabeticName(code) { var name = ''; var x = void 0; /* get a char and divide by alphabet-length */ for (x = code; x > charsLength; x = Math.floor(x / charsLength)) { name = getAlphabeticChar(x % charsLength) + name; } return getAlphabeticChar(x % charsLength) + name; }; // var interleave = (function (strings, interpolations) { var result = [strings[0]]; for (var i = 0, len = interpolations.length; i < len; i += 1) { result.push(interpolations[i], strings[i + 1]); } return result; }); // var EMPTY_ARRAY = Object.freeze([]); var EMPTY_OBJECT = Object.freeze({}); // var css = (function (styles) { for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { interpolations[_key - 1] = arguments[_key]; } if (typeof styles === 'function' || isPlainObject(styles)) { // $FlowFixMe return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations))); } // $FlowFixMe return flatten(interleave(styles, interpolations)); }); // var SC_ATTR = typeof process !== 'undefined' && ({"NODE_ENV":"development"}).SC_ATTR || 'data-styled-components'; var SC_STREAM_ATTR = 'data-styled-streamed'; var CONTEXT_KEY = '__styled-components-stylesheet__'; var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window; var DISABLE_SPEEDY = ("development") !== 'production'; // var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm; var extractComps = (function (maybeCSS) { var css = '' + (maybeCSS || ''); // Definitely a string, and a clone var existingComponents = []; css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) { existingComponents.push({ componentId: componentId, matchIndex: matchIndex }); return match; }); return existingComponents.map(function (_ref, i) { var componentId = _ref.componentId, matchIndex = _ref.matchIndex; var nextComp = existingComponents[i + 1]; var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex); return { componentId: componentId, cssFromDOM: cssFromDOM }; }); }); // /* eslint-disable camelcase, no-undef */ var getNonce = (function () { return typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null; }); // // Helper to call a given function, only once var once = (function (cb) { var called = false; return function () { if (!called) { called = true; cb(); } }; }); // /* These are helpers for the StyleTags to keep track of the injected * rule names for each (component) ID that they're keeping track of. * They're crucial for detecting whether a name has already been * injected. * (This excludes rehydrated names) */ /* adds a new ID:name pairing to a names dictionary */ var addNameForId = function addNameForId(names, id, name) { if (name) { // eslint-disable-next-line no-param-reassign var namesForId = names[id] || (names[id] = Object.create(null)); namesForId[name] = true; } }; /* resets an ID entirely by overwriting it in the dictionary */ var resetIdNames = function resetIdNames(names, id) { // eslint-disable-next-line no-param-reassign names[id] = Object.create(null); }; /* factory for a names dictionary checking the existance of an ID:name pairing */ var hasNameForId = function hasNameForId(names) { return function (id, name) { return names[id] !== undefined && names[id][name]; }; }; /* stringifies names for the html/element output */ var stringifyNames = function stringifyNames(names) { var str = ''; // eslint-disable-next-line guard-for-in for (var id in names) { str += Object.keys(names[id]).join(' ') + ' '; } return str.trim(); }; /* clones the nested names dictionary */ var cloneNames = function cloneNames(names) { var clone = Object.create(null); // eslint-disable-next-line guard-for-in for (var id in names) { clone[id] = _extends({}, names[id]); } return clone; }; // /* These are helpers that deal with the insertRule (aka speedy) API * They are used in the StyleTags and specifically the speedy tag */ /* retrieve a sheet for a given style tag */ var sheetForTag = function sheetForTag(tag) { // $FlowFixMe if (tag.sheet) return tag.sheet; /* Firefox quirk requires us to step through all stylesheets to find one owned by the given tag */ var size = document.styleSheets.length; for (var i = 0; i < size; i += 1) { var sheet = document.styleSheets[i]; // $FlowFixMe if (sheet.ownerNode === tag) return sheet; } /* we should always be able to find a tag */ throw new StyledComponentsError(10); }; /* insert a rule safely and return whether it was actually injected */ var safeInsertRule = function safeInsertRule(sheet, cssRule, index) { /* abort early if cssRule string is falsy */ if (!cssRule) return false; var maxIndex = sheet.cssRules.length; try { /* use insertRule and cap passed index with maxIndex (no of cssRules) */ sheet.insertRule(cssRule, index <= maxIndex ? index : maxIndex); } catch (err) { /* any error indicates an invalid rule */ return false; } return true; }; /* deletes `size` rules starting from `removalIndex` */ var deleteRules = function deleteRules(sheet, removalIndex, size) { var lowerBound = removalIndex - size; for (var i = removalIndex; i > lowerBound; i -= 1) { sheet.deleteRule(i); } }; // /* this marker separates component styles and is important for rehydration */ var makeTextMarker = function makeTextMarker(id) { return '\n/* sc-component-id: ' + id + ' */\n'; }; /* add up all numbers in array up until and including the index */ var addUpUntilIndex = function addUpUntilIndex(sizes, index) { var totalUpToIndex = 0; for (var i = 0; i <= index; i += 1) { totalUpToIndex += sizes[i]; } return totalUpToIndex; }; /* create a new style tag after lastEl */ var makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) { var el = document.createElement('style'); el.setAttribute(SC_ATTR, ''); var nonce = getNonce(); if (nonce) { el.setAttribute('nonce', nonce); } /* Work around insertRule quirk in EdgeHTML */ el.appendChild(document.createTextNode('')); if (target && !tagEl) { /* Append to target when no previous element was passed */ target.appendChild(el); } else { if (!tagEl || !target || !tagEl.parentNode) { throw new StyledComponentsError(6); } /* Insert new style tag after the previous one */ tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling); } return el; }; /* takes a css factory function and outputs an html styled tag factory */ var wrapAsHtmlTag = function wrapAsHtmlTag(css, names) { return function (additionalAttrs) { var nonce = getNonce(); var attrs = [nonce && 'nonce="' + nonce + '"', SC_ATTR + '="' + stringifyNames(names) + '"', additionalAttrs]; var htmlAttr = attrs.filter(Boolean).join(' '); return ''; }; }; /* takes a css factory function and outputs an element factory */ var wrapAsElement = function wrapAsElement(css, names) { return function () { var _props; var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props); var nonce = getNonce(); if (nonce) { // $FlowFixMe props.nonce = nonce; } // eslint-disable-next-line react/no-danger return React__default.createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } })); }; }; var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) { return function () { return Object.keys(markers); }; }; /* speedy tags utilise insertRule */ var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) { var names = Object.create(null); var markers = Object.create(null); var sizes = []; var extractImport = getImportRuleTag !== undefined; /* indicates whther getImportRuleTag was called */ var usedImportRuleTag = false; var insertMarker = function insertMarker(id) { var prev = markers[id]; if (prev !== undefined) { return prev; } markers[id] = sizes.length; sizes.push(0); resetIdNames(names, id); return markers[id]; }; var insertRules = function insertRules(id, cssRules, name) { var marker = insertMarker(id); var sheet = sheetForTag(el); var insertIndex = addUpUntilIndex(sizes, marker); var injectedRules = 0; var importRules = []; var cssRulesSize = cssRules.length; for (var i = 0; i < cssRulesSize; i += 1) { var cssRule = cssRules[i]; var mayHaveImport = extractImport; /* @import rules are reordered to appear first */ if (mayHaveImport && cssRule.indexOf('@import') !== -1) { importRules.push(cssRule); } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) { mayHaveImport = false; injectedRules += 1; } } if (extractImport && importRules.length > 0) { usedImportRuleTag = true; // $FlowFixMe getImportRuleTag().insertRules(id + '-import', importRules); } sizes[marker] += injectedRules; /* add up no of injected rules */ addNameForId(names, id, name); }; var removeRules = function removeRules(id) { var marker = markers[id]; if (marker === undefined) return; var size = sizes[marker]; var sheet = sheetForTag(el); var removalIndex = addUpUntilIndex(sizes, marker); deleteRules(sheet, removalIndex, size); sizes[marker] = 0; resetIdNames(names, id); if (extractImport && usedImportRuleTag) { // $FlowFixMe getImportRuleTag().removeRules(id + '-import'); } }; var css = function css() { var _sheetForTag = sheetForTag(el), cssRules = _sheetForTag.cssRules; var str = ''; // eslint-disable-next-line guard-for-in for (var id in markers) { str += makeTextMarker(id); var marker = markers[id]; var end = addUpUntilIndex(sizes, marker); var size = sizes[marker]; for (var i = end - size; i < end; i += 1) { var rule = cssRules[i]; if (rule !== undefined) { str += rule.cssText; } } } return str; }; return { clone: function clone() { throw new StyledComponentsError(5); }, css: css, getIds: getIdsFromMarkersFactory(markers), hasNameForId: hasNameForId(names), insertMarker: insertMarker, insertRules: insertRules, removeRules: removeRules, sealed: false, styleTag: el, toElement: wrapAsElement(css, names), toHTML: wrapAsHtmlTag(css, names) }; }; var makeTextNode = function makeTextNode(id) { return document.createTextNode(makeTextMarker(id)); }; var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) { var names = Object.create(null); var markers = Object.create(null); var extractImport = getImportRuleTag !== undefined; /* indicates whther getImportRuleTag was called */ var usedImportRuleTag = false; var insertMarker = function insertMarker(id) { var prev = markers[id]; if (prev !== undefined) { return prev; } markers[id] = makeTextNode(id); el.appendChild(markers[id]); names[id] = Object.create(null); return markers[id]; }; var insertRules = function insertRules(id, cssRules, name) { var marker = insertMarker(id); var importRules = []; var cssRulesSize = cssRules.length; for (var i = 0; i < cssRulesSize; i += 1) { var rule = cssRules[i]; var mayHaveImport = extractImport; if (mayHaveImport && rule.indexOf('@import') !== -1) { importRules.push(rule); } else { mayHaveImport = false; var separator = i === cssRulesSize - 1 ? '' : ' '; marker.appendData('' + rule + separator); } } addNameForId(names, id, name); if (extractImport && importRules.length > 0) { usedImportRuleTag = true; // $FlowFixMe getImportRuleTag().insertRules(id + '-import', importRules); } }; var removeRules = function removeRules(id) { var marker = markers[id]; if (marker === undefined) return; /* create new empty text node and replace the current one */ var newMarker = makeTextNode(id); el.replaceChild(newMarker, marker); markers[id] = newMarker; resetIdNames(names, id); if (extractImport && usedImportRuleTag) { // $FlowFixMe getImportRuleTag().removeRules(id + '-import'); } }; var css = function css() { var str = ''; // eslint-disable-next-line guard-for-in for (var id in markers) { str += markers[id].data; } return str; }; return { clone: function clone() { throw new StyledComponentsError(5); }, css: css, getIds: getIdsFromMarkersFactory(markers), hasNameForId: hasNameForId(names), insertMarker: insertMarker, insertRules: insertRules, removeRules: removeRules, sealed: false, styleTag: el, toElement: wrapAsElement(css, names), toHTML: wrapAsHtmlTag(css, names) }; }; var makeServerTagInternal = function makeServerTagInternal(namesArg, markersArg) { var names = namesArg === undefined ? Object.create(null) : namesArg; var markers = markersArg === undefined ? Object.create(null) : markersArg; var insertMarker = function insertMarker(id) { var prev = markers[id]; if (prev !== undefined) { return prev; } return markers[id] = ['']; }; var insertRules = function insertRules(id, cssRules, name) { var marker = insertMarker(id); marker[0] += cssRules.join(' '); addNameForId(names, id, name); }; var removeRules = function removeRules(id) { var marker = markers[id]; if (marker === undefined) return; marker[0] = ''; resetIdNames(names, id); }; var css = function css() { var str = ''; // eslint-disable-next-line guard-for-in for (var id in markers) { var cssForId = markers[id][0]; if (cssForId) { str += makeTextMarker(id) + cssForId; } } return str; }; var clone = function clone() { var namesClone = cloneNames(names); var markersClone = Object.create(null); // eslint-disable-next-line guard-for-in for (var id in markers) { markersClone[id] = [markers[id][0]]; } return makeServerTagInternal(namesClone, markersClone); }; var tag = { clone: clone, css: css, getIds: getIdsFromMarkersFactory(markers), hasNameForId: hasNameForId(names), insertMarker: insertMarker, insertRules: insertRules, removeRules: removeRules, sealed: false, styleTag: null, toElement: wrapAsElement(css, names), toHTML: wrapAsHtmlTag(css, names) }; return tag; }; var makeServerTag = function makeServerTag() { return makeServerTagInternal(); }; var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) { if (IS_BROWSER && !forceServer) { var el = makeStyleTag(target, tagEl, insertBefore); if (DISABLE_SPEEDY) { return makeBrowserTag(el, getImportRuleTag); } else { return makeSpeedyTag(el, getImportRuleTag); } } return makeServerTag(); }; /* wraps a given tag so that rehydration is performed once when necessary */ var makeRehydrationTag = function makeRehydrationTag(tag, els, extracted, immediateRehydration) { /* rehydration function that adds all rules to the new tag */ var rehydrate = once(function () { /* add all extracted components to the new tag */ for (var i = 0, len = extracted.length; i < len; i += 1) { var _extracted$i = extracted[i], componentId = _extracted$i.componentId, cssFromDOM = _extracted$i.cssFromDOM; var cssRules = splitByRules(cssFromDOM); tag.insertRules(componentId, cssRules); } /* remove old HTMLStyleElements, since they have been rehydrated */ for (var _i = 0, _len = els.length; _i < _len; _i += 1) { var el = els[_i]; if (el.parentNode) { el.parentNode.removeChild(el); } } }); if (immediateRehydration) rehydrate(); return _extends({}, tag, { /* add rehydration hook to insertion methods */ insertMarker: function insertMarker(id) { rehydrate(); return tag.insertMarker(id); }, insertRules: function insertRules(id, cssRules, name) { rehydrate(); return tag.insertRules(id, cssRules, name); } }); }; // var SPLIT_REGEX = /\s+/; /* determine the maximum number of components before tags are sharded */ var MAX_SIZE = void 0; if (IS_BROWSER) { /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */ MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000; } else { /* for servers we do not need to shard at all */ MAX_SIZE = -1; } var sheetRunningId = 0; var master = void 0; var StyleSheet = function () { /* a map from ids to tags */ /* deferred rules for a given id */ /* this is used for not reinjecting rules via hasNameForId() */ /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */ /* a list of tags belonging to this StyleSheet */ /* a tag for import rules */ /* current capacity until a new tag must be created */ /* children (aka clones) of this StyleSheet inheriting all and future injections */ function StyleSheet() { var _this = this; var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null; var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; classCallCheck(this, StyleSheet); this.getImportRuleTag = function () { var importRuleTag = _this.importRuleTag; if (importRuleTag !== undefined) { return importRuleTag; } var firstTag = _this.tags[0]; var insertBefore = true; return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore); }; sheetRunningId += 1; this.id = sheetRunningId; this.forceServer = forceServer; this.target = forceServer ? null : target; this.tagMap = {}; this.deferred = {}; this.rehydratedNames = {}; this.ignoreRehydratedNames = {}; this.tags = []; this.capacity = 1; this.clones = []; } /* rehydrate all SSR'd style tags */ StyleSheet.prototype.rehydrate = function rehydrate() { if (!IS_BROWSER || this.forceServer) { return this; } var els = []; var extracted = []; var isStreamed = false; /* retrieve all of our SSR style elements from the DOM */ var nodes = document.querySelectorAll('style[' + SC_ATTR + ']'); var nodesSize = nodes.length; /* abort rehydration if no previous style tags were found */ if (nodesSize === 0) { return this; } for (var i = 0; i < nodesSize; i += 1) { // $FlowFixMe: We can trust that all elements in this query are style elements var el = nodes[i]; /* check if style tag is a streamed tag */ if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR); /* retrieve all component names */ var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX); var elNamesSize = elNames.length; for (var j = 0; j < elNamesSize; j += 1) { var name = elNames[j]; /* add rehydrated name to sheet to avoid readding styles */ this.rehydratedNames[name] = true; } /* extract all components and their CSS */ extracted.push.apply(extracted, extractComps(el.textContent)); /* store original HTMLStyleElement */ els.push(el); } /* abort rehydration if nothing was extracted */ var extractedSize = extracted.length; if (extractedSize === 0) { return this; } /* create a tag to be used for rehydration */ var tag = this.makeTag(null); var rehydrationTag = makeRehydrationTag(tag, els, extracted, isStreamed); /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */ this.capacity = Math.max(1, MAX_SIZE - extractedSize); this.tags.push(rehydrationTag); /* retrieve all component ids */ for (var _j = 0; _j < extractedSize; _j += 1) { this.tagMap[extracted[_j].componentId] = rehydrationTag; } return this; }; /* retrieve a "master" instance of StyleSheet which is typically used when no other is available * The master StyleSheet is targeted by injectGlobal, keyframes, and components outside of any * StyleSheetManager's context */ /* reset the internal "master" instance */ StyleSheet.reset = function reset() { var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; master = new StyleSheet(undefined, forceServer).rehydrate(); }; /* adds "children" to the StyleSheet that inherit all of the parents' rules * while their own rules do not affect the parent */ StyleSheet.prototype.clone = function clone() { var sheet = new StyleSheet(this.target, this.forceServer); /* add to clone array */ this.clones.push(sheet); /* clone all tags */ sheet.tags = this.tags.map(function (tag) { var ids = tag.getIds(); var newTag = tag.clone(); /* reconstruct tagMap */ for (var i = 0; i < ids.length; i += 1) { sheet.tagMap[ids[i]] = newTag; } return newTag; }); /* clone other maps */ sheet.rehydratedNames = _extends({}, this.rehydratedNames); sheet.deferred = _extends({}, this.deferred); return sheet; }; /* force StyleSheet to create a new tag on the next injection */ StyleSheet.prototype.sealAllTags = function sealAllTags() { this.capacity = 1; this.tags.forEach(function (tag) { // eslint-disable-next-line no-param-reassign tag.sealed = true; }); }; StyleSheet.prototype.makeTag = function makeTag$$1(tag) { var lastEl = tag ? tag.styleTag : null; var insertBefore = false; return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag); }; /* get a tag for a given componentId, assign the componentId to one, or shard */ StyleSheet.prototype.getTagForId = function getTagForId(id) { /* simply return a tag, when the componentId was already assigned one */ var prev = this.tagMap[id]; if (prev !== undefined && !prev.sealed) { return prev; } var tag = this.tags[this.tags.length - 1]; /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */ this.capacity -= 1; if (this.capacity === 0) { this.capacity = MAX_SIZE; tag = this.makeTag(tag); this.tags.push(tag); } return this.tagMap[id] = tag; }; /* mainly for injectGlobal to check for its id */ StyleSheet.prototype.hasId = function hasId(id) { return this.tagMap[id] !== undefined; }; /* caching layer checking id+name to already have a corresponding tag and injected rules */ StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) { /* exception for rehydrated names which are checked separately */ if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) { return true; } var tag = this.tagMap[id]; return tag !== undefined && tag.hasNameForId(id, name); }; /* registers a componentId and registers it on its tag */ StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) { /* don't inject when the id is already registered */ if (this.tagMap[id] !== undefined) return; var clones = this.clones; for (var i = 0; i < clones.length; i += 1) { clones[i].deferredInject(id, cssRules); } this.getTagForId(id).insertMarker(id); this.deferred[id] = cssRules; }; /* injects rules for a given id with a name that will need to be cached */ StyleSheet.prototype.inject = function inject(id, cssRules, name) { var clones = this.clones; for (var i = 0; i < clones.length; i += 1) { clones[i].inject(id, cssRules, name); } var tag = this.getTagForId(id); /* add deferred rules for component */ if (this.deferred[id] !== undefined) { // Combine passed cssRules with previously deferred CSS rules // NOTE: We cannot mutate the deferred array itself as all clones // do the same (see clones[i].inject) var rules = this.deferred[id].concat(cssRules); tag.insertRules(id, rules, name); this.deferred[id] = undefined; } else { tag.insertRules(id, cssRules, name); } }; /* removes all rules for a given id, which doesn't remove its marker but resets it */ StyleSheet.prototype.remove = function remove(id) { var tag = this.tagMap[id]; if (tag === undefined) return; var clones = this.clones; for (var i = 0; i < clones.length; i += 1) { clones[i].remove(id); } /* remove all rules from the tag */ tag.removeRules(id); /* ignore possible rehydrated names */ this.ignoreRehydratedNames[id] = true; /* delete possible deferred rules */ this.deferred[id] = undefined; }; StyleSheet.prototype.toHTML = function toHTML() { return this.tags.map(function (tag) { return tag.toHTML(); }).join(''); }; StyleSheet.prototype.toReactElements = function toReactElements() { var id = this.id; return this.tags.map(function (tag, i) { var key = 'sc-' + id + '-' + i; return React.cloneElement(tag.toElement(), { key: key }); }); }; createClass(StyleSheet, null, [{ key: 'master', get: function get$$1() { return master || (master = new StyleSheet().rehydrate()); } /* NOTE: This is just for backwards-compatibility with jest-styled-components */ }, { key: 'instance', get: function get$$1() { return StyleSheet.master; } }]); return StyleSheet; }(); var _StyleSheetManager$ch; var StyleSheetManager = function (_Component) { inherits(StyleSheetManager, _Component); function StyleSheetManager() { classCallCheck(this, StyleSheetManager); return possibleConstructorReturn(this, _Component.apply(this, arguments)); } StyleSheetManager.prototype.getChildContext = function getChildContext() { var _ref; return _ref = {}, _ref[CONTEXT_KEY] = this.sheetInstance, _ref; }; StyleSheetManager.prototype.componentWillMount = function componentWillMount() { if (this.props.sheet) { this.sheetInstance = this.props.sheet; } else if (this.props.target) { this.sheetInstance = new StyleSheet(this.props.target); } else { throw new StyledComponentsError(4); } }; StyleSheetManager.prototype.render = function render() { /* eslint-disable react/prop-types */ // Flow v0.43.1 will report an error accessing the `children` property, // but v0.47.0 will not. It is necessary to use a type cast instead of // a "fixme" comment to satisfy both Flow versions. return React__default.Children.only(this.props.children); }; return StyleSheetManager; }(React.Component); StyleSheetManager.childContextTypes = (_StyleSheetManager$ch = {}, _StyleSheetManager$ch[CONTEXT_KEY] = PropTypes.oneOfType([PropTypes.instanceOf(StyleSheet), PropTypes.instanceOf(ServerStyleSheet)]).isRequired, _StyleSheetManager$ch); true ? StyleSheetManager.propTypes = { sheet: PropTypes.oneOfType([PropTypes.instanceOf(StyleSheet), PropTypes.instanceOf(ServerStyleSheet)]), target: PropTypes.shape({ appendChild: PropTypes.func.isRequired }) } : void 0; // var ServerStyleSheet = function () { function ServerStyleSheet() { classCallCheck(this, ServerStyleSheet); /* The master sheet might be reset, so keep a reference here */ this.masterSheet = StyleSheet.master; this.instance = this.masterSheet.clone(); this.closed = false; } ServerStyleSheet.prototype.complete = function complete() { if (!this.closed) { /* Remove closed StyleSheets from the master sheet */ var index = this.masterSheet.clones.indexOf(this.instance); this.masterSheet.clones.splice(index, 1); this.closed = true; } }; ServerStyleSheet.prototype.collectStyles = function collectStyles(children) { if (this.closed) { throw new StyledComponentsError(2); } return React__default.createElement( StyleSheetManager, { sheet: this.instance }, children ); }; ServerStyleSheet.prototype.getStyleTags = function getStyleTags() { this.complete(); return this.instance.toHTML(); }; ServerStyleSheet.prototype.getStyleElement = function getStyleElement() { this.complete(); return this.instance.toReactElements(); }; ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) { var _this = this; { throw new StyledComponentsError(3); } /* the tag index keeps track of which tags have already been emitted */ var instance = this.instance; var instanceTagIndex = 0; var streamAttr = SC_STREAM_ATTR + '="true"'; var transformer = new stream.Transform({ transform: function appendStyleChunks(chunk, /* encoding */_, callback) { var tags = instance.tags; var html = ''; /* retrieve html for each new style tag */ for (; instanceTagIndex < tags.length; instanceTagIndex += 1) { var tag = tags[instanceTagIndex]; html += tag.toHTML(streamAttr); } /* force our StyleSheets to emit entirely new tags */ instance.sealAllTags(); /* prepend style html to chunk */ this.push(html + chunk); callback(); } }); readableStream.on('end', function () { return _this.complete(); }); readableStream.on('error', function (err) { _this.complete(); // forward the error to the transform stream transformer.emit('error', err); }); return readableStream.pipe(transformer); }; return ServerStyleSheet; }(); // var LIMIT = 200; var createWarnTooManyClasses = (function (displayName) { var generatedClasses = {}; var warningSeen = false; return function (className) { if (!warningSeen) { generatedClasses[className] = true; if (Object.keys(generatedClasses).length >= LIMIT) { // Unable to find latestRule in test environment. /* eslint-disable no-console, prefer-template */ console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. \n' + 'Consider using the attrs method, together with a style object for frequently changed styles.\n' + 'Example:\n' + ' const Component = styled.div.attrs({\n' + ' style: ({ background }) => ({\n' + ' background,\n' + ' }),\n' + ' })`width: 100%;`\n\n' + ' '); warningSeen = true; generatedClasses = {}; } } }; }); // var determineTheme = (function (props, fallbackTheme, defaultProps) { // Props should take precedence over ThemeProvider, which should take precedence over // defaultProps, but React automatically puts defaultProps on props. /* eslint-disable react/prop-types */ var isDefaultTheme = defaultProps && props.theme === defaultProps.theme; var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme; /* eslint-enable */ return theme; }); // var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g; var dashesAtEnds = /(^-|-$)/g; /** * TODO: Explore using CSS.escape when it becomes more available * in evergreen browsers. */ function escape(str) { return str // Replace all possible CSS selectors .replace(escapeRegex, '-') // Remove extraneous hyphens at the start and end .replace(dashesAtEnds, ''); } // function getComponentName(target) { return target.displayName || target.name || 'Component'; } // function isTag(target) /* : %checks */{ return typeof target === 'string'; } // function generateDisplayName(target) { return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')'; } // /* eslint-disable max-len */ /** * Trying to avoid the unknown-prop errors on styled components by filtering by * React's attribute whitelist. * * To regenerate this regex: * * 1. `npm i -g regexgen` (https://github.com/devongovett/regexgen) * 2. Run `regexgen` with the list of space-separated words below as input * 3. Surround the emitted regex with this: `/^(GENERATED_REGEX)$/` -- this will ensure a full string match * and no false positives from partials * */ /* children dangerouslySetInnerHTML key ref autoFocus defaultValue valueLink defaultChecked checkedLink innerHTML suppressContentEditableWarning onFocusIn onFocusOut className onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onInvalid onSubmit onReset onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onAnimationStart onAnimationEnd onAnimationIteration onTransitionEnd onCopyCapture onCutCapture onPasteCapture onCompositionEndCapture onCompositionStartCapture onCompositionUpdateCapture onKeyDownCapture onKeyPressCapture onKeyUpCapture onFocusCapture onBlurCapture onChangeCapture onInputCapture onSubmitCapture onResetCapture onClickCapture onContextMenuCapture onDoubleClickCapture onDragCapture onDragEndCapture onDragEnterCapture onDragExitCapture onDragLeaveCapture onDragOverCapture onDragStartCapture onDropCapture onMouseDownCapture onMouseEnterCapture onMouseLeaveCapture onMouseMoveCapture onMouseOutCapture onMouseOverCapture onMouseUpCapture onSelectCapture onTouchCancelCapture onTouchEndCapture onTouchMoveCapture onTouchStartCapture onScrollCapture onWheelCapture onAbortCapture onCanPlayCapture onCanPlayThroughCapture onDurationChangeCapture onEmptiedCapture onEncryptedCapture onEndedCapture onErrorCapture onLoadedDataCapture onLoadedMetadataCapture onLoadStartCapture onPauseCapture onPlayCapture onPlayingCapture onProgressCapture onRateChangeCapture onSeekedCapture onSeekingCapture onStalledCapture onSuspendCapture onTimeUpdateCapture onVolumeChangeCapture onWaitingCapture onLoadCapture onAnimationStartCapture onAnimationEndCapture onAnimationIterationCapture onTransitionEndCapture accept acceptCharset accessKey action allowFullScreen allowTransparency alt as async autoComplete autoPlay capture cellPadding cellSpacing charSet challenge checked cite classID className cols colSpan content contentEditable contextMenu controlsList controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name nonce noValidate open optimum pattern placeholder playsInline poster preload profile radioGroup readOnly referrerPolicy rel required reversed role rows rowSpan sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap about datatype inlist prefix property resource typeof vocab autoCapitalize autoCorrect autoSave color itemProp itemScope itemType itemID itemRef results security unselectable accentHeight accumulate additive alignmentBaseline allowReorder alphabetic amplitude arabicForm ascent attributeName attributeType autoReverse azimuth baseFrequency baseProfile baselineShift bbox begin bias by calcMode capHeight clip clipPath clipRule clipPathUnits colorInterpolation colorInterpolationFilters colorProfile colorRendering contentScriptType contentStyleType cursor cx cy d decelerate descent diffuseConstant direction display divisor dominantBaseline dur dx dy edgeMode elevation enableBackground end exponent externalResourcesRequired fill fillOpacity fillRule filter filterRes filterUnits floodColor floodOpacity focusable fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight format from fx fy g1 g2 glyphName glyphOrientationHorizontal glyphOrientationVertical glyphRef gradientTransform gradientUnits hanging horizAdvX horizOriginX ideographic imageRendering in in2 intercept k k1 k2 k3 k4 kernelMatrix kernelUnitLength kerning keyPoints keySplines keyTimes lengthAdjust letterSpacing lightingColor limitingConeAngle local markerEnd markerMid markerStart markerHeight markerUnits markerWidth mask maskContentUnits maskUnits mathematical mode numOctaves offset opacity operator order orient orientation origin overflow overlinePosition overlineThickness paintOrder panose1 pathLength patternContentUnits patternTransform patternUnits pointerEvents points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits r radius refX refY renderingIntent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry scale seed shapeRendering slope spacing specularConstant specularExponent speed spreadMethod startOffset stdDeviation stemh stemv stitchTiles stopColor stopOpacity strikethroughPosition strikethroughThickness string stroke strokeDasharray strokeDashoffset strokeLinecap strokeLinejoin strokeMiterlimit strokeOpacity strokeWidth surfaceScale systemLanguage tableValues targetX targetY textAnchor textDecoration textRendering textLength to transform u1 u2 underlinePosition underlineThickness unicode unicodeBidi unicodeRange unitsPerEm vAlphabetic vHanging vIdeographic vMathematical values vectorEffect version vertAdvY vertOriginX vertOriginY viewBox viewTarget visibility widths wordSpacing writingMode x xHeight x1 x2 xChannelSelector xlinkActuate xlinkArcrole xlinkHref xlinkRole xlinkShow xlinkTitle xlinkType xmlBase xmlns xmlnsXlink xmlLang xmlSpace y y1 y2 yChannelSelector z zoomAndPan onPointerDown onPointerMove onPointerUp onPointerCancel onGotPointerCapture onLostPointerCapture onPointerEnter onPointerLeave onPointerOver onPointerOut class for autofocus allow allowUserMedia allowPaymentRequest */ /* eslint-enable max-len */ var ATTRIBUTE_REGEX = /^((?:s(?:uppressContentEditableWarn|croll|pac)|(?:shape|image|text)Render|(?:letter|word)Spac|vHang|hang)ing|(?:on(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:Animation|Touch|Load|Drag)Start|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|Lo(?:stPointer|ad)|TimeUpdate|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|GotPointer|MouseDown|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|KeyPress|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|P(?:rogress|laying)|DragEnd|Key(?:Down|Up)|(?:MouseU|Dro)p|(?:Wait|Seek)ing|Scroll|Focus|Paste|Abort|Drag|Play|Blur)Captur|alignmentBaselin|(?:limitingConeAng|xlink(?:(?:Arcr|R)o|Tit)|s(?:urfaceSca|ty|ca)|unselectab|baseProfi|fontSty|(?:focus|dragg)ab|multip|profi|tit)l|d(?:ominantBaselin|efaultValu)|onPointerLeav|a(?:uto(?:Capitaliz|Revers|Sav)|dditiv)|(?:(?:formNoValid|xlinkActu|noValid|accumul|rot)a|autoComple|decelera)t|(?:(?:attribute|item)T|datat)yp|onPointerMov|(?:attribute|glyph)Nam|playsInlin|(?:writing|input|edge)Mod|(?:formE|e)ncTyp|(?:amplitu|mo)d|(?:xlinkTy|itemSco|keyTy|slo)p|(?:xmlSpa|non)c|fillRul|(?:dateTi|na)m|r(?:esourc|ol)|xmlBas|wmod)e|(?:glyphOrientationHorizont|loc)al|(?:externalResourcesRequir|select|revers|mut)ed|c(?:o(?:lorInterpolationFilter|ord)s|o(?:lor(?:Interpolation)?|nt(?:rols|ent))|(?:ontentS(?:cript|tyle)Typ|o(?:ntentEditab|lorProfi)l|l(?:assNam|ipRul)|a(?:lcMod|ptur)|it)e|olorRendering|l(?:ipPathUnits|assID)|(?:ontrolsLis|apHeigh)t|h(?:eckedLink|a(?:llenge|rSet)|ildren|ecked)|ell(?:Spac|Padd)ing|o(?:ntextMenu|ls)|(?:rossOrigi|olSpa)n|l(?:ip(?:Path)?|ass)|ursor|[xy])|glyphOrientationVertical|d(?:angerouslySetInnerHTML|efaultChecked|ownload|isabled|isplay|[xy])|(?:s(?:trikethroughThickn|eaml)es|(?:und|ov)erlineThicknes|r(?:equiredExtension|adiu)|(?:requiredFeatur|tableValu|stitchTil|numOctav|filterR)e|key(?:(?:Splin|Tim)e|Param)|auto[Ff]ocu|header|bia)s|(?:(?:st(?:rikethroughPosi|dDevia)|(?:und|ov)erlinePosi|(?:textDecor|elev)a|orienta)tio|(?:strokeLinejo|orig)i|on(?:PointerDow|FocusI)|formActio|zoomAndPa|directio|(?:vers|act)io|rowSpa|begi|ico)n|o(?:n(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)|rient)|p(?:reserveAspectRatio|ointsAt[X-Z]|anose1)|(?:(?:allowPaymentReque|(?:fontSize|length)Adju|manife)s|strokeMiterlimi|(?:(?:specularE|e)xpon|renderingInt|asc)en|(?:specularConsta|repeatCou|fontVaria)n|d(?:iffuseConsta|esce)n|baselineShif|vectorEffec|onPointerOu|(?:(?:mar(?:ker|gin)|x)H|accentH|fontW)eigh|markerStar|a(?:utoCorrec|bou)|onFocusOu|intercep|restar|forma|inlis|heigh|lis)t|(?:patternContent|ma(?:sk(?:Content)?|rker)|primitive|gradient|pattern|filter)Units|(?:(?:allowTranspar|baseFrequ)enc|re(?:ferrerPolic|adOnl)|(?:(?:st(?:roke|op)O|floodO|fillO|o)pac|integr|secur)it|visibilit|fontFamil|accessKe|propert|summar)y|(?:gradientT|patternT|t)ransform|(?:(?:st(?:rokeDasho|artO)|o)ffs|acceptChars|formTarg|viewTarg|srcS)et|(?:[xy]ChannelSelect|lightingCol|textAnch|floodCol|stopCol|operat|htmlF)or|(?:(?:enableBackgrou|markerE)n|s(?:p(?:readMetho|ee)|ee)|formMetho|(?:markerM|onInval)i|preloa|metho|kin)d|k(?:ernel(?:UnitLength|Matrix)|[1-4])|strokeDasharray|(?:onPointerCanc|lab)el|(?:allowFullScre|hidd)en|a(?:l(?:lowUserMedia|phabetic|t)|rabicForm|sync)|systemLanguage|(?:(?:o(?:nPointer(?:Ent|Ov)|rd)|allowReord|placehold|frameBord|paintOrd|post)e|repeatDu|d(?:efe|u))r|(?:pointerEve|keyPoi)nts|preserveAlpha|(?:strokeLineca|onPointerU|itemPro|useMa|wra|loo)p|v(?:Mathematical|ert(?:Origin[XY]|AdvY)|alues|ocab)|unicodeRange|h(?:oriz(?:Origin|Adv)X|ttpEquiv)|(?:vI|i)deographic|mathematical|u(?:nicodeBidi|[12])|(?:fontStretc|hig)h|vAlphabetic|(?:(?:mar(?:ker|gin)W|strokeW)id|azimu)th|(?:xmlnsXl|valueL)ink|mediaGroup|spellCheck|(?:text|m(?:in|ax))Length|(?:unitsPerE|optimu|fro)m|r(?:adioGroup|e(?:sults|f[XY]|l)|ows|[xy])|pathLength|(?:xlinkHr|glyphR)ef|innerHTML|xlinkShow|f(?:o(?:ntSize|rm?)|il(?:ter|l))|(?:tabInde|(?:sand|b)bo|viewBo)x|autoPlay|r(?:e(?:quired|sult|f))?|(?:(?:href|xml|src)La|kerni)ng|o(?:verflow|pen)|i(?:temRef|n2|s)|p(?:attern|oints)|unicode|d(?:efault|ata|ir)?|divisor|t(?:arget[XY]|o)|(?:stri|la)ng|(?:width|size)s|prefix|typeof|srcDoc|s(?:coped|te(?:m[hv]|p)|pan)|s(?:t(?:roke|art)|hape|cope|rc)|a(?:ccept|llow|s)|itemID|t(?:arget|ype)|m(?:edia|a(?:sk|x)|in)|value|width|x(?:mlns)?|size|href|k(?:ey)?|end|low|by|x[12]|y[12]|g[12]|i[dn]|f[xy]|[yz])$/; /* From DOMProperty */ var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; var isCustomAttribute = RegExp.prototype.test.bind(new RegExp('^(x|data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$')); var validAttr = (function (name) { return ATTRIBUTE_REGEX.test(name) || isCustomAttribute(name.toLowerCase()); }); // function hasInInheritanceChain(child, parent) { var target = child; while (target) { target = Object.getPrototypeOf(target); if (target && target === parent) { return true; } } return false; } // /** * Creates a broadcast that can be listened to, i.e. simple event emitter * * @see https://github.com/ReactTraining/react-broadcast */ var createBroadcast = function createBroadcast(initialState) { var listeners = {}; var id = 0; var state = initialState; function publish(nextState) { state = nextState; // eslint-disable-next-line guard-for-in, no-restricted-syntax for (var key in listeners) { var listener = listeners[key]; if (listener === undefined) { // eslint-disable-next-line no-continue continue; } listener(state); } } function subscribe(listener) { var currentId = id; listeners[currentId] = listener; id += 1; listener(state); return currentId; } function unsubscribe(unsubID) { listeners[unsubID] = undefined; } return { publish: publish, subscribe: subscribe, unsubscribe: unsubscribe }; }; var _contextShape, _ThemeProvider$contex; // NOTE: DO NOT CHANGE, changing this is a semver major change! var CHANNEL = '__styled-components__'; var CHANNEL_NEXT = CHANNEL + 'next__'; var CONTEXT_CHANNEL_SHAPE = PropTypes.shape({ getTheme: PropTypes.func, subscribe: PropTypes.func, unsubscribe: PropTypes.func }); var contextShape = (_contextShape = {}, _contextShape[CHANNEL] = PropTypes.func, _contextShape[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _contextShape); var warnChannelDeprecated = void 0; if (true) { warnChannelDeprecated = once(function () { // eslint-disable-next-line no-console console.warn('Warning: Usage of `context.' + CHANNEL + '` as a function is deprecated. It will be replaced with the object on `.context.' + CHANNEL_NEXT + '` in a future version.'); }); } var isFunction = function isFunction(test) { return typeof test === 'function'; }; /** * Provide a theme to an entire react component tree via context and event listeners (have to do * both context and event emitter as pure components block context updates) */ var ThemeProvider = function (_Component) { inherits(ThemeProvider, _Component); function ThemeProvider() { classCallCheck(this, ThemeProvider); var _this = possibleConstructorReturn(this, _Component.call(this)); _this.unsubscribeToOuterId = -1; _this.getTheme = _this.getTheme.bind(_this); return _this; } ThemeProvider.prototype.componentWillMount = function componentWillMount() { var _this2 = this; // If there is a ThemeProvider wrapper anywhere around this theme provider, merge this theme // with the outer theme var outerContext = this.context[CHANNEL_NEXT]; if (outerContext !== undefined) { this.unsubscribeToOuterId = outerContext.subscribe(function (theme) { _this2.outerTheme = theme; if (_this2.broadcast !== undefined) { _this2.publish(_this2.props.theme); } }); } this.broadcast = createBroadcast(this.getTheme()); }; ThemeProvider.prototype.getChildContext = function getChildContext() { var _this3 = this, _babelHelpers$extends; return _extends({}, this.context, (_babelHelpers$extends = {}, _babelHelpers$extends[CHANNEL_NEXT] = { getTheme: this.getTheme, subscribe: this.broadcast.subscribe, unsubscribe: this.broadcast.unsubscribe }, _babelHelpers$extends[CHANNEL] = function (subscriber) { if (true) { warnChannelDeprecated(); } // Patch the old `subscribe` provide via `CHANNEL` for older clients. var unsubscribeId = _this3.broadcast.subscribe(subscriber); return function () { return _this3.broadcast.unsubscribe(unsubscribeId); }; }, _babelHelpers$extends)); }; ThemeProvider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (this.props.theme !== nextProps.theme) { this.publish(nextProps.theme); } }; ThemeProvider.prototype.componentWillUnmount = function componentWillUnmount() { if (this.unsubscribeToOuterId !== -1) { this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeToOuterId); } }; // Get the theme from the props, supporting both (outerTheme) => {} as well as object notation ThemeProvider.prototype.getTheme = function getTheme(passedTheme) { var theme = passedTheme || this.props.theme; if (isFunction(theme)) { var mergedTheme = theme(this.outerTheme); if (("development") !== 'production' && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === 'undefined' ? 'undefined' : _typeof(mergedTheme)) !== 'object')) { throw new StyledComponentsError(7); } return mergedTheme; } if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') { throw new StyledComponentsError(8); } return _extends({}, this.outerTheme, theme); }; ThemeProvider.prototype.publish = function publish(theme) { this.broadcast.publish(this.getTheme(theme)); }; ThemeProvider.prototype.render = function render() { if (!this.props.children) { return null; } return React__default.Children.only(this.props.children); }; return ThemeProvider; }(React.Component); ThemeProvider.childContextTypes = contextShape; ThemeProvider.contextTypes = (_ThemeProvider$contex = {}, _ThemeProvider$contex[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _ThemeProvider$contex); var _babelHelpers$extends; // HACK for generating all static styles without needing to allocate // an empty execution context every single time... var STATIC_EXECUTION_CONTEXT = {}; var modifiedContextShape = _extends({}, contextShape, (_babelHelpers$extends = {}, _babelHelpers$extends[CONTEXT_KEY] = PropTypes.oneOfType([PropTypes.instanceOf(StyleSheet), PropTypes.instanceOf(ServerStyleSheet)]), _babelHelpers$extends)); var identifiers = {}; /* We depend on components having unique IDs */ var generateId = function generateId(ComponentStyle, _displayName, parentComponentId) { var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName); /** * This ensures uniqueness if two components happen to share * the same displayName. */ var nr = (identifiers[displayName] || 0) + 1; identifiers[displayName] = nr; var componentId = displayName + '-' + ComponentStyle.generateName(displayName + nr); return parentComponentId !== undefined ? parentComponentId + '-' + componentId : componentId; }; var warnExtendDeprecated = function warnExtendDeprecated() {}; if (true) { warnExtendDeprecated = once(function () { // eslint-disable-next-line no-console console.warn('Warning: The "extend" API will be removed in the upcoming v4.0 release. Use styled(StyledComponent) instead. You can find more information here: https://github.com/styled-components/styled-components/issues/1546'); }); } // $FlowFixMe var BaseStyledComponent = function (_Component) { inherits(BaseStyledComponent, _Component); function BaseStyledComponent() { var _temp, _this, _ret; classCallCheck(this, BaseStyledComponent); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.attrs = {}, _this.state = { theme: null, generatedClassName: '' }, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret); } BaseStyledComponent.prototype.unsubscribeFromContext = function unsubscribeFromContext() { if (this.unsubscribeId !== -1) { this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId); } }; BaseStyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props) { var attrs = this.constructor.attrs; var context = _extends({}, props, { theme: theme }); if (attrs === undefined) { return context; } this.attrs = Object.keys(attrs).reduce(function (acc, key) { var attr = attrs[key]; // eslint-disable-next-line no-param-reassign acc[key] = typeof attr === 'function' && !hasInInheritanceChain(attr, React.Component) ? attr(context) : attr; return acc; }, {}); return _extends({}, context, this.attrs); }; BaseStyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) { var _constructor = this.constructor, attrs = _constructor.attrs, componentStyle = _constructor.componentStyle, warnTooManyClasses = _constructor.warnTooManyClasses; var styleSheet = this.context[CONTEXT_KEY] || StyleSheet.master; // statically styled-components don't need to build an execution context object, // and shouldn't be increasing the number of class names if (componentStyle.isStatic && attrs === undefined) { return componentStyle.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, styleSheet); } else { var executionContext = this.buildExecutionContext(theme, props); var className = componentStyle.generateAndInjectStyles(executionContext, styleSheet); if (("development") !== 'production' && warnTooManyClasses !== undefined) { warnTooManyClasses(className); } return className; } }; BaseStyledComponent.prototype.componentWillMount = function componentWillMount() { var _this2 = this; var componentStyle = this.constructor.componentStyle; var styledContext = this.context[CHANNEL_NEXT]; // If this is a statically-styled component, we don't need to the theme // to generate or build styles. if (componentStyle.isStatic) { var generatedClassName = this.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, this.props); this.setState({ generatedClassName: generatedClassName }); // If there is a theme in the context, subscribe to the event emitter. This // is necessary due to pure components blocking context updates, this circumvents // that by updating when an event is emitted } else if (styledContext !== undefined) { var subscribe = styledContext.subscribe; this.unsubscribeId = subscribe(function (nextTheme) { // This will be called once immediately var theme = determineTheme(_this2.props, nextTheme, _this2.constructor.defaultProps); var generatedClassName = _this2.generateAndInjectStyles(theme, _this2.props); _this2.setState({ theme: theme, generatedClassName: generatedClassName }); }); } else { // eslint-disable-next-line react/prop-types var theme = this.props.theme || EMPTY_OBJECT; var _generatedClassName = this.generateAndInjectStyles(theme, this.props); this.setState({ theme: theme, generatedClassName: _generatedClassName }); } }; BaseStyledComponent.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var _this3 = this; // If this is a statically-styled component, we don't need to listen to // props changes to update styles var componentStyle = this.constructor.componentStyle; if (componentStyle.isStatic) { return; } this.setState(function (prevState) { var theme = determineTheme(nextProps, prevState.theme, _this3.constructor.defaultProps); var generatedClassName = _this3.generateAndInjectStyles(theme, nextProps); return { theme: theme, generatedClassName: generatedClassName }; }); }; BaseStyledComponent.prototype.componentWillUnmount = function componentWillUnmount() { this.unsubscribeFromContext(); }; BaseStyledComponent.prototype.render = function render() { // eslint-disable-next-line react/prop-types var innerRef = this.props.innerRef; var generatedClassName = this.state.generatedClassName; var _constructor2 = this.constructor, styledComponentId = _constructor2.styledComponentId, target = _constructor2.target; var isTargetTag = isTag(target); var className = [ // eslint-disable-next-line react/prop-types this.props.className, styledComponentId, this.attrs.className, generatedClassName].filter(Boolean).join(' '); var baseProps = _extends({}, this.attrs, { className: className }); if (isStyledComponent(target)) { baseProps.innerRef = innerRef; } else { baseProps.ref = innerRef; } var propsForElement = baseProps; var key = void 0; for (key in this.props) { // Don't pass through non HTML tags through to HTML elements // always omit innerRef if (key !== 'innerRef' && key !== 'className' && (!isTargetTag || validAttr(key))) { propsForElement[key] = key === 'style' && key in this.attrs ? _extends({}, this.attrs[key], this.props[key]) : this.props[key]; } } return React.createElement(target, propsForElement); }; return BaseStyledComponent; }(React.Component); var _StyledComponent = (function (ComponentStyle, constructWithOptions) { var createStyledComponent = function createStyledComponent(target, options, rules) { var _options$isClass = options.isClass, isClass = _options$isClass === undefined ? !isTag(target) : _options$isClass, _options$displayName = options.displayName, displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName, _options$componentId = options.componentId, componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId, _options$ParentCompon = options.ParentComponent, ParentComponent = _options$ParentCompon === undefined ? BaseStyledComponent : _options$ParentCompon, extendingRules = options.rules, attrs = options.attrs; var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId; var componentStyle = new ComponentStyle(extendingRules === undefined ? rules : extendingRules.concat(rules), attrs, styledComponentId); var StyledComponent = function (_ParentComponent) { inherits(StyledComponent, _ParentComponent); function StyledComponent() { classCallCheck(this, StyledComponent); return possibleConstructorReturn(this, _ParentComponent.apply(this, arguments)); } StyledComponent.withComponent = function withComponent(tag) { var previousComponentId = options.componentId, optionsToCopy = objectWithoutProperties(options, ['componentId']); var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag))); var newOptions = _extends({}, optionsToCopy, { componentId: newComponentId, ParentComponent: StyledComponent }); return createStyledComponent(tag, newOptions, rules); }; createClass(StyledComponent, null, [{ key: 'extend', get: function get$$1() { var rulesFromOptions = options.rules, parentComponentId = options.componentId, optionsToCopy = objectWithoutProperties(options, ['rules', 'componentId']); var newRules = rulesFromOptions === undefined ? rules : rulesFromOptions.concat(rules); var newOptions = _extends({}, optionsToCopy, { rules: newRules, parentComponentId: parentComponentId, ParentComponent: StyledComponent }); warnExtendDeprecated(); return constructWithOptions(createStyledComponent, target, newOptions); } }]); return StyledComponent; }(ParentComponent); StyledComponent.attrs = attrs; StyledComponent.componentStyle = componentStyle; StyledComponent.contextTypes = modifiedContextShape; StyledComponent.displayName = displayName; StyledComponent.styledComponentId = styledComponentId; StyledComponent.target = target; if (true) { StyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName); } if (isClass) { hoistStatics(StyledComponent, target, { // all SC-specific things should not be hoisted attrs: true, componentStyle: true, displayName: true, extend: true, styledComponentId: true, target: true, warnTooManyClasses: true, withComponent: true }); } return StyledComponent; }; return createStyledComponent; }); // Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js function murmurhash(str) { var l = str.length | 0, h = l | 0, i = 0, k; while (l >= 4) { k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24; k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16); k ^= k >>> 24; k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16); h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k; l -= 4; ++i; } switch (l) { case 3: h ^= (str.charCodeAt(i + 2) & 0xff) << 16; case 2: h ^= (str.charCodeAt(i + 1) & 0xff) << 8; case 1: h ^= str.charCodeAt(i) & 0xff; h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16); } h ^= h >>> 13; h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16); h ^= h >>> 15; return h >>> 0; } // var areStylesCacheable = IS_BROWSER; var isStaticRules = function isStaticRules(rules, attrs) { for (var i = 0, len = rules.length; i < len; i += 1) { var rule = rules[i]; // recursive case if (Array.isArray(rule) && !isStaticRules(rule)) { return false; } else if (typeof rule === 'function' && !isStyledComponent(rule)) { // functions are allowed to be static if they're just being // used to get the classname of a nested styled component return false; } } if (attrs !== undefined) { // eslint-disable-next-line guard-for-in, no-restricted-syntax for (var key in attrs) { if (typeof attrs[key] === 'function') { return false; } } } return true; }; var isHMREnabled = typeof module !== 'undefined' && module.hot && ("development") !== 'production'; /* ComponentStyle is all the CSS-specific stuff, not the React-specific stuff. */ var _ComponentStyle = (function (nameGenerator, flatten, stringifyRules) { /* combines hashStr (murmurhash) and nameGenerator for convenience */ var generateRuleHash = function generateRuleHash(str) { return nameGenerator(murmurhash(str)); }; var ComponentStyle = function () { function ComponentStyle(rules, attrs, componentId) { classCallCheck(this, ComponentStyle); this.rules = rules; this.isStatic = !isHMREnabled && isStaticRules(rules, attrs); this.componentId = componentId; if (!StyleSheet.master.hasId(componentId)) { var placeholder = true ? ['.' + componentId + ' {}'] : []; StyleSheet.master.deferredInject(componentId, placeholder); } } /* * Flattens a rule set into valid CSS * Hashes it, wraps the whole chunk in a .hash1234 {} * Returns the hash to be injected on render() * */ ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) { var isStatic = this.isStatic, componentId = this.componentId, lastClassName = this.lastClassName; if (areStylesCacheable && isStatic && lastClassName !== undefined && styleSheet.hasNameForId(componentId, lastClassName)) { return lastClassName; } var flatCSS = flatten(this.rules, executionContext); var name = generateRuleHash(this.componentId + flatCSS.join('')); if (!styleSheet.hasNameForId(componentId, name)) { styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name), name); } this.lastClassName = name; return name; }; ComponentStyle.generateName = function generateName(str) { return generateRuleHash(str); }; return ComponentStyle; }(); return ComponentStyle; }); // // Thanks to ReactDOMFactories for this handy list! var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan']; // var _styled = (function (styledComponent, constructWithOptions) { var styled = function styled(tag) { return constructWithOptions(styledComponent, tag); }; // Shorthands for all valid HTML Elements domElements.forEach(function (domElement) { styled[domElement] = styled(domElement); }); return styled; }); // var replaceWhitespace = function replaceWhitespace(str) { return str.replace(/\s|\\n/g, ''); }; var _keyframes = (function (nameGenerator, stringifyRules, css) { return function () { var styleSheet = StyleSheet.master; var rules = css.apply(undefined, arguments); var name = nameGenerator(murmurhash(replaceWhitespace(JSON.stringify(rules)))); var id = 'sc-keyframes-' + name; if (!styleSheet.hasNameForId(id, name)) { styleSheet.inject(id, stringifyRules(rules, name, '@keyframes'), name); } return name; }; }); // var _injectGlobal = (function (stringifyRules, css) { var injectGlobal = function injectGlobal() { var styleSheet = StyleSheet.master; var rules = css.apply(undefined, arguments); var hash = murmurhash(JSON.stringify(rules)); var id = 'sc-global-' + hash; if (!styleSheet.hasId(id)) { styleSheet.inject(id, stringifyRules(rules)); } }; return injectGlobal; }); // var _constructWithOptions = (function (css) { var constructWithOptions = function constructWithOptions(componentConstructor, tag) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT; if (!reactIs.isValidElementType(tag)) { throw new StyledComponentsError(1, String(tag)); } /* This is callable directly as a template function */ // $FlowFixMe: Not typed to avoid destructuring arguments var templateFunction = function templateFunction() { return componentConstructor(tag, options, css.apply(undefined, arguments)); }; /* If config methods are called, wrap up a new template function and merge options */ templateFunction.withConfig = function (config) { return constructWithOptions(componentConstructor, tag, _extends({}, options, config)); }; templateFunction.attrs = function (attrs) { return constructWithOptions(componentConstructor, tag, _extends({}, options, { attrs: _extends({}, options.attrs || EMPTY_OBJECT, attrs) })); }; return templateFunction; }; return constructWithOptions; }); // var withTheme = (function (Component) { var isStatelessFunctionalComponent = typeof Component === 'function' && // $FlowFixMe TODO: flow for prototype !(Component.prototype && 'isReactComponent' in Component.prototype); // NOTE: We can't pass a ref to a stateless functional component var shouldSetInnerRef = isStyledComponent(Component) || isStatelessFunctionalComponent; var WithTheme = function (_React$Component) { inherits(WithTheme, _React$Component); function WithTheme() { var _temp, _this, _ret; classCallCheck(this, WithTheme); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = EMPTY_OBJECT, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret); } // NOTE: This is so that isStyledComponent passes for the innerRef unwrapping WithTheme.prototype.componentWillMount = function componentWillMount() { var _this2 = this; var defaultProps = this.constructor.defaultProps; var styledContext = this.context[CHANNEL_NEXT]; var themeProp = determineTheme(this.props, undefined, defaultProps); if (styledContext === undefined && themeProp === undefined && ("development") !== 'production') { // eslint-disable-next-line no-console console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps'); } else if (styledContext === undefined && themeProp !== undefined) { this.setState({ theme: themeProp }); } else { var subscribe = styledContext.subscribe; this.unsubscribeId = subscribe(function (nextTheme) { var theme = determineTheme(_this2.props, nextTheme, defaultProps); _this2.setState({ theme: theme }); }); } }; WithTheme.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var defaultProps = this.constructor.defaultProps; this.setState(function (oldState) { var theme = determineTheme(nextProps, oldState.theme, defaultProps); return { theme: theme }; }); }; WithTheme.prototype.componentWillUnmount = function componentWillUnmount() { if (this.unsubscribeId !== -1) { this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId); } }; WithTheme.prototype.render = function render() { var props = _extends({ theme: this.state.theme }, this.props); if (!shouldSetInnerRef) { props.ref = props.innerRef; delete props.innerRef; } return React__default.createElement(Component, props); }; return WithTheme; }(React__default.Component); WithTheme.contextTypes = contextShape; WithTheme.displayName = 'WithTheme(' + getComponentName(Component) + ')'; WithTheme.styledComponentId = 'withTheme'; return hoistStatics(WithTheme, Component); }); // /* eslint-disable */ var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = { StyleSheet: StyleSheet }; // /* Warning if you've imported this file on React Native */ if (("development") !== 'production' && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { // eslint-disable-next-line no-console console.warn("It looks like you've imported 'styled-components' on React Native.\n" + "Perhaps you're looking to import 'styled-components/native'?\n" + 'Read more about this at https://www.styled-components.com/docs/basics#react-native'); } /* Warning if there are several instances of styled-components */ if (("development") !== 'production' && ("development") !== 'test' && typeof window !== 'undefined' && typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Node.js') === -1 && navigator.userAgent.indexOf('jsdom') === -1) { window['__styled-components-init__'] = window['__styled-components-init__'] || 0; if (window['__styled-components-init__'] === 1) { // eslint-disable-next-line no-console console.warn("It looks like there are several instances of 'styled-components' initialized in this application. " + 'This may cause dynamic styles not rendering properly, errors happening during rehydration process ' + 'and makes your application bigger without a good reason.\n\n' + 'See https://s-c.sh/2BAXzed for more info.'); } window['__styled-components-init__'] += 1; } /* Instantiate singletons */ var ComponentStyle = _ComponentStyle(generateAlphabeticName, flatten, stringifyRules); var constructWithOptions = _constructWithOptions(css); var StyledComponent = _StyledComponent(ComponentStyle, constructWithOptions); /* Instantiate exported singletons */ var keyframes = _keyframes(generateAlphabeticName, stringifyRules, css); var injectGlobal = _injectGlobal(stringifyRules, css); var styled = _styled(StyledComponent, constructWithOptions); exports.default = styled; exports.css = css; exports.keyframes = keyframes; exports.injectGlobal = injectGlobal; exports.isStyledComponent = isStyledComponent; exports.consolidateStreamedStyles = consolidateStreamedStyles; exports.ThemeProvider = ThemeProvider; exports.withTheme = withTheme; exports.ServerStyleSheet = ServerStyleSheet; exports.StyleSheetManager = StyleSheetManager; exports.__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS; //# sourceMappingURL=styled-components.browser.cjs.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../process/browser.js */ 11), __webpack_require__(/*! ./../../webpack/buildin/module.js */ 12)(module))) /***/ }), /* 11 */ /*!*******************************!*\ !*** ../~/process/browser.js ***! \*******************************/ /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /* 12 */ /*!**************************************!*\ !*** ../~/webpack/buildin/module.js ***! \**************************************/ /***/ (function(module, exports) { module.exports = function(module) { if(!module.webpackPolyfill) { module.deprecate = function() {}; module.paths = []; // module.parent = undefined by default module.children = []; module.webpackPolyfill = 1; } return module; } /***/ }), /* 13 */ /*!*******************************************!*\ !*** ../~/fbjs/lib/hyphenateStyleName.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @typechecks */ 'use strict'; var hyphenate = __webpack_require__(/*! ./hyphenate */ 14); var msPattern = /^ms-/; /** * Hyphenates a camelcased CSS property name, for example: * * > hyphenateStyleName('backgroundColor') * < "background-color" * > hyphenateStyleName('MozTransition') * < "-moz-transition" * > hyphenateStyleName('msTransition') * < "-ms-transition" * * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix * is converted to `-ms-`. * * @param {string} string * @return {string} */ function hyphenateStyleName(string) { return hyphenate(string).replace(msPattern, '-ms-'); } module.exports = hyphenateStyleName; /***/ }), /* 14 */ /*!**********************************!*\ !*** ../~/fbjs/lib/hyphenate.js ***! \**********************************/ /***/ (function(module, exports) { 'use strict'; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @typechecks */ var _uppercasePattern = /([A-Z])/g; /** * Hyphenates a camelcased string, for example: * * > hyphenate('backgroundColor') * < "background-color" * * For CSS style names, use `hyphenateStyleName` instead which works properly * with all vendor prefixes, including `ms`. * * @param {string} string * @return {string} */ function hyphenate(string) { return string.replace(_uppercasePattern, '-$1').toLowerCase(); } module.exports = hyphenate; /***/ }), /* 15 */ /*!*****************************!*\ !*** ../~/stylis/stylis.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {/* * __ ___ * _____/ /___ __/ (_)____ * / ___/ __/ / / / / / ___/ * (__ ) /_/ /_/ / / (__ ) * /____/\__/\__, /_/_/____/ * /____/ * * light - weight css preprocessor @licence MIT */ (function (factory) {/* eslint-disable */ true ? (module['exports'] = factory(null)) : typeof define === 'function' && define['amd'] ? define(factory(null)) : (window['stylis'] = factory(null)) }(/** @param {*=} options */function factory (options) {/* eslint-disable */ 'use strict' /** * Notes * * The [''] pattern is used to support closure compiler * the jsdoc signatures are also used to the same effect * * ---- * * int + int + int === n4 [faster] * * vs * * int === n1 && int === n2 && int === n3 * * ---- * * switch (int) { case ints...} [faster] * * vs * * if (int == 1 && int === 2 ...) * * ---- * * The (first*n1 + second*n2 + third*n3) format used in the property parser * is a simple way to hash the sequence of characters * taking into account the index they occur in * since any number of 3 character sequences could produce duplicates. * * On the other hand sequences that are directly tied to the index of the character * resolve a far more accurate measure, it's also faster * to evaluate one condition in a switch statement * than three in an if statement regardless of the added math. * * This allows the vendor prefixer to be both small and fast. */ var nullptn = /^\0+/g /* matches leading null characters */ var formatptn = /[\0\r\f]/g /* matches new line, null and formfeed characters */ var colonptn = /: */g /* splits animation rules */ var cursorptn = /zoo|gra/ /* assert cursor varient */ var transformptn = /([,: ])(transform)/g /* vendor prefix transform, older webkit */ var animationptn = /,+\s*(?![^(]*[)])/g /* splits multiple shorthand notation animations */ var propertiesptn = / +\s*(?![^(]*[)])/g /* animation properties */ var elementptn = / *[\0] */g /* selector elements */ var selectorptn = /,\r+?/g /* splits selectors */ var andptn = /([\t\r\n ])*\f?&/g /* match & */ var escapeptn = /:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g /* matches :global(.*) */ var invalidptn = /\W+/g /* removes invalid characters from keyframes */ var keyframeptn = /@(k\w+)\s*(\S*)\s*/ /* matches @keyframes $1 */ var plcholdrptn = /::(place)/g /* match ::placeholder varient */ var readonlyptn = /:(read-only)/g /* match :read-only varient */ var beforeptn = /\s+(?=[{\];=:>])/g /* matches \s before ] ; = : */ var afterptn = /([[}=:>])\s+/g /* matches \s after characters [ } = : */ var tailptn = /(\{[^{]+?);(?=\})/g /* matches tail semi-colons ;} */ var whiteptn = /\s{2,}/g /* matches repeating whitespace */ var pseudoptn = /([^\(])(:+) */g /* pseudo element */ var writingptn = /[svh]\w+-[tblr]{2}/ /* match writing mode property values */ var gradientptn = /([\w-]+t\()/g /* match *gradient property */ var supportsptn = /\(\s*(.*)\s*\)/g /* match supports (groups) */ var propertyptn = /([\s\S]*?);/g /* match properties leading semicolon */ var selfptn = /-self|flex-/g /* match flex- and -self in align-self: flex-*; */ var pseudofmt = /[^]*?(:[rp][el]a[\w-]+)[^]*/ /* extrats :readonly or :placholder from selector */ var trimptn = /[ \t]+$/ /* match tail whitspace */ var dimensionptn = /stretch|:\s*\w+\-(?:conte|avail)/ /* match max/min/fit-content, fill-available */ var imgsrcptn = /([^-])(image-set\()/ /* vendors */ var webkit = '-webkit-' var moz = '-moz-' var ms = '-ms-' /* character codes */ var SEMICOLON = 59 /* ; */ var CLOSEBRACES = 125 /* } */ var OPENBRACES = 123 /* { */ var OPENPARENTHESES = 40 /* ( */ var CLOSEPARENTHESES = 41 /* ) */ var OPENBRACKET = 91 /* [ */ var CLOSEBRACKET = 93 /* ] */ var NEWLINE = 10 /* \n */ var CARRIAGE = 13 /* \r */ var TAB = 9 /* \t */ var AT = 64 /* @ */ var SPACE = 32 /* */ var AND = 38 /* & */ var DASH = 45 /* - */ var UNDERSCORE = 95 /* _ */ var STAR = 42 /* * */ var COMMA = 44 /* , */ var COLON = 58 /* : */ var SINGLEQUOTE = 39 /* ' */ var DOUBLEQUOTE = 34 /* " */ var FOWARDSLASH = 47 /* / */ var GREATERTHAN = 62 /* > */ var PLUS = 43 /* + */ var TILDE = 126 /* ~ */ var NULL = 0 /* \0 */ var FORMFEED = 12 /* \f */ var VERTICALTAB = 11 /* \v */ /* special identifiers */ var KEYFRAME = 107 /* k */ var MEDIA = 109 /* m */ var SUPPORTS = 115 /* s */ var PLACEHOLDER = 112 /* p */ var READONLY = 111 /* o */ var IMPORT = 105 /* i */ var CHARSET = 99 /* c */ var DOCUMENT = 100 /* d */ var PAGE = 112 /* p */ var column = 1 /* current column */ var line = 1 /* current line numebr */ var pattern = 0 /* :pattern */ var cascade = 1 /* #id h1 h2 vs h1#id h2#id */ var prefix = 1 /* vendor prefix */ var escape = 1 /* escape :global() pattern */ var compress = 0 /* compress output */ var semicolon = 0 /* no/semicolon option */ var preserve = 0 /* preserve empty selectors */ /* empty reference */ var array = [] /* plugins */ var plugins = [] var plugged = 0 var should = null /* plugin context */ var POSTS = -2 var PREPS = -1 var UNKWN = 0 var PROPS = 1 var BLCKS = 2 var ATRUL = 3 /* plugin newline context */ var unkwn = 0 /* keyframe animation */ var keyed = 1 var key = '' /* selector namespace */ var nscopealt = '' var nscope = '' /** * Compile * * @param {Array} parent * @param {Array} current * @param {string} body * @param {number} id * @param {number} depth * @return {string} */ function compile (parent, current, body, id, depth) { var bracket = 0 /* brackets [] */ var comment = 0 /* comments /* // or /* */ var parentheses = 0 /* functions () */ var quote = 0 /* quotes '', "" */ var first = 0 /* first character code */ var second = 0 /* second character code */ var code = 0 /* current character code */ var tail = 0 /* previous character code */ var trail = 0 /* character before previous code */ var peak = 0 /* previous non-whitespace code */ var counter = 0 /* count sequence termination */ var context = 0 /* track current context */ var atrule = 0 /* track @at-rule context */ var pseudo = 0 /* track pseudo token index */ var caret = 0 /* current character index */ var format = 0 /* control character formating context */ var insert = 0 /* auto semicolon insertion */ var invert = 0 /* inverted selector pattern */ var length = 0 /* generic length address */ var eof = body.length /* end of file(length) */ var eol = eof - 1 /* end of file(characters) */ var char = '' /* current character */ var chars = '' /* current buffer of characters */ var child = '' /* next buffer of characters */ var out = '' /* compiled body */ var children = '' /* compiled children */ var flat = '' /* compiled leafs */ var selector /* generic selector address */ var result /* generic address */ // ...build body while (caret < eof) { code = body.charCodeAt(caret) // eof varient if (caret === eol) { // last character + noop context, add synthetic padding for noop context to terminate if (comment + quote + parentheses + bracket !== 0) { if (comment !== 0) { code = comment === FOWARDSLASH ? NEWLINE : FOWARDSLASH } quote = parentheses = bracket = 0 eof++ eol++ } } if (comment + quote + parentheses + bracket === 0) { // eof varient if (caret === eol) { if (format > 0) { chars = chars.replace(formatptn, '') } if (chars.trim().length > 0) { switch (code) { case SPACE: case TAB: case SEMICOLON: case CARRIAGE: case NEWLINE: { break } default: { chars += body.charAt(caret) } } code = SEMICOLON } } // auto semicolon insertion if (insert === 1) { switch (code) { // false flags case OPENBRACES: case CLOSEBRACES: case SEMICOLON: case DOUBLEQUOTE: case SINGLEQUOTE: case OPENPARENTHESES: case CLOSEPARENTHESES: case COMMA: { insert = 0 } // ignore case TAB: case CARRIAGE: case NEWLINE: case SPACE: { break } // valid default: { insert = 0 length = caret first = code caret-- code = SEMICOLON while (length < eof) { switch (body.charCodeAt(length++)) { case NEWLINE: case CARRIAGE: case SEMICOLON: { ++caret code = first length = eof break } case COLON: { if (format > 0) { ++caret code = first } } case OPENBRACES: { length = eof } } } } } } // token varient switch (code) { case OPENBRACES: { chars = chars.trim() first = chars.charCodeAt(0) counter = 1 length = ++caret while (caret < eof) { switch (code = body.charCodeAt(caret)) { case OPENBRACES: { counter++ break } case CLOSEBRACES: { counter-- break } case FOWARDSLASH: { switch (second = body.charCodeAt(caret + 1)) { // /*, // case STAR: case FOWARDSLASH: { caret = delimited(second, caret, eol, body) } } break } // given "[" === 91 & "]" === 93 hence forth 91 + 1 + 1 === 93 case OPENBRACKET: { code++ } // given "(" === 40 & ")" === 41 hence forth 40 + 1 === 41 case OPENPARENTHESES: { code++ } // quote tail delimiter is identical to the head delimiter hence noop, // fallthrough clauses have been shifted to the correct tail delimiter case DOUBLEQUOTE: case SINGLEQUOTE: { while (caret++ < eol) { if (body.charCodeAt(caret) === code) { break } } } } if (counter === 0) { break } caret++ } child = body.substring(length, caret) if (first === NULL) { first = (chars = chars.replace(nullptn, '').trim()).charCodeAt(0) } switch (first) { // @at-rule case AT: { if (format > 0) { chars = chars.replace(formatptn, '') } second = chars.charCodeAt(1) switch (second) { case DOCUMENT: case MEDIA: case SUPPORTS: case DASH: { selector = current break } default: { selector = array } } child = compile(current, selector, child, second, depth+1) length = child.length // preserve empty @at-rule if (preserve > 0 && length === 0) { length = chars.length } // execute plugins, @at-rule context if (plugged > 0) { selector = select(array, chars, invert) result = proxy(ATRUL, child, selector, current, line, column, length, second, depth, id) chars = selector.join('') if (result !== void 0) { if ((length = (child = result.trim()).length) === 0) { second = 0 child = '' } } } if (length > 0) { switch (second) { case SUPPORTS: { chars = chars.replace(supportsptn, supports) } case DOCUMENT: case MEDIA: case DASH: { child = chars + '{' + child + '}' break } case KEYFRAME: { chars = chars.replace(keyframeptn, '$1 $2' + (keyed > 0 ? key : '')) child = chars + '{' + child + '}' if (prefix === 1 || (prefix === 2 && vendor('@'+child, 3))) { child = '@' + webkit + child + '@' + child } else { child = '@' + child } break } default: { child = chars + child if (id === PAGE) { child = (out += child, '') } } } } else { child = '' } break } // selector default: { child = compile(current, select(current, chars, invert), child, id, depth+1) } } children += child // reset context = 0 insert = 0 pseudo = 0 format = 0 invert = 0 atrule = 0 chars = '' child = '' code = body.charCodeAt(++caret) break } case CLOSEBRACES: case SEMICOLON: { chars = (format > 0 ? chars.replace(formatptn, '') : chars).trim() if ((length = chars.length) > 1) { // monkey-patch missing colon if (pseudo === 0) { first = chars.charCodeAt(0) // first character is a letter or dash, buffer has a space character if ((first === DASH || first > 96 && first < 123)) { length = (chars = chars.replace(' ', ':')).length } } // execute plugins, property context if (plugged > 0) { if ((result = proxy(PROPS, chars, current, parent, line, column, out.length, id, depth, id)) !== void 0) { if ((length = (chars = result.trim()).length) === 0) { chars = '\0\0' } } } first = chars.charCodeAt(0) second = chars.charCodeAt(1) switch (first) { case NULL: { break } case AT: { if (second === IMPORT || second === CHARSET) { flat += chars + body.charAt(caret) break } } default: { if (chars.charCodeAt(length-1) === COLON) { break } out += property(chars, first, second, chars.charCodeAt(2)) } } } // reset context = 0 insert = 0 pseudo = 0 format = 0 invert = 0 chars = '' code = body.charCodeAt(++caret) break } } } // parse characters switch (code) { case CARRIAGE: case NEWLINE: { // auto insert semicolon if (comment + quote + parentheses + bracket + semicolon === 0) { // valid non-whitespace characters that // may precede a newline switch (peak) { case CLOSEPARENTHESES: case SINGLEQUOTE: case DOUBLEQUOTE: case AT: case TILDE: case GREATERTHAN: case STAR: case PLUS: case FOWARDSLASH: case DASH: case COLON: case COMMA: case SEMICOLON: case OPENBRACES: case CLOSEBRACES: { break } default: { // current buffer has a colon if (pseudo > 0) { insert = 1 } } } } // terminate line comment if (comment === FOWARDSLASH) { comment = 0 } else if (cascade + context === 0 && id !== KEYFRAME && chars.length > 0) { format = 1 chars += '\0' } // execute plugins, newline context if (plugged * unkwn > 0) { proxy(UNKWN, chars, current, parent, line, column, out.length, id, depth, id) } // next line, reset column position column = 1 line++ break } case SEMICOLON: case CLOSEBRACES: { if (comment + quote + parentheses + bracket === 0) { column++ break } } default: { // increment column position column++ // current character char = body.charAt(caret) // remove comments, escape functions, strings, attributes and prepare selectors switch (code) { case TAB: case SPACE: { if (quote + bracket + comment === 0) { switch (tail) { case COMMA: case COLON: case TAB: case SPACE: { char = '' break } default: { if (code !== SPACE) { char = ' ' } } } } break } // escape breaking control characters case NULL: { char = '\\0' break } case FORMFEED: { char = '\\f' break } case VERTICALTAB: { char = '\\v' break } // & case AND: { // inverted selector pattern i.e html & if (quote + comment + bracket === 0 && cascade > 0) { invert = 1 format = 1 char = '\f' + char } break } // ::paceholder, l // :read-ony, l case 108: { if (quote + comment + bracket + pattern === 0 && pseudo > 0) { switch (caret - pseudo) { // ::placeholder case 2: { if (tail === PLACEHOLDER && body.charCodeAt(caret-3) === COLON) { pattern = tail } } // :read-only case 8: { if (trail === READONLY) { pattern = trail } } } } break } // : case COLON: { if (quote + comment + bracket === 0) { pseudo = caret } break } // selectors case COMMA: { if (comment + parentheses + quote + bracket === 0) { format = 1 char += '\r' } break } // quotes case DOUBLEQUOTE: case SINGLEQUOTE: { if (comment === 0) { quote = quote === code ? 0 : (quote === 0 ? code : quote) } break } // attributes case OPENBRACKET: { if (quote + comment + parentheses === 0) { bracket++ } break } case CLOSEBRACKET: { if (quote + comment + parentheses === 0) { bracket-- } break } // functions case CLOSEPARENTHESES: { if (quote + comment + bracket === 0) { parentheses-- } break } case OPENPARENTHESES: { if (quote + comment + bracket === 0) { if (context === 0) { switch (tail*2 + trail*3) { // :matches case 533: { break } // :global, :not, :nth-child etc... default: { counter = 0 context = 1 } } } parentheses++ } break } case AT: { if (comment + parentheses + quote + bracket + pseudo + atrule === 0) { atrule = 1 } break } // block/line comments case STAR: case FOWARDSLASH: { if (quote + bracket + parentheses > 0) { break } switch (comment) { // initialize line/block comment context case 0: { switch (code*2 + body.charCodeAt(caret+1)*3) { // // case 235: { comment = FOWARDSLASH break } // /* case 220: { length = caret comment = STAR break } } break } // end block comment context case STAR: { if (code === FOWARDSLASH && tail === STAR && length + 2 !== caret) { // /* ... */, ! if (body.charCodeAt(length+2) === 33) { out += body.substring(length, caret+1) } char = '' comment = 0 } } } } } // ignore comment blocks if (comment === 0) { // aggressive isolation mode, divide each individual selector // including selectors in :not function but excluding selectors in :global function if (cascade + quote + bracket + atrule === 0 && id !== KEYFRAME && code !== SEMICOLON) { switch (code) { case COMMA: case TILDE: case GREATERTHAN: case PLUS: case CLOSEPARENTHESES: case OPENPARENTHESES: { if (context === 0) { // outside of an isolated context i.e nth-child(<...>) switch (tail) { case TAB: case SPACE: case NEWLINE: case CARRIAGE: { char = char + '\0' break } default: { char = '\0' + char + (code === COMMA ? '' : '\0') } } format = 1 } else { // within an isolated context, sleep untill it's terminated switch (code) { case OPENPARENTHESES: { // :globa( if (pseudo + 7 === caret && tail === 108) { pseudo = 0 } context = ++counter break } case CLOSEPARENTHESES: { if ((context = --counter) === 0) { format = 1 char += '\0' } break } } } break } case TAB: case SPACE: { switch (tail) { case NULL: case OPENBRACES: case CLOSEBRACES: case SEMICOLON: case COMMA: case FORMFEED: case TAB: case SPACE: case NEWLINE: case CARRIAGE: { break } default: { // ignore in isolated contexts if (context === 0) { format = 1 char += '\0' } } } } } } // concat buffer of characters chars += char // previous non-whitespace character code if (code !== SPACE && code !== TAB) { peak = code } } } } // tail character codes trail = tail tail = code // visit every character caret++ } length = out.length // preserve empty selector if (preserve > 0) { if (length === 0 && children.length === 0 && (current[0].length === 0) === false) { if (id !== MEDIA || (current.length === 1 && (cascade > 0 ? nscopealt : nscope) === current[0])) { length = current.join(',').length + 2 } } } if (length > 0) { // cascade isolation mode? selector = cascade === 0 && id !== KEYFRAME ? isolate(current) : current // execute plugins, block context if (plugged > 0) { result = proxy(BLCKS, out, selector, parent, line, column, length, id, depth, id) if (result !== void 0 && (out = result).length === 0) { return flat + out + children } } out = selector.join(',') + '{' + out + '}' if (prefix*pattern !== 0) { if (prefix === 2 && !vendor(out, 2)) pattern = 0 switch (pattern) { // ::read-only case READONLY: { out = out.replace(readonlyptn, ':'+moz+'$1')+out break } // ::placeholder case PLACEHOLDER: { out = ( out.replace(plcholdrptn, '::' + webkit + 'input-$1') + out.replace(plcholdrptn, '::' + moz + '$1') + out.replace(plcholdrptn, ':' + ms + 'input-$1') + out ) break } } pattern = 0 } } return flat + out + children } /** * Select * * @param {Array} parent * @param {string} current * @param {number} invert * @return {Array} */ function select (parent, current, invert) { var selectors = current.trim().split(selectorptn) var out = selectors var length = selectors.length var l = parent.length switch (l) { // 0-1 parent selectors case 0: case 1: { for (var i = 0, selector = l === 0 ? '' : parent[0] + ' '; i < length; ++i) { out[i] = scope(selector, out[i], invert, l).trim() } break } // >2 parent selectors, nested default: { for (var i = 0, j = 0, out = []; i < length; ++i) { for (var k = 0; k < l; ++k) { out[j++] = scope(parent[k] + ' ', selectors[i], invert, l).trim() } } } } return out } /** * Scope * * @param {string} parent * @param {string} current * @param {number} invert * @param {number} level * @return {string} */ function scope (parent, current, invert, level) { var selector = current var code = selector.charCodeAt(0) // trim leading whitespace if (code < 33) { code = (selector = selector.trim()).charCodeAt(0) } switch (code) { // & case AND: { switch (cascade + level) { case 0: case 1: { if (parent.trim().length === 0) { break } } default: { return selector.replace(andptn, '$1'+parent.trim()) } } break } // : case COLON: { switch (selector.charCodeAt(1)) { // g in :global case 103: { if (escape > 0 && cascade > 0) { return selector.replace(escapeptn, '$1').replace(andptn, '$1'+nscope) } break } default: { // :hover return parent.trim() + selector.replace(andptn, '$1'+parent.trim()) } } } default: { // html & if (invert*cascade > 0 && selector.indexOf('\f') > 0) { return selector.replace(andptn, (parent.charCodeAt(0) === COLON ? '' : '$1')+parent.trim()) } } } return parent + selector } /** * Property * * @param {string} input * @param {number} first * @param {number} second * @param {number} third * @return {string} */ function property (input, first, second, third) { var index = 0 var out = input + ';' var hash = (first*2) + (second*3) + (third*4) var cache // animation: a, n, i characters if (hash === 944) { return animation(out) } else if (prefix === 0 || (prefix === 2 && !vendor(out, 1))) { return out } // vendor prefix switch (hash) { // text-decoration/text-size-adjust/text-shadow/text-align/text-transform: t, e, x case 1015: { // text-shadow/text-align/text-transform, a return out.charCodeAt(10) === 97 ? webkit + out + out : out } // filter/fill f, i, l case 951: { // filter, t return out.charCodeAt(3) === 116 ? webkit + out + out : out } // color/column, c, o, l case 963: { // column, n return out.charCodeAt(5) === 110 ? webkit + out + out : out } // box-decoration-break, b, o, x case 1009: { if (out.charCodeAt(4) !== 100) { break } } // mask, m, a, s // clip-path, c, l, i case 969: case 942: { return webkit + out + out } // appearance: a, p, p case 978: { return webkit + out + moz + out + out } // hyphens: h, y, p // user-select: u, s, e case 1019: case 983: { return webkit + out + moz + out + ms + out + out } // background/backface-visibility, b, a, c case 883: { // backface-visibility, - if (out.charCodeAt(8) === DASH) { return webkit + out + out } // image-set(...) if (out.indexOf('image-set(', 11) > 0) { return out.replace(imgsrcptn, '$1'+webkit+'$2') + out } return out } // flex: f, l, e case 932: { if (out.charCodeAt(4) === DASH) { switch (out.charCodeAt(5)) { // flex-grow, g case 103: { return webkit + 'box-' + out.replace('-grow', '') + webkit + out + ms + out.replace('grow', 'positive') + out } // flex-shrink, s case 115: { return webkit + out + ms + out.replace('shrink', 'negative') + out } // flex-basis, b case 98: { return webkit + out + ms + out.replace('basis', 'preferred-size') + out } } } return webkit + out + ms + out + out } // order: o, r, d case 964: { return webkit + out + ms + 'flex' + '-' + out + out } // justify-items/justify-content, j, u, s case 1023: { // justify-content, c if (out.charCodeAt(8) !== 99) { break } cache = out.substring(out.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify') return webkit + 'box-pack' + cache + webkit + out + ms + 'flex-pack' + cache + out } // cursor, c, u, r case 1005: { return cursorptn.test(out) ? out.replace(colonptn, ':' + webkit) + out.replace(colonptn, ':' + moz) + out : out } // writing-mode, w, r, i case 1000: { cache = out.substring(13).trim() index = cache.indexOf('-') + 1 switch (cache.charCodeAt(0)+cache.charCodeAt(index)) { // vertical-lr case 226: { cache = out.replace(writingptn, 'tb') break } // vertical-rl case 232: { cache = out.replace(writingptn, 'tb-rl') break } // horizontal-tb case 220: { cache = out.replace(writingptn, 'lr') break } default: { return out } } return webkit + out + ms + cache + out } // position: sticky case 1017: { if (out.indexOf('sticky', 9) === -1) { return out } } // display(flex/inline-flex/inline-box): d, i, s case 975: { index = (out = input).length - 10 cache = (out.charCodeAt(index) === 33 ? out.substring(0, index) : out).substring(input.indexOf(':', 7) + 1).trim() switch (hash = cache.charCodeAt(0) + (cache.charCodeAt(7)|0)) { // inline- case 203: { // inline-box if (cache.charCodeAt(8) < 111) { break } } // inline-box/sticky case 115: { out = out.replace(cache, webkit+cache)+';'+out break } // inline-flex // flex case 207: case 102: { out = ( out.replace(cache, webkit+(hash > 102 ? 'inline-' : '')+'box')+';'+ out.replace(cache, webkit+cache)+';'+ out.replace(cache, ms+cache+'box')+';'+ out ) } } return out + ';' } // align-items, align-center, align-self: a, l, i, - case 938: { if (out.charCodeAt(5) === DASH) { switch (out.charCodeAt(6)) { // align-items, i case 105: { cache = out.replace('-items', '') return webkit + out + webkit + 'box-' + cache + ms + 'flex-' + cache + out } // align-self, s case 115: { return webkit + out + ms + 'flex-item-' + out.replace(selfptn, '') + out } // align-content default: { return webkit + out + ms + 'flex-line-pack' + out.replace('align-content', '').replace(selfptn, '') + out } } } break } // min/max case 973: case 989: { // min-/max- height/width/block-size/inline-size if (out.charCodeAt(3) !== DASH || out.charCodeAt(4) === 122) { break } } // height/width: min-content / width: max-content case 931: case 953: { if (dimensionptn.test(input) === true) { // stretch if ((cache = input.substring(input.indexOf(':') + 1)).charCodeAt(0) === 115) return property(input.replace('stretch', 'fill-available'), first, second, third).replace(':fill-available', ':stretch') else return out.replace(cache, webkit + cache) + out.replace(cache, moz + cache.replace('fill-', '')) + out } break } // transform, transition: t, r, a case 962: { out = webkit + out + (out.charCodeAt(5) === 102 ? ms + out : '') + out // transitions if (second + third === 211 && out.charCodeAt(13) === 105 && out.indexOf('transform', 10) > 0) { return out.substring(0, out.indexOf(';', 27) + 1).replace(transformptn, '$1' + webkit + '$2') + out } break } } return out } /** * Vendor * * @param {string} content * @param {number} context * @return {boolean} */ function vendor (content, context) { var index = content.indexOf(context === 1 ? ':' : '{') var key = content.substring(0, context !== 3 ? index : 10) var value = content.substring(index + 1, content.length - 1) return should(context !== 2 ? key : key.replace(pseudofmt, '$1'), value, context) } /** * Supports * * @param {string} match * @param {string} group * @return {string} */ function supports (match, group) { var out = property(group, group.charCodeAt(0), group.charCodeAt(1), group.charCodeAt(2)) return out !== group+';' ? out.replace(propertyptn, ' or ($1)').substring(4) : '('+group+')' } /** * Animation * * @param {string} input * @return {string} */ function animation (input) { var length = input.length var index = input.indexOf(':', 9) + 1 var declare = input.substring(0, index).trim() var out = input.substring(index, length-1).trim() switch (input.charCodeAt(9)*keyed) { case 0: { break } // animation-*, - case DASH: { // animation-name, n if (input.charCodeAt(10) !== 110) { break } } // animation/animation-name default: { // split in case of multiple animations var list = out.split((out = '', animationptn)) for (var i = 0, index = 0, length = list.length; i < length; index = 0, ++i) { var value = list[i] var items = value.split(propertiesptn) while (value = items[index]) { var peak = value.charCodeAt(0) if (keyed === 1 && ( // letters (peak > AT && peak < 90) || (peak > 96 && peak < 123) || peak === UNDERSCORE || // dash but not in sequence i.e -- (peak === DASH && value.charCodeAt(1) !== DASH) )) { // not a number/function switch (isNaN(parseFloat(value)) + (value.indexOf('(') !== -1)) { case 1: { switch (value) { // not a valid reserved keyword case 'infinite': case 'alternate': case 'backwards': case 'running': case 'normal': case 'forwards': case 'both': case 'none': case 'linear': case 'ease': case 'ease-in': case 'ease-out': case 'ease-in-out': case 'paused': case 'reverse': case 'alternate-reverse': case 'inherit': case 'initial': case 'unset': case 'step-start': case 'step-end': { break } default: { value += key } } } } } items[index++] = value } out += (i === 0 ? '' : ',') + items.join(' ') } } } out = declare + out + ';' if (prefix === 1 || (prefix === 2 && vendor(out, 1))) return webkit + out + out return out } /** * Isolate * * @param {Array} current */ function isolate (current) { for (var i = 0, length = current.length, selector = Array(length), padding, element; i < length; ++i) { // split individual elements in a selector i.e h1 h2 === [h1, h2] var elements = current[i].split(elementptn) var out = '' for (var j = 0, size = 0, tail = 0, code = 0, l = elements.length; j < l; ++j) { // empty element if ((size = (element = elements[j]).length) === 0 && l > 1) { continue } tail = out.charCodeAt(out.length-1) code = element.charCodeAt(0) padding = '' if (j !== 0) { // determine if we need padding switch (tail) { case STAR: case TILDE: case GREATERTHAN: case PLUS: case SPACE: case OPENPARENTHESES: { break } default: { padding = ' ' } } } switch (code) { case AND: { element = padding + nscopealt } case TILDE: case GREATERTHAN: case PLUS: case SPACE: case CLOSEPARENTHESES: case OPENPARENTHESES: { break } case OPENBRACKET: { element = padding + element + nscopealt break } case COLON: { switch (element.charCodeAt(1)*2 + element.charCodeAt(2)*3) { // :global case 530: { if (escape > 0) { element = padding + element.substring(8, size - 1) break } } // :hover, :nth-child(), ... default: { if (j < 1 || elements[j-1].length < 1) { element = padding + nscopealt + element } } } break } case COMMA: { padding = '' } default: { if (size > 1 && element.indexOf(':') > 0) { element = padding + element.replace(pseudoptn, '$1' + nscopealt + '$2') } else { element = padding + element + nscopealt } } } out += element } selector[i] = out.replace(formatptn, '').trim() } return selector } /** * Proxy * * @param {number} context * @param {string} content * @param {Array} selectors * @param {Array} parents * @param {number} line * @param {number} column * @param {number} length * @param {number} id * @param {number} depth * @param {number} at * @return {(string|void|*)} */ function proxy (context, content, selectors, parents, line, column, length, id, depth, at) { for (var i = 0, out = content, next; i < plugged; ++i) { switch (next = plugins[i].call(stylis, context, out, selectors, parents, line, column, length, id, depth, at)) { case void 0: case false: case true: case null: { break } default: { out = next } } } if (out !== content) { return out } } /** * @param {number} code * @param {number} index * @param {number} length * @param {string} body * @return {number} */ function delimited (code, index, length, body) { for (var i = index + 1; i < length; ++i) { switch (body.charCodeAt(i)) { // /* case FOWARDSLASH: { if (code === STAR) { if (body.charCodeAt(i - 1) === STAR && index + 2 !== i) { return i + 1 } } break } // // case NEWLINE: { if (code === FOWARDSLASH) { return i + 1 } } } } return i } /** * @param {number} type * @param {number} index * @param {number} length * @param {number} find * @param {string} body * @return {number} */ function match (type, index, length, body) { for (var i = index + 1; i < length; ++i) { switch (body.charCodeAt(i)) { case type: { return i } } } return i } /** * Minify * * @param {(string|*)} output * @return {string} */ function minify (output) { return output .replace(formatptn, '') .replace(beforeptn, '') .replace(afterptn, '$1') .replace(tailptn, '$1') .replace(whiteptn, ' ') } /** * Use * * @param {(Array|function(...?)|number|void)?} plugin */ function use (plugin) { switch (plugin) { case void 0: case null: { plugged = plugins.length = 0 break } default: { if (typeof plugin === 'function') { plugins[plugged++] = plugin } else if (typeof plugin === 'object') { for (var i = 0, length = plugin.length; i < length; ++i) { use(plugin[i]) } } else { unkwn = !!plugin|0 } } } return use } /** * Set * * @param {*} options */ function set (options) { for (var name in options) { var value = options[name] switch (name) { case 'keyframe': keyed = value|0; break case 'global': escape = value|0; break case 'cascade': cascade = value|0; break case 'compress': compress = value|0; break case 'semicolon': semicolon = value|0; break case 'preserve': preserve = value|0; break case 'prefix': should = null if (!value) { prefix = 0 } else if (typeof value !== 'function') { prefix = 1 } else { prefix = 2 should = value } } } return set } /** * Stylis * * @param {string} selector * @param {string} input * @return {*} */ function stylis (selector, input) { if (this !== void 0 && this.constructor === stylis) { return factory(selector) } // setup var ns = selector var code = ns.charCodeAt(0) // trim leading whitespace if (code < 33) { code = (ns = ns.trim()).charCodeAt(0) } // keyframe/animation namespace if (keyed > 0) { key = ns.replace(invalidptn, code === OPENBRACKET ? '' : '-') } // reset, used to assert if a plugin is moneky-patching the return value code = 1 // cascade/isolate if (cascade === 1) { nscope = ns } else { nscopealt = ns } var selectors = [nscope] var result // execute plugins, pre-process context if (plugged > 0) { result = proxy(PREPS, input, selectors, selectors, line, column, 0, 0, 0, 0) if (result !== void 0 && typeof result === 'string') { input = result } } // build var output = compile(array, selectors, input, 0, 0) // execute plugins, post-process context if (plugged > 0) { result = proxy(POSTS, output, selectors, selectors, line, column, output.length, 0, 0, 0) // bypass minification if (result !== void 0 && typeof(output = result) !== 'string') { code = 0 } } // reset key = '' nscope = '' nscopealt = '' pattern = 0 line = 1 column = 1 return compress*code === 0 ? output : minify(output) } stylis['use'] = use stylis['set'] = set if (options !== void 0) { set(options) } return stylis })); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../webpack/buildin/module.js */ 12)(module))) /***/ }), /* 16 */ /*!***************************************!*\ !*** ../~/stylis-rule-sheet/index.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {(function (factory) { true ? (module['exports'] = factory()) : typeof define === 'function' && define['amd'] ? define(factory()) : (window['stylisRuleSheet'] = factory()) }(function () { 'use strict' return function (insertRule) { var delimiter = '/*|*/' var needle = delimiter+'}' function toSheet (block) { if (block) try { insertRule(block + '}') } catch (e) {} } return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) { switch (context) { // property case 1: // @import if (depth === 0 && content.charCodeAt(0) === 64) return insertRule(content+';'), '' break // selector case 2: if (ns === 0) return content + delimiter break // at-rule case 3: switch (ns) { // @font-face, @page case 102: case 112: return insertRule(selectors[0]+content), '' default: return content + (at === 0 ? delimiter : '') } case -2: content.split(needle).forEach(toSheet) } } } })) /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../webpack/buildin/module.js */ 12)(module))) /***/ }), /* 17 */ /*!************************************************************************!*\ !*** ../~/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***! \************************************************************************/ /***/ (function(module, exports) { 'use strict'; /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var REACT_STATICS = { childContextTypes: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = getPrototypeOf && getPrototypeOf(Object); function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components if (objectPrototype) { var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } } var keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) { var descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { // Avoid failures from read-only properties defineProperty(targetComponent, key, descriptor); } catch (e) {} } } return targetComponent; } return targetComponent; } module.exports = hoistNonReactStatics; /***/ }), /* 18 */ /*!*****************************!*\ !*** ./styled/constants.js ***! \*****************************/ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var colors = exports.colors = { PRIMARY: '#ABE2FB', SECONDARY: '#E6E6E6', DARKER_PRIMARY: '#87ceeb', OFF_WHITE: '#15181A', GREY: '#D3D3D3', RED: '#FF5E5E', DARK_GREY: '#535D63' }; var TRACK_TOTAL_DEG = exports.TRACK_TOTAL_DEG = 270.0; var RADIAN = exports.RADIAN = Math.PI / 180.0; var light = exports.light = { primary: colors.PRIMARY, secondary: colors.SECONDARY, detail: colors.GREY, dark: false }; var dark = exports.dark = { primary: colors.PRIMARY, secondary: colors.DARK_GREY, detail: colors.DARK_GREY, dark: true }; exports.default = { dark: dark, light: light, colors: colors }; /***/ }), /* 19 */ /*!******************************************!*\ !*** ./components/ToggleSwitch.react.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var Component = _react.Component; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var withTheme = _styledComponents.withTheme; var _Indicator = __webpack_require__(/*! ../styled/shared/Indicator.styled */ 20); var Indicator = _interopRequireDefault(_Indicator).default; var _ToggleSwitch = __webpack_require__(/*! ../styled/ToggleSwitch.styled */ 21); var Wrapper = _ToggleSwitch.Wrapper; var ButtonContainer = _ToggleSwitch.ButtonContainer; var Button = _ToggleSwitch.Button; var DarkSwitchContainer = _ToggleSwitch.DarkSwitchContainer; var DarkSwitch = _ToggleSwitch.DarkSwitch; var RowContainer = _ToggleSwitch.RowContainer; var RowLabel = _ToggleSwitch.RowLabel; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function getLabelProps(label) { if ((typeof label === 'undefined' ? 'undefined' : _typeof(label)) === 'object') { return { children: label.label, style: label.style }; } return { children: label, style: {} }; } /** * A switch component that toggles between * two values. */ var ToggleSwitch = function (_Component) { _inherits(ToggleSwitch, _Component); function ToggleSwitch(props) { _classCallCheck(this, ToggleSwitch); var _this = _possibleConstructorReturn(this, (ToggleSwitch.__proto__ || Object.getPrototypeOf(ToggleSwitch)).call(this, props)); _this.state = { value: props.value }; _this.click = _this.click.bind(_this); return _this; } _createClass(ToggleSwitch, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(newProps) { if (newProps.value !== this.state.value) this.setState({ value: newProps.value }); } }, { key: 'click', value: function click() { if (!this.props.disabled) { var newValue = !this.state.value; this.setState({ value: newValue }); if (this.props.setProps) this.props.setProps({ value: newValue }); } } }, { key: 'render', value: function render() { var _props = this.props, id = _props.id, className = _props.className, style = _props.style, label = _props.label, labelPosition = _props.labelPosition, booleanSwitch = _props.booleanSwitch, theme = _props.theme, color = _props.color; var size = this.props.size || 45; var SwitchContainer = ButtonContainer; var Switch = Button; if (theme.dark && !booleanSwitch) { SwitchContainer = DarkSwitchContainer; Switch = DarkSwitch; } var indicatorSize = size / 10 * 1.25; var doubleLabel = Array.isArray(label); var switchCore = React.createElement( Wrapper, { rotate: this.props.vertical ? -90 : 0, size: size }, !booleanSwitch && React.createElement(Indicator, { on: this.state.value, size: indicatorSize, primary: color }), React.createElement( SwitchContainer, { onClick: this.click, size: size, color: color, on: this.state.value, booleanSwitch: booleanSwitch }, React.createElement(Switch, { disabled: this.props.disabled, on: this.state.value, size: size, booleanSwitch: booleanSwitch }) ), !booleanSwitch && React.createElement(Indicator, { main: true, on: this.state.value, size: indicatorSize, primary: color }) ); return React.createElement( 'div', { id: id, className: className, style: style }, doubleLabel ? React.createElement( RowContainer, this.props, React.createElement(RowLabel, _extends({ position: this.props.vertical ? 'bottom' : 'left' }, getLabelProps(label[0]))), switchCore, React.createElement(RowLabel, _extends({ position: this.props.vertical ? 'top' : 'right' }, getLabelProps(label[1]))) ) : React.createElement( LabelContainer, { label: label, labelPosition: labelPosition }, switchCore ) ); } }]); return ToggleSwitch; }(Component); ToggleSwitch.defaultProps = { value: false, vertical: false, theme: light, labelPosition: 'top' }; ToggleSwitch.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The state of the switch */ value: PropTypes.bool, /** * The size of the switch */ size: PropTypes.number, /** * Color to highlight button/indicator */ color: PropTypes.string, /** * If true, switch will be vertical instead * of horizontal */ vertical: PropTypes.bool, /** * If true, switch cannot be clicked */ disabled: PropTypes.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }), /** * Multiple labels for both toggle states. The label at index 0 will be left * (or bottom if the switch is vertical), and the label at index 0 will be * on the right (or top if vertical) */ PropTypes.arrayOf(PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]))]), /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root object. */ style: PropTypes.object, /** * Dash-assigned callback that gets fired when * switch is toggled. */ setProps: PropTypes.func }; exports.default = withTheme(ToggleSwitch); /***/ }), /* 20 */ /*!*******************************************!*\ !*** ./styled/shared/Indicator.styled.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _templateObject = _taggedTemplateLiteral(['\n border-radius: ', ';\n transition: all 100ms ease-in-out;\n ', '\n\n'], ['\n border-radius: ', ';\n transition: all 100ms ease-in-out;\n ', '\n\n']), _templateObject2 = _taggedTemplateLiteral(['\n width: ', 'px;\n height: ', 'px;\n background-color: ', ';\n ', '\n ', '\n '], ['\n width: ', 'px;\n height: ', 'px;\n background-color: ', ';\n ', '\n ', '\n ']), _templateObject3 = _taggedTemplateLiteral(['\n box-shadow: 0 0 8px 2px ', ', 1px 1px 0px 0px rgba(0,0,0,0.9), -1px -1px 0px 0px rgba(255,255,255,0.1);\n '], ['\n box-shadow: 0 0 8px 2px ', ', 1px 1px 0px 0px rgba(0,0,0,0.9), -1px -1px 0px 0px rgba(255,255,255,0.1);\n ']), _templateObject4 = _taggedTemplateLiteral(['\n background-image: linear-gradient(145deg, rgba(255,255,255,0.10) 0%, rgba(0,0,0,0.50) 100%);\n background-blend-mode: overlay;\n box-shadow: inset 0 0 8px -1px rgba(0,0,0,0.5),\n inset 0 0 4px 0 rgba(0,0,0,0.6),\n -1px -1px 0px 0px rgba(0,0,0,0.9),\n 1px 1px 0px 0px rgba(255,255,255,0.1);\n '], ['\n background-image: linear-gradient(145deg, rgba(255,255,255,0.10) 0%, rgba(0,0,0,0.50) 100%);\n background-blend-mode: overlay;\n box-shadow: inset 0 0 8px -1px rgba(0,0,0,0.5),\n inset 0 0 4px 0 rgba(0,0,0,0.6),\n -1px -1px 0px 0px rgba(0,0,0,0.9),\n 1px 1px 0px 0px rgba(255,255,255,0.1);\n ']); var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; var _constants = __webpack_require__(/*! ../constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Indicator = styled('div')(_templateObject, function (_ref) { var rectangular = _ref.rectangular; return rectangular ? '0' : '50%'; }, function (props) { var color = props.main ? props.on ? props.primary || props.theme.primary : props.secondary || props.theme.secondary : props.on ? props.theme.secondary : props.primary || props.theme.primary; return css(_templateObject2, props.width || props.height || props.size, props.height || props.width || props.size, color, props.border ? 'border: 1px solid ' + (props.on ? color : '#F8F4F4') + ';' : '', props.theme.dark ? props.on && props.main || !props.on && !props.main ? css(_templateObject3, color) : css(_templateObject4) : ''); }); Indicator.defaultProps = { theme: light }; Indicator.propTypes = { /** * Size of the indicator */ size: PropTypes.number, /** * Theme for styling the component */ theme: PropTypes.object, /** * Add border for off */ border: PropTypes.bool, /** * Color to display when on */ primary: PropTypes.string, /** * Color to display when off */ secondary: PropTypes.string }; exports.default = Indicator; /***/ }), /* 21 */ /*!***************************************!*\ !*** ./styled/ToggleSwitch.styled.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.RowLabel = exports.RowContainer = exports.DarkSwitch = exports.DarkSwitchContainer = exports.Button = exports.ButtonContainer = exports.Wrapper = undefined; var _templateObject = _taggedTemplateLiteral(['\n display: flex;\n justify-content: space-around;\n align-items: center;\n ', ';\n'], ['\n display: flex;\n justify-content: space-around;\n align-items: center;\n ', ';\n']), _templateObject2 = _taggedTemplateLiteral(['\n transform: rotate(', 'deg);\n '], ['\n transform: rotate(', 'deg);\n ']), _templateObject3 = _taggedTemplateLiteral(['\n height: auto;\n display: flex;\n transition: all 0.1s ease-in;\n\n ', ' ', ';\n'], ['\n height: auto;\n display: flex;\n transition: all 0.1s ease-in;\n\n ', ' ', ';\n']), _templateObject4 = _taggedTemplateLiteral(['\n width: ', 'px;\n cursor: pointer;\n padding: ', 'px;\n border-radius: ', 'px;\n margin-left: ', 'px;\n margin-right: ', 'px;\n '], ['\n width: ', 'px;\n cursor: pointer;\n padding: ', 'px;\n border-radius: ', 'px;\n margin-left: ', 'px;\n margin-right: ', 'px;\n ']), _templateObject5 = _taggedTemplateLiteral(['\n background: ', ';\n'], ['\n background: ', ';\n']), _templateObject6 = _taggedTemplateLiteral(['\n background: ', ';\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.3) 100%);\n box-shadow: inset 0 0 8px -1px #000000, inset 0 0 8px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.9), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n'], ['\n background: ', ';\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.3) 100%);\n box-shadow: inset 0 0 8px -1px #000000, inset 0 0 8px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.9), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n']), _templateObject7 = _taggedTemplateLiteral(['\n background: white;\n border-radius: 50%;\n display: block;\n padding: 0;\n margin: 0;\n transition: all 100ms ease-in-out;\n outline: none;\n ', ' &:focus, &:active, &:hover {\n border: none;\n border: ', ';\n }\n\n &:disabled {\n opacity: ', ';\n cursor: not-allowed;\n }\n\n ', ';\n'], ['\n background: white;\n border-radius: 50%;\n display: block;\n padding: 0;\n margin: 0;\n transition: all 100ms ease-in-out;\n outline: none;\n ', ' &:focus, &:active, &:hover {\n border: none;\n border: ', ';\n }\n\n &:disabled {\n opacity: ', ';\n cursor: not-allowed;\n }\n\n ', ';\n']), _templateObject8 = _taggedTemplateLiteral(['\n border: none;\n border: 1px solid ', ';\n width: ', 'px;\n height: ', 'px;\n transform: translateX(', 'px);\n '], ['\n border: none;\n border: 1px solid ', ';\n width: ', 'px;\n height: ', 'px;\n transform: translateX(', 'px);\n ']), _templateObject9 = _taggedTemplateLiteral(['\n background-color: #141414;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.5) -20%, rgba(0, 0, 0, 0.7) 100%);\n box-shadow: inset 0 0 1px 0 rgba(52, 52, 52, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.2),\n 1px 1px 2px 0px rgba(0, 0, 0, 0.7);\n\n &:hover {\n background-color: rgba(0, 0, 0, 0.7);\n }\n\n &::before,\n &::after {\n content: none;\n }\n'], ['\n background-color: #141414;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.5) -20%, rgba(0, 0, 0, 0.7) 100%);\n box-shadow: inset 0 0 1px 0 rgba(52, 52, 52, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.2),\n 1px 1px 2px 0px rgba(0, 0, 0, 0.7);\n\n &:hover {\n background-color: rgba(0, 0, 0, 0.7);\n }\n\n &::before,\n &::after {\n content: none;\n }\n']), _templateObject10 = _taggedTemplateLiteral(['\n display: flex;\n padding: 2px 4px;\n cursor: pointer;\n border-radius: 1px;\n margin: 0 8px;\n\n background: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.1) 100%);\n box-shadow: inset 0 0 8px -1px #000000, inset 0 0 8px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.9), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n'], ['\n display: flex;\n padding: 2px 4px;\n cursor: pointer;\n border-radius: 1px;\n margin: 0 8px;\n\n background: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.1) 100%);\n box-shadow: inset 0 0 8px -1px #000000, inset 0 0 8px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.9), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n']), _templateObject11 = _taggedTemplateLiteral(['\n display: block;\n position: relative;\n margin: 0;\n transition: all 100ms ease-in-out;\n outline: none;\n background: #161616;\n height: ', ';\n width: ', ';\n background-blend-mode: overlay;\n background-color: #111;\n background-image: ;\n background-image: ', ';\n box-shadow: 1px 1px 3px 0px rgba(0, 0, 0, 0.9);\n border-radius: 2px;\n\n &:disabled {\n cursor: not-allowed;\n }\n\n &:hover::after,\n &:active::after,\n &:focus::after {\n box-shadow: none;\n }\n\n &::before {\n content: none;\n }\n\n &::after {\n transition: all 100ms ease-in-out;\n content: \'\';\n position: absolute;\n left: 0;\n right: 0;\n top: 4%;\n height: 92%;\n width: 92%;\n margin: 0 auto;\n ', ' background-color: #161616;\n background-blend-mode: overlay;\n background-image: ', ';\n border-radius: 2px;\n }\n\n &:hover::after {\n background-color: #181818;\n }\n'], ['\n display: block;\n position: relative;\n margin: 0;\n transition: all 100ms ease-in-out;\n outline: none;\n background: #161616;\n height: ', ';\n width: ', ';\n background-blend-mode: overlay;\n background-color: #111;\n background-image: ;\n background-image: ', ';\n box-shadow: 1px 1px 3px 0px rgba(0, 0, 0, 0.9);\n border-radius: 2px;\n\n &:disabled {\n cursor: not-allowed;\n }\n\n &:hover::after,\n &:active::after,\n &:focus::after {\n box-shadow: none;\n }\n\n &::before {\n content: none;\n }\n\n &::after {\n transition: all 100ms ease-in-out;\n content: \'\';\n position: absolute;\n left: 0;\n right: 0;\n top: 4%;\n height: 92%;\n width: 92%;\n margin: 0 auto;\n ', ' background-color: #161616;\n background-blend-mode: overlay;\n background-image: ', ';\n border-radius: 2px;\n }\n\n &:hover::after {\n background-color: #181818;\n }\n']), _templateObject12 = _taggedTemplateLiteral(['radial-gradient(farthest-corner at 0px 0px, rgba(256,255,255,1) 5%, rgba(0,0,0,0.6) 90%)'], ['radial-gradient(farthest-corner at 0px 0px, rgba(256,255,255,1) 5%, rgba(0,0,0,0.6) 90%)']), _templateObject13 = _taggedTemplateLiteral(['\n margin-left: ', 'px;\n '], ['\n margin-left: ', 'px;\n ']), _templateObject14 = _taggedTemplateLiteral(['\n margin-right: ', 'px;\n '], ['\n margin-right: ', 'px;\n ']), _templateObject15 = _taggedTemplateLiteral(['linear-gradient(135deg, rgba(255,255,255,0.7) 20%, rgba(0,0,0,0) 100%),\n linear-gradient(90deg, rgba(255,255,255,0) 40%, rgba(0,0,0,0.8) 100%)'], ['linear-gradient(135deg, rgba(255,255,255,0.7) 20%, rgba(0,0,0,0) 100%),\n linear-gradient(90deg, rgba(255,255,255,0) 40%, rgba(0,0,0,0.8) 100%)']), _templateObject16 = _taggedTemplateLiteral(['linear-gradient(135deg, rgba(0,0,0,0) 0%, rgba(255,255,255,1) 100%),\n linear-gradient(90deg, rgba(0,0,0,0.6) 40%, rgba(255,255,255,0) 100%)'], ['linear-gradient(135deg, rgba(0,0,0,0) 0%, rgba(255,255,255,1) 100%),\n linear-gradient(90deg, rgba(0,0,0,0.6) 40%, rgba(255,255,255,0) 100%)']), _templateObject17 = _taggedTemplateLiteral(['\n display: flex;\n align-items: center;\n justify-content: space-around;\n flex-direction: ', ';\n'], ['\n display: flex;\n align-items: center;\n justify-content: space-around;\n flex-direction: ', ';\n']), _templateObject18 = _taggedTemplateLiteral(['\n margin: 0;\n ', '\n ', '\n ', '\n ', '\n'], ['\n margin: 0;\n ', '\n ', '\n ', '\n ', '\n']); var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; var _constants = __webpack_require__(/*! ./constants */ 18); var light = _constants.light; var _Label = __webpack_require__(/*! ./shared/Label.styled */ 22); var Label = _interopRequireDefault(_Label).default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Wrapper = exports.Wrapper = styled('div')(_templateObject, function (_ref) { var rotate = _ref.rotate; return css(_templateObject2, parseInt(rotate, 10)); }); var ButtonContainer = exports.ButtonContainer = styled('div')(_templateObject3, function (_ref2) { var size = _ref2.size; return css(_templateObject4, size, 0.05 * size, size, 0.05 * size, 0.05 * size); }, function (_ref3) { var theme = _ref3.theme; return theme.dark ? darkContainer : lightContainer; }); ButtonContainer.defaultProps = { theme: light }; var lightContainer = css(_templateObject5, function (_ref4) { var on = _ref4.on, theme = _ref4.theme, color = _ref4.color; return on ? color || theme.secondary : theme.secondary; }); var darkContainer = css(_templateObject6, function (_ref5) { var on = _ref5.on, theme = _ref5.theme, color = _ref5.color; return on ? color || theme.secondary : '#22272a'; }); var Button = exports.Button = styled.button(_templateObject7, function (_ref6) { var size = _ref6.size, on = _ref6.on, theme = _ref6.theme; return css(_templateObject8, theme.dark ? 'none' : theme.detail, size / 2, size / 2, on ? size - size / 2 : 0); }, function (_ref7) { var theme = _ref7.theme; return theme.dark ? 'none' : '1px solid ' + theme.detail; }, function (_ref8) { var theme = _ref8.theme; return theme.dark ? 1 : 0.65; }, function (_ref9) { var theme = _ref9.theme; return theme.dark ? darkButton : null; }); Button.defaultProps = { theme: light }; var darkButton = css(_templateObject9); var DarkSwitchContainer = exports.DarkSwitchContainer = styled.div(_templateObject10); var DarkSwitch = exports.DarkSwitch = styled.button(_templateObject11, function (_ref10) { var size = _ref10.size; return size * 0.72 + 'px'; }, function (_ref11) { var size = _ref11.size; return size * 1.44 + 'px'; }, function (_ref12) { var on = _ref12.on; return on ? css(_templateObject12) : css(_templateObject12); }, function (_ref13) { var size = _ref13.size, on = _ref13.on; var margin = size * 0.08; return on ? css(_templateObject13, margin) : css(_templateObject14, margin); }, function (_ref14) { var on = _ref14.on; return on ? css(_templateObject15) : css(_templateObject16); }); var RowContainer = exports.RowContainer = styled.div(_templateObject17, function (props) { return props.vertical ? 'column-reverse' : 'row'; }); var RowLabel = exports.RowLabel = styled(Label)(_templateObject18, function (_ref15) { var position = _ref15.position, theme = _ref15.theme; return position === 'right' ? 'margin-left: ' + (theme.dark ? 12 : 8) + 'px;' : ''; }, function (_ref16) { var position = _ref16.position, theme = _ref16.theme; return position === 'left' ? 'margin-right: ' + (theme.dark ? 12 : 8) + 'px;' : ''; }, function (_ref17) { var position = _ref17.position, theme = _ref17.theme; return position === 'top' ? 'margin-bottom: ' + (theme.dark ? 34 : 20) + 'px;' : ''; }, function (_ref18) { var position = _ref18.position, theme = _ref18.theme; return position === 'bottom' ? 'margin-top: ' + (theme.dark ? 34 : 20) + 'px;' : ''; }); RowLabel.defaultProps = { theme: light }; /***/ }), /* 22 */ /*!***************************************!*\ !*** ./styled/shared/Label.styled.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _templateObject = _taggedTemplateLiteral(['\n display: block;\n font-size: 14px;\n ', '\n ', '\n'], ['\n display: block;\n font-size: 14px;\n ', '\n ', '\n']), _templateObject2 = _taggedTemplateLiteral(['margin-bottom: 8px;'], ['margin-bottom: 8px;']), _templateObject3 = _taggedTemplateLiteral(['margin-top: 8px;'], ['margin-top: 8px;']), _templateObject4 = _taggedTemplateLiteral(['', ''], ['', '']); var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } exports.default = styled.label(_templateObject, function (_ref) { var position = _ref.position; return position === 'top' ? css(_templateObject2) : css(_templateObject3); }, function (props) { return css(_templateObject4, props.css); }); /***/ }), /* 23 */ /*!************************************************!*\ !*** ./styled/shared/LabelContainer.styled.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _templateObject = _taggedTemplateLiteral(['\n display: flex;\n align-items: center;\n justify-content: space-around;\n flex-direction: ', ';\n'], ['\n display: flex;\n align-items: center;\n justify-content: space-around;\n flex-direction: ', ';\n']); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var _Label = __webpack_require__(/*! ./Label.styled */ 22); var Label = _interopRequireDefault(_Label).default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = styled.div(_templateObject, function (props) { switch (props.labelPosition) { case 'top': return 'column-reverse'; case 'bottom': return 'column'; } }); function LabelContainer(props) { var labelText = props.label; var customLabelStyle = {}; if (_typeof(props.label) === 'object') { labelText = props.label.label; customLabelStyle = props.label.style; } if (labelText && labelText.length) { return React.createElement( Container, { className: props.className, id: props.id, labelPosition: props.labelPosition }, props.children, React.createElement( Label, { style: customLabelStyle, css: props.labelCSS, position: props.labelPosition }, labelText ) ); } return React.createElement( 'div', null, props.children ); } LabelContainer.defaultProps = { labelPosition: 'bottom' }; exports.default = LabelContainer; /***/ }), /* 24 */ /*!*****************************************!*\ !*** ./components/ColorPicker.react.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var Component = _react.Component; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _reactColor = __webpack_require__(/*! react-color */ 25); var ChromePicker = _reactColor.ChromePicker; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var withTheme = _styledComponents.withTheme; var _color = __webpack_require__(/*! color */ 404); var Color = _interopRequireDefault(_color).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var colors = _constants.colors; var light = _constants.light; var _ColorPicker = __webpack_require__(/*! ../styled/ColorPicker.styled */ 412); var Container = _ColorPicker.Container; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var DEFAULT_COLOR = colors.PRIMARY; var parseValue = function parseValue(value) { value = value || {}; if (value.rgb) { var rgba = Object.values(value.rgb); return 'rgba(' + rgba[0] + ', ' + rgba[1] + ', ' + rgba[2] + ', ' + rgba[3] + ')'; } if (value.hex) return Color(value.hex).rgb().string(); return DEFAULT_COLOR; }; /** * A color picker. */ var ColorPicker = function (_Component) { _inherits(ColorPicker, _Component); function ColorPicker(props) { _classCallCheck(this, ColorPicker); var _this = _possibleConstructorReturn(this, (ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call(this, props)); _this.state = { value: props.value }; _this.calcHandleGlow = _this.calcHandleGlow.bind(_this); _this.setValue = _this.setValue.bind(_this); return _this; } _createClass(ColorPicker, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(newProps) { if (newProps.value !== this.state.value) this.setState({ value: newProps.value }); } }, { key: 'calcHandleGlow', value: function calcHandleGlow() { return Color(parseValue(this.state.value)).fade(0.5).string(); } }, { key: 'setValue', value: function setValue(value) { if (value != null) { var hex = value.hex, rgb = value.rgb; var newValue = { hex: hex, rgb: rgb }; this.setState({ value: newValue }); if (this.props.setProps) this.props.setProps({ value: newValue }); } } }, { key: 'render', value: function render() { var _props = this.props, id = _props.id, className = _props.className, style = _props.style; return React.createElement( 'div', { id: id, className: className, style: style }, React.createElement( LabelContainer, this.props, React.createElement( Container, _extends({}, this.props, { glow: this.calcHandleGlow }), React.createElement(ChromePicker, { color: parseValue(this.state.value), onChangeComplete: this.setValue }) ) ) ); } }]); return ColorPicker; }(Component); ColorPicker.defaultProps = { size: 225, theme: light, labelPosition: 'top' }; ColorPicker.propTypes = { /** * The ID used to identify the color picker in Dash callbacks */ id: PropTypes.string, /** * Color value of the picker */ value: PropTypes.shape({ /** * Hex string */ hex: PropTypes.string, /** * RGB/RGBA object */ rbg: PropTypes.shape({ r: PropTypes.number, g: PropTypes.number, b: PropTypes.number, a: PropTypes.number }) }), /** * If true, color cannot be picked. */ disabled: PropTypes.bool, /** * Size (width) of the component in pixels */ size: PropTypes.number, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the indicator label is positioned */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element */ className: PropTypes.string, /** * Dash-assigned callback that gets fired when * the color picker's value changes */ setProps: PropTypes.func, /** * Style to apply to the root component element */ style: PropTypes.object }; exports.default = withTheme(ColorPicker); /***/ }), /* 25 */ /*!*************************************!*\ !*** ../~/react-color/lib/index.js ***! \*************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.CustomPicker = exports.TwitterPicker = exports.SwatchesPicker = exports.SliderPicker = exports.SketchPicker = exports.PhotoshopPicker = exports.MaterialPicker = exports.HuePicker = exports.GithubPicker = exports.CompactPicker = exports.ChromePicker = exports.default = exports.CirclePicker = exports.BlockPicker = exports.AlphaPicker = undefined; var _Alpha = __webpack_require__(/*! ./components/alpha/Alpha */ 26); Object.defineProperty(exports, 'AlphaPicker', { enumerable: true, get: function get() { return _interopRequireDefault(_Alpha).default; } }); var _Block = __webpack_require__(/*! ./components/block/Block */ 319); Object.defineProperty(exports, 'BlockPicker', { enumerable: true, get: function get() { return _interopRequireDefault(_Block).default; } }); var _Circle = __webpack_require__(/*! ./components/circle/Circle */ 370); Object.defineProperty(exports, 'CirclePicker', { enumerable: true, get: function get() { return _interopRequireDefault(_Circle).default; } }); var _Chrome = __webpack_require__(/*! ./components/chrome/Chrome */ 373); Object.defineProperty(exports, 'ChromePicker', { enumerable: true, get: function get() { return _interopRequireDefault(_Chrome).default; } }); var _Compact = __webpack_require__(/*! ./components/compact/Compact */ 378); Object.defineProperty(exports, 'CompactPicker', { enumerable: true, get: function get() { return _interopRequireDefault(_Compact).default; } }); var _Github = __webpack_require__(/*! ./components/github/Github */ 381); Object.defineProperty(exports, 'GithubPicker', { enumerable: true, get: function get() { return _interopRequireDefault(_Github).default; } }); var _Hue = __webpack_require__(/*! ./components/hue/Hue */ 383); Object.defineProperty(exports, 'HuePicker', { enumerable: true, get: function get() { return _interopRequireDefault(_Hue).default; } }); var _Material = __webpack_require__(/*! ./components/material/Material */ 385); Object.defineProperty(exports, 'MaterialPicker', { enumerable: true, get: function get() { return _interopRequireDefault(_Material).default; } }); var _Photoshop = __webpack_require__(/*! ./components/photoshop/Photoshop */ 386); Object.defineProperty(exports, 'PhotoshopPicker', { enumerable: true, get: function get() { return _interopRequireDefault(_Photoshop).default; } }); var _Sketch = __webpack_require__(/*! ./components/sketch/Sketch */ 392); Object.defineProperty(exports, 'SketchPicker', { enumerable: true, get: function get() { return _interopRequireDefault(_Sketch).default; } }); var _Slider = __webpack_require__(/*! ./components/slider/Slider */ 395); Object.defineProperty(exports, 'SliderPicker', { enumerable: true, get: function get() { return _interopRequireDefault(_Slider).default; } }); var _Swatches = __webpack_require__(/*! ./components/swatches/Swatches */ 399); Object.defineProperty(exports, 'SwatchesPicker', { enumerable: true, get: function get() { return _interopRequireDefault(_Swatches).default; } }); var _Twitter = __webpack_require__(/*! ./components/twitter/Twitter */ 403); Object.defineProperty(exports, 'TwitterPicker', { enumerable: true, get: function get() { return _interopRequireDefault(_Twitter).default; } }); var _ColorWrap = __webpack_require__(/*! ./components/common/ColorWrap */ 303); Object.defineProperty(exports, 'CustomPicker', { enumerable: true, get: function get() { return _interopRequireDefault(_ColorWrap).default; } }); var _Chrome2 = _interopRequireDefault(_Chrome); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = _Chrome2.default; /***/ }), /* 26 */ /*!******************************************************!*\ !*** ../~/react-color/lib/components/alpha/Alpha.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.AlphaPicker = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _common = __webpack_require__(/*! ../common */ 191); var _AlphaPointer = __webpack_require__(/*! ./AlphaPointer */ 318); var _AlphaPointer2 = _interopRequireDefault(_AlphaPointer); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var AlphaPicker = exports.AlphaPicker = function AlphaPicker(_ref) { var rgb = _ref.rgb, hsl = _ref.hsl, width = _ref.width, height = _ref.height, onChange = _ref.onChange, direction = _ref.direction, style = _ref.style, renderers = _ref.renderers, pointer = _ref.pointer, _ref$className = _ref.className, className = _ref$className === undefined ? '' : _ref$className; var styles = (0, _reactcss2.default)({ 'default': { picker: { position: 'relative', width: width, height: height }, alpha: { radius: '2px', style: style } } }); return _react2.default.createElement( 'div', { style: styles.picker, className: 'alpha-picker ' + className }, _react2.default.createElement(_common.Alpha, _extends({}, styles.alpha, { rgb: rgb, hsl: hsl, pointer: pointer, renderers: renderers, onChange: onChange, direction: direction })) ); }; AlphaPicker.defaultProps = { width: '316px', height: '16px', direction: 'horizontal', pointer: _AlphaPointer2.default }; exports.default = (0, _common.ColorWrap)(AlphaPicker); /***/ }), /* 27 */ /*!**********************************!*\ !*** ../~/reactcss/lib/index.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.ReactCSS = exports.loop = exports.handleActive = exports.handleHover = exports.hover = undefined; var _flattenNames = __webpack_require__(/*! ./flattenNames */ 28); var _flattenNames2 = _interopRequireDefault(_flattenNames); var _mergeClasses = __webpack_require__(/*! ./mergeClasses */ 155); var _mergeClasses2 = _interopRequireDefault(_mergeClasses); var _autoprefix = __webpack_require__(/*! ./autoprefix */ 187); var _autoprefix2 = _interopRequireDefault(_autoprefix); var _hover2 = __webpack_require__(/*! ./components/hover */ 188); var _hover3 = _interopRequireDefault(_hover2); var _active = __webpack_require__(/*! ./components/active */ 189); var _active2 = _interopRequireDefault(_active); var _loop2 = __webpack_require__(/*! ./loop */ 190); var _loop3 = _interopRequireDefault(_loop2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.hover = _hover3.default; exports.handleHover = _hover3.default; exports.handleActive = _active2.default; exports.loop = _loop3.default; var ReactCSS = exports.ReactCSS = function ReactCSS(classes) { for (var _len = arguments.length, activations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { activations[_key - 1] = arguments[_key]; } var activeNames = (0, _flattenNames2.default)(activations); var merged = (0, _mergeClasses2.default)(classes, activeNames); return (0, _autoprefix2.default)(merged); }; exports.default = ReactCSS; /***/ }), /* 28 */ /*!*****************************************!*\ !*** ../~/reactcss/lib/flattenNames.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.flattenNames = undefined; var _isString2 = __webpack_require__(/*! lodash/isString */ 29); var _isString3 = _interopRequireDefault(_isString2); var _forOwn2 = __webpack_require__(/*! lodash/forOwn */ 38); var _forOwn3 = _interopRequireDefault(_forOwn2); var _isPlainObject2 = __webpack_require__(/*! lodash/isPlainObject */ 64); var _isPlainObject3 = _interopRequireDefault(_isPlainObject2); var _map2 = __webpack_require__(/*! lodash/map */ 66); var _map3 = _interopRequireDefault(_map2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var flattenNames = exports.flattenNames = function flattenNames() { var things = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var names = []; (0, _map3.default)(things, function (thing) { if (Array.isArray(thing)) { flattenNames(thing).map(function (name) { return names.push(name); }); } else if ((0, _isPlainObject3.default)(thing)) { (0, _forOwn3.default)(thing, function (value, key) { value === true && names.push(key); names.push(key + '-' + value); }); } else if ((0, _isString3.default)(thing)) { names.push(thing); } }); return names; }; exports.default = flattenNames; /***/ }), /* 29 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/isString.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 30), isArray = __webpack_require__(/*! ./isArray */ 36), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 37); /** `Object#toString` result references. */ var stringTag = '[object String]'; /** * Checks if `value` is classified as a `String` primitive or object. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); * // => true * * _.isString(1); * // => false */ function isString(value) { return typeof value == 'string' || (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } module.exports = isString; /***/ }), /* 30 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_baseGetTag.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ 31), getRawTag = __webpack_require__(/*! ./_getRawTag */ 34), objectToString = __webpack_require__(/*! ./_objectToString */ 35); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /* 31 */ /*!*****************************************!*\ !*** ../~/reactcss/~/lodash/_Symbol.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(/*! ./_root */ 32); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /* 32 */ /*!***************************************!*\ !*** ../~/reactcss/~/lodash/_root.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ 33); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 33 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_freeGlobal.js ***! \*********************************************/ /***/ (function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; module.exports = freeGlobal; /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }), /* 34 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_getRawTag.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ 31); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }), /* 35 */ /*!*************************************************!*\ !*** ../~/reactcss/~/lodash/_objectToString.js ***! \*************************************************/ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /* 36 */ /*!*****************************************!*\ !*** ../~/reactcss/~/lodash/isArray.js ***! \*****************************************/ /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /* 37 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/isObjectLike.js ***! \**********************************************/ /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /* 38 */ /*!****************************************!*\ !*** ../~/reactcss/~/lodash/forOwn.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var baseForOwn = __webpack_require__(/*! ./_baseForOwn */ 39), castFunction = __webpack_require__(/*! ./_castFunction */ 62); /** * Iterates over own enumerable string keyed properties of an object and * invokes `iteratee` for each property. The iteratee is invoked with three * arguments: (value, key, object). Iteratee functions may exit iteration * early by explicitly returning `false`. * * @static * @memberOf _ * @since 0.3.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. * @see _.forOwnRight * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.forOwn(new Foo, function(value, key) { * console.log(key); * }); * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forOwn(object, iteratee) { return object && baseForOwn(object, castFunction(iteratee)); } module.exports = forOwn; /***/ }), /* 39 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_baseForOwn.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseFor = __webpack_require__(/*! ./_baseFor */ 40), keys = __webpack_require__(/*! ./keys */ 42); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwn(object, iteratee) { return object && baseFor(object, iteratee, keys); } module.exports = baseForOwn; /***/ }), /* 40 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/_baseFor.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var createBaseFor = __webpack_require__(/*! ./_createBaseFor */ 41); /** * The base implementation of `baseForOwn` which iterates over `object` * properties returned by `keysFunc` and invokes `iteratee` for each property. * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseFor = createBaseFor(); module.exports = baseFor; /***/ }), /* 41 */ /*!************************************************!*\ !*** ../~/reactcss/~/lodash/_createBaseFor.js ***! \************************************************/ /***/ (function(module, exports) { /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } module.exports = createBaseFor; /***/ }), /* 42 */ /*!**************************************!*\ !*** ../~/reactcss/~/lodash/keys.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ 43), baseKeys = __webpack_require__(/*! ./_baseKeys */ 55), isArrayLike = __webpack_require__(/*! ./isArrayLike */ 59); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /* 43 */ /*!************************************************!*\ !*** ../~/reactcss/~/lodash/_arrayLikeKeys.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseTimes = __webpack_require__(/*! ./_baseTimes */ 44), isArguments = __webpack_require__(/*! ./isArguments */ 45), isArray = __webpack_require__(/*! ./isArray */ 36), isBuffer = __webpack_require__(/*! ./isBuffer */ 47), isIndex = __webpack_require__(/*! ./_isIndex */ 49), isTypedArray = __webpack_require__(/*! ./isTypedArray */ 50); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }), /* 44 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_baseTimes.js ***! \********************************************/ /***/ (function(module, exports) { /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } module.exports = baseTimes; /***/ }), /* 45 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/isArguments.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ 46), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 37); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /* 46 */ /*!**************************************************!*\ !*** ../~/reactcss/~/lodash/_baseIsArguments.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 30), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 37); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } module.exports = baseIsArguments; /***/ }), /* 47 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/isBuffer.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ 32), stubFalse = __webpack_require__(/*! ./stubFalse */ 48); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ 12)(module))) /***/ }), /* 48 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/stubFalse.js ***! \*******************************************/ /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /* 49 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/_isIndex.js ***! \******************************************/ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }), /* 50 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/isTypedArray.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__(/*! ./_baseIsTypedArray */ 51), baseUnary = __webpack_require__(/*! ./_baseUnary */ 53), nodeUtil = __webpack_require__(/*! ./_nodeUtil */ 54); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /* 51 */ /*!***************************************************!*\ !*** ../~/reactcss/~/lodash/_baseIsTypedArray.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 30), isLength = __webpack_require__(/*! ./isLength */ 52), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 37); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } module.exports = baseIsTypedArray; /***/ }), /* 52 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/isLength.js ***! \******************************************/ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /* 53 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_baseUnary.js ***! \********************************************/ /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /* 54 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_nodeUtil.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ 33); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ 12)(module))) /***/ }), /* 55 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_baseKeys.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var isPrototype = __webpack_require__(/*! ./_isPrototype */ 56), nativeKeys = __webpack_require__(/*! ./_nativeKeys */ 57); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } module.exports = baseKeys; /***/ }), /* 56 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_isPrototype.js ***! \**********************************************/ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /* 57 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_nativeKeys.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(/*! ./_overArg */ 58); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /* 58 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/_overArg.js ***! \******************************************/ /***/ (function(module, exports) { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }), /* 59 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/isArrayLike.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(/*! ./isFunction */ 60), isLength = __webpack_require__(/*! ./isLength */ 52); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /* 60 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/isFunction.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 30), isObject = __webpack_require__(/*! ./isObject */ 61); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /* 61 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/isObject.js ***! \******************************************/ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 62 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_castFunction.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(/*! ./identity */ 63); /** * Casts `value` to `identity` if it's not a function. * * @private * @param {*} value The value to inspect. * @returns {Function} Returns cast function. */ function castFunction(value) { return typeof value == 'function' ? value : identity; } module.exports = castFunction; /***/ }), /* 63 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/identity.js ***! \******************************************/ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 64 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/isPlainObject.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 30), getPrototype = __webpack_require__(/*! ./_getPrototype */ 65), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 37); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { * this.a = 1; * } * * _.isPlainObject(new Foo); * // => false * * _.isPlainObject([1, 2, 3]); * // => false * * _.isPlainObject({ 'x': 0, 'y': 0 }); * // => true * * _.isPlainObject(Object.create(null)); * // => true */ function isPlainObject(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject; /***/ }), /* 65 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_getPrototype.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(/*! ./_overArg */ 58); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /* 66 */ /*!*************************************!*\ !*** ../~/reactcss/~/lodash/map.js ***! \*************************************/ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(/*! ./_arrayMap */ 67), baseIteratee = __webpack_require__(/*! ./_baseIteratee */ 68), baseMap = __webpack_require__(/*! ./_baseMap */ 152), isArray = __webpack_require__(/*! ./isArray */ 36); /** * Creates an array of values by running each element in `collection` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * * The guarded methods are: * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, * `template`, `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * * function square(n) { * return n * n; * } * * _.map([4, 8], square); * // => [16, 64] * * _.map({ 'a': 4, 'b': 8 }, square); * // => [16, 64] (iteration order is not guaranteed) * * var users = [ * { 'user': 'barney' }, * { 'user': 'fred' } * ]; * * // The `_.property` iteratee shorthand. * _.map(users, 'user'); * // => ['barney', 'fred'] */ function map(collection, iteratee) { var func = isArray(collection) ? arrayMap : baseMap; return func(collection, baseIteratee(iteratee, 3)); } module.exports = map; /***/ }), /* 67 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_arrayMap.js ***! \*******************************************/ /***/ (function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /* 68 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_baseIteratee.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseMatches = __webpack_require__(/*! ./_baseMatches */ 69), baseMatchesProperty = __webpack_require__(/*! ./_baseMatchesProperty */ 134), identity = __webpack_require__(/*! ./identity */ 63), isArray = __webpack_require__(/*! ./isArray */ 36), property = __webpack_require__(/*! ./property */ 149); /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity; } if (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; /***/ }), /* 69 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_baseMatches.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsMatch = __webpack_require__(/*! ./_baseIsMatch */ 70), getMatchData = __webpack_require__(/*! ./_getMatchData */ 131), matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ 133); /** * The base implementation of `_.matches` which doesn't clone `source`. * * @private * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); }; } module.exports = baseMatches; /***/ }), /* 70 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_baseIsMatch.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(/*! ./_Stack */ 71), baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ 107); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if ((noCustomizer && data[2]) ? data[1] !== object[data[0]] : !(data[0] in object) ) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined && !(key in object)) { return false; } } else { var stack = new Stack; if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result )) { return false; } } } return true; } module.exports = baseIsMatch; /***/ }), /* 71 */ /*!****************************************!*\ !*** ../~/reactcss/~/lodash/_Stack.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(/*! ./_ListCache */ 72), stackClear = __webpack_require__(/*! ./_stackClear */ 80), stackDelete = __webpack_require__(/*! ./_stackDelete */ 81), stackGet = __webpack_require__(/*! ./_stackGet */ 82), stackHas = __webpack_require__(/*! ./_stackHas */ 83), stackSet = __webpack_require__(/*! ./_stackSet */ 84); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /* 72 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_ListCache.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ 73), listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ 74), listCacheGet = __webpack_require__(/*! ./_listCacheGet */ 77), listCacheHas = __webpack_require__(/*! ./_listCacheHas */ 78), listCacheSet = __webpack_require__(/*! ./_listCacheSet */ 79); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /* 73 */ /*!*************************************************!*\ !*** ../~/reactcss/~/lodash/_listCacheClear.js ***! \*************************************************/ /***/ (function(module, exports) { /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } module.exports = listCacheClear; /***/ }), /* 74 */ /*!**************************************************!*\ !*** ../~/reactcss/~/lodash/_listCacheDelete.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ 75); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listCacheDelete; /***/ }), /* 75 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_assocIndexOf.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(/*! ./eq */ 76); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /* 76 */ /*!************************************!*\ !*** ../~/reactcss/~/lodash/eq.js ***! \************************************/ /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /* 77 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_listCacheGet.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ 75); /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } module.exports = listCacheGet; /***/ }), /* 78 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_listCacheHas.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ 75); /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } module.exports = listCacheHas; /***/ }), /* 79 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_listCacheSet.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ 75); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listCacheSet; /***/ }), /* 80 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_stackClear.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(/*! ./_ListCache */ 72); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }), /* 81 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_stackDelete.js ***! \**********************************************/ /***/ (function(module, exports) { /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } module.exports = stackDelete; /***/ }), /* 82 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_stackGet.js ***! \*******************************************/ /***/ (function(module, exports) { /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } module.exports = stackGet; /***/ }), /* 83 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_stackHas.js ***! \*******************************************/ /***/ (function(module, exports) { /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } module.exports = stackHas; /***/ }), /* 84 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_stackSet.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(/*! ./_ListCache */ 72), Map = __webpack_require__(/*! ./_Map */ 85), MapCache = __webpack_require__(/*! ./_MapCache */ 92); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } module.exports = stackSet; /***/ }), /* 85 */ /*!**************************************!*\ !*** ../~/reactcss/~/lodash/_Map.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 86), root = __webpack_require__(/*! ./_root */ 32); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /* 86 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_getNative.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ 87), getValue = __webpack_require__(/*! ./_getValue */ 91); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /* 87 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_baseIsNative.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(/*! ./isFunction */ 60), isMasked = __webpack_require__(/*! ./_isMasked */ 88), isObject = __webpack_require__(/*! ./isObject */ 61), toSource = __webpack_require__(/*! ./_toSource */ 90); /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } module.exports = baseIsNative; /***/ }), /* 88 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_isMasked.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var coreJsData = __webpack_require__(/*! ./_coreJsData */ 89); /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } module.exports = isMasked; /***/ }), /* 89 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_coreJsData.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(/*! ./_root */ 32); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; /***/ }), /* 90 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_toSource.js ***! \*******************************************/ /***/ (function(module, exports) { /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } module.exports = toSource; /***/ }), /* 91 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_getValue.js ***! \*******************************************/ /***/ (function(module, exports) { /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } module.exports = getValue; /***/ }), /* 92 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_MapCache.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ 93), mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ 101), mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ 104), mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ 105), mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ 106); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /* 93 */ /*!************************************************!*\ !*** ../~/reactcss/~/lodash/_mapCacheClear.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var Hash = __webpack_require__(/*! ./_Hash */ 94), ListCache = __webpack_require__(/*! ./_ListCache */ 72), Map = __webpack_require__(/*! ./_Map */ 85); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } module.exports = mapCacheClear; /***/ }), /* 94 */ /*!***************************************!*\ !*** ../~/reactcss/~/lodash/_Hash.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var hashClear = __webpack_require__(/*! ./_hashClear */ 95), hashDelete = __webpack_require__(/*! ./_hashDelete */ 97), hashGet = __webpack_require__(/*! ./_hashGet */ 98), hashHas = __webpack_require__(/*! ./_hashHas */ 99), hashSet = __webpack_require__(/*! ./_hashSet */ 100); /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; module.exports = Hash; /***/ }), /* 95 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_hashClear.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ 96); /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } module.exports = hashClear; /***/ }), /* 96 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_nativeCreate.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 86); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /* 97 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_hashDelete.js ***! \*********************************************/ /***/ (function(module, exports) { /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } module.exports = hashDelete; /***/ }), /* 98 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/_hashGet.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ 96); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; /***/ }), /* 99 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/_hashHas.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ 96); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } module.exports = hashHas; /***/ }), /* 100 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/_hashSet.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ 96); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } module.exports = hashSet; /***/ }), /* 101 */ /*!*************************************************!*\ !*** ../~/reactcss/~/lodash/_mapCacheDelete.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(/*! ./_getMapData */ 102); /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } module.exports = mapCacheDelete; /***/ }), /* 102 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_getMapData.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__(/*! ./_isKeyable */ 103); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /* 103 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_isKeyable.js ***! \********************************************/ /***/ (function(module, exports) { /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } module.exports = isKeyable; /***/ }), /* 104 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_mapCacheGet.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(/*! ./_getMapData */ 102); /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } module.exports = mapCacheGet; /***/ }), /* 105 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_mapCacheHas.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(/*! ./_getMapData */ 102); /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } module.exports = mapCacheHas; /***/ }), /* 106 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_mapCacheSet.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(/*! ./_getMapData */ 102); /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } module.exports = mapCacheSet; /***/ }), /* 107 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_baseIsEqual.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsEqualDeep = __webpack_require__(/*! ./_baseIsEqualDeep */ 108), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 37); /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; /***/ }), /* 108 */ /*!**************************************************!*\ !*** ../~/reactcss/~/lodash/_baseIsEqualDeep.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(/*! ./_Stack */ 71), equalArrays = __webpack_require__(/*! ./_equalArrays */ 109), equalByTag = __webpack_require__(/*! ./_equalByTag */ 115), equalObjects = __webpack_require__(/*! ./_equalObjects */ 119), getTag = __webpack_require__(/*! ./_getTag */ 126), isArray = __webpack_require__(/*! ./isArray */ 36), isBuffer = __webpack_require__(/*! ./isBuffer */ 47), isTypedArray = __webpack_require__(/*! ./isTypedArray */ 50); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', objectTag = '[object Object]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } module.exports = baseIsEqualDeep; /***/ }), /* 109 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_equalArrays.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(/*! ./_SetCache */ 110), arraySome = __webpack_require__(/*! ./_arraySome */ 113), cacheHas = __webpack_require__(/*! ./_cacheHas */ 114); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. var stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function(othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } module.exports = equalArrays; /***/ }), /* 110 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_SetCache.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(/*! ./_MapCache */ 92), setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ 111), setCacheHas = __webpack_require__(/*! ./_setCacheHas */ 112); /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module.exports = SetCache; /***/ }), /* 111 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_setCacheAdd.js ***! \**********************************************/ /***/ (function(module, exports) { /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Adds `value` to the array cache. * * @private * @name add * @memberOf SetCache * @alias push * @param {*} value The value to cache. * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } module.exports = setCacheAdd; /***/ }), /* 112 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_setCacheHas.js ***! \**********************************************/ /***/ (function(module, exports) { /** * Checks if `value` is in the array cache. * * @private * @name has * @memberOf SetCache * @param {*} value The value to search for. * @returns {number} Returns `true` if `value` is found, else `false`. */ function setCacheHas(value) { return this.__data__.has(value); } module.exports = setCacheHas; /***/ }), /* 113 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_arraySome.js ***! \********************************************/ /***/ (function(module, exports) { /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } module.exports = arraySome; /***/ }), /* 114 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_cacheHas.js ***! \*******************************************/ /***/ (function(module, exports) { /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } module.exports = cacheHas; /***/ }), /* 115 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_equalByTag.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ 31), Uint8Array = __webpack_require__(/*! ./_Uint8Array */ 116), eq = __webpack_require__(/*! ./eq */ 76), equalArrays = __webpack_require__(/*! ./_equalArrays */ 109), mapToArray = __webpack_require__(/*! ./_mapToArray */ 117), setToArray = __webpack_require__(/*! ./_setToArray */ 118); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]'; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * A specialized version of `baseIsEqualDeep` for comparing objects of * the same `toStringTag`. * * **Note:** This function only supports comparing values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if ((object.byteLength != other.byteLength) || (object.byteOffset != other.byteOffset)) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: // Coerce booleans to `1` or `0` and dates to milliseconds. // Invalid dates are coerced to `NaN`. return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } module.exports = equalByTag; /***/ }), /* 116 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_Uint8Array.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(/*! ./_root */ 32); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /* 117 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_mapToArray.js ***! \*********************************************/ /***/ (function(module, exports) { /** * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function(value, key) { result[++index] = [key, value]; }); return result; } module.exports = mapToArray; /***/ }), /* 118 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_setToArray.js ***! \*********************************************/ /***/ (function(module, exports) { /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } module.exports = setToArray; /***/ }), /* 119 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_equalObjects.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var getAllKeys = __webpack_require__(/*! ./_getAllKeys */ 120); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } module.exports = equalObjects; /***/ }), /* 120 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_getAllKeys.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ 121), getSymbols = __webpack_require__(/*! ./_getSymbols */ 123), keys = __webpack_require__(/*! ./keys */ 42); /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } module.exports = getAllKeys; /***/ }), /* 121 */ /*!*************************************************!*\ !*** ../~/reactcss/~/lodash/_baseGetAllKeys.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(/*! ./_arrayPush */ 122), isArray = __webpack_require__(/*! ./isArray */ 36); /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; /***/ }), /* 122 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_arrayPush.js ***! \********************************************/ /***/ (function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /* 123 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_getSymbols.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ 124), stubArray = __webpack_require__(/*! ./stubArray */ 125); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /* 124 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_arrayFilter.js ***! \**********************************************/ /***/ (function(module, exports) { /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } module.exports = arrayFilter; /***/ }), /* 125 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/stubArray.js ***! \*******************************************/ /***/ (function(module, exports) { /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } module.exports = stubArray; /***/ }), /* 126 */ /*!*****************************************!*\ !*** ../~/reactcss/~/lodash/_getTag.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__(/*! ./_DataView */ 127), Map = __webpack_require__(/*! ./_Map */ 85), Promise = __webpack_require__(/*! ./_Promise */ 128), Set = __webpack_require__(/*! ./_Set */ 129), WeakMap = __webpack_require__(/*! ./_WeakMap */ 130), baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 30), toSource = __webpack_require__(/*! ./_toSource */ 90); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /* 127 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_DataView.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 86), root = __webpack_require__(/*! ./_root */ 32); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); module.exports = DataView; /***/ }), /* 128 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/_Promise.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 86), root = __webpack_require__(/*! ./_root */ 32); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); module.exports = Promise; /***/ }), /* 129 */ /*!**************************************!*\ !*** ../~/reactcss/~/lodash/_Set.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 86), root = __webpack_require__(/*! ./_root */ 32); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); module.exports = Set; /***/ }), /* 130 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/_WeakMap.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 86), root = __webpack_require__(/*! ./_root */ 32); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }), /* 131 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_getMatchData.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ 132), keys = __webpack_require__(/*! ./keys */ 42); /** * Gets the property names, values, and compare flags of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; } return result; } module.exports = getMatchData; /***/ }), /* 132 */ /*!*****************************************************!*\ !*** ../~/reactcss/~/lodash/_isStrictComparable.js ***! \*****************************************************/ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./isObject */ 61); /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` if suitable for strict * equality comparisons, else `false`. */ function isStrictComparable(value) { return value === value && !isObject(value); } module.exports = isStrictComparable; /***/ }), /* 133 */ /*!**********************************************************!*\ !*** ../~/reactcss/~/lodash/_matchesStrictComparable.js ***! \**********************************************************/ /***/ (function(module, exports) { /** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined || (key in Object(object))); }; } module.exports = matchesStrictComparable; /***/ }), /* 134 */ /*!******************************************************!*\ !*** ../~/reactcss/~/lodash/_baseMatchesProperty.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ 107), get = __webpack_require__(/*! ./get */ 135), hasIn = __webpack_require__(/*! ./hasIn */ 146), isKey = __webpack_require__(/*! ./_isKey */ 138), isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ 132), matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ 133), toKey = __webpack_require__(/*! ./_toKey */ 145); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } module.exports = baseMatchesProperty; /***/ }), /* 135 */ /*!*************************************!*\ !*** ../~/reactcss/~/lodash/get.js ***! \*************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(/*! ./_baseGet */ 136); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /* 136 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/_baseGet.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(/*! ./_castPath */ 137), toKey = __webpack_require__(/*! ./_toKey */ 145); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /* 137 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_castPath.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(/*! ./isArray */ 36), isKey = __webpack_require__(/*! ./_isKey */ 138), stringToPath = __webpack_require__(/*! ./_stringToPath */ 140), toString = __webpack_require__(/*! ./toString */ 143); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /* 138 */ /*!****************************************!*\ !*** ../~/reactcss/~/lodash/_isKey.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(/*! ./isArray */ 36), isSymbol = __webpack_require__(/*! ./isSymbol */ 139); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /* 139 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/isSymbol.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 30), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 37); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /* 140 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_stringToPath.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var memoizeCapped = __webpack_require__(/*! ./_memoizeCapped */ 141); /** Used to match property names within property paths. */ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoizeCapped(function(string) { var result = []; if (string.charCodeAt(0) === 46 /* . */) { result.push(''); } string.replace(rePropName, function(match, number, quote, subString) { result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); module.exports = stringToPath; /***/ }), /* 141 */ /*!************************************************!*\ !*** ../~/reactcss/~/lodash/_memoizeCapped.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var memoize = __webpack_require__(/*! ./memoize */ 142); /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = memoize(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } module.exports = memoizeCapped; /***/ }), /* 142 */ /*!*****************************************!*\ !*** ../~/reactcss/~/lodash/memoize.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(/*! ./_MapCache */ 92); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; /***/ }), /* 143 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/toString.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var baseToString = __webpack_require__(/*! ./_baseToString */ 144); /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } module.exports = toString; /***/ }), /* 144 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_baseToString.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ 31), arrayMap = __webpack_require__(/*! ./_arrayMap */ 67), isArray = __webpack_require__(/*! ./isArray */ 36), isSymbol = __webpack_require__(/*! ./isSymbol */ 139); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray(value)) { // Recursively convert values (susceptible to call stack limits). return arrayMap(value, baseToString) + ''; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = baseToString; /***/ }), /* 145 */ /*!****************************************!*\ !*** ../~/reactcss/~/lodash/_toKey.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(/*! ./isSymbol */ 139); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /* 146 */ /*!***************************************!*\ !*** ../~/reactcss/~/lodash/hasIn.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var baseHasIn = __webpack_require__(/*! ./_baseHasIn */ 147), hasPath = __webpack_require__(/*! ./_hasPath */ 148); /** * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.hasIn(object, 'a'); * // => true * * _.hasIn(object, 'a.b'); * // => true * * _.hasIn(object, ['a', 'b']); * // => true * * _.hasIn(object, 'b'); * // => false */ function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } module.exports = hasIn; /***/ }), /* 147 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_baseHasIn.js ***! \********************************************/ /***/ (function(module, exports) { /** * The base implementation of `_.hasIn` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { return object != null && key in Object(object); } module.exports = baseHasIn; /***/ }), /* 148 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/_hasPath.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(/*! ./_castPath */ 137), isArguments = __webpack_require__(/*! ./isArguments */ 45), isArray = __webpack_require__(/*! ./isArray */ 36), isIndex = __webpack_require__(/*! ./_isIndex */ 49), isLength = __webpack_require__(/*! ./isLength */ 52), toKey = __webpack_require__(/*! ./_toKey */ 145); /** * Checks if `path` exists on `object`. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @param {Function} hasFunc The function to check properties. * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { path = castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } module.exports = hasPath; /***/ }), /* 149 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/property.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var baseProperty = __webpack_require__(/*! ./_baseProperty */ 150), basePropertyDeep = __webpack_require__(/*! ./_basePropertyDeep */ 151), isKey = __webpack_require__(/*! ./_isKey */ 138), toKey = __webpack_require__(/*! ./_toKey */ 145); /** * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. * @example * * var objects = [ * { 'a': { 'b': 2 } }, * { 'a': { 'b': 1 } } * ]; * * _.map(objects, _.property('a.b')); * // => [2, 1] * * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } module.exports = property; /***/ }), /* 150 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_baseProperty.js ***! \***********************************************/ /***/ (function(module, exports) { /** * The base implementation of `_.property` without support for deep paths. * * @private * @param {string} key The key of the property to get. * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { return object == null ? undefined : object[key]; }; } module.exports = baseProperty; /***/ }), /* 151 */ /*!***************************************************!*\ !*** ../~/reactcss/~/lodash/_basePropertyDeep.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(/*! ./_baseGet */ 136); /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { return baseGet(object, path); }; } module.exports = basePropertyDeep; /***/ }), /* 152 */ /*!******************************************!*\ !*** ../~/reactcss/~/lodash/_baseMap.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var baseEach = __webpack_require__(/*! ./_baseEach */ 153), isArrayLike = __webpack_require__(/*! ./isArrayLike */ 59); /** * The base implementation of `_.map` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function baseMap(collection, iteratee) { var index = -1, result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value, key, collection) { result[++index] = iteratee(value, key, collection); }); return result; } module.exports = baseMap; /***/ }), /* 153 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/_baseEach.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var baseForOwn = __webpack_require__(/*! ./_baseForOwn */ 39), createBaseEach = __webpack_require__(/*! ./_createBaseEach */ 154); /** * The base implementation of `_.forEach` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array|Object} Returns `collection`. */ var baseEach = createBaseEach(baseForOwn); module.exports = baseEach; /***/ }), /* 154 */ /*!*************************************************!*\ !*** ../~/reactcss/~/lodash/_createBaseEach.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(/*! ./isArrayLike */ 59); /** * Creates a `baseEach` or `baseEachRight` function. * * @private * @param {Function} eachFunc The function to iterate over a collection. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); while ((fromRight ? index-- : ++index < length)) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } module.exports = createBaseEach; /***/ }), /* 155 */ /*!*****************************************!*\ !*** ../~/reactcss/lib/mergeClasses.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.mergeClasses = undefined; var _forOwn2 = __webpack_require__(/*! lodash/forOwn */ 38); var _forOwn3 = _interopRequireDefault(_forOwn2); var _cloneDeep2 = __webpack_require__(/*! lodash/cloneDeep */ 156); var _cloneDeep3 = _interopRequireDefault(_cloneDeep2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var mergeClasses = exports.mergeClasses = function mergeClasses(classes) { var activeNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var styles = classes.default && (0, _cloneDeep3.default)(classes.default) || {}; activeNames.map(function (name) { var toMerge = classes[name]; if (toMerge) { (0, _forOwn3.default)(toMerge, function (value, key) { if (!styles[key]) { styles[key] = {}; } styles[key] = _extends({}, styles[key], toMerge[key]); }); } return name; }); return styles; }; exports.default = mergeClasses; /***/ }), /* 156 */ /*!*******************************************!*\ !*** ../~/reactcss/~/lodash/cloneDeep.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var baseClone = __webpack_require__(/*! ./_baseClone */ 157); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4; /** * This method is like `_.clone` except that it recursively clones `value`. * * @static * @memberOf _ * @since 1.0.0 * @category Lang * @param {*} value The value to recursively clone. * @returns {*} Returns the deep cloned value. * @see _.clone * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; * * var deep = _.cloneDeep(objects); * console.log(deep[0] === objects[0]); * // => false */ function cloneDeep(value) { return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } module.exports = cloneDeep; /***/ }), /* 157 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_baseClone.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(/*! ./_Stack */ 71), arrayEach = __webpack_require__(/*! ./_arrayEach */ 158), assignValue = __webpack_require__(/*! ./_assignValue */ 159), baseAssign = __webpack_require__(/*! ./_baseAssign */ 162), baseAssignIn = __webpack_require__(/*! ./_baseAssignIn */ 164), cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ 168), copyArray = __webpack_require__(/*! ./_copyArray */ 169), copySymbols = __webpack_require__(/*! ./_copySymbols */ 170), copySymbolsIn = __webpack_require__(/*! ./_copySymbolsIn */ 171), getAllKeys = __webpack_require__(/*! ./_getAllKeys */ 120), getAllKeysIn = __webpack_require__(/*! ./_getAllKeysIn */ 173), getTag = __webpack_require__(/*! ./_getTag */ 126), initCloneArray = __webpack_require__(/*! ./_initCloneArray */ 174), initCloneByTag = __webpack_require__(/*! ./_initCloneByTag */ 175), initCloneObject = __webpack_require__(/*! ./_initCloneObject */ 181), isArray = __webpack_require__(/*! ./isArray */ 36), isBuffer = __webpack_require__(/*! ./isBuffer */ 47), isMap = __webpack_require__(/*! ./isMap */ 183), isObject = __webpack_require__(/*! ./isObject */ 61), isSet = __webpack_require__(/*! ./isSet */ 185), keys = __webpack_require__(/*! ./keys */ 42); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values supported by `_.clone`. */ var cloneableTags = {}; cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; /** * The base implementation of `_.clone` and `_.cloneDeep` which tracks * traversed objects. * * @private * @param {*} value The value to clone. * @param {boolean} bitmask The bitmask flags. * 1 - Deep clone * 2 - Flatten inherited properties * 4 - Clone symbols * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ function baseClone(value, bitmask, customizer, key, object, stack) { var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } if (result !== undefined) { return result; } if (!isObject(value)) { return value; } var isArr = isArray(value); if (isArr) { result = initCloneArray(value); if (!isDeep) { return copyArray(value, result); } } else { var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; if (isBuffer(value)) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { result = (isFlat || isFunc) ? {} : initCloneObject(value); if (!isDeep) { return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { return object ? value : {}; } result = initCloneByTag(value, tag, isDeep); } } // Check for circular references and return its corresponding clone. stack || (stack = new Stack); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result); if (isSet(value)) { value.forEach(function(subValue) { result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); return result; } if (isMap(value)) { value.forEach(function(subValue, key) { result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); return result; } var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : (isFlat ? keysIn : keys); var props = isArr ? undefined : keysFunc(value); arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); return result; } module.exports = baseClone; /***/ }), /* 158 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_arrayEach.js ***! \********************************************/ /***/ (function(module, exports) { /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } module.exports = arrayEach; /***/ }), /* 159 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_assignValue.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ 160), eq = __webpack_require__(/*! ./eq */ 76); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignValue; /***/ }), /* 160 */ /*!**************************************************!*\ !*** ../~/reactcss/~/lodash/_baseAssignValue.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__(/*! ./_defineProperty */ 161); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /* 161 */ /*!*************************************************!*\ !*** ../~/reactcss/~/lodash/_defineProperty.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 86); var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); module.exports = defineProperty; /***/ }), /* 162 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_baseAssign.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(/*! ./_copyObject */ 163), keys = __webpack_require__(/*! ./keys */ 42); /** * The base implementation of `_.assign` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssign(object, source) { return object && copyObject(source, keys(source), object); } module.exports = baseAssign; /***/ }), /* 163 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_copyObject.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(/*! ./_assignValue */ 159), baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ 160); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /* 164 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_baseAssignIn.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(/*! ./_copyObject */ 163), keysIn = __webpack_require__(/*! ./keysIn */ 165); /** * The base implementation of `_.assignIn` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssignIn(object, source) { return object && copyObject(source, keysIn(source), object); } module.exports = baseAssignIn; /***/ }), /* 165 */ /*!****************************************!*\ !*** ../~/reactcss/~/lodash/keysIn.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ 43), baseKeysIn = __webpack_require__(/*! ./_baseKeysIn */ 166), isArrayLike = __webpack_require__(/*! ./isArrayLike */ 59); /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } module.exports = keysIn; /***/ }), /* 166 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_baseKeysIn.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./isObject */ 61), isPrototype = __webpack_require__(/*! ./_isPrototype */ 56), nativeKeysIn = __webpack_require__(/*! ./_nativeKeysIn */ 167); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { if (!isObject(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } module.exports = baseKeysIn; /***/ }), /* 167 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_nativeKeysIn.js ***! \***********************************************/ /***/ (function(module, exports) { /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } module.exports = nativeKeysIn; /***/ }), /* 168 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_cloneBuffer.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ 32); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; /** * Creates a clone of `buffer`. * * @private * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Buffer} Returns the cloned buffer. */ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } module.exports = cloneBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ 12)(module))) /***/ }), /* 169 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_copyArray.js ***! \********************************************/ /***/ (function(module, exports) { /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } module.exports = copyArray; /***/ }), /* 170 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_copySymbols.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(/*! ./_copyObject */ 163), getSymbols = __webpack_require__(/*! ./_getSymbols */ 123); /** * Copies own symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbols(source, object) { return copyObject(source, getSymbols(source), object); } module.exports = copySymbols; /***/ }), /* 171 */ /*!************************************************!*\ !*** ../~/reactcss/~/lodash/_copySymbolsIn.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(/*! ./_copyObject */ 163), getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ 172); /** * Copies own and inherited symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbolsIn(source, object) { return copyObject(source, getSymbolsIn(source), object); } module.exports = copySymbolsIn; /***/ }), /* 172 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_getSymbolsIn.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(/*! ./_arrayPush */ 122), getPrototype = __webpack_require__(/*! ./_getPrototype */ 65), getSymbols = __webpack_require__(/*! ./_getSymbols */ 123), stubArray = __webpack_require__(/*! ./stubArray */ 125); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own and inherited enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush(result, getSymbols(object)); object = getPrototype(object); } return result; }; module.exports = getSymbolsIn; /***/ }), /* 173 */ /*!***********************************************!*\ !*** ../~/reactcss/~/lodash/_getAllKeysIn.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ 121), getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ 172), keysIn = __webpack_require__(/*! ./keysIn */ 165); /** * Creates an array of own and inherited enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeysIn(object) { return baseGetAllKeys(object, keysIn, getSymbolsIn); } module.exports = getAllKeysIn; /***/ }), /* 174 */ /*!*************************************************!*\ !*** ../~/reactcss/~/lodash/_initCloneArray.js ***! \*************************************************/ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Initializes an array clone. * * @private * @param {Array} array The array to clone. * @returns {Array} Returns the initialized clone. */ function initCloneArray(array) { var length = array.length, result = new array.constructor(length); // Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { result.index = array.index; result.input = array.input; } return result; } module.exports = initCloneArray; /***/ }), /* 175 */ /*!*************************************************!*\ !*** ../~/reactcss/~/lodash/_initCloneByTag.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ 176), cloneDataView = __webpack_require__(/*! ./_cloneDataView */ 177), cloneRegExp = __webpack_require__(/*! ./_cloneRegExp */ 178), cloneSymbol = __webpack_require__(/*! ./_cloneSymbol */ 179), cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ 180); /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ function initCloneByTag(object, tag, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag: return cloneArrayBuffer(object); case boolTag: case dateTag: return new Ctor(+object); case dataViewTag: return cloneDataView(object, isDeep); case float32Tag: case float64Tag: case int8Tag: case int16Tag: case int32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: return cloneTypedArray(object, isDeep); case mapTag: return new Ctor; case numberTag: case stringTag: return new Ctor(object); case regexpTag: return cloneRegExp(object); case setTag: return new Ctor; case symbolTag: return cloneSymbol(object); } } module.exports = initCloneByTag; /***/ }), /* 176 */ /*!***************************************************!*\ !*** ../~/reactcss/~/lodash/_cloneArrayBuffer.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(/*! ./_Uint8Array */ 116); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /* 177 */ /*!************************************************!*\ !*** ../~/reactcss/~/lodash/_cloneDataView.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ 176); /** * Creates a clone of `dataView`. * * @private * @param {Object} dataView The data view to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned data view. */ function cloneDataView(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } module.exports = cloneDataView; /***/ }), /* 178 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_cloneRegExp.js ***! \**********************************************/ /***/ (function(module, exports) { /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; /** * Creates a clone of `regexp`. * * @private * @param {Object} regexp The regexp to clone. * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } module.exports = cloneRegExp; /***/ }), /* 179 */ /*!**********************************************!*\ !*** ../~/reactcss/~/lodash/_cloneSymbol.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ 31); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a clone of the `symbol` object. * * @private * @param {Object} symbol The symbol object to clone. * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } module.exports = cloneSymbol; /***/ }), /* 180 */ /*!**************************************************!*\ !*** ../~/reactcss/~/lodash/_cloneTypedArray.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ 176); /** * Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } module.exports = cloneTypedArray; /***/ }), /* 181 */ /*!**************************************************!*\ !*** ../~/reactcss/~/lodash/_initCloneObject.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(/*! ./_baseCreate */ 182), getPrototype = __webpack_require__(/*! ./_getPrototype */ 65), isPrototype = __webpack_require__(/*! ./_isPrototype */ 56); /** * Initializes an object clone. * * @private * @param {Object} object The object to clone. * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { return (typeof object.constructor == 'function' && !isPrototype(object)) ? baseCreate(getPrototype(object)) : {}; } module.exports = initCloneObject; /***/ }), /* 182 */ /*!*********************************************!*\ !*** ../~/reactcss/~/lodash/_baseCreate.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./isObject */ 61); /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); module.exports = baseCreate; /***/ }), /* 183 */ /*!***************************************!*\ !*** ../~/reactcss/~/lodash/isMap.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsMap = __webpack_require__(/*! ./_baseIsMap */ 184), baseUnary = __webpack_require__(/*! ./_baseUnary */ 53), nodeUtil = __webpack_require__(/*! ./_nodeUtil */ 54); /* Node.js helper references. */ var nodeIsMap = nodeUtil && nodeUtil.isMap; /** * Checks if `value` is classified as a `Map` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. * @example * * _.isMap(new Map); * // => true * * _.isMap(new WeakMap); * // => false */ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; module.exports = isMap; /***/ }), /* 184 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_baseIsMap.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var getTag = __webpack_require__(/*! ./_getTag */ 126), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 37); /** `Object#toString` result references. */ var mapTag = '[object Map]'; /** * The base implementation of `_.isMap` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. */ function baseIsMap(value) { return isObjectLike(value) && getTag(value) == mapTag; } module.exports = baseIsMap; /***/ }), /* 185 */ /*!***************************************!*\ !*** ../~/reactcss/~/lodash/isSet.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsSet = __webpack_require__(/*! ./_baseIsSet */ 186), baseUnary = __webpack_require__(/*! ./_baseUnary */ 53), nodeUtil = __webpack_require__(/*! ./_nodeUtil */ 54); /* Node.js helper references. */ var nodeIsSet = nodeUtil && nodeUtil.isSet; /** * Checks if `value` is classified as a `Set` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. * @example * * _.isSet(new Set); * // => true * * _.isSet(new WeakSet); * // => false */ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; module.exports = isSet; /***/ }), /* 186 */ /*!********************************************!*\ !*** ../~/reactcss/~/lodash/_baseIsSet.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var getTag = __webpack_require__(/*! ./_getTag */ 126), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 37); /** `Object#toString` result references. */ var setTag = '[object Set]'; /** * The base implementation of `_.isSet` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. */ function baseIsSet(value) { return isObjectLike(value) && getTag(value) == setTag; } module.exports = baseIsSet; /***/ }), /* 187 */ /*!***************************************!*\ !*** ../~/reactcss/lib/autoprefix.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.autoprefix = undefined; var _forOwn2 = __webpack_require__(/*! lodash/forOwn */ 38); var _forOwn3 = _interopRequireDefault(_forOwn2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var transforms = { borderRadius: function borderRadius(value) { return { msBorderRadius: value, MozBorderRadius: value, OBorderRadius: value, WebkitBorderRadius: value, borderRadius: value }; }, boxShadow: function boxShadow(value) { return { msBoxShadow: value, MozBoxShadow: value, OBoxShadow: value, WebkitBoxShadow: value, boxShadow: value }; }, userSelect: function userSelect(value) { return { WebkitTouchCallout: value, KhtmlUserSelect: value, MozUserSelect: value, msUserSelect: value, WebkitUserSelect: value, userSelect: value }; }, flex: function flex(value) { return { WebkitBoxFlex: value, MozBoxFlex: value, WebkitFlex: value, msFlex: value, flex: value }; }, flexBasis: function flexBasis(value) { return { WebkitFlexBasis: value, flexBasis: value }; }, justifyContent: function justifyContent(value) { return { WebkitJustifyContent: value, justifyContent: value }; }, transition: function transition(value) { return { msTransition: value, MozTransition: value, OTransition: value, WebkitTransition: value, transition: value }; }, transform: function transform(value) { return { msTransform: value, MozTransform: value, OTransform: value, WebkitTransform: value, transform: value }; }, absolute: function absolute(value) { var direction = value && value.split(' '); return { position: 'absolute', top: direction && direction[0], right: direction && direction[1], bottom: direction && direction[2], left: direction && direction[3] }; }, extend: function extend(name, otherElementStyles) { var otherStyle = otherElementStyles[name]; if (otherStyle) { return otherStyle; } return { 'extend': name }; } }; var autoprefix = exports.autoprefix = function autoprefix(elements) { var prefixed = {}; (0, _forOwn3.default)(elements, function (styles, element) { var expanded = {}; (0, _forOwn3.default)(styles, function (value, key) { var transform = transforms[key]; if (transform) { expanded = _extends({}, expanded, transform(value)); } else { expanded[key] = value; } }); prefixed[element] = expanded; }); return prefixed; }; exports.default = autoprefix; /***/ }), /* 188 */ /*!*********************************************!*\ !*** ../~/reactcss/lib/components/hover.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.hover = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var hover = exports.hover = function hover(Component) { var Span = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'span'; return function (_React$Component) { _inherits(Hover, _React$Component); function Hover() { var _ref; var _temp, _this, _ret; _classCallCheck(this, Hover); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Hover.__proto__ || Object.getPrototypeOf(Hover)).call.apply(_ref, [this].concat(args))), _this), _this.state = { hover: false }, _this.handleMouseOver = function () { return _this.setState({ hover: true }); }, _this.handleMouseOut = function () { return _this.setState({ hover: false }); }, _this.render = function () { return _react2.default.createElement( Span, { onMouseOver: _this.handleMouseOver, onMouseOut: _this.handleMouseOut }, _react2.default.createElement(Component, _extends({}, _this.props, _this.state)) ); }, _temp), _possibleConstructorReturn(_this, _ret); } return Hover; }(_react2.default.Component); }; exports.default = hover; /***/ }), /* 189 */ /*!**********************************************!*\ !*** ../~/reactcss/lib/components/active.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.active = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var active = exports.active = function active(Component) { var Span = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'span'; return function (_React$Component) { _inherits(Active, _React$Component); function Active() { var _ref; var _temp, _this, _ret; _classCallCheck(this, Active); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Active.__proto__ || Object.getPrototypeOf(Active)).call.apply(_ref, [this].concat(args))), _this), _this.state = { active: false }, _this.handleMouseDown = function () { return _this.setState({ active: true }); }, _this.handleMouseUp = function () { return _this.setState({ active: false }); }, _this.render = function () { return _react2.default.createElement( Span, { onMouseDown: _this.handleMouseDown, onMouseUp: _this.handleMouseUp }, _react2.default.createElement(Component, _extends({}, _this.props, _this.state)) ); }, _temp), _possibleConstructorReturn(_this, _ret); } return Active; }(_react2.default.Component); }; exports.default = active; /***/ }), /* 190 */ /*!*********************************!*\ !*** ../~/reactcss/lib/loop.js ***! \*********************************/ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var loopable = function loopable(i, length) { var props = {}; var setProp = function setProp(name) { var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; props[name] = value; }; i === 0 && setProp('first-child'); i === length - 1 && setProp('last-child'); (i === 0 || i % 2 === 0) && setProp('even'); Math.abs(i % 2) === 1 && setProp('odd'); setProp('nth-child', i); return props; }; exports.default = loopable; /***/ }), /* 191 */ /*!*******************************************************!*\ !*** ../~/react-color/lib/components/common/index.js ***! \*******************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Alpha = __webpack_require__(/*! ./Alpha */ 192); Object.defineProperty(exports, 'Alpha', { enumerable: true, get: function get() { return _interopRequireDefault(_Alpha).default; } }); var _Checkboard = __webpack_require__(/*! ./Checkboard */ 194); Object.defineProperty(exports, 'Checkboard', { enumerable: true, get: function get() { return _interopRequireDefault(_Checkboard).default; } }); var _EditableInput = __webpack_require__(/*! ./EditableInput */ 196); Object.defineProperty(exports, 'EditableInput', { enumerable: true, get: function get() { return _interopRequireDefault(_EditableInput).default; } }); var _Hue = __webpack_require__(/*! ./Hue */ 197); Object.defineProperty(exports, 'Hue', { enumerable: true, get: function get() { return _interopRequireDefault(_Hue).default; } }); var _Raised = __webpack_require__(/*! ./Raised */ 199); Object.defineProperty(exports, 'Raised', { enumerable: true, get: function get() { return _interopRequireDefault(_Raised).default; } }); var _Saturation = __webpack_require__(/*! ./Saturation */ 296); Object.defineProperty(exports, 'Saturation', { enumerable: true, get: function get() { return _interopRequireDefault(_Saturation).default; } }); var _ColorWrap = __webpack_require__(/*! ./ColorWrap */ 303); Object.defineProperty(exports, 'ColorWrap', { enumerable: true, get: function get() { return _interopRequireDefault(_ColorWrap).default; } }); var _Swatch = __webpack_require__(/*! ./Swatch */ 316); Object.defineProperty(exports, 'Swatch', { enumerable: true, get: function get() { return _interopRequireDefault(_Swatch).default; } }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), /* 192 */ /*!*******************************************************!*\ !*** ../~/react-color/lib/components/common/Alpha.js ***! \*******************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Alpha = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _alpha = __webpack_require__(/*! ../../helpers/alpha */ 193); var alpha = _interopRequireWildcard(_alpha); var _Checkboard = __webpack_require__(/*! ./Checkboard */ 194); var _Checkboard2 = _interopRequireDefault(_Checkboard); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Alpha = exports.Alpha = function (_ref) { _inherits(Alpha, _ref); function Alpha() { var _ref2; var _temp, _this, _ret; _classCallCheck(this, Alpha); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref2 = Alpha.__proto__ || Object.getPrototypeOf(Alpha)).call.apply(_ref2, [this].concat(args))), _this), _this.handleChange = function (e) { var change = alpha.calculateChange(e, _this.props.hsl, _this.props.direction, _this.props.a, _this.container); change && typeof _this.props.onChange === 'function' && _this.props.onChange(change, e); }, _this.handleMouseDown = function (e) { _this.handleChange(e); window.addEventListener('mousemove', _this.handleChange); window.addEventListener('mouseup', _this.handleMouseUp); }, _this.handleMouseUp = function () { _this.unbindEventListeners(); }, _this.unbindEventListeners = function () { window.removeEventListener('mousemove', _this.handleChange); window.removeEventListener('mouseup', _this.handleMouseUp); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(Alpha, [{ key: 'componentWillUnmount', value: function componentWillUnmount() { this.unbindEventListeners(); } }, { key: 'render', value: function render() { var _this2 = this; var rgb = this.props.rgb; var styles = (0, _reactcss2.default)({ 'default': { alpha: { absolute: '0px 0px 0px 0px', borderRadius: this.props.radius }, checkboard: { absolute: '0px 0px 0px 0px', overflow: 'hidden', borderRadius: this.props.radius }, gradient: { absolute: '0px 0px 0px 0px', background: 'linear-gradient(to right, rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 0) 0%,\n rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 1) 100%)', boxShadow: this.props.shadow, borderRadius: this.props.radius }, container: { position: 'relative', height: '100%', margin: '0 3px' }, pointer: { position: 'absolute', left: rgb.a * 100 + '%' }, slider: { width: '4px', borderRadius: '1px', height: '8px', boxShadow: '0 0 2px rgba(0, 0, 0, .6)', background: '#fff', marginTop: '1px', transform: 'translateX(-2px)' } }, 'vertical': { gradient: { background: 'linear-gradient(to bottom, rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 0) 0%,\n rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 1) 100%)' }, pointer: { left: 0, top: rgb.a * 100 + '%' } }, 'overwrite': _extends({}, this.props.style) }, { vertical: this.props.direction === 'vertical', overwrite: true }); return _react2.default.createElement( 'div', { style: styles.alpha }, _react2.default.createElement( 'div', { style: styles.checkboard }, _react2.default.createElement(_Checkboard2.default, { renderers: this.props.renderers }) ), _react2.default.createElement('div', { style: styles.gradient }), _react2.default.createElement( 'div', { style: styles.container, ref: function ref(container) { return _this2.container = container; }, onMouseDown: this.handleMouseDown, onTouchMove: this.handleChange, onTouchStart: this.handleChange }, _react2.default.createElement( 'div', { style: styles.pointer }, this.props.pointer ? _react2.default.createElement(this.props.pointer, this.props) : _react2.default.createElement('div', { style: styles.slider }) ) ) ); } }]); return Alpha; }(_react.PureComponent || _react.Component); exports.default = Alpha; /***/ }), /* 193 */ /*!*********************************************!*\ !*** ../~/react-color/lib/helpers/alpha.js ***! \*********************************************/ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var calculateChange = exports.calculateChange = function calculateChange(e, hsl, direction, initialA, container) { e.preventDefault(); var containerWidth = container.clientWidth; var containerHeight = container.clientHeight; var x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX; var y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY; var left = x - (container.getBoundingClientRect().left + window.pageXOffset); var top = y - (container.getBoundingClientRect().top + window.pageYOffset); if (direction === 'vertical') { var a = void 0; if (top < 0) { a = 0; } else if (top > containerHeight) { a = 1; } else { a = Math.round(top * 100 / containerHeight) / 100; } if (hsl.a !== a) { return { h: hsl.h, s: hsl.s, l: hsl.l, a: a, source: 'rgb' }; } } else { var _a = void 0; if (left < 0) { _a = 0; } else if (left > containerWidth) { _a = 1; } else { _a = Math.round(left * 100 / containerWidth) / 100; } if (initialA !== _a) { return { h: hsl.h, s: hsl.s, l: hsl.l, a: _a, source: 'rgb' }; } } return null; }; /***/ }), /* 194 */ /*!************************************************************!*\ !*** ../~/react-color/lib/components/common/Checkboard.js ***! \************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Checkboard = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _checkboard = __webpack_require__(/*! ../../helpers/checkboard */ 195); var checkboard = _interopRequireWildcard(_checkboard); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Checkboard = exports.Checkboard = function Checkboard(_ref) { var white = _ref.white, grey = _ref.grey, size = _ref.size, renderers = _ref.renderers, borderRadius = _ref.borderRadius, boxShadow = _ref.boxShadow; var styles = (0, _reactcss2.default)({ 'default': { grid: { borderRadius: borderRadius, boxShadow: boxShadow, absolute: '0px 0px 0px 0px', background: 'url(' + checkboard.get(white, grey, size, renderers.canvas) + ') center left' } } }); return _react2.default.createElement('div', { style: styles.grid }); }; Checkboard.defaultProps = { size: 8, white: 'transparent', grey: 'rgba(0,0,0,.08)', renderers: {} }; exports.default = Checkboard; /***/ }), /* 195 */ /*!**************************************************!*\ !*** ../~/react-color/lib/helpers/checkboard.js ***! \**************************************************/ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var checkboardCache = {}; var render = exports.render = function render(c1, c2, size, serverCanvas) { if (typeof document === 'undefined' && !serverCanvas) { return null; } var canvas = serverCanvas ? new serverCanvas() : document.createElement('canvas'); canvas.width = size * 2; canvas.height = size * 2; var ctx = canvas.getContext('2d'); if (!ctx) { return null; } // If no context can be found, return early. ctx.fillStyle = c1; ctx.fillRect(0, 0, canvas.width, canvas.height); ctx.fillStyle = c2; ctx.fillRect(0, 0, size, size); ctx.translate(size, size); ctx.fillRect(0, 0, size, size); return canvas.toDataURL(); }; var get = exports.get = function get(c1, c2, size, serverCanvas) { var key = c1 + '-' + c2 + '-' + size + (serverCanvas ? '-server' : ''); if (checkboardCache[key]) { return checkboardCache[key]; } var checkboard = render(c1, c2, size, serverCanvas); checkboardCache[key] = checkboard; return checkboard; }; /***/ }), /* 196 */ /*!***************************************************************!*\ !*** ../~/react-color/lib/components/common/EditableInput.js ***! \***************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.EditableInput = undefined; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var DEFAULT_ARROW_OFFSET = 1; var UP_KEY_CODE = 38; var DOWN_KEY_CODE = 40; var VALID_KEY_CODES = [UP_KEY_CODE, DOWN_KEY_CODE]; var isValidKeyCode = function isValidKeyCode(keyCode) { return VALID_KEY_CODES.indexOf(keyCode) > -1; }; var getFormattedPercentage = function getFormattedPercentage(number) { return number + '%'; }; var getNumberValue = function getNumberValue(value) { return Number(String(value).replace(/%/g, '')); }; var getIsPercentage = function getIsPercentage(value) { return String(value).indexOf('%') > -1; }; var EditableInput = exports.EditableInput = function (_ref) { _inherits(EditableInput, _ref); function EditableInput(props) { _classCallCheck(this, EditableInput); var _this = _possibleConstructorReturn(this, (EditableInput.__proto__ || Object.getPrototypeOf(EditableInput)).call(this)); _this.handleBlur = function () { if (_this.state.blurValue) { _this.setState({ value: _this.state.blurValue, blurValue: null }); } }; _this.handleChange = function (e) { _this.setUpdatedValue(e.target.value, e); }; _this.handleKeyDown = function (e) { // In case `e.target.value` is a percentage remove the `%` character // and update accordingly with a percentage // https://github.com/casesandberg/react-color/issues/383 var value = getNumberValue(e.target.value); if (!isNaN(value) && isValidKeyCode(e.keyCode)) { var offset = _this.getArrowOffset(); var updatedValue = e.keyCode === UP_KEY_CODE ? value + offset : value - offset; _this.setUpdatedValue(updatedValue, e); } }; _this.handleDrag = function (e) { if (_this.props.dragLabel) { var newValue = Math.round(_this.props.value + e.movementX); if (newValue >= 0 && newValue <= _this.props.dragMax) { _this.props.onChange && _this.props.onChange(_this.getValueObjectWithLabel(newValue), e); } } }; _this.handleMouseDown = function (e) { if (_this.props.dragLabel) { e.preventDefault(); _this.handleDrag(e); window.addEventListener('mousemove', _this.handleDrag); window.addEventListener('mouseup', _this.handleMouseUp); } }; _this.handleMouseUp = function () { _this.unbindEventListeners(); }; _this.unbindEventListeners = function () { window.removeEventListener('mousemove', _this.handleDrag); window.removeEventListener('mouseup', _this.handleMouseUp); }; _this.state = { value: String(props.value).toUpperCase(), blurValue: String(props.value).toUpperCase() }; return _this; } _createClass(EditableInput, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { var input = this.input; if (nextProps.value !== this.state.value) { if (input === document.activeElement) { this.setState({ blurValue: String(nextProps.value).toUpperCase() }); } else { this.setState({ value: String(nextProps.value).toUpperCase(), blurValue: !this.state.blurValue && String(nextProps.value).toUpperCase() }); } } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.unbindEventListeners(); } }, { key: 'getValueObjectWithLabel', value: function getValueObjectWithLabel(value) { return _defineProperty({}, this.props.label, value); } }, { key: 'getArrowOffset', value: function getArrowOffset() { return this.props.arrowOffset || DEFAULT_ARROW_OFFSET; } }, { key: 'setUpdatedValue', value: function setUpdatedValue(value, e) { var onChangeValue = this.props.label !== null ? this.getValueObjectWithLabel(value) : value; this.props.onChange && this.props.onChange(onChangeValue, e); var isPercentage = getIsPercentage(e.target.value); this.setState({ value: isPercentage ? getFormattedPercentage(value) : value }); } }, { key: 'render', value: function render() { var _this2 = this; var styles = (0, _reactcss2.default)({ 'default': { wrap: { position: 'relative' } }, 'user-override': { wrap: this.props.style && this.props.style.wrap ? this.props.style.wrap : {}, input: this.props.style && this.props.style.input ? this.props.style.input : {}, label: this.props.style && this.props.style.label ? this.props.style.label : {} }, 'dragLabel-true': { label: { cursor: 'ew-resize' } } }, { 'user-override': true }, this.props); return _react2.default.createElement( 'div', { style: styles.wrap }, _react2.default.createElement('input', { style: styles.input, ref: function ref(input) { return _this2.input = input; }, value: this.state.value, onKeyDown: this.handleKeyDown, onChange: this.handleChange, onBlur: this.handleBlur, placeholder: this.props.placeholder, spellCheck: 'false' }), this.props.label && !this.props.hideLabel ? _react2.default.createElement( 'span', { style: styles.label, onMouseDown: this.handleMouseDown }, this.props.label ) : null ); } }]); return EditableInput; }(_react.PureComponent || _react.Component); exports.default = EditableInput; /***/ }), /* 197 */ /*!*****************************************************!*\ !*** ../~/react-color/lib/components/common/Hue.js ***! \*****************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Hue = undefined; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _hue = __webpack_require__(/*! ../../helpers/hue */ 198); var hue = _interopRequireWildcard(_hue); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Hue = exports.Hue = function (_ref) { _inherits(Hue, _ref); function Hue() { var _ref2; var _temp, _this, _ret; _classCallCheck(this, Hue); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref2 = Hue.__proto__ || Object.getPrototypeOf(Hue)).call.apply(_ref2, [this].concat(args))), _this), _this.handleChange = function (e) { var change = hue.calculateChange(e, _this.props.direction, _this.props.hsl, _this.container); change && typeof _this.props.onChange === 'function' && _this.props.onChange(change, e); }, _this.handleMouseDown = function (e) { _this.handleChange(e); window.addEventListener('mousemove', _this.handleChange); window.addEventListener('mouseup', _this.handleMouseUp); }, _this.handleMouseUp = function () { _this.unbindEventListeners(); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(Hue, [{ key: 'componentWillUnmount', value: function componentWillUnmount() { this.unbindEventListeners(); } }, { key: 'unbindEventListeners', value: function unbindEventListeners() { window.removeEventListener('mousemove', this.handleChange); window.removeEventListener('mouseup', this.handleMouseUp); } }, { key: 'render', value: function render() { var _this2 = this; var _props$direction = this.props.direction, direction = _props$direction === undefined ? 'horizontal' : _props$direction; var styles = (0, _reactcss2.default)({ 'default': { hue: { absolute: '0px 0px 0px 0px', borderRadius: this.props.radius, boxShadow: this.props.shadow }, container: { padding: '0 2px', position: 'relative', height: '100%', borderRadius: this.props.radius }, pointer: { position: 'absolute', left: this.props.hsl.h * 100 / 360 + '%' }, slider: { marginTop: '1px', width: '4px', borderRadius: '1px', height: '8px', boxShadow: '0 0 2px rgba(0, 0, 0, .6)', background: '#fff', transform: 'translateX(-2px)' } }, 'vertical': { pointer: { left: '0px', top: -(this.props.hsl.h * 100 / 360) + 100 + '%' } } }, { vertical: direction === 'vertical' }); return _react2.default.createElement( 'div', { style: styles.hue }, _react2.default.createElement( 'div', { className: 'hue-' + direction, style: styles.container, ref: function ref(container) { return _this2.container = container; }, onMouseDown: this.handleMouseDown, onTouchMove: this.handleChange, onTouchStart: this.handleChange }, _react2.default.createElement( 'style', null, '\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n ' ), _react2.default.createElement( 'div', { style: styles.pointer }, this.props.pointer ? _react2.default.createElement(this.props.pointer, this.props) : _react2.default.createElement('div', { style: styles.slider }) ) ) ); } }]); return Hue; }(_react.PureComponent || _react.Component); exports.default = Hue; /***/ }), /* 198 */ /*!*******************************************!*\ !*** ../~/react-color/lib/helpers/hue.js ***! \*******************************************/ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var calculateChange = exports.calculateChange = function calculateChange(e, direction, hsl, container) { e.preventDefault(); var containerWidth = container.clientWidth; var containerHeight = container.clientHeight; var x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX; var y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY; var left = x - (container.getBoundingClientRect().left + window.pageXOffset); var top = y - (container.getBoundingClientRect().top + window.pageYOffset); if (direction === 'vertical') { var h = void 0; if (top < 0) { h = 359; } else if (top > containerHeight) { h = 0; } else { var percent = -(top * 100 / containerHeight) + 100; h = 360 * percent / 100; } if (hsl.h !== h) { return { h: h, s: hsl.s, l: hsl.l, a: hsl.a, source: 'rgb' }; } } else { var _h = void 0; if (left < 0) { _h = 0; } else if (left > containerWidth) { _h = 359; } else { var _percent = left * 100 / containerWidth; _h = 360 * _percent / 100; } if (hsl.h !== _h) { return { h: _h, s: hsl.s, l: hsl.l, a: hsl.a, source: 'rgb' }; } } return null; }; /***/ }), /* 199 */ /*!********************************************************!*\ !*** ../~/react-color/lib/components/common/Raised.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Raised = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _merge = __webpack_require__(/*! lodash/merge */ 200); var _merge2 = _interopRequireDefault(_merge); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Raised = exports.Raised = function Raised(_ref) { var zDepth = _ref.zDepth, radius = _ref.radius, background = _ref.background, children = _ref.children, _ref$styles = _ref.styles, passedStyles = _ref$styles === undefined ? {} : _ref$styles; var styles = (0, _reactcss2.default)((0, _merge2.default)({ 'default': { wrap: { position: 'relative', display: 'inline-block' }, content: { position: 'relative' }, bg: { absolute: '0px 0px 0px 0px', boxShadow: '0 ' + zDepth + 'px ' + zDepth * 4 + 'px rgba(0,0,0,.24)', borderRadius: radius, background: background } }, 'zDepth-0': { bg: { boxShadow: 'none' } }, 'zDepth-1': { bg: { boxShadow: '0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)' } }, 'zDepth-2': { bg: { boxShadow: '0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)' } }, 'zDepth-3': { bg: { boxShadow: '0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)' } }, 'zDepth-4': { bg: { boxShadow: '0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)' } }, 'zDepth-5': { bg: { boxShadow: '0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)' } }, 'square': { bg: { borderRadius: '0' } }, 'circle': { bg: { borderRadius: '50%' } } }, passedStyles), { 'zDepth-1': zDepth === 1 }); return _react2.default.createElement( 'div', { style: styles.wrap }, _react2.default.createElement('div', { style: styles.bg }), _react2.default.createElement( 'div', { style: styles.content }, children ) ); }; Raised.propTypes = { background: _propTypes2.default.string, zDepth: _propTypes2.default.oneOf([0, 1, 2, 3, 4, 5]), radius: _propTypes2.default.number, styles: _propTypes2.default.object }; Raised.defaultProps = { background: '#fff', zDepth: 1, radius: 2, styles: {} }; exports.default = Raised; /***/ }), /* 200 */ /*!******************************************!*\ !*** ../~/react-color/~/lodash/merge.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var baseMerge = __webpack_require__(/*! ./_baseMerge */ 201), createAssigner = __webpack_require__(/*! ./_createAssigner */ 286); /** * This method is like `_.assign` except that it recursively merges own and * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 0.5.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @example * * var object = { * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * * var other = { * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * * _.merge(object, other); * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); }); module.exports = merge; /***/ }), /* 201 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/_baseMerge.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(/*! ./_Stack */ 202), assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ 246), baseFor = __webpack_require__(/*! ./_baseFor */ 249), baseMergeDeep = __webpack_require__(/*! ./_baseMergeDeep */ 251), isObject = __webpack_require__(/*! ./isObject */ 226), keysIn = __webpack_require__(/*! ./keysIn */ 280), safeGet = __webpack_require__(/*! ./_safeGet */ 276); /** * The base implementation of `_.merge` without support for multiple sources. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {number} srcIndex The index of `source`. * @param {Function} [customizer] The function to customize merged values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } baseFor(source, function(srcValue, key) { if (isObject(srcValue)) { stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { newValue = srcValue; } assignMergeValue(object, key, newValue); } }, keysIn); } module.exports = baseMerge; /***/ }), /* 202 */ /*!*******************************************!*\ !*** ../~/react-color/~/lodash/_Stack.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(/*! ./_ListCache */ 203), stackClear = __webpack_require__(/*! ./_stackClear */ 211), stackDelete = __webpack_require__(/*! ./_stackDelete */ 212), stackGet = __webpack_require__(/*! ./_stackGet */ 213), stackHas = __webpack_require__(/*! ./_stackHas */ 214), stackSet = __webpack_require__(/*! ./_stackSet */ 215); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /* 203 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/_ListCache.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ 204), listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ 205), listCacheGet = __webpack_require__(/*! ./_listCacheGet */ 208), listCacheHas = __webpack_require__(/*! ./_listCacheHas */ 209), listCacheSet = __webpack_require__(/*! ./_listCacheSet */ 210); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /* 204 */ /*!****************************************************!*\ !*** ../~/react-color/~/lodash/_listCacheClear.js ***! \****************************************************/ /***/ (function(module, exports) { /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } module.exports = listCacheClear; /***/ }), /* 205 */ /*!*****************************************************!*\ !*** ../~/react-color/~/lodash/_listCacheDelete.js ***! \*****************************************************/ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ 206); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listCacheDelete; /***/ }), /* 206 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_assocIndexOf.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(/*! ./eq */ 207); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /* 207 */ /*!***************************************!*\ !*** ../~/react-color/~/lodash/eq.js ***! \***************************************/ /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /* 208 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_listCacheGet.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ 206); /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } module.exports = listCacheGet; /***/ }), /* 209 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_listCacheHas.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ 206); /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } module.exports = listCacheHas; /***/ }), /* 210 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_listCacheSet.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ 206); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listCacheSet; /***/ }), /* 211 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_stackClear.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(/*! ./_ListCache */ 203); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }), /* 212 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_stackDelete.js ***! \*************************************************/ /***/ (function(module, exports) { /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } module.exports = stackDelete; /***/ }), /* 213 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_stackGet.js ***! \**********************************************/ /***/ (function(module, exports) { /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } module.exports = stackGet; /***/ }), /* 214 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_stackHas.js ***! \**********************************************/ /***/ (function(module, exports) { /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } module.exports = stackHas; /***/ }), /* 215 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_stackSet.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(/*! ./_ListCache */ 203), Map = __webpack_require__(/*! ./_Map */ 216), MapCache = __webpack_require__(/*! ./_MapCache */ 231); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } module.exports = stackSet; /***/ }), /* 216 */ /*!*****************************************!*\ !*** ../~/react-color/~/lodash/_Map.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 217), root = __webpack_require__(/*! ./_root */ 222); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /* 217 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/_getNative.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ 218), getValue = __webpack_require__(/*! ./_getValue */ 230); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /* 218 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_baseIsNative.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(/*! ./isFunction */ 219), isMasked = __webpack_require__(/*! ./_isMasked */ 227), isObject = __webpack_require__(/*! ./isObject */ 226), toSource = __webpack_require__(/*! ./_toSource */ 229); /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } module.exports = baseIsNative; /***/ }), /* 219 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/isFunction.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 220), isObject = __webpack_require__(/*! ./isObject */ 226); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /* 220 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_baseGetTag.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ 221), getRawTag = __webpack_require__(/*! ./_getRawTag */ 224), objectToString = __webpack_require__(/*! ./_objectToString */ 225); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /* 221 */ /*!********************************************!*\ !*** ../~/react-color/~/lodash/_Symbol.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(/*! ./_root */ 222); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /* 222 */ /*!******************************************!*\ !*** ../~/react-color/~/lodash/_root.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ 223); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 223 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_freeGlobal.js ***! \************************************************/ /***/ (function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; module.exports = freeGlobal; /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }), /* 224 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/_getRawTag.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ 221); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }), /* 225 */ /*!****************************************************!*\ !*** ../~/react-color/~/lodash/_objectToString.js ***! \****************************************************/ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /* 226 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/isObject.js ***! \*********************************************/ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 227 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_isMasked.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var coreJsData = __webpack_require__(/*! ./_coreJsData */ 228); /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } module.exports = isMasked; /***/ }), /* 228 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_coreJsData.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(/*! ./_root */ 222); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; /***/ }), /* 229 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_toSource.js ***! \**********************************************/ /***/ (function(module, exports) { /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } module.exports = toSource; /***/ }), /* 230 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_getValue.js ***! \**********************************************/ /***/ (function(module, exports) { /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } module.exports = getValue; /***/ }), /* 231 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_MapCache.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ 232), mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ 240), mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ 243), mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ 244), mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ 245); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /* 232 */ /*!***************************************************!*\ !*** ../~/react-color/~/lodash/_mapCacheClear.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { var Hash = __webpack_require__(/*! ./_Hash */ 233), ListCache = __webpack_require__(/*! ./_ListCache */ 203), Map = __webpack_require__(/*! ./_Map */ 216); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } module.exports = mapCacheClear; /***/ }), /* 233 */ /*!******************************************!*\ !*** ../~/react-color/~/lodash/_Hash.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var hashClear = __webpack_require__(/*! ./_hashClear */ 234), hashDelete = __webpack_require__(/*! ./_hashDelete */ 236), hashGet = __webpack_require__(/*! ./_hashGet */ 237), hashHas = __webpack_require__(/*! ./_hashHas */ 238), hashSet = __webpack_require__(/*! ./_hashSet */ 239); /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; module.exports = Hash; /***/ }), /* 234 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/_hashClear.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ 235); /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } module.exports = hashClear; /***/ }), /* 235 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_nativeCreate.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 217); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /* 236 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_hashDelete.js ***! \************************************************/ /***/ (function(module, exports) { /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } module.exports = hashDelete; /***/ }), /* 237 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/_hashGet.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ 235); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; /***/ }), /* 238 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/_hashHas.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ 235); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } module.exports = hashHas; /***/ }), /* 239 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/_hashSet.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ 235); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } module.exports = hashSet; /***/ }), /* 240 */ /*!****************************************************!*\ !*** ../~/react-color/~/lodash/_mapCacheDelete.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(/*! ./_getMapData */ 241); /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } module.exports = mapCacheDelete; /***/ }), /* 241 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_getMapData.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__(/*! ./_isKeyable */ 242); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /* 242 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/_isKeyable.js ***! \***********************************************/ /***/ (function(module, exports) { /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } module.exports = isKeyable; /***/ }), /* 243 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_mapCacheGet.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(/*! ./_getMapData */ 241); /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } module.exports = mapCacheGet; /***/ }), /* 244 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_mapCacheHas.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(/*! ./_getMapData */ 241); /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } module.exports = mapCacheHas; /***/ }), /* 245 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_mapCacheSet.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(/*! ./_getMapData */ 241); /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } module.exports = mapCacheSet; /***/ }), /* 246 */ /*!******************************************************!*\ !*** ../~/react-color/~/lodash/_assignMergeValue.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ 247), eq = __webpack_require__(/*! ./eq */ 207); /** * This function is like `assignValue` except that it doesn't assign * `undefined` values. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignMergeValue; /***/ }), /* 247 */ /*!*****************************************************!*\ !*** ../~/react-color/~/lodash/_baseAssignValue.js ***! \*****************************************************/ /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__(/*! ./_defineProperty */ 248); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /* 248 */ /*!****************************************************!*\ !*** ../~/react-color/~/lodash/_defineProperty.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 217); var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); module.exports = defineProperty; /***/ }), /* 249 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/_baseFor.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var createBaseFor = __webpack_require__(/*! ./_createBaseFor */ 250); /** * The base implementation of `baseForOwn` which iterates over `object` * properties returned by `keysFunc` and invokes `iteratee` for each property. * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseFor = createBaseFor(); module.exports = baseFor; /***/ }), /* 250 */ /*!***************************************************!*\ !*** ../~/react-color/~/lodash/_createBaseFor.js ***! \***************************************************/ /***/ (function(module, exports) { /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } module.exports = createBaseFor; /***/ }), /* 251 */ /*!***************************************************!*\ !*** ../~/react-color/~/lodash/_baseMergeDeep.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { var assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ 246), cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ 252), cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ 253), copyArray = __webpack_require__(/*! ./_copyArray */ 256), initCloneObject = __webpack_require__(/*! ./_initCloneObject */ 257), isArguments = __webpack_require__(/*! ./isArguments */ 262), isArray = __webpack_require__(/*! ./isArray */ 265), isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ 266), isBuffer = __webpack_require__(/*! ./isBuffer */ 269), isFunction = __webpack_require__(/*! ./isFunction */ 219), isObject = __webpack_require__(/*! ./isObject */ 226), isPlainObject = __webpack_require__(/*! ./isPlainObject */ 271), isTypedArray = __webpack_require__(/*! ./isTypedArray */ 272), safeGet = __webpack_require__(/*! ./_safeGet */ 276), toPlainObject = __webpack_require__(/*! ./toPlainObject */ 277); /** * A specialized version of `baseMerge` for arrays and objects which performs * deep merges and tracks traversed objects enabling objects with circular * references to be merged. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {string} key The key of the value to merge. * @param {number} srcIndex The index of `source`. * @param {Function} mergeFunc The function to merge values. * @param {Function} [customizer] The function to customize assigned values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, (key + ''), object, source, stack) : undefined; var isCommon = newValue === undefined; if (isCommon) { var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = cloneBuffer(srcValue, true); } else if (isTyped) { isCommon = false; newValue = cloneTypedArray(srcValue, true); } else { newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject(objValue) || isFunction(objValue)) { newValue = initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack['delete'](srcValue); } assignMergeValue(object, key, newValue); } module.exports = baseMergeDeep; /***/ }), /* 252 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_cloneBuffer.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ 222); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; /** * Creates a clone of `buffer`. * * @private * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Buffer} Returns the cloned buffer. */ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } module.exports = cloneBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ 12)(module))) /***/ }), /* 253 */ /*!*****************************************************!*\ !*** ../~/react-color/~/lodash/_cloneTypedArray.js ***! \*****************************************************/ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ 254); /** * Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } module.exports = cloneTypedArray; /***/ }), /* 254 */ /*!******************************************************!*\ !*** ../~/react-color/~/lodash/_cloneArrayBuffer.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(/*! ./_Uint8Array */ 255); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /* 255 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_Uint8Array.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(/*! ./_root */ 222); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /* 256 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/_copyArray.js ***! \***********************************************/ /***/ (function(module, exports) { /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } module.exports = copyArray; /***/ }), /* 257 */ /*!*****************************************************!*\ !*** ../~/react-color/~/lodash/_initCloneObject.js ***! \*****************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(/*! ./_baseCreate */ 258), getPrototype = __webpack_require__(/*! ./_getPrototype */ 259), isPrototype = __webpack_require__(/*! ./_isPrototype */ 261); /** * Initializes an object clone. * * @private * @param {Object} object The object to clone. * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { return (typeof object.constructor == 'function' && !isPrototype(object)) ? baseCreate(getPrototype(object)) : {}; } module.exports = initCloneObject; /***/ }), /* 258 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_baseCreate.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./isObject */ 226); /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); module.exports = baseCreate; /***/ }), /* 259 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_getPrototype.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(/*! ./_overArg */ 260); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /* 260 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/_overArg.js ***! \*********************************************/ /***/ (function(module, exports) { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }), /* 261 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_isPrototype.js ***! \*************************************************/ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /* 262 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/isArguments.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ 263), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 264); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /* 263 */ /*!*****************************************************!*\ !*** ../~/react-color/~/lodash/_baseIsArguments.js ***! \*****************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 220), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 264); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } module.exports = baseIsArguments; /***/ }), /* 264 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/isObjectLike.js ***! \*************************************************/ /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /* 265 */ /*!********************************************!*\ !*** ../~/react-color/~/lodash/isArray.js ***! \********************************************/ /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /* 266 */ /*!******************************************************!*\ !*** ../~/react-color/~/lodash/isArrayLikeObject.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(/*! ./isArrayLike */ 267), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 264); /** * This method is like `_.isArrayLike` except that it also checks if `value` * is an object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array-like object, * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); * // => true * * _.isArrayLikeObject(document.body.children); * // => true * * _.isArrayLikeObject('abc'); * // => false * * _.isArrayLikeObject(_.noop); * // => false */ function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(value); } module.exports = isArrayLikeObject; /***/ }), /* 267 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/isArrayLike.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(/*! ./isFunction */ 219), isLength = __webpack_require__(/*! ./isLength */ 268); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /* 268 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/isLength.js ***! \*********************************************/ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /* 269 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/isBuffer.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ 222), stubFalse = __webpack_require__(/*! ./stubFalse */ 270); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ 12)(module))) /***/ }), /* 270 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/stubFalse.js ***! \**********************************************/ /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /* 271 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/isPlainObject.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 220), getPrototype = __webpack_require__(/*! ./_getPrototype */ 259), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 264); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { * this.a = 1; * } * * _.isPlainObject(new Foo); * // => false * * _.isPlainObject([1, 2, 3]); * // => false * * _.isPlainObject({ 'x': 0, 'y': 0 }); * // => true * * _.isPlainObject(Object.create(null)); * // => true */ function isPlainObject(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject; /***/ }), /* 272 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/isTypedArray.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__(/*! ./_baseIsTypedArray */ 273), baseUnary = __webpack_require__(/*! ./_baseUnary */ 274), nodeUtil = __webpack_require__(/*! ./_nodeUtil */ 275); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /* 273 */ /*!******************************************************!*\ !*** ../~/react-color/~/lodash/_baseIsTypedArray.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 220), isLength = __webpack_require__(/*! ./isLength */ 268), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 264); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } module.exports = baseIsTypedArray; /***/ }), /* 274 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/_baseUnary.js ***! \***********************************************/ /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /* 275 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_nodeUtil.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ 223); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ 12)(module))) /***/ }), /* 276 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/_safeGet.js ***! \*********************************************/ /***/ (function(module, exports) { /** * Gets the value at `key`, unless `key` is "__proto__". * * @private * @param {Object} object The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function safeGet(object, key) { if (key == '__proto__') { return; } return object[key]; } module.exports = safeGet; /***/ }), /* 277 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/toPlainObject.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(/*! ./_copyObject */ 278), keysIn = __webpack_require__(/*! ./keysIn */ 280); /** * Converts `value` to a plain object flattening inherited enumerable string * keyed properties of `value` to own properties of the plain object. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to convert. * @returns {Object} Returns the converted plain object. * @example * * function Foo() { * this.b = 2; * } * * Foo.prototype.c = 3; * * _.assign({ 'a': 1 }, new Foo); * // => { 'a': 1, 'b': 2 } * * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); * // => { 'a': 1, 'b': 2, 'c': 3 } */ function toPlainObject(value) { return copyObject(value, keysIn(value)); } module.exports = toPlainObject; /***/ }), /* 278 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_copyObject.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(/*! ./_assignValue */ 279), baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ 247); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /* 279 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_assignValue.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ 247), eq = __webpack_require__(/*! ./eq */ 207); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignValue; /***/ }), /* 280 */ /*!*******************************************!*\ !*** ../~/react-color/~/lodash/keysIn.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ 281), baseKeysIn = __webpack_require__(/*! ./_baseKeysIn */ 284), isArrayLike = __webpack_require__(/*! ./isArrayLike */ 267); /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } module.exports = keysIn; /***/ }), /* 281 */ /*!***************************************************!*\ !*** ../~/react-color/~/lodash/_arrayLikeKeys.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseTimes = __webpack_require__(/*! ./_baseTimes */ 282), isArguments = __webpack_require__(/*! ./isArguments */ 262), isArray = __webpack_require__(/*! ./isArray */ 265), isBuffer = __webpack_require__(/*! ./isBuffer */ 269), isIndex = __webpack_require__(/*! ./_isIndex */ 283), isTypedArray = __webpack_require__(/*! ./isTypedArray */ 272); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }), /* 282 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/_baseTimes.js ***! \***********************************************/ /***/ (function(module, exports) { /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } module.exports = baseTimes; /***/ }), /* 283 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/_isIndex.js ***! \*********************************************/ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }), /* 284 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_baseKeysIn.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./isObject */ 226), isPrototype = __webpack_require__(/*! ./_isPrototype */ 261), nativeKeysIn = __webpack_require__(/*! ./_nativeKeysIn */ 285); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { if (!isObject(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } module.exports = baseKeysIn; /***/ }), /* 285 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_nativeKeysIn.js ***! \**************************************************/ /***/ (function(module, exports) { /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } module.exports = nativeKeysIn; /***/ }), /* 286 */ /*!****************************************************!*\ !*** ../~/react-color/~/lodash/_createAssigner.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseRest = __webpack_require__(/*! ./_baseRest */ 287), isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ 295); /** * Creates a function like `_.assign`. * * @private * @param {Function} assigner The function to assign values. * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } module.exports = createAssigner; /***/ }), /* 287 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_baseRest.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(/*! ./identity */ 288), overRest = __webpack_require__(/*! ./_overRest */ 289), setToString = __webpack_require__(/*! ./_setToString */ 291); /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ function baseRest(func, start) { return setToString(overRest(func, start, identity), func + ''); } module.exports = baseRest; /***/ }), /* 288 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/identity.js ***! \*********************************************/ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 289 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_overRest.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(/*! ./_apply */ 290); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * A specialized version of `baseRest` which transforms the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @param {Function} transform The rest array transform. * @returns {Function} Returns the new function. */ function overRest(func, start, transform) { start = nativeMax(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return apply(func, this, otherArgs); }; } module.exports = overRest; /***/ }), /* 290 */ /*!*******************************************!*\ !*** ../~/react-color/~/lodash/_apply.js ***! \*******************************************/ /***/ (function(module, exports) { /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } module.exports = apply; /***/ }), /* 291 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_setToString.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseSetToString = __webpack_require__(/*! ./_baseSetToString */ 292), shortOut = __webpack_require__(/*! ./_shortOut */ 294); /** * Sets the `toString` method of `func` to return `string`. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var setToString = shortOut(baseSetToString); module.exports = setToString; /***/ }), /* 292 */ /*!*****************************************************!*\ !*** ../~/react-color/~/lodash/_baseSetToString.js ***! \*****************************************************/ /***/ (function(module, exports, __webpack_require__) { var constant = __webpack_require__(/*! ./constant */ 293), defineProperty = __webpack_require__(/*! ./_defineProperty */ 248), identity = __webpack_require__(/*! ./identity */ 288); /** * The base implementation of `setToString` without support for hot loop shorting. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var baseSetToString = !defineProperty ? identity : function(func, string) { return defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant(string), 'writable': true }); }; module.exports = baseSetToString; /***/ }), /* 293 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/constant.js ***! \*********************************************/ /***/ (function(module, exports) { /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } module.exports = constant; /***/ }), /* 294 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_shortOut.js ***! \**********************************************/ /***/ (function(module, exports) { /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeNow = Date.now; /** * Creates a function that'll short out and invoke `identity` instead * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` * milliseconds. * * @private * @param {Function} func The function to restrict. * @returns {Function} Returns the new shortable function. */ function shortOut(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined, arguments); }; } module.exports = shortOut; /***/ }), /* 295 */ /*!****************************************************!*\ !*** ../~/react-color/~/lodash/_isIterateeCall.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(/*! ./eq */ 207), isArrayLike = __webpack_require__(/*! ./isArrayLike */ 267), isIndex = __webpack_require__(/*! ./_isIndex */ 283), isObject = __webpack_require__(/*! ./isObject */ 226); /** * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. * @param {*} index The potential iteratee index or key argument. * @param {*} object The potential iteratee object argument. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, * else `false`. */ function isIterateeCall(value, index, object) { if (!isObject(object)) { return false; } var type = typeof index; if (type == 'number' ? (isArrayLike(object) && isIndex(index, object.length)) : (type == 'string' && index in object) ) { return eq(object[index], value); } return false; } module.exports = isIterateeCall; /***/ }), /* 296 */ /*!************************************************************!*\ !*** ../~/react-color/lib/components/common/Saturation.js ***! \************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Saturation = undefined; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _throttle = __webpack_require__(/*! lodash/throttle */ 297); var _throttle2 = _interopRequireDefault(_throttle); var _saturation = __webpack_require__(/*! ../../helpers/saturation */ 302); var saturation = _interopRequireWildcard(_saturation); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Saturation = exports.Saturation = function (_ref) { _inherits(Saturation, _ref); function Saturation(props) { _classCallCheck(this, Saturation); var _this = _possibleConstructorReturn(this, (Saturation.__proto__ || Object.getPrototypeOf(Saturation)).call(this, props)); _this.handleChange = function (e) { typeof _this.props.onChange === 'function' && _this.throttle(_this.props.onChange, saturation.calculateChange(e, _this.props.hsl, _this.container), e); }; _this.handleMouseDown = function (e) { _this.handleChange(e); window.addEventListener('mousemove', _this.handleChange); window.addEventListener('mouseup', _this.handleMouseUp); }; _this.handleMouseUp = function () { _this.unbindEventListeners(); }; _this.throttle = (0, _throttle2.default)(function (fn, data, e) { fn(data, e); }, 50); return _this; } _createClass(Saturation, [{ key: 'componentWillUnmount', value: function componentWillUnmount() { this.throttle.cancel(); this.unbindEventListeners(); } }, { key: 'unbindEventListeners', value: function unbindEventListeners() { window.removeEventListener('mousemove', this.handleChange); window.removeEventListener('mouseup', this.handleMouseUp); } }, { key: 'render', value: function render() { var _this2 = this; var _ref2 = this.props.style || {}, color = _ref2.color, white = _ref2.white, black = _ref2.black, pointer = _ref2.pointer, circle = _ref2.circle; var styles = (0, _reactcss2.default)({ 'default': { color: { absolute: '0px 0px 0px 0px', background: 'hsl(' + this.props.hsl.h + ',100%, 50%)', borderRadius: this.props.radius }, white: { absolute: '0px 0px 0px 0px', borderRadius: this.props.radius }, black: { absolute: '0px 0px 0px 0px', boxShadow: this.props.shadow, borderRadius: this.props.radius }, pointer: { position: 'absolute', top: -(this.props.hsv.v * 100) + 100 + '%', left: this.props.hsv.s * 100 + '%', cursor: 'default' }, circle: { width: '4px', height: '4px', boxShadow: '0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)', borderRadius: '50%', cursor: 'hand', transform: 'translate(-2px, -2px)' } }, 'custom': { color: color, white: white, black: black, pointer: pointer, circle: circle } }, { 'custom': !!this.props.style }); return _react2.default.createElement( 'div', { style: styles.color, ref: function ref(container) { return _this2.container = container; }, onMouseDown: this.handleMouseDown, onTouchMove: this.handleChange, onTouchStart: this.handleChange }, _react2.default.createElement( 'style', null, '\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n ' ), _react2.default.createElement( 'div', { style: styles.white, className: 'saturation-white' }, _react2.default.createElement('div', { style: styles.black, className: 'saturation-black' }), _react2.default.createElement( 'div', { style: styles.pointer }, this.props.pointer ? _react2.default.createElement(this.props.pointer, this.props) : _react2.default.createElement('div', { style: styles.circle }) ) ) ); } }]); return Saturation; }(_react.PureComponent || _react.Component); exports.default = Saturation; /***/ }), /* 297 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/throttle.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var debounce = __webpack_require__(/*! ./debounce */ 298), isObject = __webpack_require__(/*! ./isObject */ 226); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a throttled function that only invokes `func` at most once per * every `wait` milliseconds. The throttled function comes with a `cancel` * method to cancel delayed `func` invocations and a `flush` method to * immediately invoke them. Provide `options` to indicate whether `func` * should be invoked on the leading and/or trailing edge of the `wait` * timeout. The `func` is invoked with the last arguments provided to the * throttled function. Subsequent calls to the throttled function return the * result of the last `func` invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is * invoked on the trailing edge of the timeout only if the throttled function * is invoked more than once during the `wait` timeout. * * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.throttle` and `_.debounce`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to throttle. * @param {number} [wait=0] The number of milliseconds to throttle invocations to. * @param {Object} [options={}] The options object. * @param {boolean} [options.leading=true] * Specify invoking on the leading edge of the timeout. * @param {boolean} [options.trailing=true] * Specify invoking on the trailing edge of the timeout. * @returns {Function} Returns the new throttled function. * @example * * // Avoid excessively updating the position while scrolling. * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); * * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); * jQuery(element).on('click', throttled); * * // Cancel the trailing throttled invocation. * jQuery(window).on('popstate', throttled.cancel); */ function throttle(func, wait, options) { var leading = true, trailing = true; if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } if (isObject(options)) { leading = 'leading' in options ? !!options.leading : leading; trailing = 'trailing' in options ? !!options.trailing : trailing; } return debounce(func, wait, { 'leading': leading, 'maxWait': wait, 'trailing': trailing }); } module.exports = throttle; /***/ }), /* 298 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/debounce.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./isObject */ 226), now = __webpack_require__(/*! ./now */ 299), toNumber = __webpack_require__(/*! ./toNumber */ 300); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max, nativeMin = Math.min; /** * Creates a debounced function that delays invoking `func` until after `wait` * milliseconds have elapsed since the last time the debounced function was * invoked. The debounced function comes with a `cancel` method to cancel * delayed `func` invocations and a `flush` method to immediately invoke them. * Provide `options` to indicate whether `func` should be invoked on the * leading and/or trailing edge of the `wait` timeout. The `func` is invoked * with the last arguments provided to the debounced function. Subsequent * calls to the debounced function return the result of the last `func` * invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is * invoked on the trailing edge of the timeout only if the debounced function * is invoked more than once during the `wait` timeout. * * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to debounce. * @param {number} [wait=0] The number of milliseconds to delay. * @param {Object} [options={}] The options object. * @param {boolean} [options.leading=false] * Specify invoking on the leading edge of the timeout. * @param {number} [options.maxWait] * The maximum time `func` is allowed to be delayed before it's invoked. * @param {boolean} [options.trailing=true] * Specify invoking on the trailing edge of the timeout. * @returns {Function} Returns the new debounced function. * @example * * // Avoid costly calculations while the window size is in flux. * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); * * // Invoke `sendMail` when clicked, debouncing subsequent calls. * jQuery(element).on('click', _.debounce(sendMail, 300, { * 'leading': true, * 'trailing': false * })); * * // Ensure `batchLog` is invoked once after 1 second of debounced calls. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); * var source = new EventSource('/stream'); * jQuery(source).on('message', debounced); * * // Cancel the trailing debounced invocation. * jQuery(window).on('popstate', debounced.cancel); */ function debounce(func, wait, options) { var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } wait = toNumber(wait) || 0; if (isObject(options)) { leading = !!options.leading; maxing = 'maxWait' in options; maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; trailing = 'trailing' in options ? !!options.trailing : trailing; } function invokeFunc(time) { var args = lastArgs, thisArg = lastThis; lastArgs = lastThis = undefined; lastInvokeTime = time; result = func.apply(thisArg, args); return result; } function leadingEdge(time) { // Reset any `maxWait` timer. lastInvokeTime = time; // Start the timer for the trailing edge. timerId = setTimeout(timerExpired, wait); // Invoke the leading edge. return leading ? invokeFunc(time) : result; } function remainingWait(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; } function shouldInvoke(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; // Either this is the first call, activity has stopped and we're at the // trailing edge, the system time has gone backwards and we're treating // it as the trailing edge, or we've hit the `maxWait` limit. return (lastCallTime === undefined || (timeSinceLastCall >= wait) || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); } function timerExpired() { var time = now(); if (shouldInvoke(time)) { return trailingEdge(time); } // Restart the timer. timerId = setTimeout(timerExpired, remainingWait(time)); } function trailingEdge(time) { timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been // debounced at least once. if (trailing && lastArgs) { return invokeFunc(time); } lastArgs = lastThis = undefined; return result; } function cancel() { if (timerId !== undefined) { clearTimeout(timerId); } lastInvokeTime = 0; lastArgs = lastCallTime = lastThis = timerId = undefined; } function flush() { return timerId === undefined ? result : trailingEdge(now()); } function debounced() { var time = now(), isInvoking = shouldInvoke(time); lastArgs = arguments; lastThis = this; lastCallTime = time; if (isInvoking) { if (timerId === undefined) { return leadingEdge(lastCallTime); } if (maxing) { // Handle invocations in a tight loop. timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } } if (timerId === undefined) { timerId = setTimeout(timerExpired, wait); } return result; } debounced.cancel = cancel; debounced.flush = flush; return debounced; } module.exports = debounce; /***/ }), /* 299 */ /*!****************************************!*\ !*** ../~/react-color/~/lodash/now.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(/*! ./_root */ 222); /** * Gets the timestamp of the number of milliseconds that have elapsed since * the Unix epoch (1 January 1970 00:00:00 UTC). * * @static * @memberOf _ * @since 2.4.0 * @category Date * @returns {number} Returns the timestamp. * @example * * _.defer(function(stamp) { * console.log(_.now() - stamp); * }, _.now()); * // => Logs the number of milliseconds it took for the deferred invocation. */ var now = function() { return root.Date.now(); }; module.exports = now; /***/ }), /* 300 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/toNumber.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./isObject */ 226), isSymbol = __webpack_require__(/*! ./isSymbol */ 301); /** Used as references for various `Number` constants. */ var NAN = 0 / 0; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; /** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * * _.toNumber(3.2); * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = value.replace(reTrim, ''); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN : +value); } module.exports = toNumber; /***/ }), /* 301 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/isSymbol.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 220), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 264); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /* 302 */ /*!**************************************************!*\ !*** ../~/react-color/lib/helpers/saturation.js ***! \**************************************************/ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var calculateChange = exports.calculateChange = function calculateChange(e, hsl, container) { e.preventDefault(); var _container$getBoundin = container.getBoundingClientRect(), containerWidth = _container$getBoundin.width, containerHeight = _container$getBoundin.height; var x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX; var y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY; var left = x - (container.getBoundingClientRect().left + window.pageXOffset); var top = y - (container.getBoundingClientRect().top + window.pageYOffset); if (left < 0) { left = 0; } else if (left > containerWidth) { left = containerWidth; } else if (top < 0) { top = 0; } else if (top > containerHeight) { top = containerHeight; } var saturation = left * 100 / containerWidth; var bright = -(top * 100 / containerHeight) + 100; return { h: hsl.h, s: saturation, v: bright, a: hsl.a, source: 'rgb' }; }; /***/ }), /* 303 */ /*!***********************************************************!*\ !*** ../~/react-color/lib/components/common/ColorWrap.js ***! \***********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.ColorWrap = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _debounce = __webpack_require__(/*! lodash/debounce */ 298); var _debounce2 = _interopRequireDefault(_debounce); var _color = __webpack_require__(/*! ../../helpers/color */ 304); var _color2 = _interopRequireDefault(_color); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ColorWrap = exports.ColorWrap = function ColorWrap(Picker) { var ColorPicker = function (_ref) { _inherits(ColorPicker, _ref); function ColorPicker(props) { _classCallCheck(this, ColorPicker); var _this = _possibleConstructorReturn(this, (ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call(this)); _this.handleChange = function (data, event) { var isValidColor = _color2.default.simpleCheckForValidColor(data); if (isValidColor) { var colors = _color2.default.toState(data, data.h || _this.state.oldHue); _this.setState(colors); _this.props.onChangeComplete && _this.debounce(_this.props.onChangeComplete, colors, event); _this.props.onChange && _this.props.onChange(colors, event); } }; _this.handleSwatchHover = function (data, event) { var isValidColor = _color2.default.simpleCheckForValidColor(data); if (isValidColor) { var colors = _color2.default.toState(data, data.h || _this.state.oldHue); _this.setState(colors); _this.props.onSwatchHover && _this.props.onSwatchHover(colors, event); } }; _this.state = _extends({}, _color2.default.toState(props.color, 0)); _this.debounce = (0, _debounce2.default)(function (fn, data, event) { fn(data, event); }, 100); return _this; } _createClass(ColorPicker, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { this.setState(_extends({}, _color2.default.toState(nextProps.color, this.state.oldHue))); } }, { key: 'render', value: function render() { var optionalEvents = {}; if (this.props.onSwatchHover) { optionalEvents.onSwatchHover = this.handleSwatchHover; } return _react2.default.createElement(Picker, _extends({}, this.props, this.state, { onChange: this.handleChange }, optionalEvents)); } }]); return ColorPicker; }(_react.PureComponent || _react.Component); ColorPicker.propTypes = _extends({}, Picker.propTypes); ColorPicker.defaultProps = _extends({}, Picker.defaultProps, { color: { h: 250, s: 0.50, l: 0.20, a: 1 } }); return ColorPicker; }; exports.default = ColorWrap; /***/ }), /* 304 */ /*!*********************************************!*\ !*** ../~/react-color/lib/helpers/color.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.red = undefined; var _each = __webpack_require__(/*! lodash/each */ 305); var _each2 = _interopRequireDefault(_each); var _tinycolor = __webpack_require__(/*! tinycolor2 */ 315); var _tinycolor2 = _interopRequireDefault(_tinycolor); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = { simpleCheckForValidColor: function simpleCheckForValidColor(data) { var keysToCheck = ['r', 'g', 'b', 'a', 'h', 's', 'l', 'v']; var checked = 0; var passed = 0; (0, _each2.default)(keysToCheck, function (letter) { if (data[letter]) { checked += 1; if (!isNaN(data[letter])) { passed += 1; } if (letter === 's' || letter === 'l') { var percentPatt = /^\d+%$/; if (percentPatt.test(data[letter])) { passed += 1; } } } }); return checked === passed ? data : false; }, toState: function toState(data, oldHue) { var color = data.hex ? (0, _tinycolor2.default)(data.hex) : (0, _tinycolor2.default)(data); var hsl = color.toHsl(); var hsv = color.toHsv(); var rgb = color.toRgb(); var hex = color.toHex(); if (hsl.s === 0) { hsl.h = oldHue || 0; hsv.h = oldHue || 0; } var transparent = hex === '000000' && rgb.a === 0; return { hsl: hsl, hex: transparent ? 'transparent' : '#' + hex, rgb: rgb, hsv: hsv, oldHue: data.h || oldHue || hsl.h, source: data.source }; }, isValidHex: function isValidHex(hex) { // disable hex4 and hex8 var lh = String(hex).charAt(0) === '#' ? 1 : 0; return hex.length !== 4 + lh && hex.length < 7 + lh && (0, _tinycolor2.default)(hex).isValid(); }, getContrastingColor: function getContrastingColor(data) { if (!data) { return '#fff'; } var col = this.toState(data); if (col.hex === 'transparent') { return 'rgba(0,0,0,0.4)'; } var yiq = (col.rgb.r * 299 + col.rgb.g * 587 + col.rgb.b * 114) / 1000; return yiq >= 128 ? '#000' : '#fff'; } }; var red = exports.red = { hsl: { a: 1, h: 0, l: 0.5, s: 1 }, hex: '#ff0000', rgb: { r: 255, g: 0, b: 0, a: 1 }, hsv: { h: 0, s: 1, v: 1, a: 1 } }; /***/ }), /* 305 */ /*!*****************************************!*\ !*** ../~/react-color/~/lodash/each.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(/*! ./forEach */ 306); /***/ }), /* 306 */ /*!********************************************!*\ !*** ../~/react-color/~/lodash/forEach.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var arrayEach = __webpack_require__(/*! ./_arrayEach */ 307), baseEach = __webpack_require__(/*! ./_baseEach */ 308), castFunction = __webpack_require__(/*! ./_castFunction */ 314), isArray = __webpack_require__(/*! ./isArray */ 265); /** * Iterates over elements of `collection` and invokes `iteratee` for each element. * The iteratee is invoked with three arguments: (value, index|key, collection). * Iteratee functions may exit iteration early by explicitly returning `false`. * * **Note:** As with other "Collections" methods, objects with a "length" * property are iterated like arrays. To avoid this behavior use `_.forIn` * or `_.forOwn` for object iteration. * * @static * @memberOf _ * @since 0.1.0 * @alias each * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. * @see _.forEachRight * @example * * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. * * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { * console.log(key); * }); * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { var func = isArray(collection) ? arrayEach : baseEach; return func(collection, castFunction(iteratee)); } module.exports = forEach; /***/ }), /* 307 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/_arrayEach.js ***! \***********************************************/ /***/ (function(module, exports) { /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } module.exports = arrayEach; /***/ }), /* 308 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_baseEach.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseForOwn = __webpack_require__(/*! ./_baseForOwn */ 309), createBaseEach = __webpack_require__(/*! ./_createBaseEach */ 313); /** * The base implementation of `_.forEach` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array|Object} Returns `collection`. */ var baseEach = createBaseEach(baseForOwn); module.exports = baseEach; /***/ }), /* 309 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_baseForOwn.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseFor = __webpack_require__(/*! ./_baseFor */ 249), keys = __webpack_require__(/*! ./keys */ 310); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwn(object, iteratee) { return object && baseFor(object, iteratee, keys); } module.exports = baseForOwn; /***/ }), /* 310 */ /*!*****************************************!*\ !*** ../~/react-color/~/lodash/keys.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ 281), baseKeys = __webpack_require__(/*! ./_baseKeys */ 311), isArrayLike = __webpack_require__(/*! ./isArrayLike */ 267); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /* 311 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_baseKeys.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var isPrototype = __webpack_require__(/*! ./_isPrototype */ 261), nativeKeys = __webpack_require__(/*! ./_nativeKeys */ 312); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } module.exports = baseKeys; /***/ }), /* 312 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_nativeKeys.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(/*! ./_overArg */ 260); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /* 313 */ /*!****************************************************!*\ !*** ../~/react-color/~/lodash/_createBaseEach.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(/*! ./isArrayLike */ 267); /** * Creates a `baseEach` or `baseEachRight` function. * * @private * @param {Function} eachFunc The function to iterate over a collection. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); while ((fromRight ? index-- : ++index < length)) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } module.exports = createBaseEach; /***/ }), /* 314 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_castFunction.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(/*! ./identity */ 288); /** * Casts `value` to `identity` if it's not a function. * * @private * @param {*} value The value to inspect. * @returns {Function} Returns cast function. */ function castFunction(value) { return typeof value == 'function' ? value : identity; } module.exports = castFunction; /***/ }), /* 315 */ /*!************************************!*\ !*** ../~/tinycolor2/tinycolor.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.1 // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License (function(Math) { var trimLeft = /^\s+/, trimRight = /\s+$/, tinyCounter = 0, mathRound = Math.round, mathMin = Math.min, mathMax = Math.max, mathRandom = Math.random; function tinycolor (color, opts) { color = (color) ? color : ''; opts = opts || { }; // If input is already a tinycolor, return itself if (color instanceof tinycolor) { return color; } // If we are called as a function, call using new instead if (!(this instanceof tinycolor)) { return new tinycolor(color, opts); } var rgb = inputToRGB(color); this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = mathRound(100*this._a) / 100, this._format = opts.format || rgb.format; this._gradientType = opts.gradientType; // Don't let the range of [0,255] come back in [0,1]. // Potentially lose a little bit of precision here, but will fix issues where // .5 gets interpreted as half of the total, instead of half of 1 // If it was supposed to be 128, this was already taken care of by `inputToRgb` if (this._r < 1) { this._r = mathRound(this._r); } if (this._g < 1) { this._g = mathRound(this._g); } if (this._b < 1) { this._b = mathRound(this._b); } this._ok = rgb.ok; this._tc_id = tinyCounter++; } tinycolor.prototype = { isDark: function() { return this.getBrightness() < 128; }, isLight: function() { return !this.isDark(); }, isValid: function() { return this._ok; }, getOriginalInput: function() { return this._originalInput; }, getFormat: function() { return this._format; }, getAlpha: function() { return this._a; }, getBrightness: function() { //http://www.w3.org/TR/AERT#color-contrast var rgb = this.toRgb(); return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; }, getLuminance: function() { //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef var rgb = this.toRgb(); var RsRGB, GsRGB, BsRGB, R, G, B; RsRGB = rgb.r/255; GsRGB = rgb.g/255; BsRGB = rgb.b/255; if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);} if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);} if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);} return (0.2126 * R) + (0.7152 * G) + (0.0722 * B); }, setAlpha: function(value) { this._a = boundAlpha(value); this._roundA = mathRound(100*this._a) / 100; return this; }, toHsv: function() { var hsv = rgbToHsv(this._r, this._g, this._b); return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a }; }, toHsvString: function() { var hsv = rgbToHsv(this._r, this._g, this._b); var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); return (this._a == 1) ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")"; }, toHsl: function() { var hsl = rgbToHsl(this._r, this._g, this._b); return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a }; }, toHslString: function() { var hsl = rgbToHsl(this._r, this._g, this._b); var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); return (this._a == 1) ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")"; }, toHex: function(allow3Char) { return rgbToHex(this._r, this._g, this._b, allow3Char); }, toHexString: function(allow3Char) { return '#' + this.toHex(allow3Char); }, toHex8: function(allow4Char) { return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char); }, toHex8String: function(allow4Char) { return '#' + this.toHex8(allow4Char); }, toRgb: function() { return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a }; }, toRgbString: function() { return (this._a == 1) ? "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" : "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")"; }, toPercentageRgb: function() { return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a }; }, toPercentageRgbString: function() { return (this._a == 1) ? "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" : "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")"; }, toName: function() { if (this._a === 0) { return "transparent"; } if (this._a < 1) { return false; } return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false; }, toFilter: function(secondColor) { var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a); var secondHex8String = hex8String; var gradientType = this._gradientType ? "GradientType = 1, " : ""; if (secondColor) { var s = tinycolor(secondColor); secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a); } return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")"; }, toString: function(format) { var formatSet = !!format; format = format || this._format; var formattedString = false; var hasAlpha = this._a < 1 && this._a >= 0; var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); if (needsAlphaFormat) { // Special case for "transparent", all other non-alpha formats // will return rgba when there is transparency. if (format === "name" && this._a === 0) { return this.toName(); } return this.toRgbString(); } if (format === "rgb") { formattedString = this.toRgbString(); } if (format === "prgb") { formattedString = this.toPercentageRgbString(); } if (format === "hex" || format === "hex6") { formattedString = this.toHexString(); } if (format === "hex3") { formattedString = this.toHexString(true); } if (format === "hex4") { formattedString = this.toHex8String(true); } if (format === "hex8") { formattedString = this.toHex8String(); } if (format === "name") { formattedString = this.toName(); } if (format === "hsl") { formattedString = this.toHslString(); } if (format === "hsv") { formattedString = this.toHsvString(); } return formattedString || this.toHexString(); }, clone: function() { return tinycolor(this.toString()); }, _applyModification: function(fn, args) { var color = fn.apply(null, [this].concat([].slice.call(args))); this._r = color._r; this._g = color._g; this._b = color._b; this.setAlpha(color._a); return this; }, lighten: function() { return this._applyModification(lighten, arguments); }, brighten: function() { return this._applyModification(brighten, arguments); }, darken: function() { return this._applyModification(darken, arguments); }, desaturate: function() { return this._applyModification(desaturate, arguments); }, saturate: function() { return this._applyModification(saturate, arguments); }, greyscale: function() { return this._applyModification(greyscale, arguments); }, spin: function() { return this._applyModification(spin, arguments); }, _applyCombination: function(fn, args) { return fn.apply(null, [this].concat([].slice.call(args))); }, analogous: function() { return this._applyCombination(analogous, arguments); }, complement: function() { return this._applyCombination(complement, arguments); }, monochromatic: function() { return this._applyCombination(monochromatic, arguments); }, splitcomplement: function() { return this._applyCombination(splitcomplement, arguments); }, triad: function() { return this._applyCombination(triad, arguments); }, tetrad: function() { return this._applyCombination(tetrad, arguments); } }; // If input is an object, force 1 into "1.0" to handle ratios properly // String input requires "1.0" as input, so 1 will be treated as 1 tinycolor.fromRatio = function(color, opts) { if (typeof color == "object") { var newColor = {}; for (var i in color) { if (color.hasOwnProperty(i)) { if (i === "a") { newColor[i] = color[i]; } else { newColor[i] = convertToPercentage(color[i]); } } } color = newColor; } return tinycolor(color, opts); }; // Given a string or object, convert that input to RGB // Possible string inputs: // // "red" // "#f00" or "f00" // "#ff0000" or "ff0000" // "#ff000000" or "ff000000" // "rgb 255 0 0" or "rgb (255, 0, 0)" // "rgb 1.0 0 0" or "rgb (1, 0, 0)" // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" // function inputToRGB(color) { var rgb = { r: 0, g: 0, b: 0 }; var a = 1; var s = null; var v = null; var l = null; var ok = false; var format = false; if (typeof color == "string") { color = stringInputToObject(color); } if (typeof color == "object") { if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { rgb = rgbToRgb(color.r, color.g, color.b); ok = true; format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { s = convertToPercentage(color.s); v = convertToPercentage(color.v); rgb = hsvToRgb(color.h, s, v); ok = true; format = "hsv"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { s = convertToPercentage(color.s); l = convertToPercentage(color.l); rgb = hslToRgb(color.h, s, l); ok = true; format = "hsl"; } if (color.hasOwnProperty("a")) { a = color.a; } } a = boundAlpha(a); return { ok: ok, format: color.format || format, r: mathMin(255, mathMax(rgb.r, 0)), g: mathMin(255, mathMax(rgb.g, 0)), b: mathMin(255, mathMax(rgb.b, 0)), a: a }; } // Conversion Functions // -------------------- // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: // // `rgbToRgb` // Handle bounds / percentage checking to conform to CSS color spec // // *Assumes:* r, g, b in [0, 255] or [0, 1] // *Returns:* { r, g, b } in [0, 255] function rgbToRgb(r, g, b){ return { r: bound01(r, 255) * 255, g: bound01(g, 255) * 255, b: bound01(b, 255) * 255 }; } // `rgbToHsl` // Converts an RGB color value to HSL. // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] // *Returns:* { h, s, l } in [0,1] function rgbToHsl(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); var max = mathMax(r, g, b), min = mathMin(r, g, b); var h, s, l = (max + min) / 2; if(max == min) { h = s = 0; // achromatic } else { var d = max - min; s = l > 0.5 ? d / (2 - max - min) : d / (max + min); switch(max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h, s: s, l: l }; } // `hslToRgb` // Converts an HSL color value to RGB. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] // *Returns:* { r, g, b } in the set [0, 255] function hslToRgb(h, s, l) { var r, g, b; h = bound01(h, 360); s = bound01(s, 100); l = bound01(l, 100); function hue2rgb(p, q, t) { if(t < 0) t += 1; if(t > 1) t -= 1; if(t < 1/6) return p + (q - p) * 6 * t; if(t < 1/2) return q; if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; return p; } if(s === 0) { r = g = b = l; // achromatic } else { var q = l < 0.5 ? l * (1 + s) : l + s - l * s; var p = 2 * l - q; r = hue2rgb(p, q, h + 1/3); g = hue2rgb(p, q, h); b = hue2rgb(p, q, h - 1/3); } return { r: r * 255, g: g * 255, b: b * 255 }; } // `rgbToHsv` // Converts an RGB color value to HSV // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] // *Returns:* { h, s, v } in [0,1] function rgbToHsv(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); var max = mathMax(r, g, b), min = mathMin(r, g, b); var h, s, v = max; var d = max - min; s = max === 0 ? 0 : d / max; if(max == min) { h = 0; // achromatic } else { switch(max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h, s: s, v: v }; } // `hsvToRgb` // Converts an HSV color value to RGB. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] // *Returns:* { r, g, b } in the set [0, 255] function hsvToRgb(h, s, v) { h = bound01(h, 360) * 6; s = bound01(s, 100); v = bound01(v, 100); var i = Math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod]; return { r: r * 255, g: g * 255, b: b * 255 }; } // `rgbToHex` // Converts an RGB color to hex // Assumes r, g, and b are contained in the set [0, 255] // Returns a 3 or 6 character hex function rgbToHex(r, g, b, allow3Char) { var hex = [ pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ]; // Return a 3 character hex if possible if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); } return hex.join(""); } // `rgbaToHex` // Converts an RGBA color plus alpha transparency to hex // Assumes r, g, b are contained in the set [0, 255] and // a in [0, 1]. Returns a 4 or 8 character rgba hex function rgbaToHex(r, g, b, a, allow4Char) { var hex = [ pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)), pad2(convertDecimalToHex(a)) ]; // Return a 4 character hex if possible if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); } return hex.join(""); } // `rgbaToArgbHex` // Converts an RGBA color to an ARGB Hex8 string // Rarely used, but required for "toFilter()" function rgbaToArgbHex(r, g, b, a) { var hex = [ pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ]; return hex.join(""); } // `equals` // Can be called with any tinycolor input tinycolor.equals = function (color1, color2) { if (!color1 || !color2) { return false; } return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); }; tinycolor.random = function() { return tinycolor.fromRatio({ r: mathRandom(), g: mathRandom(), b: mathRandom() }); }; // Modification Functions // ---------------------- // Thanks to less.js for some of the basics here // function desaturate(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.s -= amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } function saturate(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.s += amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } function greyscale(color) { return tinycolor(color).desaturate(100); } function lighten (color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.l += amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } function brighten(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var rgb = tinycolor(color).toRgb(); rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100)))); rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100)))); rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100)))); return tinycolor(rgb); } function darken (color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.l -= amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. // Values outside of this range will be wrapped into this range. function spin(color, amount) { var hsl = tinycolor(color).toHsl(); var hue = (hsl.h + amount) % 360; hsl.h = hue < 0 ? 360 + hue : hue; return tinycolor(hsl); } // Combination Functions // --------------------- // Thanks to jQuery xColor for some of the ideas behind these // function complement(color) { var hsl = tinycolor(color).toHsl(); hsl.h = (hsl.h + 180) % 360; return tinycolor(hsl); } function triad(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) ]; } function tetrad(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) ]; } function splitcomplement(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) ]; } function analogous(color, results, slices) { results = results || 6; slices = slices || 30; var hsl = tinycolor(color).toHsl(); var part = 360 / slices; var ret = [tinycolor(color)]; for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { hsl.h = (hsl.h + part) % 360; ret.push(tinycolor(hsl)); } return ret; } function monochromatic(color, results) { results = results || 6; var hsv = tinycolor(color).toHsv(); var h = hsv.h, s = hsv.s, v = hsv.v; var ret = []; var modification = 1 / results; while (results--) { ret.push(tinycolor({ h: h, s: s, v: v})); v = (v + modification) % 1; } return ret; } // Utility Functions // --------------------- tinycolor.mix = function(color1, color2, amount) { amount = (amount === 0) ? 0 : (amount || 50); var rgb1 = tinycolor(color1).toRgb(); var rgb2 = tinycolor(color2).toRgb(); var p = amount / 100; var rgba = { r: ((rgb2.r - rgb1.r) * p) + rgb1.r, g: ((rgb2.g - rgb1.g) * p) + rgb1.g, b: ((rgb2.b - rgb1.b) * p) + rgb1.b, a: ((rgb2.a - rgb1.a) * p) + rgb1.a }; return tinycolor(rgba); }; // Readability Functions // --------------------- // false // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false tinycolor.isReadable = function(color1, color2, wcag2) { var readability = tinycolor.readability(color1, color2); var wcag2Parms, out; out = false; wcag2Parms = validateWCAG2Parms(wcag2); switch (wcag2Parms.level + wcag2Parms.size) { case "AAsmall": case "AAAlarge": out = readability >= 4.5; break; case "AAlarge": out = readability >= 3; break; case "AAAsmall": out = readability >= 7; break; } return out; }; // `mostReadable` // Given a base color and a list of possible foreground or background // colors for that base, returns the most readable color. // Optionally returns Black or White if the most readable color is unreadable. // *Example* // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255" // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff" // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3" // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff" tinycolor.mostReadable = function(baseColor, colorList, args) { var bestColor = null; var bestScore = 0; var readability; var includeFallbackColors, level, size ; args = args || {}; includeFallbackColors = args.includeFallbackColors ; level = args.level; size = args.size; for (var i= 0; i < colorList.length ; i++) { readability = tinycolor.readability(baseColor, colorList[i]); if (readability > bestScore) { bestScore = readability; bestColor = tinycolor(colorList[i]); } } if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) { return bestColor; } else { args.includeFallbackColors=false; return tinycolor.mostReadable(baseColor,["#fff", "#000"],args); } }; // Big List of Colors // ------------------ // var names = tinycolor.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "00f", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", burntsienna: "ea7e5d", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "0ff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "f0f", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "663399", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" }; // Make it easy to access colors via `hexNames[hex]` var hexNames = tinycolor.hexNames = flip(names); // Utilities // --------- // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` function flip(o) { var flipped = { }; for (var i in o) { if (o.hasOwnProperty(i)) { flipped[o[i]] = i; } } return flipped; } // Return a valid alpha value [0,1] with all invalid values being set to 1 function boundAlpha(a) { a = parseFloat(a); if (isNaN(a) || a < 0 || a > 1) { a = 1; } return a; } // Take input from [0, n] and return it as [0, 1] function bound01(n, max) { if (isOnePointZero(n)) { n = "100%"; } var processPercent = isPercentage(n); n = mathMin(max, mathMax(0, parseFloat(n))); // Automatically convert percentage into number if (processPercent) { n = parseInt(n * max, 10) / 100; } // Handle floating point rounding errors if ((Math.abs(n - max) < 0.000001)) { return 1; } // Convert into [0, 1] range if it isn't already return (n % max) / parseFloat(max); } // Force a number between 0 and 1 function clamp01(val) { return mathMin(1, mathMax(0, val)); } // Parse a base-16 hex value into a base-10 integer function parseIntFromHex(val) { return parseInt(val, 16); } // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 // function isOnePointZero(n) { return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; } // Check to see if string passed in is a percentage function isPercentage(n) { return typeof n === "string" && n.indexOf('%') != -1; } // Force a hex value to have 2 characters function pad2(c) { return c.length == 1 ? '0' + c : '' + c; } // Replace a decimal with it's percentage value function convertToPercentage(n) { if (n <= 1) { n = (n * 100) + "%"; } return n; } // Converts a decimal to a hex value function convertDecimalToHex(d) { return Math.round(parseFloat(d) * 255).toString(16); } // Converts a hex value to a decimal function convertHexToDecimal(h) { return (parseIntFromHex(h) / 255); } var matchers = (function() { // var CSS_INTEGER = "[-\\+]?\\d+%?"; // var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; // Actual matching. // Parentheses and commas are optional, but not required. // Whitespace can take the place of commas or opening paren var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; return { CSS_UNIT: new RegExp(CSS_UNIT), rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ }; })(); // `isValidCSSUnit` // Take in a single string / number and check to see if it looks like a CSS unit // (see `matchers` above for definition). function isValidCSSUnit(color) { return !!matchers.CSS_UNIT.exec(color); } // `stringInputToObject` // Permissive string parsing. Take in a number of formats, and output an object // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` function stringInputToObject(color) { color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); var named = false; if (names[color]) { color = names[color]; named = true; } else if (color == 'transparent') { return { r: 0, g: 0, b: 0, a: 0, format: "name" }; } // Try to match string input using regular expressions. // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] // Just return an object and let the conversion functions handle that. // This way the result will be the same whether the tinycolor is initialized with string or object. var match; if ((match = matchers.rgb.exec(color))) { return { r: match[1], g: match[2], b: match[3] }; } if ((match = matchers.rgba.exec(color))) { return { r: match[1], g: match[2], b: match[3], a: match[4] }; } if ((match = matchers.hsl.exec(color))) { return { h: match[1], s: match[2], l: match[3] }; } if ((match = matchers.hsla.exec(color))) { return { h: match[1], s: match[2], l: match[3], a: match[4] }; } if ((match = matchers.hsv.exec(color))) { return { h: match[1], s: match[2], v: match[3] }; } if ((match = matchers.hsva.exec(color))) { return { h: match[1], s: match[2], v: match[3], a: match[4] }; } if ((match = matchers.hex8.exec(color))) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), a: convertHexToDecimal(match[4]), format: named ? "name" : "hex8" }; } if ((match = matchers.hex6.exec(color))) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), format: named ? "name" : "hex" }; } if ((match = matchers.hex4.exec(color))) { return { r: parseIntFromHex(match[1] + '' + match[1]), g: parseIntFromHex(match[2] + '' + match[2]), b: parseIntFromHex(match[3] + '' + match[3]), a: convertHexToDecimal(match[4] + '' + match[4]), format: named ? "name" : "hex8" }; } if ((match = matchers.hex3.exec(color))) { return { r: parseIntFromHex(match[1] + '' + match[1]), g: parseIntFromHex(match[2] + '' + match[2]), b: parseIntFromHex(match[3] + '' + match[3]), format: named ? "name" : "hex" }; } return false; } function validateWCAG2Parms(parms) { // return valid WCAG2 parms for isReadable. // If input parms are invalid, return {"level":"AA", "size":"small"} var level, size; parms = parms || {"level":"AA", "size":"small"}; level = (parms.level || "AA").toUpperCase(); size = (parms.size || "small").toLowerCase(); if (level !== "AA" && level !== "AAA") { level = "AA"; } if (size !== "small" && size !== "large") { size = "small"; } return {"level":level, "size":size}; } // Node: Export function if (typeof module !== "undefined" && module.exports) { module.exports = tinycolor; } // AMD/requirejs: Define the module else if (true) { !(__WEBPACK_AMD_DEFINE_RESULT__ = function () {return tinycolor;}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } // Browser: Expose to window else { window.tinycolor = tinycolor; } })(Math); /***/ }), /* 316 */ /*!********************************************************!*\ !*** ../~/react-color/lib/components/common/Swatch.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Swatch = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _interaction = __webpack_require__(/*! ../../helpers/interaction */ 317); var _Checkboard = __webpack_require__(/*! ./Checkboard */ 194); var _Checkboard2 = _interopRequireDefault(_Checkboard); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var ENTER = 13; var Swatch = exports.Swatch = function Swatch(_ref) { var color = _ref.color, style = _ref.style, _ref$onClick = _ref.onClick, onClick = _ref$onClick === undefined ? function () {} : _ref$onClick, onHover = _ref.onHover, _ref$title = _ref.title, title = _ref$title === undefined ? color : _ref$title, children = _ref.children, focus = _ref.focus, _ref$focusStyle = _ref.focusStyle, focusStyle = _ref$focusStyle === undefined ? {} : _ref$focusStyle; var transparent = color === 'transparent'; var styles = (0, _reactcss2.default)({ default: { swatch: _extends({ background: color, height: '100%', width: '100%', cursor: 'pointer', position: 'relative', outline: 'none' }, style, focus ? focusStyle : {}) } }); var handleClick = function handleClick(e) { return onClick(color, e); }; var handleKeyDown = function handleKeyDown(e) { return e.keyCode === ENTER && onClick(color, e); }; var handleHover = function handleHover(e) { return onHover(color, e); }; var optionalEvents = {}; if (onHover) { optionalEvents.onMouseOver = handleHover; } return _react2.default.createElement( 'div', _extends({ style: styles.swatch, onClick: handleClick, title: title, tabIndex: 0, onKeyDown: handleKeyDown }, optionalEvents), children, transparent && _react2.default.createElement(_Checkboard2.default, { borderRadius: styles.swatch.borderRadius, boxShadow: 'inset 0 0 0 1px rgba(0,0,0,0.1)' }) ); }; exports.default = (0, _interaction.handleFocus)(Swatch); /***/ }), /* 317 */ /*!***************************************************!*\ !*** ../~/react-color/lib/helpers/interaction.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.handleFocus = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable no-invalid-this */ var handleFocus = exports.handleFocus = function handleFocus(Component) { var Span = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'span'; return function (_React$Component) { _inherits(Focus, _React$Component); function Focus() { var _ref; var _temp, _this, _ret; _classCallCheck(this, Focus); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Focus.__proto__ || Object.getPrototypeOf(Focus)).call.apply(_ref, [this].concat(args))), _this), _this.state = { focus: false }, _this.handleFocus = function () { return _this.setState({ focus: true }); }, _this.handleBlur = function () { return _this.setState({ focus: false }); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(Focus, [{ key: 'render', value: function render() { return _react2.default.createElement( Span, { onFocus: this.handleFocus, onBlur: this.handleBlur }, _react2.default.createElement(Component, _extends({}, this.props, this.state)) ); } }]); return Focus; }(_react2.default.Component); }; /***/ }), /* 318 */ /*!*************************************************************!*\ !*** ../~/react-color/lib/components/alpha/AlphaPointer.js ***! \*************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.AlphaPointer = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var AlphaPointer = exports.AlphaPointer = function AlphaPointer(_ref) { var direction = _ref.direction; var styles = (0, _reactcss2.default)({ 'default': { picker: { width: '18px', height: '18px', borderRadius: '50%', transform: 'translate(-9px, -1px)', backgroundColor: 'rgb(248, 248, 248)', boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)' } }, 'vertical': { picker: { transform: 'translate(-3px, -9px)' } } }, { vertical: direction === 'vertical' }); return _react2.default.createElement('div', { style: styles.picker }); }; exports.default = AlphaPointer; /***/ }), /* 319 */ /*!******************************************************!*\ !*** ../~/react-color/lib/components/block/Block.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Block = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _merge = __webpack_require__(/*! lodash/merge */ 200); var _merge2 = _interopRequireDefault(_merge); var _color = __webpack_require__(/*! ../../helpers/color */ 304); var _color2 = _interopRequireDefault(_color); var _common = __webpack_require__(/*! ../common */ 191); var _BlockSwatches = __webpack_require__(/*! ./BlockSwatches */ 320); var _BlockSwatches2 = _interopRequireDefault(_BlockSwatches); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Block = exports.Block = function Block(_ref) { var onChange = _ref.onChange, onSwatchHover = _ref.onSwatchHover, hex = _ref.hex, colors = _ref.colors, width = _ref.width, triangle = _ref.triangle, _ref$styles = _ref.styles, passedStyles = _ref$styles === undefined ? {} : _ref$styles, _ref$className = _ref.className, className = _ref$className === undefined ? '' : _ref$className; var transparent = hex === 'transparent'; var handleChange = function handleChange(hexCode, e) { _color2.default.isValidHex(hexCode) && onChange({ hex: hexCode, source: 'hex' }, e); }; var styles = (0, _reactcss2.default)((0, _merge2.default)({ 'default': { card: { width: width, background: '#fff', boxShadow: '0 1px rgba(0,0,0,.1)', borderRadius: '6px', position: 'relative' }, head: { height: '110px', background: hex, borderRadius: '6px 6px 0 0', display: 'flex', alignItems: 'center', justifyContent: 'center', position: 'relative' }, body: { padding: '10px' }, label: { fontSize: '18px', color: _color2.default.getContrastingColor(hex), position: 'relative' }, triangle: { width: '0px', height: '0px', borderStyle: 'solid', borderWidth: '0 10px 10px 10px', borderColor: 'transparent transparent ' + hex + ' transparent', position: 'absolute', top: '-10px', left: '50%', marginLeft: '-10px' }, input: { width: '100%', fontSize: '12px', color: '#666', border: '0px', outline: 'none', height: '22px', boxShadow: 'inset 0 0 0 1px #ddd', borderRadius: '4px', padding: '0 7px', boxSizing: 'border-box' } }, 'hide-triangle': { triangle: { display: 'none' } } }, passedStyles), { 'hide-triangle': triangle === 'hide' }); return _react2.default.createElement( 'div', { style: styles.card, className: 'block-picker ' + className }, _react2.default.createElement('div', { style: styles.triangle }), _react2.default.createElement( 'div', { style: styles.head }, transparent && _react2.default.createElement(_common.Checkboard, { borderRadius: '6px 6px 0 0' }), _react2.default.createElement( 'div', { style: styles.label }, hex ) ), _react2.default.createElement( 'div', { style: styles.body }, _react2.default.createElement(_BlockSwatches2.default, { colors: colors, onClick: handleChange, onSwatchHover: onSwatchHover }), _react2.default.createElement(_common.EditableInput, { style: { input: styles.input }, value: hex, onChange: handleChange }) ) ); }; Block.propTypes = { width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]), colors: _propTypes2.default.arrayOf(_propTypes2.default.string), triangle: _propTypes2.default.oneOf(['top', 'hide']), styles: _propTypes2.default.object }; Block.defaultProps = { width: 170, colors: ['#D9E3F0', '#F47373', '#697689', '#37D67A', '#2CCCE4', '#555555', '#dce775', '#ff8a65', '#ba68c8'], triangle: 'top', styles: {} }; exports.default = (0, _common.ColorWrap)(Block); /***/ }), /* 320 */ /*!**************************************************************!*\ !*** ../~/react-color/lib/components/block/BlockSwatches.js ***! \**************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.BlockSwatches = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _map = __webpack_require__(/*! lodash/map */ 321); var _map2 = _interopRequireDefault(_map); var _common = __webpack_require__(/*! ../common */ 191); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var BlockSwatches = exports.BlockSwatches = function BlockSwatches(_ref) { var colors = _ref.colors, onClick = _ref.onClick, onSwatchHover = _ref.onSwatchHover; var styles = (0, _reactcss2.default)({ 'default': { swatches: { marginRight: '-10px' }, swatch: { width: '22px', height: '22px', float: 'left', marginRight: '10px', marginBottom: '10px', borderRadius: '4px' }, clear: { clear: 'both' } } }); return _react2.default.createElement( 'div', { style: styles.swatches }, (0, _map2.default)(colors, function (c) { return _react2.default.createElement(_common.Swatch, { key: c, color: c, style: styles.swatch, onClick: onClick, onHover: onSwatchHover, focusStyle: { boxShadow: '0 0 4px ' + c } }); }), _react2.default.createElement('div', { style: styles.clear }) ); }; exports.default = BlockSwatches; /***/ }), /* 321 */ /*!****************************************!*\ !*** ../~/react-color/~/lodash/map.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(/*! ./_arrayMap */ 322), baseIteratee = __webpack_require__(/*! ./_baseIteratee */ 323), baseMap = __webpack_require__(/*! ./_baseMap */ 369), isArray = __webpack_require__(/*! ./isArray */ 265); /** * Creates an array of values by running each element in `collection` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * * The guarded methods are: * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, * `template`, `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * * function square(n) { * return n * n; * } * * _.map([4, 8], square); * // => [16, 64] * * _.map({ 'a': 4, 'b': 8 }, square); * // => [16, 64] (iteration order is not guaranteed) * * var users = [ * { 'user': 'barney' }, * { 'user': 'fred' } * ]; * * // The `_.property` iteratee shorthand. * _.map(users, 'user'); * // => ['barney', 'fred'] */ function map(collection, iteratee) { var func = isArray(collection) ? arrayMap : baseMap; return func(collection, baseIteratee(iteratee, 3)); } module.exports = map; /***/ }), /* 322 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_arrayMap.js ***! \**********************************************/ /***/ (function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /* 323 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_baseIteratee.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseMatches = __webpack_require__(/*! ./_baseMatches */ 324), baseMatchesProperty = __webpack_require__(/*! ./_baseMatchesProperty */ 352), identity = __webpack_require__(/*! ./identity */ 288), isArray = __webpack_require__(/*! ./isArray */ 265), property = __webpack_require__(/*! ./property */ 366); /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity; } if (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; /***/ }), /* 324 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_baseMatches.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsMatch = __webpack_require__(/*! ./_baseIsMatch */ 325), getMatchData = __webpack_require__(/*! ./_getMatchData */ 349), matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ 351); /** * The base implementation of `_.matches` which doesn't clone `source`. * * @private * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); }; } module.exports = baseMatches; /***/ }), /* 325 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_baseIsMatch.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(/*! ./_Stack */ 202), baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ 326); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if ((noCustomizer && data[2]) ? data[1] !== object[data[0]] : !(data[0] in object) ) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined && !(key in object)) { return false; } } else { var stack = new Stack; if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result )) { return false; } } } return true; } module.exports = baseIsMatch; /***/ }), /* 326 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_baseIsEqual.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsEqualDeep = __webpack_require__(/*! ./_baseIsEqualDeep */ 327), isObjectLike = __webpack_require__(/*! ./isObjectLike */ 264); /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; /***/ }), /* 327 */ /*!*****************************************************!*\ !*** ../~/react-color/~/lodash/_baseIsEqualDeep.js ***! \*****************************************************/ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(/*! ./_Stack */ 202), equalArrays = __webpack_require__(/*! ./_equalArrays */ 328), equalByTag = __webpack_require__(/*! ./_equalByTag */ 334), equalObjects = __webpack_require__(/*! ./_equalObjects */ 337), getTag = __webpack_require__(/*! ./_getTag */ 344), isArray = __webpack_require__(/*! ./isArray */ 265), isBuffer = __webpack_require__(/*! ./isBuffer */ 269), isTypedArray = __webpack_require__(/*! ./isTypedArray */ 272); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', objectTag = '[object Object]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } module.exports = baseIsEqualDeep; /***/ }), /* 328 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_equalArrays.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(/*! ./_SetCache */ 329), arraySome = __webpack_require__(/*! ./_arraySome */ 332), cacheHas = __webpack_require__(/*! ./_cacheHas */ 333); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. var stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function(othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } module.exports = equalArrays; /***/ }), /* 329 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_SetCache.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(/*! ./_MapCache */ 231), setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ 330), setCacheHas = __webpack_require__(/*! ./_setCacheHas */ 331); /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module.exports = SetCache; /***/ }), /* 330 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_setCacheAdd.js ***! \*************************************************/ /***/ (function(module, exports) { /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Adds `value` to the array cache. * * @private * @name add * @memberOf SetCache * @alias push * @param {*} value The value to cache. * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } module.exports = setCacheAdd; /***/ }), /* 331 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_setCacheHas.js ***! \*************************************************/ /***/ (function(module, exports) { /** * Checks if `value` is in the array cache. * * @private * @name has * @memberOf SetCache * @param {*} value The value to search for. * @returns {number} Returns `true` if `value` is found, else `false`. */ function setCacheHas(value) { return this.__data__.has(value); } module.exports = setCacheHas; /***/ }), /* 332 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/_arraySome.js ***! \***********************************************/ /***/ (function(module, exports) { /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } module.exports = arraySome; /***/ }), /* 333 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_cacheHas.js ***! \**********************************************/ /***/ (function(module, exports) { /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } module.exports = cacheHas; /***/ }), /* 334 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_equalByTag.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ 221), Uint8Array = __webpack_require__(/*! ./_Uint8Array */ 255), eq = __webpack_require__(/*! ./eq */ 207), equalArrays = __webpack_require__(/*! ./_equalArrays */ 328), mapToArray = __webpack_require__(/*! ./_mapToArray */ 335), setToArray = __webpack_require__(/*! ./_setToArray */ 336); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]'; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * A specialized version of `baseIsEqualDeep` for comparing objects of * the same `toStringTag`. * * **Note:** This function only supports comparing values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if ((object.byteLength != other.byteLength) || (object.byteOffset != other.byteOffset)) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: // Coerce booleans to `1` or `0` and dates to milliseconds. // Invalid dates are coerced to `NaN`. return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } module.exports = equalByTag; /***/ }), /* 335 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_mapToArray.js ***! \************************************************/ /***/ (function(module, exports) { /** * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function(value, key) { result[++index] = [key, value]; }); return result; } module.exports = mapToArray; /***/ }), /* 336 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_setToArray.js ***! \************************************************/ /***/ (function(module, exports) { /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } module.exports = setToArray; /***/ }), /* 337 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_equalObjects.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var getAllKeys = __webpack_require__(/*! ./_getAllKeys */ 338); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } module.exports = equalObjects; /***/ }), /* 338 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_getAllKeys.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ 339), getSymbols = __webpack_require__(/*! ./_getSymbols */ 341), keys = __webpack_require__(/*! ./keys */ 310); /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } module.exports = getAllKeys; /***/ }), /* 339 */ /*!****************************************************!*\ !*** ../~/react-color/~/lodash/_baseGetAllKeys.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(/*! ./_arrayPush */ 340), isArray = __webpack_require__(/*! ./isArray */ 265); /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; /***/ }), /* 340 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/_arrayPush.js ***! \***********************************************/ /***/ (function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /* 341 */ /*!************************************************!*\ !*** ../~/react-color/~/lodash/_getSymbols.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ 342), stubArray = __webpack_require__(/*! ./stubArray */ 343); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /* 342 */ /*!*************************************************!*\ !*** ../~/react-color/~/lodash/_arrayFilter.js ***! \*************************************************/ /***/ (function(module, exports) { /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } module.exports = arrayFilter; /***/ }), /* 343 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/stubArray.js ***! \**********************************************/ /***/ (function(module, exports) { /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } module.exports = stubArray; /***/ }), /* 344 */ /*!********************************************!*\ !*** ../~/react-color/~/lodash/_getTag.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__(/*! ./_DataView */ 345), Map = __webpack_require__(/*! ./_Map */ 216), Promise = __webpack_require__(/*! ./_Promise */ 346), Set = __webpack_require__(/*! ./_Set */ 347), WeakMap = __webpack_require__(/*! ./_WeakMap */ 348), baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 220), toSource = __webpack_require__(/*! ./_toSource */ 229); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /* 345 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_DataView.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 217), root = __webpack_require__(/*! ./_root */ 222); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); module.exports = DataView; /***/ }), /* 346 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/_Promise.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 217), root = __webpack_require__(/*! ./_root */ 222); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); module.exports = Promise; /***/ }), /* 347 */ /*!*****************************************!*\ !*** ../~/react-color/~/lodash/_Set.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 217), root = __webpack_require__(/*! ./_root */ 222); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); module.exports = Set; /***/ }), /* 348 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/_WeakMap.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ 217), root = __webpack_require__(/*! ./_root */ 222); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }), /* 349 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_getMatchData.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ 350), keys = __webpack_require__(/*! ./keys */ 310); /** * Gets the property names, values, and compare flags of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; } return result; } module.exports = getMatchData; /***/ }), /* 350 */ /*!********************************************************!*\ !*** ../~/react-color/~/lodash/_isStrictComparable.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./isObject */ 226); /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` if suitable for strict * equality comparisons, else `false`. */ function isStrictComparable(value) { return value === value && !isObject(value); } module.exports = isStrictComparable; /***/ }), /* 351 */ /*!*************************************************************!*\ !*** ../~/react-color/~/lodash/_matchesStrictComparable.js ***! \*************************************************************/ /***/ (function(module, exports) { /** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined || (key in Object(object))); }; } module.exports = matchesStrictComparable; /***/ }), /* 352 */ /*!*********************************************************!*\ !*** ../~/react-color/~/lodash/_baseMatchesProperty.js ***! \*********************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ 326), get = __webpack_require__(/*! ./get */ 353), hasIn = __webpack_require__(/*! ./hasIn */ 363), isKey = __webpack_require__(/*! ./_isKey */ 356), isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ 350), matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ 351), toKey = __webpack_require__(/*! ./_toKey */ 362); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } module.exports = baseMatchesProperty; /***/ }), /* 353 */ /*!****************************************!*\ !*** ../~/react-color/~/lodash/get.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(/*! ./_baseGet */ 354); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /* 354 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/_baseGet.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(/*! ./_castPath */ 355), toKey = __webpack_require__(/*! ./_toKey */ 362); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /* 355 */ /*!**********************************************!*\ !*** ../~/react-color/~/lodash/_castPath.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(/*! ./isArray */ 265), isKey = __webpack_require__(/*! ./_isKey */ 356), stringToPath = __webpack_require__(/*! ./_stringToPath */ 357), toString = __webpack_require__(/*! ./toString */ 360); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /* 356 */ /*!*******************************************!*\ !*** ../~/react-color/~/lodash/_isKey.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(/*! ./isArray */ 265), isSymbol = __webpack_require__(/*! ./isSymbol */ 301); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /* 357 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_stringToPath.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var memoizeCapped = __webpack_require__(/*! ./_memoizeCapped */ 358); /** Used to match property names within property paths. */ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoizeCapped(function(string) { var result = []; if (string.charCodeAt(0) === 46 /* . */) { result.push(''); } string.replace(rePropName, function(match, number, quote, subString) { result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); module.exports = stringToPath; /***/ }), /* 358 */ /*!***************************************************!*\ !*** ../~/react-color/~/lodash/_memoizeCapped.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { var memoize = __webpack_require__(/*! ./memoize */ 359); /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = memoize(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } module.exports = memoizeCapped; /***/ }), /* 359 */ /*!********************************************!*\ !*** ../~/react-color/~/lodash/memoize.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(/*! ./_MapCache */ 231); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; /***/ }), /* 360 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/toString.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseToString = __webpack_require__(/*! ./_baseToString */ 361); /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } module.exports = toString; /***/ }), /* 361 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_baseToString.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ 221), arrayMap = __webpack_require__(/*! ./_arrayMap */ 322), isArray = __webpack_require__(/*! ./isArray */ 265), isSymbol = __webpack_require__(/*! ./isSymbol */ 301); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray(value)) { // Recursively convert values (susceptible to call stack limits). return arrayMap(value, baseToString) + ''; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = baseToString; /***/ }), /* 362 */ /*!*******************************************!*\ !*** ../~/react-color/~/lodash/_toKey.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(/*! ./isSymbol */ 301); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /* 363 */ /*!******************************************!*\ !*** ../~/react-color/~/lodash/hasIn.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var baseHasIn = __webpack_require__(/*! ./_baseHasIn */ 364), hasPath = __webpack_require__(/*! ./_hasPath */ 365); /** * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.hasIn(object, 'a'); * // => true * * _.hasIn(object, 'a.b'); * // => true * * _.hasIn(object, ['a', 'b']); * // => true * * _.hasIn(object, 'b'); * // => false */ function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } module.exports = hasIn; /***/ }), /* 364 */ /*!***********************************************!*\ !*** ../~/react-color/~/lodash/_baseHasIn.js ***! \***********************************************/ /***/ (function(module, exports) { /** * The base implementation of `_.hasIn` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { return object != null && key in Object(object); } module.exports = baseHasIn; /***/ }), /* 365 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/_hasPath.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(/*! ./_castPath */ 355), isArguments = __webpack_require__(/*! ./isArguments */ 262), isArray = __webpack_require__(/*! ./isArray */ 265), isIndex = __webpack_require__(/*! ./_isIndex */ 283), isLength = __webpack_require__(/*! ./isLength */ 268), toKey = __webpack_require__(/*! ./_toKey */ 362); /** * Checks if `path` exists on `object`. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @param {Function} hasFunc The function to check properties. * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { path = castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } module.exports = hasPath; /***/ }), /* 366 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/property.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseProperty = __webpack_require__(/*! ./_baseProperty */ 367), basePropertyDeep = __webpack_require__(/*! ./_basePropertyDeep */ 368), isKey = __webpack_require__(/*! ./_isKey */ 356), toKey = __webpack_require__(/*! ./_toKey */ 362); /** * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. * @example * * var objects = [ * { 'a': { 'b': 2 } }, * { 'a': { 'b': 1 } } * ]; * * _.map(objects, _.property('a.b')); * // => [2, 1] * * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } module.exports = property; /***/ }), /* 367 */ /*!**************************************************!*\ !*** ../~/react-color/~/lodash/_baseProperty.js ***! \**************************************************/ /***/ (function(module, exports) { /** * The base implementation of `_.property` without support for deep paths. * * @private * @param {string} key The key of the property to get. * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { return object == null ? undefined : object[key]; }; } module.exports = baseProperty; /***/ }), /* 368 */ /*!******************************************************!*\ !*** ../~/react-color/~/lodash/_basePropertyDeep.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(/*! ./_baseGet */ 354); /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { return baseGet(object, path); }; } module.exports = basePropertyDeep; /***/ }), /* 369 */ /*!*********************************************!*\ !*** ../~/react-color/~/lodash/_baseMap.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var baseEach = __webpack_require__(/*! ./_baseEach */ 308), isArrayLike = __webpack_require__(/*! ./isArrayLike */ 267); /** * The base implementation of `_.map` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function baseMap(collection, iteratee) { var index = -1, result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value, key, collection) { result[++index] = iteratee(value, key, collection); }); return result; } module.exports = baseMap; /***/ }), /* 370 */ /*!********************************************************!*\ !*** ../~/react-color/lib/components/circle/Circle.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Circle = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _map = __webpack_require__(/*! lodash/map */ 321); var _map2 = _interopRequireDefault(_map); var _merge = __webpack_require__(/*! lodash/merge */ 200); var _merge2 = _interopRequireDefault(_merge); var _materialColors = __webpack_require__(/*! material-colors */ 371); var material = _interopRequireWildcard(_materialColors); var _common = __webpack_require__(/*! ../common */ 191); var _CircleSwatch = __webpack_require__(/*! ./CircleSwatch */ 372); var _CircleSwatch2 = _interopRequireDefault(_CircleSwatch); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Circle = exports.Circle = function Circle(_ref) { var width = _ref.width, onChange = _ref.onChange, onSwatchHover = _ref.onSwatchHover, colors = _ref.colors, hex = _ref.hex, circleSize = _ref.circleSize, _ref$styles = _ref.styles, passedStyles = _ref$styles === undefined ? {} : _ref$styles, circleSpacing = _ref.circleSpacing, _ref$className = _ref.className, className = _ref$className === undefined ? '' : _ref$className; var styles = (0, _reactcss2.default)((0, _merge2.default)({ 'default': { card: { width: width, display: 'flex', flexWrap: 'wrap', marginRight: -circleSpacing, marginBottom: -circleSpacing } } }, passedStyles)); var handleChange = function handleChange(hexCode, e) { return onChange({ hex: hexCode, source: 'hex' }, e); }; return _react2.default.createElement( 'div', { style: styles.card, className: 'circle-picker ' + className }, (0, _map2.default)(colors, function (c) { return _react2.default.createElement(_CircleSwatch2.default, { key: c, color: c, onClick: handleChange, onSwatchHover: onSwatchHover, active: hex === c.toLowerCase(), circleSize: circleSize, circleSpacing: circleSpacing }); }) ); }; Circle.propTypes = { width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]), circleSize: _propTypes2.default.number, circleSpacing: _propTypes2.default.number, styles: _propTypes2.default.object }; Circle.defaultProps = { width: 252, circleSize: 28, circleSpacing: 14, colors: [material.red['500'], material.pink['500'], material.purple['500'], material.deepPurple['500'], material.indigo['500'], material.blue['500'], material.lightBlue['500'], material.cyan['500'], material.teal['500'], material.green['500'], material.lightGreen['500'], material.lime['500'], material.yellow['500'], material.amber['500'], material.orange['500'], material.deepOrange['500'], material.brown['500'], material.blueGrey['500']], styles: {} }; exports.default = (0, _common.ColorWrap)(Circle); /***/ }), /* 371 */ /*!*******************************************!*\ !*** ../~/material-colors/dist/colors.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports === 'object') { module.exports = factory(); } else { root.materialColors = factory(); } })(this, function() { return {"red":{"50":"#ffebee","100":"#ffcdd2","200":"#ef9a9a","300":"#e57373","400":"#ef5350","500":"#f44336","600":"#e53935","700":"#d32f2f","800":"#c62828","900":"#b71c1c","a100":"#ff8a80","a200":"#ff5252","a400":"#ff1744","a700":"#d50000"},"pink":{"50":"#fce4ec","100":"#f8bbd0","200":"#f48fb1","300":"#f06292","400":"#ec407a","500":"#e91e63","600":"#d81b60","700":"#c2185b","800":"#ad1457","900":"#880e4f","a100":"#ff80ab","a200":"#ff4081","a400":"#f50057","a700":"#c51162"},"purple":{"50":"#f3e5f5","100":"#e1bee7","200":"#ce93d8","300":"#ba68c8","400":"#ab47bc","500":"#9c27b0","600":"#8e24aa","700":"#7b1fa2","800":"#6a1b9a","900":"#4a148c","a100":"#ea80fc","a200":"#e040fb","a400":"#d500f9","a700":"#aa00ff"},"deepPurple":{"50":"#ede7f6","100":"#d1c4e9","200":"#b39ddb","300":"#9575cd","400":"#7e57c2","500":"#673ab7","600":"#5e35b1","700":"#512da8","800":"#4527a0","900":"#311b92","a100":"#b388ff","a200":"#7c4dff","a400":"#651fff","a700":"#6200ea"},"indigo":{"50":"#e8eaf6","100":"#c5cae9","200":"#9fa8da","300":"#7986cb","400":"#5c6bc0","500":"#3f51b5","600":"#3949ab","700":"#303f9f","800":"#283593","900":"#1a237e","a100":"#8c9eff","a200":"#536dfe","a400":"#3d5afe","a700":"#304ffe"},"blue":{"50":"#e3f2fd","100":"#bbdefb","200":"#90caf9","300":"#64b5f6","400":"#42a5f5","500":"#2196f3","600":"#1e88e5","700":"#1976d2","800":"#1565c0","900":"#0d47a1","a100":"#82b1ff","a200":"#448aff","a400":"#2979ff","a700":"#2962ff"},"lightBlue":{"50":"#e1f5fe","100":"#b3e5fc","200":"#81d4fa","300":"#4fc3f7","400":"#29b6f6","500":"#03a9f4","600":"#039be5","700":"#0288d1","800":"#0277bd","900":"#01579b","a100":"#80d8ff","a200":"#40c4ff","a400":"#00b0ff","a700":"#0091ea"},"cyan":{"50":"#e0f7fa","100":"#b2ebf2","200":"#80deea","300":"#4dd0e1","400":"#26c6da","500":"#00bcd4","600":"#00acc1","700":"#0097a7","800":"#00838f","900":"#006064","a100":"#84ffff","a200":"#18ffff","a400":"#00e5ff","a700":"#00b8d4"},"teal":{"50":"#e0f2f1","100":"#b2dfdb","200":"#80cbc4","300":"#4db6ac","400":"#26a69a","500":"#009688","600":"#00897b","700":"#00796b","800":"#00695c","900":"#004d40","a100":"#a7ffeb","a200":"#64ffda","a400":"#1de9b6","a700":"#00bfa5"},"green":{"50":"#e8f5e9","100":"#c8e6c9","200":"#a5d6a7","300":"#81c784","400":"#66bb6a","500":"#4caf50","600":"#43a047","700":"#388e3c","800":"#2e7d32","900":"#1b5e20","a100":"#b9f6ca","a200":"#69f0ae","a400":"#00e676","a700":"#00c853"},"lightGreen":{"50":"#f1f8e9","100":"#dcedc8","200":"#c5e1a5","300":"#aed581","400":"#9ccc65","500":"#8bc34a","600":"#7cb342","700":"#689f38","800":"#558b2f","900":"#33691e","a100":"#ccff90","a200":"#b2ff59","a400":"#76ff03","a700":"#64dd17"},"lime":{"50":"#f9fbe7","100":"#f0f4c3","200":"#e6ee9c","300":"#dce775","400":"#d4e157","500":"#cddc39","600":"#c0ca33","700":"#afb42b","800":"#9e9d24","900":"#827717","a100":"#f4ff81","a200":"#eeff41","a400":"#c6ff00","a700":"#aeea00"},"yellow":{"50":"#fffde7","100":"#fff9c4","200":"#fff59d","300":"#fff176","400":"#ffee58","500":"#ffeb3b","600":"#fdd835","700":"#fbc02d","800":"#f9a825","900":"#f57f17","a100":"#ffff8d","a200":"#ffff00","a400":"#ffea00","a700":"#ffd600"},"amber":{"50":"#fff8e1","100":"#ffecb3","200":"#ffe082","300":"#ffd54f","400":"#ffca28","500":"#ffc107","600":"#ffb300","700":"#ffa000","800":"#ff8f00","900":"#ff6f00","a100":"#ffe57f","a200":"#ffd740","a400":"#ffc400","a700":"#ffab00"},"orange":{"50":"#fff3e0","100":"#ffe0b2","200":"#ffcc80","300":"#ffb74d","400":"#ffa726","500":"#ff9800","600":"#fb8c00","700":"#f57c00","800":"#ef6c00","900":"#e65100","a100":"#ffd180","a200":"#ffab40","a400":"#ff9100","a700":"#ff6d00"},"deepOrange":{"50":"#fbe9e7","100":"#ffccbc","200":"#ffab91","300":"#ff8a65","400":"#ff7043","500":"#ff5722","600":"#f4511e","700":"#e64a19","800":"#d84315","900":"#bf360c","a100":"#ff9e80","a200":"#ff6e40","a400":"#ff3d00","a700":"#dd2c00"},"brown":{"50":"#efebe9","100":"#d7ccc8","200":"#bcaaa4","300":"#a1887f","400":"#8d6e63","500":"#795548","600":"#6d4c41","700":"#5d4037","800":"#4e342e","900":"#3e2723"},"grey":{"50":"#fafafa","100":"#f5f5f5","200":"#eeeeee","300":"#e0e0e0","400":"#bdbdbd","500":"#9e9e9e","600":"#757575","700":"#616161","800":"#424242","900":"#212121"},"blueGrey":{"50":"#eceff1","100":"#cfd8dc","200":"#b0bec5","300":"#90a4ae","400":"#78909c","500":"#607d8b","600":"#546e7a","700":"#455a64","800":"#37474f","900":"#263238"},"darkText":{"primary":"rgba(0, 0, 0, 0.87)","secondary":"rgba(0, 0, 0, 0.54)","disabled":"rgba(0, 0, 0, 0.38)","dividers":"rgba(0, 0, 0, 0.12)"},"lightText":{"primary":"rgba(255, 255, 255, 1)","secondary":"rgba(255, 255, 255, 0.7)","disabled":"rgba(255, 255, 255, 0.5)","dividers":"rgba(255, 255, 255, 0.12)"},"darkIcons":{"active":"rgba(0, 0, 0, 0.54)","inactive":"rgba(0, 0, 0, 0.38)"},"lightIcons":{"active":"rgba(255, 255, 255, 1)","inactive":"rgba(255, 255, 255, 0.5)"},"white":"#ffffff","black":"#000000"}; }); /***/ }), /* 372 */ /*!**************************************************************!*\ !*** ../~/react-color/lib/components/circle/CircleSwatch.js ***! \**************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.CircleSwatch = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _common = __webpack_require__(/*! ../common */ 191); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var CircleSwatch = exports.CircleSwatch = function CircleSwatch(_ref) { var color = _ref.color, onClick = _ref.onClick, onSwatchHover = _ref.onSwatchHover, hover = _ref.hover, active = _ref.active, circleSize = _ref.circleSize, circleSpacing = _ref.circleSpacing; var styles = (0, _reactcss2.default)({ 'default': { swatch: { width: circleSize, height: circleSize, marginRight: circleSpacing, marginBottom: circleSpacing, transform: 'scale(1)', transition: '100ms transform ease' }, Swatch: { borderRadius: '50%', background: 'transparent', boxShadow: 'inset 0 0 0 ' + circleSize / 2 + 'px ' + color, transition: '100ms box-shadow ease' } }, 'hover': { swatch: { transform: 'scale(1.2)' } }, 'active': { Swatch: { boxShadow: 'inset 0 0 0 3px ' + color } } }, { hover: hover, active: active }); return _react2.default.createElement( 'div', { style: styles.swatch }, _react2.default.createElement(_common.Swatch, { style: styles.Swatch, color: color, onClick: onClick, onHover: onSwatchHover, focusStyle: { boxShadow: styles.Swatch.boxShadow + ', 0 0 5px ' + color } }) ); }; CircleSwatch.defaultProps = { circleSize: 28, circleSpacing: 14 }; exports.default = (0, _reactcss.handleHover)(CircleSwatch); /***/ }), /* 373 */ /*!********************************************************!*\ !*** ../~/react-color/lib/components/chrome/Chrome.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Chrome = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _merge = __webpack_require__(/*! lodash/merge */ 200); var _merge2 = _interopRequireDefault(_merge); var _common = __webpack_require__(/*! ../common */ 191); var _ChromeFields = __webpack_require__(/*! ./ChromeFields */ 374); var _ChromeFields2 = _interopRequireDefault(_ChromeFields); var _ChromePointer = __webpack_require__(/*! ./ChromePointer */ 376); var _ChromePointer2 = _interopRequireDefault(_ChromePointer); var _ChromePointerCircle = __webpack_require__(/*! ./ChromePointerCircle */ 377); var _ChromePointerCircle2 = _interopRequireDefault(_ChromePointerCircle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Chrome = exports.Chrome = function Chrome(_ref) { var width = _ref.width, onChange = _ref.onChange, disableAlpha = _ref.disableAlpha, rgb = _ref.rgb, hsl = _ref.hsl, hsv = _ref.hsv, hex = _ref.hex, renderers = _ref.renderers, _ref$styles = _ref.styles, passedStyles = _ref$styles === undefined ? {} : _ref$styles, _ref$className = _ref.className, className = _ref$className === undefined ? '' : _ref$className; var styles = (0, _reactcss2.default)((0, _merge2.default)({ 'default': { picker: { width: width, background: '#fff', borderRadius: '2px', boxShadow: '0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)', boxSizing: 'initial', fontFamily: 'Menlo' }, saturation: { width: '100%', paddingBottom: '55%', position: 'relative', borderRadius: '2px 2px 0 0', overflow: 'hidden' }, Saturation: { radius: '2px 2px 0 0' }, body: { padding: '16px 16px 12px' }, controls: { display: 'flex' }, color: { width: '32px' }, swatch: { marginTop: '6px', width: '16px', height: '16px', borderRadius: '8px', position: 'relative', overflow: 'hidden' }, active: { absolute: '0px 0px 0px 0px', borderRadius: '8px', boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.1)', background: 'rgba(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ', ' + rgb.a + ')', zIndex: '2' }, toggles: { flex: '1' }, hue: { height: '10px', position: 'relative', marginBottom: '8px' }, Hue: { radius: '2px' }, alpha: { height: '10px', position: 'relative' }, Alpha: { radius: '2px' } }, 'disableAlpha': { color: { width: '22px' }, alpha: { display: 'none' }, hue: { marginBottom: '0px' }, swatch: { width: '10px', height: '10px', marginTop: '0px' } } }, passedStyles), { disableAlpha: disableAlpha }); return _react2.default.createElement( 'div', { style: styles.picker, className: 'chrome-picker ' + className }, _react2.default.createElement( 'div', { style: styles.saturation }, _react2.default.createElement(_common.Saturation, { style: styles.Saturation, hsl: hsl, hsv: hsv, pointer: _ChromePointerCircle2.default, onChange: onChange }) ), _react2.default.createElement( 'div', { style: styles.body }, _react2.default.createElement( 'div', { style: styles.controls, className: 'flexbox-fix' }, _react2.default.createElement( 'div', { style: styles.color }, _react2.default.createElement( 'div', { style: styles.swatch }, _react2.default.createElement('div', { style: styles.active }), _react2.default.createElement(_common.Checkboard, { renderers: renderers }) ) ), _react2.default.createElement( 'div', { style: styles.toggles }, _react2.default.createElement( 'div', { style: styles.hue }, _react2.default.createElement(_common.Hue, { style: styles.Hue, hsl: hsl, pointer: _ChromePointer2.default, onChange: onChange }) ), _react2.default.createElement( 'div', { style: styles.alpha }, _react2.default.createElement(_common.Alpha, { style: styles.Alpha, rgb: rgb, hsl: hsl, pointer: _ChromePointer2.default, renderers: renderers, onChange: onChange }) ) ) ), _react2.default.createElement(_ChromeFields2.default, { rgb: rgb, hsl: hsl, hex: hex, onChange: onChange, disableAlpha: disableAlpha }) ) ); }; Chrome.propTypes = { width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]), disableAlpha: _propTypes2.default.bool, styles: _propTypes2.default.object }; Chrome.defaultProps = { width: 225, disableAlpha: false, styles: {} }; exports.default = (0, _common.ColorWrap)(Chrome); /***/ }), /* 374 */ /*!**************************************************************!*\ !*** ../~/react-color/lib/components/chrome/ChromeFields.js ***! \**************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.ChromeFields = undefined; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _color = __webpack_require__(/*! ../../helpers/color */ 304); var _color2 = _interopRequireDefault(_color); var _common = __webpack_require__(/*! ../common */ 191); var _UnfoldMoreHorizontalIcon = __webpack_require__(/*! @icons/material/UnfoldMoreHorizontalIcon */ 375); var _UnfoldMoreHorizontalIcon2 = _interopRequireDefault(_UnfoldMoreHorizontalIcon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable react/no-did-mount-set-state, no-param-reassign */ var ChromeFields = exports.ChromeFields = function (_React$Component) { _inherits(ChromeFields, _React$Component); function ChromeFields() { var _ref; var _temp, _this, _ret; _classCallCheck(this, ChromeFields); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ChromeFields.__proto__ || Object.getPrototypeOf(ChromeFields)).call.apply(_ref, [this].concat(args))), _this), _this.state = { view: '' }, _this.toggleViews = function () { if (_this.state.view === 'hex') { _this.setState({ view: 'rgb' }); } else if (_this.state.view === 'rgb') { _this.setState({ view: 'hsl' }); } else if (_this.state.view === 'hsl') { if (_this.props.hsl.a === 1) { _this.setState({ view: 'hex' }); } else { _this.setState({ view: 'rgb' }); } } }, _this.handleChange = function (data, e) { if (data.hex) { _color2.default.isValidHex(data.hex) && _this.props.onChange({ hex: data.hex, source: 'hex' }, e); } else if (data.r || data.g || data.b) { _this.props.onChange({ r: data.r || _this.props.rgb.r, g: data.g || _this.props.rgb.g, b: data.b || _this.props.rgb.b, source: 'rgb' }, e); } else if (data.a) { if (data.a < 0) { data.a = 0; } else if (data.a > 1) { data.a = 1; } _this.props.onChange({ h: _this.props.hsl.h, s: _this.props.hsl.s, l: _this.props.hsl.l, a: Math.round(data.a * 100) / 100, source: 'rgb' }, e); } else if (data.h || data.s || data.l) { // Remove any occurances of '%'. if (typeof data.s === 'string' && data.s.includes('%')) { data.s = data.s.replace('%', ''); } if (typeof data.l === 'string' && data.l.includes('%')) { data.l = data.l.replace('%', ''); } _this.props.onChange({ h: data.h || _this.props.hsl.h, s: Number(data.s && data.s || _this.props.hsl.s), l: Number(data.l && data.l || _this.props.hsl.l), source: 'hsl' }, e); } }, _this.showHighlight = function (e) { e.currentTarget.style.background = '#eee'; }, _this.hideHighlight = function (e) { e.currentTarget.style.background = 'transparent'; }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(ChromeFields, [{ key: 'componentDidMount', value: function componentDidMount() { if (this.props.hsl.a === 1 && this.state.view !== 'hex') { this.setState({ view: 'hex' }); } else if (this.state.view !== 'rgb' && this.state.view !== 'hsl') { this.setState({ view: 'rgb' }); } } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if (nextProps.hsl.a !== 1 && this.state.view === 'hex') { this.setState({ view: 'rgb' }); } } }, { key: 'render', value: function render() { var _this2 = this; var styles = (0, _reactcss2.default)({ 'default': { wrap: { paddingTop: '16px', display: 'flex' }, fields: { flex: '1', display: 'flex', marginLeft: '-6px' }, field: { paddingLeft: '6px', width: '100%' }, alpha: { paddingLeft: '6px', width: '100%' }, toggle: { width: '32px', textAlign: 'right', position: 'relative' }, icon: { marginRight: '-4px', marginTop: '12px', cursor: 'pointer', position: 'relative' }, iconHighlight: { position: 'absolute', width: '24px', height: '28px', background: '#eee', borderRadius: '4px', top: '10px', left: '12px', display: 'none' }, input: { fontSize: '11px', color: '#333', width: '100%', borderRadius: '2px', border: 'none', boxShadow: 'inset 0 0 0 1px #dadada', height: '21px', textAlign: 'center' }, label: { textTransform: 'uppercase', fontSize: '11px', lineHeight: '11px', color: '#969696', textAlign: 'center', display: 'block', marginTop: '12px' }, svg: { fill: '#333', width: '24px', height: '24px', border: '1px transparent solid', borderRadius: '5px' } }, 'disableAlpha': { alpha: { display: 'none' } } }, this.props, this.state); var fields = void 0; if (this.state.view === 'hex') { fields = _react2.default.createElement( 'div', { style: styles.fields, className: 'flexbox-fix' }, _react2.default.createElement( 'div', { style: styles.field }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 'hex', value: this.props.hex, onChange: this.handleChange }) ) ); } else if (this.state.view === 'rgb') { fields = _react2.default.createElement( 'div', { style: styles.fields, className: 'flexbox-fix' }, _react2.default.createElement( 'div', { style: styles.field }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 'r', value: this.props.rgb.r, onChange: this.handleChange }) ), _react2.default.createElement( 'div', { style: styles.field }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 'g', value: this.props.rgb.g, onChange: this.handleChange }) ), _react2.default.createElement( 'div', { style: styles.field }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 'b', value: this.props.rgb.b, onChange: this.handleChange }) ), _react2.default.createElement( 'div', { style: styles.alpha }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 'a', value: this.props.rgb.a, arrowOffset: 0.01, onChange: this.handleChange }) ) ); } else if (this.state.view === 'hsl') { fields = _react2.default.createElement( 'div', { style: styles.fields, className: 'flexbox-fix' }, _react2.default.createElement( 'div', { style: styles.field }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 'h', value: Math.round(this.props.hsl.h), onChange: this.handleChange }) ), _react2.default.createElement( 'div', { style: styles.field }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 's', value: Math.round(this.props.hsl.s * 100) + '%', onChange: this.handleChange }) ), _react2.default.createElement( 'div', { style: styles.field }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 'l', value: Math.round(this.props.hsl.l * 100) + '%', onChange: this.handleChange }) ), _react2.default.createElement( 'div', { style: styles.alpha }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 'a', value: this.props.hsl.a, arrowOffset: 0.01, onChange: this.handleChange }) ) ); } return _react2.default.createElement( 'div', { style: styles.wrap, className: 'flexbox-fix' }, fields, _react2.default.createElement( 'div', { style: styles.toggle }, _react2.default.createElement( 'div', { style: styles.icon, onClick: this.toggleViews, ref: function ref(icon) { return _this2.icon = icon; } }, _react2.default.createElement(_UnfoldMoreHorizontalIcon2.default, { style: styles.svg, onMouseOver: this.showHighlight, onMouseEnter: this.showHighlight, onMouseOut: this.hideHighlight }) ) ) ); } }]); return ChromeFields; }(_react2.default.Component); exports.default = ChromeFields; /***/ }), /* 375 */ /*!********************************************************!*\ !*** ../~/@icons/material/UnfoldMoreHorizontalIcon.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var DEFAULT_SIZE = 24; exports.default = function (_ref) { var _ref$fill = _ref.fill, fill = _ref$fill === undefined ? 'currentColor' : _ref$fill, _ref$width = _ref.width, width = _ref$width === undefined ? DEFAULT_SIZE : _ref$width, _ref$height = _ref.height, height = _ref$height === undefined ? DEFAULT_SIZE : _ref$height, _ref$style = _ref.style, style = _ref$style === undefined ? {} : _ref$style, props = _objectWithoutProperties(_ref, ['fill', 'width', 'height', 'style']); return _react2.default.createElement( 'svg', _extends({ viewBox: '0 0 ' + DEFAULT_SIZE + ' ' + DEFAULT_SIZE, style: _extends({ fill: fill, width: width, height: height }, style) }, props), _react2.default.createElement('path', { d: 'M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z' }) ); }; /***/ }), /* 376 */ /*!***************************************************************!*\ !*** ../~/react-color/lib/components/chrome/ChromePointer.js ***! \***************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.ChromePointer = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var ChromePointer = exports.ChromePointer = function ChromePointer() { var styles = (0, _reactcss2.default)({ 'default': { picker: { width: '12px', height: '12px', borderRadius: '6px', transform: 'translate(-6px, -1px)', backgroundColor: 'rgb(248, 248, 248)', boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)' } } }); return _react2.default.createElement('div', { style: styles.picker }); }; exports.default = ChromePointer; /***/ }), /* 377 */ /*!*********************************************************************!*\ !*** ../~/react-color/lib/components/chrome/ChromePointerCircle.js ***! \*********************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.ChromePointerCircle = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var ChromePointerCircle = exports.ChromePointerCircle = function ChromePointerCircle() { var styles = (0, _reactcss2.default)({ 'default': { picker: { width: '12px', height: '12px', borderRadius: '6px', boxShadow: 'inset 0 0 0 1px #fff', transform: 'translate(-6px, -6px)' } } }); return _react2.default.createElement('div', { style: styles.picker }); }; exports.default = ChromePointerCircle; /***/ }), /* 378 */ /*!**********************************************************!*\ !*** ../~/react-color/lib/components/compact/Compact.js ***! \**********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Compact = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _map = __webpack_require__(/*! lodash/map */ 321); var _map2 = _interopRequireDefault(_map); var _merge = __webpack_require__(/*! lodash/merge */ 200); var _merge2 = _interopRequireDefault(_merge); var _color = __webpack_require__(/*! ../../helpers/color */ 304); var _color2 = _interopRequireDefault(_color); var _common = __webpack_require__(/*! ../common */ 191); var _CompactColor = __webpack_require__(/*! ./CompactColor */ 379); var _CompactColor2 = _interopRequireDefault(_CompactColor); var _CompactFields = __webpack_require__(/*! ./CompactFields */ 380); var _CompactFields2 = _interopRequireDefault(_CompactFields); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Compact = exports.Compact = function Compact(_ref) { var onChange = _ref.onChange, onSwatchHover = _ref.onSwatchHover, colors = _ref.colors, hex = _ref.hex, rgb = _ref.rgb, _ref$styles = _ref.styles, passedStyles = _ref$styles === undefined ? {} : _ref$styles, _ref$className = _ref.className, className = _ref$className === undefined ? '' : _ref$className; var styles = (0, _reactcss2.default)((0, _merge2.default)({ 'default': { Compact: { background: '#f6f6f6', radius: '4px' }, compact: { paddingTop: '5px', paddingLeft: '5px', boxSizing: 'initial', width: '240px' }, clear: { clear: 'both' } } }, passedStyles)); var handleChange = function handleChange(data, e) { if (data.hex) { _color2.default.isValidHex(data.hex) && onChange({ hex: data.hex, source: 'hex' }, e); } else { onChange(data, e); } }; return _react2.default.createElement( _common.Raised, { style: styles.Compact, styles: passedStyles }, _react2.default.createElement( 'div', { style: styles.compact, className: 'compact-picker ' + className }, _react2.default.createElement( 'div', null, (0, _map2.default)(colors, function (c) { return _react2.default.createElement(_CompactColor2.default, { key: c, color: c, active: c.toLowerCase() === hex, onClick: handleChange, onSwatchHover: onSwatchHover }); }), _react2.default.createElement('div', { style: styles.clear }) ), _react2.default.createElement(_CompactFields2.default, { hex: hex, rgb: rgb, onChange: handleChange }) ) ); }; Compact.propTypes = { colors: _propTypes2.default.arrayOf(_propTypes2.default.string), styles: _propTypes2.default.object }; Compact.defaultProps = { colors: ['#4D4D4D', '#999999', '#FFFFFF', '#F44E3B', '#FE9200', '#FCDC00', '#DBDF00', '#A4DD00', '#68CCCA', '#73D8FF', '#AEA1FF', '#FDA1FF', '#333333', '#808080', '#cccccc', '#D33115', '#E27300', '#FCC400', '#B0BC00', '#68BC00', '#16A5A5', '#009CE0', '#7B64FF', '#FA28FF', '#000000', '#666666', '#B3B3B3', '#9F0500', '#C45100', '#FB9E00', '#808900', '#194D33', '#0C797D', '#0062B1', '#653294', '#AB149E'], styles: {} }; exports.default = (0, _common.ColorWrap)(Compact); /***/ }), /* 379 */ /*!***************************************************************!*\ !*** ../~/react-color/lib/components/compact/CompactColor.js ***! \***************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.CompactColor = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _color = __webpack_require__(/*! ../../helpers/color */ 304); var _color2 = _interopRequireDefault(_color); var _common = __webpack_require__(/*! ../common */ 191); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var CompactColor = exports.CompactColor = function CompactColor(_ref) { var color = _ref.color, _ref$onClick = _ref.onClick, onClick = _ref$onClick === undefined ? function () {} : _ref$onClick, onSwatchHover = _ref.onSwatchHover, active = _ref.active; var styles = (0, _reactcss2.default)({ 'default': { color: { background: color, width: '15px', height: '15px', float: 'left', marginRight: '5px', marginBottom: '5px', position: 'relative', cursor: 'pointer' }, dot: { absolute: '5px 5px 5px 5px', background: _color2.default.getContrastingColor(color), borderRadius: '50%', opacity: '0' } }, 'active': { dot: { opacity: '1' } }, 'color-#FFFFFF': { color: { boxShadow: 'inset 0 0 0 1px #ddd' }, dot: { background: '#000' } }, 'transparent': { dot: { background: '#000' } } }, { active: active, 'color-#FFFFFF': color === '#FFFFFF', 'transparent': color === 'transparent' }); return _react2.default.createElement( _common.Swatch, { style: styles.color, color: color, onClick: onClick, onHover: onSwatchHover, focusStyle: { boxShadow: '0 0 4px ' + color } }, _react2.default.createElement('div', { style: styles.dot }) ); }; exports.default = CompactColor; /***/ }), /* 380 */ /*!****************************************************************!*\ !*** ../~/react-color/lib/components/compact/CompactFields.js ***! \****************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.CompactFields = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _common = __webpack_require__(/*! ../common */ 191); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var CompactFields = exports.CompactFields = function CompactFields(_ref) { var hex = _ref.hex, rgb = _ref.rgb, onChange = _ref.onChange; var styles = (0, _reactcss2.default)({ 'default': { fields: { display: 'flex', paddingBottom: '6px', paddingRight: '5px', position: 'relative' }, active: { position: 'absolute', top: '6px', left: '5px', height: '9px', width: '9px', background: hex }, HEXwrap: { flex: '6', position: 'relative' }, HEXinput: { width: '80%', padding: '0px', paddingLeft: '20%', border: 'none', outline: 'none', background: 'none', fontSize: '12px', color: '#333', height: '16px' }, HEXlabel: { display: 'none' }, RGBwrap: { flex: '3', position: 'relative' }, RGBinput: { width: '70%', padding: '0px', paddingLeft: '30%', border: 'none', outline: 'none', background: 'none', fontSize: '12px', color: '#333', height: '16px' }, RGBlabel: { position: 'absolute', top: '3px', left: '0px', lineHeight: '16px', textTransform: 'uppercase', fontSize: '12px', color: '#999' } } }); var handleChange = function handleChange(data, e) { if (data.r || data.g || data.b) { onChange({ r: data.r || rgb.r, g: data.g || rgb.g, b: data.b || rgb.b, source: 'rgb' }, e); } else { onChange({ hex: data.hex, source: 'hex' }, e); } }; return _react2.default.createElement( 'div', { style: styles.fields, className: 'flexbox-fix' }, _react2.default.createElement('div', { style: styles.active }), _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.HEXwrap, input: styles.HEXinput, label: styles.HEXlabel }, label: 'hex', value: hex, onChange: handleChange }), _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, label: 'r', value: rgb.r, onChange: handleChange }), _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, label: 'g', value: rgb.g, onChange: handleChange }), _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, label: 'b', value: rgb.b, onChange: handleChange }) ); }; exports.default = CompactFields; /***/ }), /* 381 */ /*!********************************************************!*\ !*** ../~/react-color/lib/components/github/Github.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Github = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _map = __webpack_require__(/*! lodash/map */ 321); var _map2 = _interopRequireDefault(_map); var _merge = __webpack_require__(/*! lodash/merge */ 200); var _merge2 = _interopRequireDefault(_merge); var _common = __webpack_require__(/*! ../common */ 191); var _GithubSwatch = __webpack_require__(/*! ./GithubSwatch */ 382); var _GithubSwatch2 = _interopRequireDefault(_GithubSwatch); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Github = exports.Github = function Github(_ref) { var width = _ref.width, colors = _ref.colors, onChange = _ref.onChange, onSwatchHover = _ref.onSwatchHover, triangle = _ref.triangle, _ref$styles = _ref.styles, passedStyles = _ref$styles === undefined ? {} : _ref$styles, _ref$className = _ref.className, className = _ref$className === undefined ? '' : _ref$className; var styles = (0, _reactcss2.default)((0, _merge2.default)({ 'default': { card: { width: width, background: '#fff', border: '1px solid rgba(0,0,0,0.2)', boxShadow: '0 3px 12px rgba(0,0,0,0.15)', borderRadius: '4px', position: 'relative', padding: '5px', display: 'flex', flexWrap: 'wrap' }, triangle: { position: 'absolute', border: '7px solid transparent', borderBottomColor: '#fff' }, triangleShadow: { position: 'absolute', border: '8px solid transparent', borderBottomColor: 'rgba(0,0,0,0.15)' } }, 'hide-triangle': { triangle: { display: 'none' }, triangleShadow: { display: 'none' } }, 'top-left-triangle': { triangle: { top: '-14px', left: '10px' }, triangleShadow: { top: '-16px', left: '9px' } }, 'top-right-triangle': { triangle: { top: '-14px', right: '10px' }, triangleShadow: { top: '-16px', right: '9px' } }, 'bottom-left-triangle': { triangle: { top: '35px', left: '10px', transform: 'rotate(180deg)' }, triangleShadow: { top: '37px', left: '9px', transform: 'rotate(180deg)' } }, 'bottom-right-triangle': { triangle: { top: '35px', right: '10px', transform: 'rotate(180deg)' }, triangleShadow: { top: '37px', right: '9px', transform: 'rotate(180deg)' } } }, passedStyles), { 'hide-triangle': triangle === 'hide', 'top-left-triangle': triangle === 'top-left', 'top-right-triangle': triangle === 'top-right', 'bottom-left-triangle': triangle === 'bottom-left', 'bottom-right-triangle': triangle === 'bottom-right' }); var handleChange = function handleChange(hex, e) { return onChange({ hex: hex, source: 'hex' }, e); }; return _react2.default.createElement( 'div', { style: styles.card, className: 'github-picker ' + className }, _react2.default.createElement('div', { style: styles.triangleShadow }), _react2.default.createElement('div', { style: styles.triangle }), (0, _map2.default)(colors, function (c) { return _react2.default.createElement(_GithubSwatch2.default, { color: c, key: c, onClick: handleChange, onSwatchHover: onSwatchHover }); }) ); }; Github.propTypes = { width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]), colors: _propTypes2.default.arrayOf(_propTypes2.default.string), triangle: _propTypes2.default.oneOf(['hide', 'top-left', 'top-right', 'bottom-left', 'bottom-right']), styles: _propTypes2.default.object }; Github.defaultProps = { width: 200, colors: ['#B80000', '#DB3E00', '#FCCB00', '#008B02', '#006B76', '#1273DE', '#004DCF', '#5300EB', '#EB9694', '#FAD0C3', '#FEF3BD', '#C1E1C5', '#BEDADC', '#C4DEF6', '#BED3F3', '#D4C4FB'], triangle: 'top-left', styles: {} }; exports.default = (0, _common.ColorWrap)(Github); /***/ }), /* 382 */ /*!**************************************************************!*\ !*** ../~/react-color/lib/components/github/GithubSwatch.js ***! \**************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.GithubSwatch = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _common = __webpack_require__(/*! ../common */ 191); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var GithubSwatch = exports.GithubSwatch = function GithubSwatch(_ref) { var hover = _ref.hover, color = _ref.color, onClick = _ref.onClick, onSwatchHover = _ref.onSwatchHover; var hoverSwatch = { position: 'relative', zIndex: '2', outline: '2px solid #fff', boxShadow: '0 0 5px 2px rgba(0,0,0,0.25)' }; var styles = (0, _reactcss2.default)({ 'default': { swatch: { width: '25px', height: '25px', fontSize: '0' } }, 'hover': { swatch: hoverSwatch } }, { hover: hover }); return _react2.default.createElement( 'div', { style: styles.swatch }, _react2.default.createElement(_common.Swatch, { color: color, onClick: onClick, onHover: onSwatchHover, focusStyle: hoverSwatch }) ); }; exports.default = (0, _reactcss.handleHover)(GithubSwatch); /***/ }), /* 383 */ /*!**************************************************!*\ !*** ../~/react-color/lib/components/hue/Hue.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.HuePicker = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _merge = __webpack_require__(/*! lodash/merge */ 200); var _merge2 = _interopRequireDefault(_merge); var _common = __webpack_require__(/*! ../common */ 191); var _HuePointer = __webpack_require__(/*! ./HuePointer */ 384); var _HuePointer2 = _interopRequireDefault(_HuePointer); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var HuePicker = exports.HuePicker = function HuePicker(_ref) { var width = _ref.width, height = _ref.height, onChange = _ref.onChange, hsl = _ref.hsl, direction = _ref.direction, pointer = _ref.pointer, _ref$styles = _ref.styles, passedStyles = _ref$styles === undefined ? {} : _ref$styles, _ref$className = _ref.className, className = _ref$className === undefined ? '' : _ref$className; var styles = (0, _reactcss2.default)((0, _merge2.default)({ 'default': { picker: { position: 'relative', width: width, height: height }, hue: { radius: '2px' } } }, passedStyles)); // Overwrite to provide pure hue color var handleChange = function handleChange(data) { return onChange({ a: 1, h: data.h, l: 0.5, s: 1 }); }; return _react2.default.createElement( 'div', { style: styles.picker, className: 'hue-picker ' + className }, _react2.default.createElement(_common.Hue, _extends({}, styles.hue, { hsl: hsl, pointer: pointer, onChange: handleChange, direction: direction })) ); }; HuePicker.propTypes = { styles: _propTypes2.default.object }; HuePicker.defaultProps = { width: '316px', height: '16px', direction: 'horizontal', pointer: _HuePointer2.default, styles: {} }; exports.default = (0, _common.ColorWrap)(HuePicker); /***/ }), /* 384 */ /*!*********************************************************!*\ !*** ../~/react-color/lib/components/hue/HuePointer.js ***! \*********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.SliderPointer = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var SliderPointer = exports.SliderPointer = function SliderPointer(_ref) { var direction = _ref.direction; var styles = (0, _reactcss2.default)({ 'default': { picker: { width: '18px', height: '18px', borderRadius: '50%', transform: 'translate(-9px, -1px)', backgroundColor: 'rgb(248, 248, 248)', boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)' } }, 'vertical': { picker: { transform: 'translate(-3px, -9px)' } } }, { vertical: direction === 'vertical' }); return _react2.default.createElement('div', { style: styles.picker }); }; exports.default = SliderPointer; /***/ }), /* 385 */ /*!************************************************************!*\ !*** ../~/react-color/lib/components/material/Material.js ***! \************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Material = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _merge = __webpack_require__(/*! lodash/merge */ 200); var _merge2 = _interopRequireDefault(_merge); var _color = __webpack_require__(/*! ../../helpers/color */ 304); var _color2 = _interopRequireDefault(_color); var _common = __webpack_require__(/*! ../common */ 191); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Material = exports.Material = function Material(_ref) { var onChange = _ref.onChange, hex = _ref.hex, rgb = _ref.rgb, _ref$styles = _ref.styles, passedStyles = _ref$styles === undefined ? {} : _ref$styles, _ref$className = _ref.className, className = _ref$className === undefined ? '' : _ref$className; var styles = (0, _reactcss2.default)((0, _merge2.default)({ 'default': { material: { width: '98px', height: '98px', padding: '16px', fontFamily: 'Roboto' }, HEXwrap: { position: 'relative' }, HEXinput: { width: '100%', marginTop: '12px', fontSize: '15px', color: '#333', padding: '0px', border: '0px', borderBottom: '2px solid ' + hex, outline: 'none', height: '30px' }, HEXlabel: { position: 'absolute', top: '0px', left: '0px', fontSize: '11px', color: '#999999', textTransform: 'capitalize' }, Hex: { style: {} }, RGBwrap: { position: 'relative' }, RGBinput: { width: '100%', marginTop: '12px', fontSize: '15px', color: '#333', padding: '0px', border: '0px', borderBottom: '1px solid #eee', outline: 'none', height: '30px' }, RGBlabel: { position: 'absolute', top: '0px', left: '0px', fontSize: '11px', color: '#999999', textTransform: 'capitalize' }, split: { display: 'flex', marginRight: '-10px', paddingTop: '11px' }, third: { flex: '1', paddingRight: '10px' } } }, passedStyles)); var handleChange = function handleChange(data, e) { if (data.hex) { _color2.default.isValidHex(data.hex) && onChange({ hex: data.hex, source: 'hex' }, e); } else if (data.r || data.g || data.b) { onChange({ r: data.r || rgb.r, g: data.g || rgb.g, b: data.b || rgb.b, source: 'rgb' }, e); } }; return _react2.default.createElement( _common.Raised, { styles: passedStyles }, _react2.default.createElement( 'div', { style: styles.material, className: 'material-picker ' + className }, _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.HEXwrap, input: styles.HEXinput, label: styles.HEXlabel }, label: 'hex', value: hex, onChange: handleChange }), _react2.default.createElement( 'div', { style: styles.split, className: 'flexbox-fix' }, _react2.default.createElement( 'div', { style: styles.third }, _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, label: 'r', value: rgb.r, onChange: handleChange }) ), _react2.default.createElement( 'div', { style: styles.third }, _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, label: 'g', value: rgb.g, onChange: handleChange }) ), _react2.default.createElement( 'div', { style: styles.third }, _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, label: 'b', value: rgb.b, onChange: handleChange }) ) ) ) ); }; exports.default = (0, _common.ColorWrap)(Material); /***/ }), /* 386 */ /*!**************************************************************!*\ !*** ../~/react-color/lib/components/photoshop/Photoshop.js ***! \**************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Photoshop = undefined; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _merge = __webpack_require__(/*! lodash/merge */ 200); var _merge2 = _interopRequireDefault(_merge); var _common = __webpack_require__(/*! ../common */ 191); var _PhotoshopFields = __webpack_require__(/*! ./PhotoshopFields */ 387); var _PhotoshopFields2 = _interopRequireDefault(_PhotoshopFields); var _PhotoshopPointerCircle = __webpack_require__(/*! ./PhotoshopPointerCircle */ 388); var _PhotoshopPointerCircle2 = _interopRequireDefault(_PhotoshopPointerCircle); var _PhotoshopPointer = __webpack_require__(/*! ./PhotoshopPointer */ 389); var _PhotoshopPointer2 = _interopRequireDefault(_PhotoshopPointer); var _PhotoshopButton = __webpack_require__(/*! ./PhotoshopButton */ 390); var _PhotoshopButton2 = _interopRequireDefault(_PhotoshopButton); var _PhotoshopPreviews = __webpack_require__(/*! ./PhotoshopPreviews */ 391); var _PhotoshopPreviews2 = _interopRequireDefault(_PhotoshopPreviews); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Photoshop = exports.Photoshop = function (_React$Component) { _inherits(Photoshop, _React$Component); function Photoshop(props) { _classCallCheck(this, Photoshop); var _this = _possibleConstructorReturn(this, (Photoshop.__proto__ || Object.getPrototypeOf(Photoshop)).call(this)); _this.state = { currentColor: props.hex }; return _this; } _createClass(Photoshop, [{ key: 'render', value: function render() { var _props = this.props, _props$styles = _props.styles, passedStyles = _props$styles === undefined ? {} : _props$styles, _props$className = _props.className, className = _props$className === undefined ? '' : _props$className; var styles = (0, _reactcss2.default)((0, _merge2.default)({ 'default': { picker: { background: '#DCDCDC', borderRadius: '4px', boxShadow: '0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)', boxSizing: 'initial', width: '513px' }, head: { backgroundImage: 'linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)', borderBottom: '1px solid #B1B1B1', boxShadow: 'inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)', height: '23px', lineHeight: '24px', borderRadius: '4px 4px 0 0', fontSize: '13px', color: '#4D4D4D', textAlign: 'center' }, body: { padding: '15px 15px 0', display: 'flex' }, saturation: { width: '256px', height: '256px', position: 'relative', border: '2px solid #B3B3B3', borderBottom: '2px solid #F0F0F0', overflow: 'hidden' }, hue: { position: 'relative', height: '256px', width: '19px', marginLeft: '10px', border: '2px solid #B3B3B3', borderBottom: '2px solid #F0F0F0' }, controls: { width: '180px', marginLeft: '10px' }, top: { display: 'flex' }, previews: { width: '60px' }, actions: { flex: '1', marginLeft: '20px' } } }, passedStyles)); return _react2.default.createElement( 'div', { style: styles.picker, className: 'photoshop-picker ' + className }, _react2.default.createElement( 'div', { style: styles.head }, this.props.header ), _react2.default.createElement( 'div', { style: styles.body, className: 'flexbox-fix' }, _react2.default.createElement( 'div', { style: styles.saturation }, _react2.default.createElement(_common.Saturation, { hsl: this.props.hsl, hsv: this.props.hsv, pointer: _PhotoshopPointerCircle2.default, onChange: this.props.onChange }) ), _react2.default.createElement( 'div', { style: styles.hue }, _react2.default.createElement(_common.Hue, { direction: 'vertical', hsl: this.props.hsl, pointer: _PhotoshopPointer2.default, onChange: this.props.onChange }) ), _react2.default.createElement( 'div', { style: styles.controls }, _react2.default.createElement( 'div', { style: styles.top, className: 'flexbox-fix' }, _react2.default.createElement( 'div', { style: styles.previews }, _react2.default.createElement(_PhotoshopPreviews2.default, { rgb: this.props.rgb, currentColor: this.state.currentColor }) ), _react2.default.createElement( 'div', { style: styles.actions }, _react2.default.createElement(_PhotoshopButton2.default, { label: 'OK', onClick: this.props.onAccept, active: true }), _react2.default.createElement(_PhotoshopButton2.default, { label: 'Cancel', onClick: this.props.onCancel }), _react2.default.createElement(_PhotoshopFields2.default, { onChange: this.props.onChange, rgb: this.props.rgb, hsv: this.props.hsv, hex: this.props.hex }) ) ) ) ) ); } }]); return Photoshop; }(_react2.default.Component); Photoshop.propTypes = { header: _propTypes2.default.string, styles: _propTypes2.default.object }; Photoshop.defaultProps = { header: 'Color Picker', styles: {} }; exports.default = (0, _common.ColorWrap)(Photoshop); /***/ }), /* 387 */ /*!********************************************************************!*\ !*** ../~/react-color/lib/components/photoshop/PhotoshopFields.js ***! \********************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.PhotoshopPicker = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _color = __webpack_require__(/*! ../../helpers/color */ 304); var _color2 = _interopRequireDefault(_color); var _common = __webpack_require__(/*! ../common */ 191); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var PhotoshopPicker = exports.PhotoshopPicker = function PhotoshopPicker(_ref) { var onChange = _ref.onChange, rgb = _ref.rgb, hsv = _ref.hsv, hex = _ref.hex; var styles = (0, _reactcss2.default)({ 'default': { fields: { paddingTop: '5px', paddingBottom: '9px', width: '80px', position: 'relative' }, divider: { height: '5px' }, RGBwrap: { position: 'relative' }, RGBinput: { marginLeft: '40%', width: '40%', height: '18px', border: '1px solid #888888', boxShadow: 'inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC', marginBottom: '5px', fontSize: '13px', paddingLeft: '3px', marginRight: '10px' }, RGBlabel: { left: '0px', width: '34px', textTransform: 'uppercase', fontSize: '13px', height: '18px', lineHeight: '22px', position: 'absolute' }, HEXwrap: { position: 'relative' }, HEXinput: { marginLeft: '20%', width: '80%', height: '18px', border: '1px solid #888888', boxShadow: 'inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC', marginBottom: '6px', fontSize: '13px', paddingLeft: '3px' }, HEXlabel: { position: 'absolute', top: '0px', left: '0px', width: '14px', textTransform: 'uppercase', fontSize: '13px', height: '18px', lineHeight: '22px' }, fieldSymbols: { position: 'absolute', top: '5px', right: '-7px', fontSize: '13px' }, symbol: { height: '20px', lineHeight: '22px', paddingBottom: '7px' } } }); var handleChange = function handleChange(data, e) { if (data['#']) { _color2.default.isValidHex(data['#']) && onChange({ hex: data['#'], source: 'hex' }, e); } else if (data.r || data.g || data.b) { onChange({ r: data.r || rgb.r, g: data.g || rgb.g, b: data.b || rgb.b, source: 'rgb' }, e); } else if (data.h || data.s || data.v) { onChange({ h: data.h || hsv.h, s: data.s || hsv.s, v: data.v || hsv.v, source: 'hsv' }, e); } }; return _react2.default.createElement( 'div', { style: styles.fields }, _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, label: 'h', value: Math.round(hsv.h), onChange: handleChange }), _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, label: 's', value: Math.round(hsv.s * 100), onChange: handleChange }), _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, label: 'v', value: Math.round(hsv.v * 100), onChange: handleChange }), _react2.default.createElement('div', { style: styles.divider }), _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, label: 'r', value: rgb.r, onChange: handleChange }), _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, label: 'g', value: rgb.g, onChange: handleChange }), _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, label: 'b', value: rgb.b, onChange: handleChange }), _react2.default.createElement('div', { style: styles.divider }), _react2.default.createElement(_common.EditableInput, { style: { wrap: styles.HEXwrap, input: styles.HEXinput, label: styles.HEXlabel }, label: '#', value: hex.replace('#', ''), onChange: handleChange }), _react2.default.createElement( 'div', { style: styles.fieldSymbols }, _react2.default.createElement( 'div', { style: styles.symbol }, '\xB0' ), _react2.default.createElement( 'div', { style: styles.symbol }, '%' ), _react2.default.createElement( 'div', { style: styles.symbol }, '%' ) ) ); }; exports.default = PhotoshopPicker; /***/ }), /* 388 */ /*!***************************************************************************!*\ !*** ../~/react-color/lib/components/photoshop/PhotoshopPointerCircle.js ***! \***************************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.PhotoshopPointerCircle = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var PhotoshopPointerCircle = exports.PhotoshopPointerCircle = function PhotoshopPointerCircle(_ref) { var hsl = _ref.hsl; var styles = (0, _reactcss2.default)({ 'default': { picker: { width: '12px', height: '12px', borderRadius: '6px', boxShadow: 'inset 0 0 0 1px #fff', transform: 'translate(-6px, -6px)' } }, 'black-outline': { picker: { boxShadow: 'inset 0 0 0 1px #000' } } }, { 'black-outline': hsl.l > 0.5 }); return _react2.default.createElement('div', { style: styles.picker }); }; exports.default = PhotoshopPointerCircle; /***/ }), /* 389 */ /*!*********************************************************************!*\ !*** ../~/react-color/lib/components/photoshop/PhotoshopPointer.js ***! \*********************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.PhotoshopPointerCircle = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var PhotoshopPointerCircle = exports.PhotoshopPointerCircle = function PhotoshopPointerCircle() { var styles = (0, _reactcss2.default)({ 'default': { triangle: { width: 0, height: 0, borderStyle: 'solid', borderWidth: '4px 0 4px 6px', borderColor: 'transparent transparent transparent #fff', position: 'absolute', top: '1px', left: '1px' }, triangleBorder: { width: 0, height: 0, borderStyle: 'solid', borderWidth: '5px 0 5px 8px', borderColor: 'transparent transparent transparent #555' }, left: { Extend: 'triangleBorder', transform: 'translate(-13px, -4px)' }, leftInside: { Extend: 'triangle', transform: 'translate(-8px, -5px)' }, right: { Extend: 'triangleBorder', transform: 'translate(20px, -14px) rotate(180deg)' }, rightInside: { Extend: 'triangle', transform: 'translate(-8px, -5px)' } } }); return _react2.default.createElement( 'div', { style: styles.pointer }, _react2.default.createElement( 'div', { style: styles.left }, _react2.default.createElement('div', { style: styles.leftInside }) ), _react2.default.createElement( 'div', { style: styles.right }, _react2.default.createElement('div', { style: styles.rightInside }) ) ); }; exports.default = PhotoshopPointerCircle; /***/ }), /* 390 */ /*!********************************************************************!*\ !*** ../~/react-color/lib/components/photoshop/PhotoshopButton.js ***! \********************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.PhotoshopButton = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var PhotoshopButton = exports.PhotoshopButton = function PhotoshopButton(_ref) { var onClick = _ref.onClick, label = _ref.label, children = _ref.children, active = _ref.active; var styles = (0, _reactcss2.default)({ 'default': { button: { backgroundImage: 'linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)', border: '1px solid #878787', borderRadius: '2px', height: '20px', boxShadow: '0 1px 0 0 #EAEAEA', fontSize: '14px', color: '#000', lineHeight: '20px', textAlign: 'center', marginBottom: '10px', cursor: 'pointer' } }, 'active': { button: { boxShadow: '0 0 0 1px #878787' } } }, { active: active }); return _react2.default.createElement( 'div', { style: styles.button, onClick: onClick }, label || children ); }; exports.default = PhotoshopButton; /***/ }), /* 391 */ /*!**********************************************************************!*\ !*** ../~/react-color/lib/components/photoshop/PhotoshopPreviews.js ***! \**********************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.PhotoshopPreviews = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var PhotoshopPreviews = exports.PhotoshopPreviews = function PhotoshopPreviews(_ref) { var rgb = _ref.rgb, currentColor = _ref.currentColor; var styles = (0, _reactcss2.default)({ 'default': { swatches: { border: '1px solid #B3B3B3', borderBottom: '1px solid #F0F0F0', marginBottom: '2px', marginTop: '1px' }, new: { height: '34px', background: 'rgb(' + rgb.r + ',' + rgb.g + ', ' + rgb.b + ')', boxShadow: 'inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000' }, current: { height: '34px', background: currentColor, boxShadow: 'inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000' }, label: { fontSize: '14px', color: '#000', textAlign: 'center' } } }); return _react2.default.createElement( 'div', null, _react2.default.createElement( 'div', { style: styles.label }, 'new' ), _react2.default.createElement( 'div', { style: styles.swatches }, _react2.default.createElement('div', { style: styles.new }), _react2.default.createElement('div', { style: styles.current }) ), _react2.default.createElement( 'div', { style: styles.label }, 'current' ) ); }; exports.default = PhotoshopPreviews; /***/ }), /* 392 */ /*!********************************************************!*\ !*** ../~/react-color/lib/components/sketch/Sketch.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Sketch = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _merge = __webpack_require__(/*! lodash/merge */ 200); var _merge2 = _interopRequireDefault(_merge); var _common = __webpack_require__(/*! ../common */ 191); var _SketchFields = __webpack_require__(/*! ./SketchFields */ 393); var _SketchFields2 = _interopRequireDefault(_SketchFields); var _SketchPresetColors = __webpack_require__(/*! ./SketchPresetColors */ 394); var _SketchPresetColors2 = _interopRequireDefault(_SketchPresetColors); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Sketch = exports.Sketch = function Sketch(_ref) { var width = _ref.width, rgb = _ref.rgb, hex = _ref.hex, hsv = _ref.hsv, hsl = _ref.hsl, onChange = _ref.onChange, onSwatchHover = _ref.onSwatchHover, disableAlpha = _ref.disableAlpha, presetColors = _ref.presetColors, renderers = _ref.renderers, _ref$styles = _ref.styles, passedStyles = _ref$styles === undefined ? {} : _ref$styles, _ref$className = _ref.className, className = _ref$className === undefined ? '' : _ref$className; var styles = (0, _reactcss2.default)((0, _merge2.default)({ 'default': _extends({ picker: { width: width, padding: '10px 10px 0', boxSizing: 'initial', background: '#fff', borderRadius: '4px', boxShadow: '0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)' }, saturation: { width: '100%', paddingBottom: '75%', position: 'relative', overflow: 'hidden' }, Saturation: { radius: '3px', shadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)' }, controls: { display: 'flex' }, sliders: { padding: '4px 0', flex: '1' }, color: { width: '24px', height: '24px', position: 'relative', marginTop: '4px', marginLeft: '4px', borderRadius: '3px' }, activeColor: { absolute: '0px 0px 0px 0px', borderRadius: '2px', background: 'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + rgb.a + ')', boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)' }, hue: { position: 'relative', height: '10px', overflow: 'hidden' }, Hue: { radius: '2px', shadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)' }, alpha: { position: 'relative', height: '10px', marginTop: '4px', overflow: 'hidden' }, Alpha: { radius: '2px', shadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)' } }, passedStyles), 'disableAlpha': { color: { height: '10px' }, hue: { height: '10px' }, alpha: { display: 'none' } } }, passedStyles), { disableAlpha: disableAlpha }); return _react2.default.createElement( 'div', { style: styles.picker, className: 'sketch-picker ' + className }, _react2.default.createElement( 'div', { style: styles.saturation }, _react2.default.createElement(_common.Saturation, { style: styles.Saturation, hsl: hsl, hsv: hsv, onChange: onChange }) ), _react2.default.createElement( 'div', { style: styles.controls, className: 'flexbox-fix' }, _react2.default.createElement( 'div', { style: styles.sliders }, _react2.default.createElement( 'div', { style: styles.hue }, _react2.default.createElement(_common.Hue, { style: styles.Hue, hsl: hsl, onChange: onChange }) ), _react2.default.createElement( 'div', { style: styles.alpha }, _react2.default.createElement(_common.Alpha, { style: styles.Alpha, rgb: rgb, hsl: hsl, renderers: renderers, onChange: onChange }) ) ), _react2.default.createElement( 'div', { style: styles.color }, _react2.default.createElement(_common.Checkboard, null), _react2.default.createElement('div', { style: styles.activeColor }) ) ), _react2.default.createElement(_SketchFields2.default, { rgb: rgb, hsl: hsl, hex: hex, onChange: onChange, disableAlpha: disableAlpha }), _react2.default.createElement(_SketchPresetColors2.default, { colors: presetColors, onClick: onChange, onSwatchHover: onSwatchHover }) ); }; Sketch.propTypes = { disableAlpha: _propTypes2.default.bool, width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]), styles: _propTypes2.default.object }; Sketch.defaultProps = { disableAlpha: false, width: 200, styles: {}, presetColors: ['#D0021B', '#F5A623', '#F8E71C', '#8B572A', '#7ED321', '#417505', '#BD10E0', '#9013FE', '#4A90E2', '#50E3C2', '#B8E986', '#000000', '#4A4A4A', '#9B9B9B', '#FFFFFF'] }; exports.default = (0, _common.ColorWrap)(Sketch); /***/ }), /* 393 */ /*!**************************************************************!*\ !*** ../~/react-color/lib/components/sketch/SketchFields.js ***! \**************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.SketchFields = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _color = __webpack_require__(/*! ../../helpers/color */ 304); var _color2 = _interopRequireDefault(_color); var _common = __webpack_require__(/*! ../common */ 191); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /* eslint-disable no-param-reassign */ var SketchFields = exports.SketchFields = function SketchFields(_ref) { var onChange = _ref.onChange, rgb = _ref.rgb, hsl = _ref.hsl, hex = _ref.hex, disableAlpha = _ref.disableAlpha; var styles = (0, _reactcss2.default)({ 'default': { fields: { display: 'flex', paddingTop: '4px' }, single: { flex: '1', paddingLeft: '6px' }, alpha: { flex: '1', paddingLeft: '6px' }, double: { flex: '2' }, input: { width: '80%', padding: '4px 10% 3px', border: 'none', boxShadow: 'inset 0 0 0 1px #ccc', fontSize: '11px' }, label: { display: 'block', textAlign: 'center', fontSize: '11px', color: '#222', paddingTop: '3px', paddingBottom: '4px', textTransform: 'capitalize' } }, 'disableAlpha': { alpha: { display: 'none' } } }, { disableAlpha: disableAlpha }); var handleChange = function handleChange(data, e) { if (data.hex) { _color2.default.isValidHex(data.hex) && onChange({ hex: data.hex, source: 'hex' }, e); } else if (data.r || data.g || data.b) { onChange({ r: data.r || rgb.r, g: data.g || rgb.g, b: data.b || rgb.b, a: rgb.a, source: 'rgb' }, e); } else if (data.a) { if (data.a < 0) { data.a = 0; } else if (data.a > 100) { data.a = 100; } data.a /= 100; onChange({ h: hsl.h, s: hsl.s, l: hsl.l, a: data.a, source: 'rgb' }, e); } }; return _react2.default.createElement( 'div', { style: styles.fields, className: 'flexbox-fix' }, _react2.default.createElement( 'div', { style: styles.double }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 'hex', value: hex.replace('#', ''), onChange: handleChange }) ), _react2.default.createElement( 'div', { style: styles.single }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 'r', value: rgb.r, onChange: handleChange, dragLabel: 'true', dragMax: '255' }) ), _react2.default.createElement( 'div', { style: styles.single }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 'g', value: rgb.g, onChange: handleChange, dragLabel: 'true', dragMax: '255' }) ), _react2.default.createElement( 'div', { style: styles.single }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 'b', value: rgb.b, onChange: handleChange, dragLabel: 'true', dragMax: '255' }) ), _react2.default.createElement( 'div', { style: styles.alpha }, _react2.default.createElement(_common.EditableInput, { style: { input: styles.input, label: styles.label }, label: 'a', value: Math.round(rgb.a * 100), onChange: handleChange, dragLabel: 'true', dragMax: '100' }) ) ); }; exports.default = SketchFields; /***/ }), /* 394 */ /*!********************************************************************!*\ !*** ../~/react-color/lib/components/sketch/SketchPresetColors.js ***! \********************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.SketchPresetColors = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _common = __webpack_require__(/*! ../common */ 191); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var SketchPresetColors = exports.SketchPresetColors = function SketchPresetColors(_ref) { var colors = _ref.colors, _ref$onClick = _ref.onClick, onClick = _ref$onClick === undefined ? function () {} : _ref$onClick, onSwatchHover = _ref.onSwatchHover; var styles = (0, _reactcss2.default)({ 'default': { colors: { margin: '0 -10px', padding: '10px 0 0 10px', borderTop: '1px solid #eee', display: 'flex', flexWrap: 'wrap', position: 'relative' }, swatchWrap: { width: '16px', height: '16px', margin: '0 10px 10px 0' }, swatch: { borderRadius: '3px', boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.15)' } }, 'no-presets': { colors: { display: 'none' } } }, { 'no-presets': !colors || !colors.length }); var handleClick = function handleClick(hex, e) { onClick({ hex: hex, source: 'hex' }, e); }; return _react2.default.createElement( 'div', { style: styles.colors, className: 'flexbox-fix' }, colors.map(function (colorObjOrString) { var c = typeof colorObjOrString === 'string' ? { color: colorObjOrString } : colorObjOrString; var key = '' + c.color + (c.title || ''); return _react2.default.createElement( 'div', { key: key, style: styles.swatchWrap }, _react2.default.createElement(_common.Swatch, _extends({}, c, { style: styles.swatch, onClick: handleClick, onHover: onSwatchHover, focusStyle: { boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px ' + c.color } })) ); }) ); }; SketchPresetColors.propTypes = { colors: _propTypes2.default.arrayOf(_propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({ color: _propTypes2.default.string, title: _propTypes2.default.string })])).isRequired }; exports.default = SketchPresetColors; /***/ }), /* 395 */ /*!********************************************************!*\ !*** ../~/react-color/lib/components/slider/Slider.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Slider = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _merge = __webpack_require__(/*! lodash/merge */ 200); var _merge2 = _interopRequireDefault(_merge); var _common = __webpack_require__(/*! ../common */ 191); var _SliderSwatches = __webpack_require__(/*! ./SliderSwatches */ 396); var _SliderSwatches2 = _interopRequireDefault(_SliderSwatches); var _SliderPointer = __webpack_require__(/*! ./SliderPointer */ 398); var _SliderPointer2 = _interopRequireDefault(_SliderPointer); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Slider = exports.Slider = function Slider(_ref) { var hsl = _ref.hsl, onChange = _ref.onChange, pointer = _ref.pointer, _ref$styles = _ref.styles, passedStyles = _ref$styles === undefined ? {} : _ref$styles, _ref$className = _ref.className, className = _ref$className === undefined ? '' : _ref$className; var styles = (0, _reactcss2.default)((0, _merge2.default)({ 'default': { hue: { height: '12px', position: 'relative' }, Hue: { radius: '2px' } } }, passedStyles)); return _react2.default.createElement( 'div', { style: styles.wrap || {}, className: 'slider-picker ' + className }, _react2.default.createElement( 'div', { style: styles.hue }, _react2.default.createElement(_common.Hue, { style: styles.Hue, hsl: hsl, pointer: pointer, onChange: onChange }) ), _react2.default.createElement( 'div', { style: styles.swatches }, _react2.default.createElement(_SliderSwatches2.default, { hsl: hsl, onClick: onChange }) ) ); }; Slider.propTypes = { styles: _propTypes2.default.object }; Slider.defaultProps = { pointer: _SliderPointer2.default, styles: {} }; exports.default = (0, _common.ColorWrap)(Slider); /***/ }), /* 396 */ /*!****************************************************************!*\ !*** ../~/react-color/lib/components/slider/SliderSwatches.js ***! \****************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.SliderSwatches = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _SliderSwatch = __webpack_require__(/*! ./SliderSwatch */ 397); var _SliderSwatch2 = _interopRequireDefault(_SliderSwatch); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var SliderSwatches = exports.SliderSwatches = function SliderSwatches(_ref) { var onClick = _ref.onClick, hsl = _ref.hsl; var styles = (0, _reactcss2.default)({ 'default': { swatches: { marginTop: '20px' }, swatch: { boxSizing: 'border-box', width: '20%', paddingRight: '1px', float: 'left' }, clear: { clear: 'both' } } }); // Acceptible difference in floating point equality var epsilon = 0.1; return _react2.default.createElement( 'div', { style: styles.swatches }, _react2.default.createElement( 'div', { style: styles.swatch }, _react2.default.createElement(_SliderSwatch2.default, { hsl: hsl, offset: '.80', active: Math.abs(hsl.l - 0.80) < epsilon && Math.abs(hsl.s - 0.50) < epsilon, onClick: onClick, first: true }) ), _react2.default.createElement( 'div', { style: styles.swatch }, _react2.default.createElement(_SliderSwatch2.default, { hsl: hsl, offset: '.65', active: Math.abs(hsl.l - 0.65) < epsilon && Math.abs(hsl.s - 0.50) < epsilon, onClick: onClick }) ), _react2.default.createElement( 'div', { style: styles.swatch }, _react2.default.createElement(_SliderSwatch2.default, { hsl: hsl, offset: '.50', active: Math.abs(hsl.l - 0.50) < epsilon && Math.abs(hsl.s - 0.50) < epsilon, onClick: onClick }) ), _react2.default.createElement( 'div', { style: styles.swatch }, _react2.default.createElement(_SliderSwatch2.default, { hsl: hsl, offset: '.35', active: Math.abs(hsl.l - 0.35) < epsilon && Math.abs(hsl.s - 0.50) < epsilon, onClick: onClick }) ), _react2.default.createElement( 'div', { style: styles.swatch }, _react2.default.createElement(_SliderSwatch2.default, { hsl: hsl, offset: '.20', active: Math.abs(hsl.l - 0.20) < epsilon && Math.abs(hsl.s - 0.50) < epsilon, onClick: onClick, last: true }) ), _react2.default.createElement('div', { style: styles.clear }) ); }; exports.default = SliderSwatches; /***/ }), /* 397 */ /*!**************************************************************!*\ !*** ../~/react-color/lib/components/slider/SliderSwatch.js ***! \**************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.SliderSwatch = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var SliderSwatch = exports.SliderSwatch = function SliderSwatch(_ref) { var hsl = _ref.hsl, offset = _ref.offset, _ref$onClick = _ref.onClick, onClick = _ref$onClick === undefined ? function () {} : _ref$onClick, active = _ref.active, first = _ref.first, last = _ref.last; var styles = (0, _reactcss2.default)({ 'default': { swatch: { height: '12px', background: 'hsl(' + hsl.h + ', 50%, ' + offset * 100 + '%)', cursor: 'pointer' } }, 'first': { swatch: { borderRadius: '2px 0 0 2px' } }, 'last': { swatch: { borderRadius: '0 2px 2px 0' } }, 'active': { swatch: { transform: 'scaleY(1.8)', borderRadius: '3.6px/2px' } } }, { active: active, first: first, last: last }); var handleClick = function handleClick(e) { return onClick({ h: hsl.h, s: 0.5, l: offset, source: 'hsl' }, e); }; return _react2.default.createElement('div', { style: styles.swatch, onClick: handleClick }); }; exports.default = SliderSwatch; /***/ }), /* 398 */ /*!***************************************************************!*\ !*** ../~/react-color/lib/components/slider/SliderPointer.js ***! \***************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.SliderPointer = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var SliderPointer = exports.SliderPointer = function SliderPointer() { var styles = (0, _reactcss2.default)({ 'default': { picker: { width: '14px', height: '14px', borderRadius: '6px', transform: 'translate(-7px, -1px)', backgroundColor: 'rgb(248, 248, 248)', boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)' } } }); return _react2.default.createElement('div', { style: styles.picker }); }; exports.default = SliderPointer; /***/ }), /* 399 */ /*!************************************************************!*\ !*** ../~/react-color/lib/components/swatches/Swatches.js ***! \************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Swatches = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _map = __webpack_require__(/*! lodash/map */ 321); var _map2 = _interopRequireDefault(_map); var _merge = __webpack_require__(/*! lodash/merge */ 200); var _merge2 = _interopRequireDefault(_merge); var _color = __webpack_require__(/*! ../../helpers/color */ 304); var _color2 = _interopRequireDefault(_color); var _materialColors = __webpack_require__(/*! material-colors */ 371); var material = _interopRequireWildcard(_materialColors); var _common = __webpack_require__(/*! ../common */ 191); var _SwatchesGroup = __webpack_require__(/*! ./SwatchesGroup */ 400); var _SwatchesGroup2 = _interopRequireDefault(_SwatchesGroup); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Swatches = exports.Swatches = function Swatches(_ref) { var width = _ref.width, height = _ref.height, onChange = _ref.onChange, onSwatchHover = _ref.onSwatchHover, colors = _ref.colors, hex = _ref.hex, _ref$styles = _ref.styles, passedStyles = _ref$styles === undefined ? {} : _ref$styles, _ref$className = _ref.className, className = _ref$className === undefined ? '' : _ref$className; var styles = (0, _reactcss2.default)((0, _merge2.default)({ 'default': { picker: { width: width, height: height }, overflow: { height: height, overflowY: 'scroll' }, body: { padding: '16px 0 6px 16px' }, clear: { clear: 'both' } } }, passedStyles)); var handleChange = function handleChange(data, e) { _color2.default.isValidHex(data) && onChange({ hex: data, source: 'hex' }, e); }; return _react2.default.createElement( 'div', { style: styles.picker, className: 'swatches-picker ' + className }, _react2.default.createElement( _common.Raised, null, _react2.default.createElement( 'div', { style: styles.overflow }, _react2.default.createElement( 'div', { style: styles.body }, (0, _map2.default)(colors, function (group) { return _react2.default.createElement(_SwatchesGroup2.default, { key: group.toString(), group: group, active: hex, onClick: handleChange, onSwatchHover: onSwatchHover }); }), _react2.default.createElement('div', { style: styles.clear }) ) ) ) ); }; Swatches.propTypes = { width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]), height: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]), colors: _propTypes2.default.arrayOf(_propTypes2.default.arrayOf(_propTypes2.default.string)), styles: _propTypes2.default.object /* eslint-disable max-len */ };Swatches.defaultProps = { width: 320, height: 240, colors: [[material.red['900'], material.red['700'], material.red['500'], material.red['300'], material.red['100']], [material.pink['900'], material.pink['700'], material.pink['500'], material.pink['300'], material.pink['100']], [material.purple['900'], material.purple['700'], material.purple['500'], material.purple['300'], material.purple['100']], [material.deepPurple['900'], material.deepPurple['700'], material.deepPurple['500'], material.deepPurple['300'], material.deepPurple['100']], [material.indigo['900'], material.indigo['700'], material.indigo['500'], material.indigo['300'], material.indigo['100']], [material.blue['900'], material.blue['700'], material.blue['500'], material.blue['300'], material.blue['100']], [material.lightBlue['900'], material.lightBlue['700'], material.lightBlue['500'], material.lightBlue['300'], material.lightBlue['100']], [material.cyan['900'], material.cyan['700'], material.cyan['500'], material.cyan['300'], material.cyan['100']], [material.teal['900'], material.teal['700'], material.teal['500'], material.teal['300'], material.teal['100']], ['#194D33', material.green['700'], material.green['500'], material.green['300'], material.green['100']], [material.lightGreen['900'], material.lightGreen['700'], material.lightGreen['500'], material.lightGreen['300'], material.lightGreen['100']], [material.lime['900'], material.lime['700'], material.lime['500'], material.lime['300'], material.lime['100']], [material.yellow['900'], material.yellow['700'], material.yellow['500'], material.yellow['300'], material.yellow['100']], [material.amber['900'], material.amber['700'], material.amber['500'], material.amber['300'], material.amber['100']], [material.orange['900'], material.orange['700'], material.orange['500'], material.orange['300'], material.orange['100']], [material.deepOrange['900'], material.deepOrange['700'], material.deepOrange['500'], material.deepOrange['300'], material.deepOrange['100']], [material.brown['900'], material.brown['700'], material.brown['500'], material.brown['300'], material.brown['100']], [material.blueGrey['900'], material.blueGrey['700'], material.blueGrey['500'], material.blueGrey['300'], material.blueGrey['100']], ['#000000', '#525252', '#969696', '#D9D9D9', '#FFFFFF']], styles: {} }; exports.default = (0, _common.ColorWrap)(Swatches); /***/ }), /* 400 */ /*!*****************************************************************!*\ !*** ../~/react-color/lib/components/swatches/SwatchesGroup.js ***! \*****************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.SwatchesGroup = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _map = __webpack_require__(/*! lodash/map */ 321); var _map2 = _interopRequireDefault(_map); var _SwatchesColor = __webpack_require__(/*! ./SwatchesColor */ 401); var _SwatchesColor2 = _interopRequireDefault(_SwatchesColor); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var SwatchesGroup = exports.SwatchesGroup = function SwatchesGroup(_ref) { var onClick = _ref.onClick, onSwatchHover = _ref.onSwatchHover, group = _ref.group, active = _ref.active; var styles = (0, _reactcss2.default)({ 'default': { group: { paddingBottom: '10px', width: '40px', float: 'left', marginRight: '10px' } } }); return _react2.default.createElement( 'div', { style: styles.group }, (0, _map2.default)(group, function (color, i) { return _react2.default.createElement(_SwatchesColor2.default, { key: color, color: color, active: color.toLowerCase() === active, first: i === 0, last: i === group.length - 1, onClick: onClick, onSwatchHover: onSwatchHover }); }) ); }; exports.default = SwatchesGroup; /***/ }), /* 401 */ /*!*****************************************************************!*\ !*** ../~/react-color/lib/components/swatches/SwatchesColor.js ***! \*****************************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.SwatchesColor = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _color = __webpack_require__(/*! ../../helpers/color */ 304); var _color2 = _interopRequireDefault(_color); var _common = __webpack_require__(/*! ../common */ 191); var _CheckIcon = __webpack_require__(/*! @icons/material/CheckIcon */ 402); var _CheckIcon2 = _interopRequireDefault(_CheckIcon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var SwatchesColor = exports.SwatchesColor = function SwatchesColor(_ref) { var color = _ref.color, _ref$onClick = _ref.onClick, onClick = _ref$onClick === undefined ? function () {} : _ref$onClick, onSwatchHover = _ref.onSwatchHover, first = _ref.first, last = _ref.last, active = _ref.active; var styles = (0, _reactcss2.default)({ 'default': { color: { width: '40px', height: '24px', cursor: 'pointer', background: color, marginBottom: '1px' }, check: { color: _color2.default.getContrastingColor(color), marginLeft: '8px', display: 'none' } }, 'first': { color: { overflow: 'hidden', borderRadius: '2px 2px 0 0' } }, 'last': { color: { overflow: 'hidden', borderRadius: '0 0 2px 2px' } }, 'active': { check: { display: 'block' } }, 'color-#FFFFFF': { color: { boxShadow: 'inset 0 0 0 1px #ddd' }, check: { color: '#333' } }, 'transparent': { check: { color: '#333' } } }, { first: first, last: last, active: active, 'color-#FFFFFF': color === '#FFFFFF', 'transparent': color === 'transparent' }); return _react2.default.createElement( _common.Swatch, { color: color, style: styles.color, onClick: onClick, onHover: onSwatchHover, focusStyle: { boxShadow: '0 0 4px ' + color } }, _react2.default.createElement( 'div', { style: styles.check }, _react2.default.createElement(_CheckIcon2.default, null) ) ); }; exports.default = SwatchesColor; /***/ }), /* 402 */ /*!*****************************************!*\ !*** ../~/@icons/material/CheckIcon.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var DEFAULT_SIZE = 24; exports.default = function (_ref) { var _ref$fill = _ref.fill, fill = _ref$fill === undefined ? 'currentColor' : _ref$fill, _ref$width = _ref.width, width = _ref$width === undefined ? DEFAULT_SIZE : _ref$width, _ref$height = _ref.height, height = _ref$height === undefined ? DEFAULT_SIZE : _ref$height, _ref$style = _ref.style, style = _ref$style === undefined ? {} : _ref$style, props = _objectWithoutProperties(_ref, ['fill', 'width', 'height', 'style']); return _react2.default.createElement( 'svg', _extends({ viewBox: '0 0 ' + DEFAULT_SIZE + ' ' + DEFAULT_SIZE, style: _extends({ fill: fill, width: width, height: height }, style) }, props), _react2.default.createElement('path', { d: 'M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z' }) ); }; /***/ }), /* 403 */ /*!**********************************************************!*\ !*** ../~/react-color/lib/components/twitter/Twitter.js ***! \**********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Twitter = undefined; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactcss = __webpack_require__(/*! reactcss */ 27); var _reactcss2 = _interopRequireDefault(_reactcss); var _map = __webpack_require__(/*! lodash/map */ 321); var _map2 = _interopRequireDefault(_map); var _merge = __webpack_require__(/*! lodash/merge */ 200); var _merge2 = _interopRequireDefault(_merge); var _color = __webpack_require__(/*! ../../helpers/color */ 304); var _color2 = _interopRequireDefault(_color); var _common = __webpack_require__(/*! ../common */ 191); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Twitter = exports.Twitter = function Twitter(_ref) { var onChange = _ref.onChange, onSwatchHover = _ref.onSwatchHover, hex = _ref.hex, colors = _ref.colors, width = _ref.width, triangle = _ref.triangle, _ref$styles = _ref.styles, passedStyles = _ref$styles === undefined ? {} : _ref$styles, _ref$className = _ref.className, className = _ref$className === undefined ? '' : _ref$className; var styles = (0, _reactcss2.default)((0, _merge2.default)({ 'default': { card: { width: width, background: '#fff', border: '0 solid rgba(0,0,0,0.25)', boxShadow: '0 1px 4px rgba(0,0,0,0.25)', borderRadius: '4px', position: 'relative' }, body: { padding: '15px 9px 9px 15px' }, label: { fontSize: '18px', color: '#fff' }, triangle: { width: '0px', height: '0px', borderStyle: 'solid', borderWidth: '0 9px 10px 9px', borderColor: 'transparent transparent #fff transparent', position: 'absolute' }, triangleShadow: { width: '0px', height: '0px', borderStyle: 'solid', borderWidth: '0 9px 10px 9px', borderColor: 'transparent transparent rgba(0,0,0,.1) transparent', position: 'absolute' }, hash: { background: '#F0F0F0', height: '30px', width: '30px', borderRadius: '4px 0 0 4px', float: 'left', color: '#98A1A4', display: 'flex', alignItems: 'center', justifyContent: 'center' }, input: { width: '100px', fontSize: '14px', color: '#666', border: '0px', outline: 'none', height: '28px', boxShadow: 'inset 0 0 0 1px #F0F0F0', boxSizing: 'content-box', borderRadius: '0 4px 4px 0', float: 'left', paddingLeft: '8px' }, swatch: { width: '30px', height: '30px', float: 'left', borderRadius: '4px', margin: '0 6px 6px 0' }, clear: { clear: 'both' } }, 'hide-triangle': { triangle: { display: 'none' }, triangleShadow: { display: 'none' } }, 'top-left-triangle': { triangle: { top: '-10px', left: '12px' }, triangleShadow: { top: '-11px', left: '12px' } }, 'top-right-triangle': { triangle: { top: '-10px', right: '12px' }, triangleShadow: { top: '-11px', right: '12px' } } }, passedStyles), { 'hide-triangle': triangle === 'hide', 'top-left-triangle': triangle === 'top-left', 'top-right-triangle': triangle === 'top-right' }); var handleChange = function handleChange(hexcode, e) { _color2.default.isValidHex(hexcode) && onChange({ hex: hexcode, source: 'hex' }, e); }; return _react2.default.createElement( 'div', { style: styles.card, className: 'twitter-picker ' + className }, _react2.default.createElement('div', { style: styles.triangleShadow }), _react2.default.createElement('div', { style: styles.triangle }), _react2.default.createElement( 'div', { style: styles.body }, (0, _map2.default)(colors, function (c, i) { return _react2.default.createElement(_common.Swatch, { key: i, color: c, hex: c, style: styles.swatch, onClick: handleChange, onHover: onSwatchHover, focusStyle: { boxShadow: '0 0 4px ' + c } }); }), _react2.default.createElement( 'div', { style: styles.hash }, '#' ), _react2.default.createElement(_common.EditableInput, { label: null, style: { input: styles.input }, value: hex.replace('#', ''), onChange: handleChange }), _react2.default.createElement('div', { style: styles.clear }) ) ); }; Twitter.propTypes = { width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]), triangle: _propTypes2.default.oneOf(['hide', 'top-left', 'top-right']), colors: _propTypes2.default.arrayOf(_propTypes2.default.string), styles: _propTypes2.default.object }; Twitter.defaultProps = { width: 276, colors: ['#FF6900', '#FCB900', '#7BDCB5', '#00D084', '#8ED1FC', '#0693E3', '#ABB8C3', '#EB144C', '#F78DA7', '#9900EF'], triangle: 'top-left', styles: {} }; exports.default = (0, _common.ColorWrap)(Twitter); /***/ }), /* 404 */ /*!***************************!*\ !*** ../~/color/index.js ***! \***************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var colorString = __webpack_require__(/*! color-string */ 405); var convert = __webpack_require__(/*! color-convert */ 409); var _slice = [].slice; var skippedModels = [ // to be honest, I don't really feel like keyword belongs in color convert, but eh. 'keyword', // gray conflicts with some method names, and has its own method defined. 'gray', // shouldn't really be in color-convert either... 'hex' ]; var hashedModelKeys = {}; Object.keys(convert).forEach(function (model) { hashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model; }); var limiters = {}; function Color(obj, model) { if (!(this instanceof Color)) { return new Color(obj, model); } if (model && model in skippedModels) { model = null; } if (model && !(model in convert)) { throw new Error('Unknown model: ' + model); } var i; var channels; if (typeof obj === 'undefined') { this.model = 'rgb'; this.color = [0, 0, 0]; this.valpha = 1; } else if (obj instanceof Color) { this.model = obj.model; this.color = obj.color.slice(); this.valpha = obj.valpha; } else if (typeof obj === 'string') { var result = colorString.get(obj); if (result === null) { throw new Error('Unable to parse color from string: ' + obj); } this.model = result.model; channels = convert[this.model].channels; this.color = result.value.slice(0, channels); this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1; } else if (obj.length) { this.model = model || 'rgb'; channels = convert[this.model].channels; var newArr = _slice.call(obj, 0, channels); this.color = zeroArray(newArr, channels); this.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1; } else if (typeof obj === 'number') { // this is always RGB - can be converted later on. obj &= 0xFFFFFF; this.model = 'rgb'; this.color = [ (obj >> 16) & 0xFF, (obj >> 8) & 0xFF, obj & 0xFF ]; this.valpha = 1; } else { this.valpha = 1; var keys = Object.keys(obj); if ('alpha' in obj) { keys.splice(keys.indexOf('alpha'), 1); this.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0; } var hashedKeys = keys.sort().join(''); if (!(hashedKeys in hashedModelKeys)) { throw new Error('Unable to parse color from object: ' + JSON.stringify(obj)); } this.model = hashedModelKeys[hashedKeys]; var labels = convert[this.model].labels; var color = []; for (i = 0; i < labels.length; i++) { color.push(obj[labels[i]]); } this.color = zeroArray(color); } // perform limitations (clamping, etc.) if (limiters[this.model]) { channels = convert[this.model].channels; for (i = 0; i < channels; i++) { var limit = limiters[this.model][i]; if (limit) { this.color[i] = limit(this.color[i]); } } } this.valpha = Math.max(0, Math.min(1, this.valpha)); if (Object.freeze) { Object.freeze(this); } } Color.prototype = { toString: function () { return this.string(); }, toJSON: function () { return this[this.model](); }, string: function (places) { var self = this.model in colorString.to ? this : this.rgb(); self = self.round(typeof places === 'number' ? places : 1); var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); return colorString.to[self.model](args); }, percentString: function (places) { var self = this.rgb().round(typeof places === 'number' ? places : 1); var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); return colorString.to.rgb.percent(args); }, array: function () { return this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha); }, object: function () { var result = {}; var channels = convert[this.model].channels; var labels = convert[this.model].labels; for (var i = 0; i < channels; i++) { result[labels[i]] = this.color[i]; } if (this.valpha !== 1) { result.alpha = this.valpha; } return result; }, unitArray: function () { var rgb = this.rgb().color; rgb[0] /= 255; rgb[1] /= 255; rgb[2] /= 255; if (this.valpha !== 1) { rgb.push(this.valpha); } return rgb; }, unitObject: function () { var rgb = this.rgb().object(); rgb.r /= 255; rgb.g /= 255; rgb.b /= 255; if (this.valpha !== 1) { rgb.alpha = this.valpha; } return rgb; }, round: function (places) { places = Math.max(places || 0, 0); return new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model); }, alpha: function (val) { if (arguments.length) { return new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model); } return this.valpha; }, // rgb red: getset('rgb', 0, maxfn(255)), green: getset('rgb', 1, maxfn(255)), blue: getset('rgb', 2, maxfn(255)), hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style saturationl: getset('hsl', 1, maxfn(100)), lightness: getset('hsl', 2, maxfn(100)), saturationv: getset('hsv', 1, maxfn(100)), value: getset('hsv', 2, maxfn(100)), chroma: getset('hcg', 1, maxfn(100)), gray: getset('hcg', 2, maxfn(100)), white: getset('hwb', 1, maxfn(100)), wblack: getset('hwb', 2, maxfn(100)), cyan: getset('cmyk', 0, maxfn(100)), magenta: getset('cmyk', 1, maxfn(100)), yellow: getset('cmyk', 2, maxfn(100)), black: getset('cmyk', 3, maxfn(100)), x: getset('xyz', 0, maxfn(100)), y: getset('xyz', 1, maxfn(100)), z: getset('xyz', 2, maxfn(100)), l: getset('lab', 0, maxfn(100)), a: getset('lab', 1), b: getset('lab', 2), keyword: function (val) { if (arguments.length) { return new Color(val); } return convert[this.model].keyword(this.color); }, hex: function (val) { if (arguments.length) { return new Color(val); } return colorString.to.hex(this.rgb().round().color); }, rgbNumber: function () { var rgb = this.rgb().color; return ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF); }, luminosity: function () { // http://www.w3.org/TR/WCAG20/#relativeluminancedef var rgb = this.rgb().color; var lum = []; for (var i = 0; i < rgb.length; i++) { var chan = rgb[i] / 255; lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4); } return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; }, contrast: function (color2) { // http://www.w3.org/TR/WCAG20/#contrast-ratiodef var lum1 = this.luminosity(); var lum2 = color2.luminosity(); if (lum1 > lum2) { return (lum1 + 0.05) / (lum2 + 0.05); } return (lum2 + 0.05) / (lum1 + 0.05); }, level: function (color2) { var contrastRatio = this.contrast(color2); if (contrastRatio >= 7.1) { return 'AAA'; } return (contrastRatio >= 4.5) ? 'AA' : ''; }, isDark: function () { // YIQ equation from http://24ways.org/2010/calculating-color-contrast var rgb = this.rgb().color; var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000; return yiq < 128; }, isLight: function () { return !this.isDark(); }, negate: function () { var rgb = this.rgb(); for (var i = 0; i < 3; i++) { rgb.color[i] = 255 - rgb.color[i]; } return rgb; }, lighten: function (ratio) { var hsl = this.hsl(); hsl.color[2] += hsl.color[2] * ratio; return hsl; }, darken: function (ratio) { var hsl = this.hsl(); hsl.color[2] -= hsl.color[2] * ratio; return hsl; }, saturate: function (ratio) { var hsl = this.hsl(); hsl.color[1] += hsl.color[1] * ratio; return hsl; }, desaturate: function (ratio) { var hsl = this.hsl(); hsl.color[1] -= hsl.color[1] * ratio; return hsl; }, whiten: function (ratio) { var hwb = this.hwb(); hwb.color[1] += hwb.color[1] * ratio; return hwb; }, blacken: function (ratio) { var hwb = this.hwb(); hwb.color[2] += hwb.color[2] * ratio; return hwb; }, grayscale: function () { // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale var rgb = this.rgb().color; var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; return Color.rgb(val, val, val); }, fade: function (ratio) { return this.alpha(this.valpha - (this.valpha * ratio)); }, opaquer: function (ratio) { return this.alpha(this.valpha + (this.valpha * ratio)); }, rotate: function (degrees) { var hsl = this.hsl(); var hue = hsl.color[0]; hue = (hue + degrees) % 360; hue = hue < 0 ? 360 + hue : hue; hsl.color[0] = hue; return hsl; }, mix: function (mixinColor, weight) { // ported from sass implementation in C // https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209 if (!mixinColor || !mixinColor.rgb) { throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor); } var color1 = mixinColor.rgb(); var color2 = this.rgb(); var p = weight === undefined ? 0.5 : weight; var w = 2 * p - 1; var a = color1.alpha() - color2.alpha(); var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0; var w2 = 1 - w1; return Color.rgb( w1 * color1.red() + w2 * color2.red(), w1 * color1.green() + w2 * color2.green(), w1 * color1.blue() + w2 * color2.blue(), color1.alpha() * p + color2.alpha() * (1 - p)); } }; // model conversion methods and static constructors Object.keys(convert).forEach(function (model) { if (skippedModels.indexOf(model) !== -1) { return; } var channels = convert[model].channels; // conversion methods Color.prototype[model] = function () { if (this.model === model) { return new Color(this); } if (arguments.length) { return new Color(arguments, model); } var newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha; return new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model); }; // 'static' construction methods Color[model] = function (color) { if (typeof color === 'number') { color = zeroArray(_slice.call(arguments), channels); } return new Color(color, model); }; }); function roundTo(num, places) { return Number(num.toFixed(places)); } function roundToPlace(places) { return function (num) { return roundTo(num, places); }; } function getset(model, channel, modifier) { model = Array.isArray(model) ? model : [model]; model.forEach(function (m) { (limiters[m] || (limiters[m] = []))[channel] = modifier; }); model = model[0]; return function (val) { var result; if (arguments.length) { if (modifier) { val = modifier(val); } result = this[model](); result.color[channel] = val; return result; } result = this[model]().color[channel]; if (modifier) { result = modifier(result); } return result; }; } function maxfn(max) { return function (v) { return Math.max(0, Math.min(max, v)); }; } function assertArray(val) { return Array.isArray(val) ? val : [val]; } function zeroArray(arr, length) { for (var i = 0; i < length; i++) { if (typeof arr[i] !== 'number') { arr[i] = 0; } } return arr; } module.exports = Color; /***/ }), /* 405 */ /*!**********************************!*\ !*** ../~/color-string/index.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ var colorNames = __webpack_require__(/*! color-name */ 406); var swizzle = __webpack_require__(/*! simple-swizzle */ 407); var reverseNames = {}; // create a list of reverse color names for (var name in colorNames) { if (colorNames.hasOwnProperty(name)) { reverseNames[colorNames[name]] = name; } } var cs = module.exports = { to: {}, get: {} }; cs.get = function (string) { var prefix = string.substring(0, 3).toLowerCase(); var val; var model; switch (prefix) { case 'hsl': val = cs.get.hsl(string); model = 'hsl'; break; case 'hwb': val = cs.get.hwb(string); model = 'hwb'; break; default: val = cs.get.rgb(string); model = 'rgb'; break; } if (!val) { return null; } return {model: model, value: val}; }; cs.get.rgb = function (string) { if (!string) { return null; } var abbr = /^#([a-f0-9]{3,4})$/i; var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i; var rgba = /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var keyword = /(\D+)/; var rgb = [0, 0, 0, 1]; var match; var i; var hexAlpha; if (match = string.match(hex)) { hexAlpha = match[2]; match = match[1]; for (i = 0; i < 3; i++) { // https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19 var i2 = i * 2; rgb[i] = parseInt(match.slice(i2, i2 + 2), 16); } if (hexAlpha) { rgb[3] = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100; } } else if (match = string.match(abbr)) { match = match[1]; hexAlpha = match[3]; for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i] + match[i], 16); } if (hexAlpha) { rgb[3] = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100; } } else if (match = string.match(rgba)) { for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i + 1], 0); } if (match[4]) { rgb[3] = parseFloat(match[4]); } } else if (match = string.match(per)) { for (i = 0; i < 3; i++) { rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55); } if (match[4]) { rgb[3] = parseFloat(match[4]); } } else if (match = string.match(keyword)) { if (match[1] === 'transparent') { return [0, 0, 0, 0]; } rgb = colorNames[match[1]]; if (!rgb) { return null; } rgb[3] = 1; return rgb; } else { return null; } for (i = 0; i < 3; i++) { rgb[i] = clamp(rgb[i], 0, 255); } rgb[3] = clamp(rgb[3], 0, 1); return rgb; }; cs.get.hsl = function (string) { if (!string) { return null; } var hsl = /^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var match = string.match(hsl); if (match) { var alpha = parseFloat(match[4]); var h = (parseFloat(match[1]) + 360) % 360; var s = clamp(parseFloat(match[2]), 0, 100); var l = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, s, l, a]; } return null; }; cs.get.hwb = function (string) { if (!string) { return null; } var hwb = /^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var match = string.match(hwb); if (match) { var alpha = parseFloat(match[4]); var h = ((parseFloat(match[1]) % 360) + 360) % 360; var w = clamp(parseFloat(match[2]), 0, 100); var b = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, w, b, a]; } return null; }; cs.to.hex = function () { var rgba = swizzle(arguments); return ( '#' + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? (hexDouble(Math.round(rgba[3] * 255))) : '') ); }; cs.to.rgb = function () { var rgba = swizzle(arguments); return rgba.length < 4 || rgba[3] === 1 ? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')' : 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')'; }; cs.to.rgb.percent = function () { var rgba = swizzle(arguments); var r = Math.round(rgba[0] / 255 * 100); var g = Math.round(rgba[1] / 255 * 100); var b = Math.round(rgba[2] / 255 * 100); return rgba.length < 4 || rgba[3] === 1 ? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)' : 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')'; }; cs.to.hsl = function () { var hsla = swizzle(arguments); return hsla.length < 4 || hsla[3] === 1 ? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)' : 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')'; }; // hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax // (hwb have alpha optional & 1 is default value) cs.to.hwb = function () { var hwba = swizzle(arguments); var a = ''; if (hwba.length >= 4 && hwba[3] !== 1) { a = ', ' + hwba[3]; } return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')'; }; cs.to.keyword = function (rgb) { return reverseNames[rgb.slice(0, 3)]; }; // helpers function clamp(num, min, max) { return Math.min(Math.max(min, num), max); } function hexDouble(num) { var str = num.toString(16).toUpperCase(); return (str.length < 2) ? '0' + str : str; } /***/ }), /* 406 */ /*!********************************!*\ !*** ../~/color-name/index.js ***! \********************************/ /***/ (function(module, exports) { 'use strict' module.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], "aqua": [0, 255, 255], "aquamarine": [127, 255, 212], "azure": [240, 255, 255], "beige": [245, 245, 220], "bisque": [255, 228, 196], "black": [0, 0, 0], "blanchedalmond": [255, 235, 205], "blue": [0, 0, 255], "blueviolet": [138, 43, 226], "brown": [165, 42, 42], "burlywood": [222, 184, 135], "cadetblue": [95, 158, 160], "chartreuse": [127, 255, 0], "chocolate": [210, 105, 30], "coral": [255, 127, 80], "cornflowerblue": [100, 149, 237], "cornsilk": [255, 248, 220], "crimson": [220, 20, 60], "cyan": [0, 255, 255], "darkblue": [0, 0, 139], "darkcyan": [0, 139, 139], "darkgoldenrod": [184, 134, 11], "darkgray": [169, 169, 169], "darkgreen": [0, 100, 0], "darkgrey": [169, 169, 169], "darkkhaki": [189, 183, 107], "darkmagenta": [139, 0, 139], "darkolivegreen": [85, 107, 47], "darkorange": [255, 140, 0], "darkorchid": [153, 50, 204], "darkred": [139, 0, 0], "darksalmon": [233, 150, 122], "darkseagreen": [143, 188, 143], "darkslateblue": [72, 61, 139], "darkslategray": [47, 79, 79], "darkslategrey": [47, 79, 79], "darkturquoise": [0, 206, 209], "darkviolet": [148, 0, 211], "deeppink": [255, 20, 147], "deepskyblue": [0, 191, 255], "dimgray": [105, 105, 105], "dimgrey": [105, 105, 105], "dodgerblue": [30, 144, 255], "firebrick": [178, 34, 34], "floralwhite": [255, 250, 240], "forestgreen": [34, 139, 34], "fuchsia": [255, 0, 255], "gainsboro": [220, 220, 220], "ghostwhite": [248, 248, 255], "gold": [255, 215, 0], "goldenrod": [218, 165, 32], "gray": [128, 128, 128], "green": [0, 128, 0], "greenyellow": [173, 255, 47], "grey": [128, 128, 128], "honeydew": [240, 255, 240], "hotpink": [255, 105, 180], "indianred": [205, 92, 92], "indigo": [75, 0, 130], "ivory": [255, 255, 240], "khaki": [240, 230, 140], "lavender": [230, 230, 250], "lavenderblush": [255, 240, 245], "lawngreen": [124, 252, 0], "lemonchiffon": [255, 250, 205], "lightblue": [173, 216, 230], "lightcoral": [240, 128, 128], "lightcyan": [224, 255, 255], "lightgoldenrodyellow": [250, 250, 210], "lightgray": [211, 211, 211], "lightgreen": [144, 238, 144], "lightgrey": [211, 211, 211], "lightpink": [255, 182, 193], "lightsalmon": [255, 160, 122], "lightseagreen": [32, 178, 170], "lightskyblue": [135, 206, 250], "lightslategray": [119, 136, 153], "lightslategrey": [119, 136, 153], "lightsteelblue": [176, 196, 222], "lightyellow": [255, 255, 224], "lime": [0, 255, 0], "limegreen": [50, 205, 50], "linen": [250, 240, 230], "magenta": [255, 0, 255], "maroon": [128, 0, 0], "mediumaquamarine": [102, 205, 170], "mediumblue": [0, 0, 205], "mediumorchid": [186, 85, 211], "mediumpurple": [147, 112, 219], "mediumseagreen": [60, 179, 113], "mediumslateblue": [123, 104, 238], "mediumspringgreen": [0, 250, 154], "mediumturquoise": [72, 209, 204], "mediumvioletred": [199, 21, 133], "midnightblue": [25, 25, 112], "mintcream": [245, 255, 250], "mistyrose": [255, 228, 225], "moccasin": [255, 228, 181], "navajowhite": [255, 222, 173], "navy": [0, 0, 128], "oldlace": [253, 245, 230], "olive": [128, 128, 0], "olivedrab": [107, 142, 35], "orange": [255, 165, 0], "orangered": [255, 69, 0], "orchid": [218, 112, 214], "palegoldenrod": [238, 232, 170], "palegreen": [152, 251, 152], "paleturquoise": [175, 238, 238], "palevioletred": [219, 112, 147], "papayawhip": [255, 239, 213], "peachpuff": [255, 218, 185], "peru": [205, 133, 63], "pink": [255, 192, 203], "plum": [221, 160, 221], "powderblue": [176, 224, 230], "purple": [128, 0, 128], "rebeccapurple": [102, 51, 153], "red": [255, 0, 0], "rosybrown": [188, 143, 143], "royalblue": [65, 105, 225], "saddlebrown": [139, 69, 19], "salmon": [250, 128, 114], "sandybrown": [244, 164, 96], "seagreen": [46, 139, 87], "seashell": [255, 245, 238], "sienna": [160, 82, 45], "silver": [192, 192, 192], "skyblue": [135, 206, 235], "slateblue": [106, 90, 205], "slategray": [112, 128, 144], "slategrey": [112, 128, 144], "snow": [255, 250, 250], "springgreen": [0, 255, 127], "steelblue": [70, 130, 180], "tan": [210, 180, 140], "teal": [0, 128, 128], "thistle": [216, 191, 216], "tomato": [255, 99, 71], "turquoise": [64, 224, 208], "violet": [238, 130, 238], "wheat": [245, 222, 179], "white": [255, 255, 255], "whitesmoke": [245, 245, 245], "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; /***/ }), /* 407 */ /*!************************************!*\ !*** ../~/simple-swizzle/index.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var isArrayish = __webpack_require__(/*! is-arrayish */ 408); var concat = Array.prototype.concat; var slice = Array.prototype.slice; var swizzle = module.exports = function swizzle(args) { var results = []; for (var i = 0, len = args.length; i < len; i++) { var arg = args[i]; if (isArrayish(arg)) { // http://jsperf.com/javascript-array-concat-vs-push/98 results = concat.call(results, slice.call(arg)); } else { results.push(arg); } } return results; }; swizzle.wrap = function (fn) { return function () { return fn(swizzle(arguments)); }; }; /***/ }), /* 408 */ /*!*********************************!*\ !*** ../~/is-arrayish/index.js ***! \*********************************/ /***/ (function(module, exports) { module.exports = function isArrayish(obj) { if (!obj || typeof obj === 'string') { return false; } return obj instanceof Array || Array.isArray(obj) || (obj.length >= 0 && (obj.splice instanceof Function || (Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String'))); }; /***/ }), /* 409 */ /*!***********************************!*\ !*** ../~/color-convert/index.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var conversions = __webpack_require__(/*! ./conversions */ 410); var route = __webpack_require__(/*! ./route */ 411); var convert = {}; var models = Object.keys(conversions); function wrapRaw(fn) { var wrappedFn = function (args) { if (args === undefined || args === null) { return args; } if (arguments.length > 1) { args = Array.prototype.slice.call(arguments); } return fn(args); }; // preserve .conversion property if there is one if ('conversion' in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } function wrapRounded(fn) { var wrappedFn = function (args) { if (args === undefined || args === null) { return args; } if (arguments.length > 1) { args = Array.prototype.slice.call(arguments); } var result = fn(args); // we're assuming the result is an array here. // see notice in conversions.js; don't use box types // in conversion functions. if (typeof result === 'object') { for (var len = result.length, i = 0; i < len; i++) { result[i] = Math.round(result[i]); } } return result; }; // preserve .conversion property if there is one if ('conversion' in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } models.forEach(function (fromModel) { convert[fromModel] = {}; Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); var routes = route(fromModel); var routeModels = Object.keys(routes); routeModels.forEach(function (toModel) { var fn = routes[toModel]; convert[fromModel][toModel] = wrapRounded(fn); convert[fromModel][toModel].raw = wrapRaw(fn); }); }); module.exports = convert; /***/ }), /* 410 */ /*!*****************************************!*\ !*** ../~/color-convert/conversions.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ var cssKeywords = __webpack_require__(/*! color-name */ 406); // NOTE: conversions should only return primitive values (i.e. arrays, or // values that give correct `typeof` results). // do not use box values types (i.e. Number(), String(), etc.) var reverseKeywords = {}; for (var key in cssKeywords) { if (cssKeywords.hasOwnProperty(key)) { reverseKeywords[cssKeywords[key]] = key; } } var convert = module.exports = { rgb: {channels: 3, labels: 'rgb'}, hsl: {channels: 3, labels: 'hsl'}, hsv: {channels: 3, labels: 'hsv'}, hwb: {channels: 3, labels: 'hwb'}, cmyk: {channels: 4, labels: 'cmyk'}, xyz: {channels: 3, labels: 'xyz'}, lab: {channels: 3, labels: 'lab'}, lch: {channels: 3, labels: 'lch'}, hex: {channels: 1, labels: ['hex']}, keyword: {channels: 1, labels: ['keyword']}, ansi16: {channels: 1, labels: ['ansi16']}, ansi256: {channels: 1, labels: ['ansi256']}, hcg: {channels: 3, labels: ['h', 'c', 'g']}, apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, gray: {channels: 1, labels: ['gray']} }; // hide .channels and .labels properties for (var model in convert) { if (convert.hasOwnProperty(model)) { if (!('channels' in convert[model])) { throw new Error('missing channels property: ' + model); } if (!('labels' in convert[model])) { throw new Error('missing channel labels property: ' + model); } if (convert[model].labels.length !== convert[model].channels) { throw new Error('channel and label counts mismatch: ' + model); } var channels = convert[model].channels; var labels = convert[model].labels; delete convert[model].channels; delete convert[model].labels; Object.defineProperty(convert[model], 'channels', {value: channels}); Object.defineProperty(convert[model], 'labels', {value: labels}); } } convert.rgb.hsl = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var min = Math.min(r, g, b); var max = Math.max(r, g, b); var delta = max - min; var h; var s; var l; if (max === min) { h = 0; } else if (r === max) { h = (g - b) / delta; } else if (g === max) { h = 2 + (b - r) / delta; } else if (b === max) { h = 4 + (r - g) / delta; } h = Math.min(h * 60, 360); if (h < 0) { h += 360; } l = (min + max) / 2; if (max === min) { s = 0; } else if (l <= 0.5) { s = delta / (max + min); } else { s = delta / (2 - max - min); } return [h, s * 100, l * 100]; }; convert.rgb.hsv = function (rgb) { var rdif; var gdif; var bdif; var h; var s; var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var v = Math.max(r, g, b); var diff = v - Math.min(r, g, b); var diffc = function (c) { return (v - c) / 6 / diff + 1 / 2; }; if (diff === 0) { h = s = 0; } else { s = diff / v; rdif = diffc(r); gdif = diffc(g); bdif = diffc(b); if (r === v) { h = bdif - gdif; } else if (g === v) { h = (1 / 3) + rdif - bdif; } else if (b === v) { h = (2 / 3) + gdif - rdif; } if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } } return [ h * 360, s * 100, v * 100 ]; }; convert.rgb.hwb = function (rgb) { var r = rgb[0]; var g = rgb[1]; var b = rgb[2]; var h = convert.rgb.hsl(rgb)[0]; var w = 1 / 255 * Math.min(r, Math.min(g, b)); b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); return [h, w * 100, b * 100]; }; convert.rgb.cmyk = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var c; var m; var y; var k; k = Math.min(1 - r, 1 - g, 1 - b); c = (1 - r - k) / (1 - k) || 0; m = (1 - g - k) / (1 - k) || 0; y = (1 - b - k) / (1 - k) || 0; return [c * 100, m * 100, y * 100, k * 100]; }; /** * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance * */ function comparativeDistance(x, y) { return ( Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2) ); } convert.rgb.keyword = function (rgb) { var reversed = reverseKeywords[rgb]; if (reversed) { return reversed; } var currentClosestDistance = Infinity; var currentClosestKeyword; for (var keyword in cssKeywords) { if (cssKeywords.hasOwnProperty(keyword)) { var value = cssKeywords[keyword]; // Compute comparative distance var distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest if (distance < currentClosestDistance) { currentClosestDistance = distance; currentClosestKeyword = keyword; } } } return currentClosestKeyword; }; convert.keyword.rgb = function (keyword) { return cssKeywords[keyword]; }; convert.rgb.xyz = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; // assume sRGB r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); return [x * 100, y * 100, z * 100]; }; convert.rgb.lab = function (rgb) { var xyz = convert.rgb.xyz(rgb); var x = xyz[0]; var y = xyz[1]; var z = xyz[2]; var l; var a; var b; x /= 95.047; y /= 100; z /= 108.883; x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); l = (116 * y) - 16; a = 500 * (x - y); b = 200 * (y - z); return [l, a, b]; }; convert.hsl.rgb = function (hsl) { var h = hsl[0] / 360; var s = hsl[1] / 100; var l = hsl[2] / 100; var t1; var t2; var t3; var rgb; var val; if (s === 0) { val = l * 255; return [val, val, val]; } if (l < 0.5) { t2 = l * (1 + s); } else { t2 = l + s - l * s; } t1 = 2 * l - t2; rgb = [0, 0, 0]; for (var i = 0; i < 3; i++) { t3 = h + 1 / 3 * -(i - 1); if (t3 < 0) { t3++; } if (t3 > 1) { t3--; } if (6 * t3 < 1) { val = t1 + (t2 - t1) * 6 * t3; } else if (2 * t3 < 1) { val = t2; } else if (3 * t3 < 2) { val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; } else { val = t1; } rgb[i] = val * 255; } return rgb; }; convert.hsl.hsv = function (hsl) { var h = hsl[0]; var s = hsl[1] / 100; var l = hsl[2] / 100; var smin = s; var lmin = Math.max(l, 0.01); var sv; var v; l *= 2; s *= (l <= 1) ? l : 2 - l; smin *= lmin <= 1 ? lmin : 2 - lmin; v = (l + s) / 2; sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); return [h, sv * 100, v * 100]; }; convert.hsv.rgb = function (hsv) { var h = hsv[0] / 60; var s = hsv[1] / 100; var v = hsv[2] / 100; var hi = Math.floor(h) % 6; var f = h - Math.floor(h); var p = 255 * v * (1 - s); var q = 255 * v * (1 - (s * f)); var t = 255 * v * (1 - (s * (1 - f))); v *= 255; switch (hi) { case 0: return [v, t, p]; case 1: return [q, v, p]; case 2: return [p, v, t]; case 3: return [p, q, v]; case 4: return [t, p, v]; case 5: return [v, p, q]; } }; convert.hsv.hsl = function (hsv) { var h = hsv[0]; var s = hsv[1] / 100; var v = hsv[2] / 100; var vmin = Math.max(v, 0.01); var lmin; var sl; var l; l = (2 - s) * v; lmin = (2 - s) * vmin; sl = s * vmin; sl /= (lmin <= 1) ? lmin : 2 - lmin; sl = sl || 0; l /= 2; return [h, sl * 100, l * 100]; }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb convert.hwb.rgb = function (hwb) { var h = hwb[0] / 360; var wh = hwb[1] / 100; var bl = hwb[2] / 100; var ratio = wh + bl; var i; var v; var f; var n; // wh + bl cant be > 1 if (ratio > 1) { wh /= ratio; bl /= ratio; } i = Math.floor(6 * h); v = 1 - bl; f = 6 * h - i; if ((i & 0x01) !== 0) { f = 1 - f; } n = wh + f * (v - wh); // linear interpolation var r; var g; var b; switch (i) { default: case 6: case 0: r = v; g = n; b = wh; break; case 1: r = n; g = v; b = wh; break; case 2: r = wh; g = v; b = n; break; case 3: r = wh; g = n; b = v; break; case 4: r = n; g = wh; b = v; break; case 5: r = v; g = wh; b = n; break; } return [r * 255, g * 255, b * 255]; }; convert.cmyk.rgb = function (cmyk) { var c = cmyk[0] / 100; var m = cmyk[1] / 100; var y = cmyk[2] / 100; var k = cmyk[3] / 100; var r; var g; var b; r = 1 - Math.min(1, c * (1 - k) + k); g = 1 - Math.min(1, m * (1 - k) + k); b = 1 - Math.min(1, y * (1 - k) + k); return [r * 255, g * 255, b * 255]; }; convert.xyz.rgb = function (xyz) { var x = xyz[0] / 100; var y = xyz[1] / 100; var z = xyz[2] / 100; var r; var g; var b; r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); // assume sRGB r = r > 0.0031308 ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) : r * 12.92; g = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) : g * 12.92; b = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) : b * 12.92; r = Math.min(Math.max(0, r), 1); g = Math.min(Math.max(0, g), 1); b = Math.min(Math.max(0, b), 1); return [r * 255, g * 255, b * 255]; }; convert.xyz.lab = function (xyz) { var x = xyz[0]; var y = xyz[1]; var z = xyz[2]; var l; var a; var b; x /= 95.047; y /= 100; z /= 108.883; x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); l = (116 * y) - 16; a = 500 * (x - y); b = 200 * (y - z); return [l, a, b]; }; convert.lab.xyz = function (lab) { var l = lab[0]; var a = lab[1]; var b = lab[2]; var x; var y; var z; y = (l + 16) / 116; x = a / 500 + y; z = y - b / 200; var y2 = Math.pow(y, 3); var x2 = Math.pow(x, 3); var z2 = Math.pow(z, 3); y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; x *= 95.047; y *= 100; z *= 108.883; return [x, y, z]; }; convert.lab.lch = function (lab) { var l = lab[0]; var a = lab[1]; var b = lab[2]; var hr; var h; var c; hr = Math.atan2(b, a); h = hr * 360 / 2 / Math.PI; if (h < 0) { h += 360; } c = Math.sqrt(a * a + b * b); return [l, c, h]; }; convert.lch.lab = function (lch) { var l = lch[0]; var c = lch[1]; var h = lch[2]; var a; var b; var hr; hr = h / 360 * 2 * Math.PI; a = c * Math.cos(hr); b = c * Math.sin(hr); return [l, a, b]; }; convert.rgb.ansi16 = function (args) { var r = args[0]; var g = args[1]; var b = args[2]; var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization value = Math.round(value / 50); if (value === 0) { return 30; } var ansi = 30 + ((Math.round(b / 255) << 2) | (Math.round(g / 255) << 1) | Math.round(r / 255)); if (value === 2) { ansi += 60; } return ansi; }; convert.hsv.ansi16 = function (args) { // optimization here; we already know the value and don't need to get // it converted for us. return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); }; convert.rgb.ansi256 = function (args) { var r = args[0]; var g = args[1]; var b = args[2]; // we use the extended greyscale palette here, with the exception of // black and white. normal palette only has 4 greyscale shades. if (r === g && g === b) { if (r < 8) { return 16; } if (r > 248) { return 231; } return Math.round(((r - 8) / 247) * 24) + 232; } var ansi = 16 + (36 * Math.round(r / 255 * 5)) + (6 * Math.round(g / 255 * 5)) + Math.round(b / 255 * 5); return ansi; }; convert.ansi16.rgb = function (args) { var color = args % 10; // handle greyscale if (color === 0 || color === 7) { if (args > 50) { color += 3.5; } color = color / 10.5 * 255; return [color, color, color]; } var mult = (~~(args > 50) + 1) * 0.5; var r = ((color & 1) * mult) * 255; var g = (((color >> 1) & 1) * mult) * 255; var b = (((color >> 2) & 1) * mult) * 255; return [r, g, b]; }; convert.ansi256.rgb = function (args) { // handle greyscale if (args >= 232) { var c = (args - 232) * 10 + 8; return [c, c, c]; } args -= 16; var rem; var r = Math.floor(args / 36) / 5 * 255; var g = Math.floor((rem = args % 36) / 6) / 5 * 255; var b = (rem % 6) / 5 * 255; return [r, g, b]; }; convert.rgb.hex = function (args) { var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF); var string = integer.toString(16).toUpperCase(); return '000000'.substring(string.length) + string; }; convert.hex.rgb = function (args) { var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); if (!match) { return [0, 0, 0]; } var colorString = match[0]; if (match[0].length === 3) { colorString = colorString.split('').map(function (char) { return char + char; }).join(''); } var integer = parseInt(colorString, 16); var r = (integer >> 16) & 0xFF; var g = (integer >> 8) & 0xFF; var b = integer & 0xFF; return [r, g, b]; }; convert.rgb.hcg = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var max = Math.max(Math.max(r, g), b); var min = Math.min(Math.min(r, g), b); var chroma = (max - min); var grayscale; var hue; if (chroma < 1) { grayscale = min / (1 - chroma); } else { grayscale = 0; } if (chroma <= 0) { hue = 0; } else if (max === r) { hue = ((g - b) / chroma) % 6; } else if (max === g) { hue = 2 + (b - r) / chroma; } else { hue = 4 + (r - g) / chroma + 4; } hue /= 6; hue %= 1; return [hue * 360, chroma * 100, grayscale * 100]; }; convert.hsl.hcg = function (hsl) { var s = hsl[1] / 100; var l = hsl[2] / 100; var c = 1; var f = 0; if (l < 0.5) { c = 2.0 * s * l; } else { c = 2.0 * s * (1.0 - l); } if (c < 1.0) { f = (l - 0.5 * c) / (1.0 - c); } return [hsl[0], c * 100, f * 100]; }; convert.hsv.hcg = function (hsv) { var s = hsv[1] / 100; var v = hsv[2] / 100; var c = s * v; var f = 0; if (c < 1.0) { f = (v - c) / (1 - c); } return [hsv[0], c * 100, f * 100]; }; convert.hcg.rgb = function (hcg) { var h = hcg[0] / 360; var c = hcg[1] / 100; var g = hcg[2] / 100; if (c === 0.0) { return [g * 255, g * 255, g * 255]; } var pure = [0, 0, 0]; var hi = (h % 1) * 6; var v = hi % 1; var w = 1 - v; var mg = 0; switch (Math.floor(hi)) { case 0: pure[0] = 1; pure[1] = v; pure[2] = 0; break; case 1: pure[0] = w; pure[1] = 1; pure[2] = 0; break; case 2: pure[0] = 0; pure[1] = 1; pure[2] = v; break; case 3: pure[0] = 0; pure[1] = w; pure[2] = 1; break; case 4: pure[0] = v; pure[1] = 0; pure[2] = 1; break; default: pure[0] = 1; pure[1] = 0; pure[2] = w; } mg = (1.0 - c) * g; return [ (c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255 ]; }; convert.hcg.hsv = function (hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var v = c + g * (1.0 - c); var f = 0; if (v > 0.0) { f = c / v; } return [hcg[0], f * 100, v * 100]; }; convert.hcg.hsl = function (hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var l = g * (1.0 - c) + 0.5 * c; var s = 0; if (l > 0.0 && l < 0.5) { s = c / (2 * l); } else if (l >= 0.5 && l < 1.0) { s = c / (2 * (1 - l)); } return [hcg[0], s * 100, l * 100]; }; convert.hcg.hwb = function (hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var v = c + g * (1.0 - c); return [hcg[0], (v - c) * 100, (1 - v) * 100]; }; convert.hwb.hcg = function (hwb) { var w = hwb[1] / 100; var b = hwb[2] / 100; var v = 1 - b; var c = v - w; var g = 0; if (c < 1) { g = (v - c) / (1 - c); } return [hwb[0], c * 100, g * 100]; }; convert.apple.rgb = function (apple) { return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; }; convert.rgb.apple = function (rgb) { return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; }; convert.gray.rgb = function (args) { return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; }; convert.gray.hsl = convert.gray.hsv = function (args) { return [0, 0, args[0]]; }; convert.gray.hwb = function (gray) { return [0, 100, gray[0]]; }; convert.gray.cmyk = function (gray) { return [0, 0, 0, gray[0]]; }; convert.gray.lab = function (gray) { return [gray[0], 0, 0]; }; convert.gray.hex = function (gray) { var val = Math.round(gray[0] / 100 * 255) & 0xFF; var integer = (val << 16) + (val << 8) + val; var string = integer.toString(16).toUpperCase(); return '000000'.substring(string.length) + string; }; convert.rgb.gray = function (rgb) { var val = (rgb[0] + rgb[1] + rgb[2]) / 3; return [val / 255 * 100]; }; /***/ }), /* 411 */ /*!***********************************!*\ !*** ../~/color-convert/route.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var conversions = __webpack_require__(/*! ./conversions */ 410); /* this function routes a model to all other models. all functions that are routed have a property `.conversion` attached to the returned synthetic function. This property is an array of strings, each with the steps in between the 'from' and 'to' color models (inclusive). conversions that are not possible simply are not included. */ function buildGraph() { var graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3 var models = Object.keys(conversions); for (var len = models.length, i = 0; i < len; i++) { graph[models[i]] = { // http://jsperf.com/1-vs-infinity // micro-opt, but this is simple. distance: -1, parent: null }; } return graph; } // https://en.wikipedia.org/wiki/Breadth-first_search function deriveBFS(fromModel) { var graph = buildGraph(); var queue = [fromModel]; // unshift -> queue -> pop graph[fromModel].distance = 0; while (queue.length) { var current = queue.pop(); var adjacents = Object.keys(conversions[current]); for (var len = adjacents.length, i = 0; i < len; i++) { var adjacent = adjacents[i]; var node = graph[adjacent]; if (node.distance === -1) { node.distance = graph[current].distance + 1; node.parent = current; queue.unshift(adjacent); } } } return graph; } function link(from, to) { return function (args) { return to(from(args)); }; } function wrapConversion(toModel, graph) { var path = [graph[toModel].parent, toModel]; var fn = conversions[graph[toModel].parent][toModel]; var cur = graph[toModel].parent; while (graph[cur].parent) { path.unshift(graph[cur].parent); fn = link(conversions[graph[cur].parent][cur], fn); cur = graph[cur].parent; } fn.conversion = path; return fn; } module.exports = function (fromModel) { var graph = deriveBFS(fromModel); var conversion = {}; var models = Object.keys(graph); for (var len = models.length, i = 0; i < len; i++) { var toModel = models[i]; var node = graph[toModel]; if (node.parent === null) { // no possible conversion, or this node is the source model. continue; } conversion[toModel] = wrapConversion(toModel, graph); } return conversion; }; /***/ }), /* 412 */ /*!**************************************!*\ !*** ./styled/ColorPicker.styled.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Container = undefined; var _templateObject = _taggedTemplateLiteral(['\n ', ' & .chrome-picker {\n font-family: unset !important;\n box-shadow: none !important;\n ', ';\n }\n\n & .chrome-picker svg {\n background: unset !important;\n }\n\n & .chrome-picker svg:hover path {\n fill: ', ';\n }\n\n ', ';\n'], ['\n ', ' & .chrome-picker {\n font-family: unset !important;\n box-shadow: none !important;\n ', ';\n }\n\n & .chrome-picker svg {\n background: unset !important;\n }\n\n & .chrome-picker svg:hover path {\n fill: ', ';\n }\n\n ', ';\n']), _templateObject2 = _taggedTemplateLiteral(['\n opacity: ', ';\n cursor: not-allowed !important;\n & .chrome-picker {\n pointer-events: none !important;\n }\n '], ['\n opacity: ', ';\n cursor: not-allowed !important;\n & .chrome-picker {\n pointer-events: none !important;\n }\n ']), _templateObject3 = _taggedTemplateLiteral(['\n width: ', 'px !important;\n '], ['\n width: ', 'px !important;\n ']), _templateObject4 = _taggedTemplateLiteral(['\n & .chrome-picker .hue-horizontal > div > div,\n .chrome-picker\n > div:nth-child(2)\n > div:nth-child(1)\n > div:nth-child(2)\n > div:nth-child(2)\n > div\n > div:nth-child(3)\n > div\n > div {\n box-shadow: none !important;\n background-color: #fff;\n border-radius: 100% !important;\n ', ';\n }\n'], ['\n & .chrome-picker .hue-horizontal > div > div,\n .chrome-picker\n > div:nth-child(2)\n > div:nth-child(1)\n > div:nth-child(2)\n > div:nth-child(2)\n > div\n > div:nth-child(3)\n > div\n > div {\n box-shadow: none !important;\n background-color: #fff;\n border-radius: 100% !important;\n ', ';\n }\n']), _templateObject5 = _taggedTemplateLiteral(['\n border: 1px solid ', ' !important;\n '], ['\n border: 1px solid ', ' !important;\n ']), _templateObject6 = _taggedTemplateLiteral(['\n border-radius: 3px !important;\n\n ', ' ', ';\n'], ['\n border-radius: 3px !important;\n\n ', ' ', ';\n']), _templateObject7 = _taggedTemplateLiteral(['\n border: 1px solid ', ';\n '], ['\n border: 1px solid ', ';\n ']), _templateObject8 = _taggedTemplateLiteral(['\n & .chrome-picker .hue-horizontal > div > div,\n .chrome-picker\n > div:nth-child(2)\n > div:nth-child(1)\n > div:nth-child(2)\n > div:nth-child(2)\n > div\n > div:nth-child(3)\n > div\n > div {\n border-radius: 100% !important;\n border: none !important;\n background: #101010 !important;\n background-image: linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.3) -50%,\n rgba(0, 0, 0, 0.7) 100%\n ) !important;\n transition: all 0.3s ease-in !important;\n ', ';\n }\n'], ['\n & .chrome-picker .hue-horizontal > div > div,\n .chrome-picker\n > div:nth-child(2)\n > div:nth-child(1)\n > div:nth-child(2)\n > div:nth-child(2)\n > div\n > div:nth-child(3)\n > div\n > div {\n border-radius: 100% !important;\n border: none !important;\n background: #101010 !important;\n background-image: linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.3) -50%,\n rgba(0, 0, 0, 0.7) 100%\n ) !important;\n transition: all 0.3s ease-in !important;\n ', ';\n }\n']), _templateObject9 = _taggedTemplateLiteral(['\n box-shadow: inset 0 0 1px 0 rgba(52, 52, 52, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.2),\n 0 0 12px 4px ', ' !important;\n '], ['\n box-shadow: inset 0 0 1px 0 rgba(52, 52, 52, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.2),\n 0 0 12px 4px ', ' !important;\n ']), _templateObject10 = _taggedTemplateLiteral(['\n .chrome-picker .flexbox-fix div:nth-child(2) > div:nth-child(2) > div {\n background: #fff !important;\n }\n'], ['\n .chrome-picker .flexbox-fix div:nth-child(2) > div:nth-child(2) > div {\n background: #fff !important;\n }\n']), _templateObject11 = _taggedTemplateLiteral(['\n & .chrome-picker input {\n font-family: unset !important;\n color: #fff !important;\n border-radius: 0px !important;\n background-color: #22272a !important;\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.05) 0%,\n rgba(0, 0, 0, 0.5) 100%\n ) !important;\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1) !important;\n }\n\n & .chrome-picker input:focus {\n outline: 0 !important;\n border: none !important;\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.2) 0%,\n rgba(0, 0, 0, 0.4) 100%\n ) !important;\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.6), inset 0 0 4px 0 rgba(0, 0, 0, 0.6),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.6), 1px 1px 0px 0px rgba(255, 255, 255, 0.1) !important;\n }\n'], ['\n & .chrome-picker input {\n font-family: unset !important;\n color: #fff !important;\n border-radius: 0px !important;\n background-color: #22272a !important;\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.05) 0%,\n rgba(0, 0, 0, 0.5) 100%\n ) !important;\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1) !important;\n }\n\n & .chrome-picker input:focus {\n outline: 0 !important;\n border: none !important;\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.2) 0%,\n rgba(0, 0, 0, 0.4) 100%\n ) !important;\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.6), inset 0 0 4px 0 rgba(0, 0, 0, 0.6),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.6), 1px 1px 0px 0px rgba(255, 255, 255, 0.1) !important;\n }\n']), _templateObject12 = _taggedTemplateLiteral(['\n box-shadow: 0px 0px 8px 2px rgba(100,100,100,0.075),\n 0px 0px 32px 2px rgba(255,255,255,0.05),\n 1px 1px 0px 0px rgba(25,25,25,0.6),\n -1px -1px 0px 0px rgba(255,255,255,0.2) !important;\n\n & .chrome-picker > div:first-child {\n border-radius: 0 !important;\n }\n\n & .chrome-picker > div:nth-child(2) {\n background: #0a0a0a !important;\n border-top: 1px solid rgba(255,255,255,0.075);\n }\n\n ', '\n ', '\n ', '\n'], ['\n box-shadow: 0px 0px 8px 2px rgba(100,100,100,0.075),\n 0px 0px 32px 2px rgba(255,255,255,0.05),\n 1px 1px 0px 0px rgba(25,25,25,0.6),\n -1px -1px 0px 0px rgba(255,255,255,0.2) !important;\n\n & .chrome-picker > div:first-child {\n border-radius: 0 !important;\n }\n\n & .chrome-picker > div:nth-child(2) {\n background: #0a0a0a !important;\n border-top: 1px solid rgba(255,255,255,0.075);\n }\n\n ', '\n ', '\n ', '\n']); var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; var _constants = __webpack_require__(/*! ./constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = exports.Container = styled.div(_templateObject, function (_ref) { var disabled = _ref.disabled, theme = _ref.theme; return disabled && css(_templateObject2, theme.dark ? 1 : 0.65); }, function (_ref2) { var size = _ref2.size; return css(_templateObject3, size); }, function (_ref3) { var theme = _ref3.theme, color = _ref3.color; return color || theme.primary; }, function (_ref4) { var theme = _ref4.theme; return theme.dark ? darkContainer : lightContainer; }); var lightKnobs = css(_templateObject4, function (_ref5) { var theme = _ref5.theme; return css(_templateObject5, theme.detail); }); var lightContainer = css(_templateObject6, lightKnobs, function (_ref6) { var theme = _ref6.theme; return css(_templateObject7, theme.detail); }); var darkKnobs = css(_templateObject8, function (_ref7) { var glow = _ref7.glow; return css(_templateObject9, glow); }); var darkAlpha = css(_templateObject10); var darkInput = css(_templateObject11); var darkContainer = css(_templateObject12, darkKnobs, darkInput, darkAlpha); Container.defaultProps = { theme: light }; exports.default = Container; /***/ }), /* 413 */ /*!***********************************!*\ !*** ./components/Gauge.react.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var withTheme = _styledComponents.withTheme; var _GaugeSvg = __webpack_require__(/*! ../helpers/GaugeSvg.react */ 414); var GaugeSVG = _interopRequireDefault(_GaugeSvg).default; var _Gauge = __webpack_require__(/*! ../styled/Gauge.styled */ 421); var Container = _interopRequireDefault(_Gauge).default; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; var _CurrentValue = __webpack_require__(/*! ../styled/CurrentValue.styled */ 422); var CurrentValue = _interopRequireDefault(_CurrentValue).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; var _util = __webpack_require__(/*! ../helpers/util */ 416); var sanitizeRangeValue = _util.sanitizeRangeValue; var computeProgress = _util.computeProgress; var _logarithm = __webpack_require__(/*! ../helpers/logarithm */ 423); var log = _interopRequireDefault(_logarithm).default; var _scale = __webpack_require__(/*! ../helpers/scale */ 424); var generateScale = _interopRequireDefault(_scale).default; var _colorRanges = __webpack_require__(/*! ../helpers/colorRanges */ 418); var getColorValue = _colorRanges.getColorValue; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * A Gauge component that points to * a value between some range. */ var Gauge = function (_React$Component) { _inherits(Gauge, _React$Component); function Gauge() { _classCallCheck(this, Gauge); return _possibleConstructorReturn(this, (Gauge.__proto__ || Object.getPrototypeOf(Gauge)).apply(this, arguments)); } _createClass(Gauge, [{ key: 'componentDidMount', value: function componentDidMount() { // eslint-disable-next-line __webpack_require__(/*! conic-gradient */ 420); } }, { key: 'render', value: function render() { var _props = this.props, color = _props.color, max = _props.max, min = _props.min, showCurrentValue = _props.showCurrentValue, units = _props.units, logarithmic = _props.logarithmic, base = _props.base, id = _props.id, className = _props.className, style = _props.style; var colorValue = getColorValue(color); var rawValue = this.props.value != null ? this.props.value : min; var dirtyValue = logarithmic ? log.compute(rawValue) : rawValue; var value = sanitizeRangeValue({ min: min, max: max, value: dirtyValue }); var formatter = logarithmic ? log.generateLogFormatter({ base: base, isSVG: true }) : null; var scale = generateScale(_extends({}, this.props, { formatter: formatter })); var progress = computeProgress({ min: min, max: max, value: value, progressionTarget: 1 }); var currentValue = React.createElement( CurrentValue, { valueColor: colorValue, units: units, css: 'transform: translateY(-150%); top: 0;' }, logarithmic ? log.formatValue(value, base) : value.toFixed(1) ); return React.createElement( 'div', { id: id, className: className, style: style }, React.createElement( LabelContainer, _extends({}, this.props, { labelCSS: this.props.labelPosition === 'top' ? null : 'transform: translateY(-80px);' }), React.createElement( Container, { color: colorValue }, React.createElement(GaugeSVG, _extends({}, _extends({}, this.props, { scale: scale }), { progress: progress })), showCurrentValue && currentValue ) ) ); } }]); return Gauge; }(React.Component); Gauge.defaultProps = { min: 0, max: 10, base: 10, theme: light, labelPosition: 'top' }; Gauge.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The value of gauge. If logarithmic, the displayed * value will be the logarithm of the inputted value. */ value: PropTypes.number, /** * The size (diameter) of the gauge in pixels */ size: PropTypes.number, /** * The minimum value of the gauge. If logarithmic, * represents the minimum exponent. */ min: PropTypes.number, /** * The maximum value of the gauge. If logarithmic, * represents the maximum exponent. */ max: PropTypes.number, /** * Base to be used in logarithmic scale. */ base: PropTypes.number, /** * If set to true, a logarithmic scale will be * used. */ logarithmic: PropTypes.bool, /** * If true, the current value of the gauge * will be displayed */ showCurrentValue: PropTypes.bool, /** * Label for the current value */ units: PropTypes.string, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: PropTypes.shape({ /** * Value to start the scale from. Defaults * to min. */ start: PropTypes.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: PropTypes.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: PropTypes.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: PropTypes.oneOfType([ /** * Label for the mark */ PropTypes.number, /** * Style object with label */ PropTypes.shape({ style: PropTypes.string, label: PropTypes.string })]) }), /** * Color configuration for the gauge's track. */ color: PropTypes.oneOfType([ /** * Color used for gauge's track/indicator */ PropTypes.string, /** * Color ranges configuration. */ PropTypes.shape({ /** * Color used for current value text and other minor accents */ default: PropTypes.string, /** * Display ranges as a gradient between given colors. */ gradient: PropTypes.bool, /** * Define multiple color ranges on the gauge's track. * The key determines the color of the range and * the value is the start,end of the range itself. * Ranges must be contiguous along the entirety * of the gauge's range of values. */ ranges: PropTypes.shape({ color: PropTypes.arrayOf(PropTypes.number) }) })]), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object }; exports.default = withTheme(Gauge); /***/ }), /* 414 */ /*!***********************************!*\ !*** ./helpers/GaugeSvg.react.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; var _DarkGradient = __webpack_require__(/*! ../styled/shared/DarkGradient */ 415); var darkGradientDefs = _interopRequireDefault(_DarkGradient).default; var _util = __webpack_require__(/*! ../helpers/util */ 416); var getRandomInt = _util.getRandomInt; var _TrackSvg = __webpack_require__(/*! ./shared/TrackSvg */ 417); var drawScale = _TrackSvg.drawScale; var colorRangesTrack = _TrackSvg.colorRangesTrack; var lightTrack = _TrackSvg.lightTrack; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var lightNeedleKnob = function lightNeedleKnob(_ref) { var CX = _ref.CX, CY = _ref.CY; return React.createElement('circle', { className: 'needle-knob', cx: CX, cy: CY, r: '14', fill: '#fff' }); }; var darkNeedleKnob = function darkNeedleKnob(_ref2) { var CX = _ref2.CX, CY = _ref2.CY; var id = getRandomInt(); return React.createElement( 'g', null, React.createElement( 'defs', null, React.createElement('circle', { id: 'needle-knob-edge-' + id, strokeWidth: '2px', fill: 'none', cx: CX, cy: CY, r: '14' }), React.createElement('circle', { id: 'needle-knob-' + id, className: 'needle-knob', cx: CX, cy: CY, r: '14' }) ), React.createElement('use', { fill: '#141414', xlinkHref: '#needle-knob-' + id }), React.createElement('use', { fill: 'url(#l)', style: { mixBlendMode: 'overlay' }, xlinkHref: '#needle-knob-' + id }), React.createElement('use', { fill: 'url(#m)', style: { mixBlendMode: 'overlay' }, xlinkHref: '#needle-knob-' + id }), React.createElement('use', { fill: '#141414', filter: 'url(#n)', xlinkHref: '#needle-knob-' + id }), React.createElement('use', { stroke: '#000000', xlinkHref: '#needle-knob-edge-' + id }), React.createElement('use', { stroke: 'url(#p)', style: { mixBlendMode: 'overlay' }, xlinkHref: '#needle-knob-edge-' + id }), React.createElement('use', { stroke: 'url(#q)', strokeOpacity: '.4', xlinkHref: '#needle-knob-edge-' + id }) ); }; var darkTrack = function darkTrack(props, dimensions) { var progress = props.progress; var CX = dimensions.CX, CY = dimensions.CY, GAUGE_RAD = dimensions.GAUGE_RAD, CIRCLE_CIR = dimensions.CIRCLE_CIR, GAP_ARC_LENGTH = dimensions.GAP_ARC_LENGTH, TRACK_ARC_LENGTH = dimensions.TRACK_ARC_LENGTH; var id = getRandomInt(); var colorValue = props.color && (typeof props.color === 'string' ? props.color : props.color.default); return React.createElement( 'g', null, React.createElement( 'defs', null, React.createElement('circle', { id: 'gauge-track-' + id, className: 'track', cx: CX, cy: CY, r: GAUGE_RAD, fill: 'none', strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH, strokeWidth: '6', transform: 'rotate(-225 ' + CX + ' ' + CY + ')' }), React.createElement('circle', { id: 'gauge-track-progress-' + id, className: 'track progress', cx: CX, cy: CY, r: GAUGE_RAD, fill: 'none', strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH + (1 - progress) * TRACK_ARC_LENGTH, strokeWidth: '6', transform: 'rotate(-225 ' + CX + ' ' + CY + ')' }) ), React.createElement('use', { stroke: 'black', filter: 'url(#a)', xlinkHref: '#gauge-track-' + id }), props.color && props.color.ranges && React.createElement('use', { stroke: '#15181A', xlinkHref: '#gauge-track-' + id }), React.createElement('use', { stroke: 'url(#c)', style: { mixBlendMode: 'overlay' }, xlinkHref: '#gauge-track-' + id }), React.createElement('use', { stroke: 'black', filter: 'url(#d)', xlinkHref: '#gauge-track-' + id }), React.createElement('use', { stroke: 'black', filter: 'url(#e)', xlinkHref: '#gauge-track-progress-' + id }), React.createElement('use', { stroke: colorValue || '#ABE2FB', xlinkHref: '#gauge-track-progress-' + id }), React.createElement('use', { stroke: 'url(#g)', style: { mixBlendMode: 'overlay' }, xlinkHref: '#gauge-track-progress-' + id }), props.color && props.color.ranges && colorRangesTrack(props, dimensions) ); }; var needle = function needle(needleRotation, _ref3) { var CX = _ref3.CX, CY = _ref3.CY, SCALE_RAD = _ref3.SCALE_RAD; return React.createElement('line', { className: 'needle', x1: CX, y1: CY, x2: CX + SCALE_RAD, y2: CY, transform: 'rotate(' + (needleRotation || 0) + ' ' + CX + ' ' + CY + ')', strokeLinecap: 'round' }); }; var defs = React.createElement( 'defs', null, darkGradientDefs ); var GaugeSvg = function GaugeSvg(props) { var progress = props.progress, min = props.min, max = props.max, step = props.step, scale = props.scale; var dimensions = calcDimensions(props); var scaleItems = drawScale({ min: min, max: max, step: step, scale: scale }, dimensions); var knob = props.theme.dark ? darkNeedleKnob(dimensions) : lightNeedleKnob(dimensions); var track = props.theme.dark ? darkTrack(props, dimensions) : lightTrack(props, dimensions); var needleRotation = 270 * progress - 225; return React.createElement( 'svg', { width: dimensions.SVG_WIDTH, height: dimensions.SVG_WIDTH, viewBox: '0 0 ' + dimensions.SVG_WIDTH + ' ' + dimensions.SVG_WIDTH }, props.theme.dark && defs, React.createElement( 'g', { className: 'scale' }, scaleItems ), needle(needleRotation, dimensions), knob, track ); }; GaugeSvg.defaultProps = { theme: light, size: 208 }; exports.default = GaugeSvg; // private helpers function calcDimensions(_ref4) { var size = _ref4.size; var OFFSET = 8; var d = {}; d.SVG_WIDTH = size + 32; d.CY = ~~(d.SVG_WIDTH / 2); d.CX = ~~(d.SVG_WIDTH / 2); d.GAUGE_RAD = size / 2; d.SCALE_RAD = d.GAUGE_RAD - OFFSET; d.CIRCLE_CIR = 2 * Math.PI * d.GAUGE_RAD; d.GAP_ARC_LENGTH = 90 / 360 * (2 * Math.PI * d.GAUGE_RAD); d.TRACK_ARC_LENGTH = d.CIRCLE_CIR - d.GAP_ARC_LENGTH; d.SCALE_TICK_OUTER_RAD = d.SCALE_RAD; d.SCALE_TICK_INNER_RAD = d.SCALE_TICK_OUTER_RAD - 6; d.SCALE_TEXT_RAD = d.SCALE_TICK_INNER_RAD - 8; d.IS_GAUGE = true; return d; } /***/ }), /* 415 */ /*!***************************************!*\ !*** ./styled/shared/DarkGradient.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.darkColon = exports.darkDecimal = exports.DARK_SEGMENTS = exports.darkLEDDefs = exports.UnstyledDarkHandle = undefined; var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var UnstyledDarkHandle = exports.UnstyledDarkHandle = function UnstyledDarkHandle(_ref) { var className = _ref.className; return React.createElement( "svg", { className: className, xmlns: "http://www.w3.org/2000/svg", width: "10", height: "22" }, React.createElement( "g", { fill: "none" }, React.createElement( "g", { filter: "url(#filter0_di)" }, React.createElement("path", { className: "dark-handle-custom-fill", fill: "#101010", d: "M4.886 1H3.114a2 2 0 0 0-1.997 2.11l.778 14A2 2 0 0 0 3.892 19h.216a2 2 0 0 0 1.997-1.89l.778-14A2 2 0 0 0 4.886 1z" }), React.createElement("path", { style: { mixBlendMode: 'overlay' }, fill: "url(#paint0_linear)", d: "M3.886 0H2.114A2 2 0 0 0 .117 2.11l.778 14A2 2 0 0 0 2.892 18h.216a2 2 0 0 0 1.997-1.89l.778-14A2 2 0 0 0 3.886 0z", transform: "translate(1 1)" }), React.createElement("path", { style: { mixBlendMode: 'overlay' }, fill: "url(#paint1_radial)", d: "M3.886 0H2.114A2 2 0 0 0 .117 2.11l.778 14A2 2 0 0 0 2.892 18h.216a2 2 0 0 0 1.997-1.89l.778-14A2 2 0 0 0 3.886 0z", transform: "translate(1 1)" }) ), React.createElement( "g", { fillRule: "evenodd", clipRule: "evenodd" }, React.createElement("path", { className: "dark-handle-custom-fill", fill: "#101010", d: "M3.114 1h1.772a2 2 0 0 1 1.997 2.11l-.778 14A2 2 0 0 1 4.108 19h-.216a2 2 0 0 1-1.997-1.89l-.778-14A2 2 0 0 1 3.114 1zm.333 1h1.105A2 2 0 0 1 6.55 4.11l-.673 12.115a1.88 1.88 0 0 1-3.752 0L1.45 4.11A2 2 0 0 1 3.447 2z" }), React.createElement("path", { style: { mixBlendMode: 'overlay' }, fill: "url(#paint2_linear)", d: "M2 0h1.772a2 2 0 0 1 1.997 2.11l-.778 14A2 2 0 0 1 2.994 18h-.216A2 2 0 0 1 .78 16.11l-.778-14A2 2 0 0 1 2 0zm.333 1h1.105a2 2 0 0 1 1.997 2.11l-.673 12.115a1.88 1.88 0 0 1-3.753 0L.337 3.11A2 2 0 0 1 2.333 1z", transform: "translate(1.114 1)" }), React.createElement("path", { fill: "url(#paint3_radial)", fillOpacity: ".4", d: "M2 0h1.772a2 2 0 0 1 1.997 2.11l-.778 14A2 2 0 0 1 2.994 18h-.216A2 2 0 0 1 .78 16.11l-.778-14A2 2 0 0 1 2 0zm.333 1h1.105a2 2 0 0 1 1.997 2.11l-.673 12.115a1.88 1.88 0 0 1-3.753 0L.337 3.11A2 2 0 0 1 2.333 1z", transform: "translate(1.114 1)" }) ) ), React.createElement( "defs", null, React.createElement( "filter", { id: "filter0_di", width: "9.772", height: "22", x: ".114", y: "0", colorInterpolationFilters: "sRGB", filterUnits: "userSpaceOnUse" }, React.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), React.createElement("feColorMatrix", { "in": "SourceAlpha", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0" }), React.createElement("feOffset", { dx: "1", dy: "1" }), React.createElement("feGaussianBlur", { stdDeviation: "1" }), React.createElement("feColorMatrix", { values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" }), React.createElement("feBlend", { in2: "BackgroundImageFix", result: "effect1_dropShadow" }), React.createElement("feBlend", { "in": "SourceGraphic", in2: "effect1_dropShadow", result: "shape" }), React.createElement("feColorMatrix", { "in": "SourceAlpha", result: "hardAlpha", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0" }), React.createElement("feOffset", { dx: ".25", dy: ".25" }), React.createElement("feGaussianBlur", { stdDeviation: ".5" }), React.createElement("feComposite", { in2: "hardAlpha", k2: "-1", k3: "1", operator: "arithmetic" }), React.createElement("feColorMatrix", { values: "0 0 0 0 0.204294 0 0 0 0 0.204294 0 0 0 0 0.204294 0 0 0 0.395267 0" }), React.createElement("feBlend", { in2: "shape", result: "effect2_innerShadow" }) ), React.createElement( "linearGradient", { id: "paint0_linear", x2: "1", gradientTransform: "matrix(4.19709 12.8041 -4.26804 12.5913 .947 2.739)", gradientUnits: "userSpaceOnUse" }, React.createElement("stop", { stopColor: "#fff", stopOpacity: ".55" }), React.createElement("stop", { offset: "1", stopOpacity: ".01" }) ), React.createElement( "radialGradient", { id: "paint1_radial", cx: ".5", cy: ".5", r: ".5", gradientTransform: "matrix(8.55956 25.5096 -8.50319 25.6787 .868 -23.103)", gradientUnits: "userSpaceOnUse" }, React.createElement("stop", { stopColor: "#fff", stopOpacity: ".5" }), React.createElement("stop", { offset: "1", stopOpacity: ".5" }) ), React.createElement( "linearGradient", { id: "paint2_linear", x2: "1", gradientTransform: "matrix(0 18 -5.77167 0 2.886 0)", gradientUnits: "userSpaceOnUse" }, React.createElement("stop", { stopColor: "#fff", stopOpacity: ".5" }), React.createElement("stop", { offset: "1", stopOpacity: ".01" }) ), React.createElement( "radialGradient", { id: "paint3_radial", cx: ".5", cy: ".5", r: ".5", gradientTransform: "matrix(0 36 -11.5433 0 8.658 -18)", gradientUnits: "userSpaceOnUse" }, React.createElement("stop", { stopColor: "#fff", stopOpacity: ".5" }), React.createElement("stop", { offset: "1", stopOpacity: ".5" }) ) ) ); }; var darkGradientDefs = React.createElement( "defs", null, React.createElement( "linearGradient", { id: "l", x1: "15.78%", x2: "85.732%", y1: "15.214%", y2: "86.348%" }, React.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".55" }), React.createElement("stop", { offset: "100%", stopColor: "#000000", stopOpacity: "0" }) ), React.createElement( "radialGradient", { id: "m", cx: "14.944%", cy: "13.839%", r: "100.544%", fx: "14.944%", fy: "13.839%" }, React.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".5" }), React.createElement("stop", { offset: "100%", stopColor: "#000000", stopOpacity: ".5" }) ), React.createElement( "filter", { id: "n", width: "101.7%", height: "101.7%", x: "-.8%", y: "-.8%", filterUnits: "objectBoundingBox" }, React.createElement("feGaussianBlur", { "in": "SourceAlpha", result: "shadowBlurInner1", stdDeviation: ".5" }), React.createElement("feOffset", { dx: ".25", dy: ".25", "in": "shadowBlurInner1", result: "shadowOffsetInner1" }), React.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), React.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 0.204294218 0 0 0 0 0.204294218 0 0 0 0 0.204294218 0 0 0 0.39526721 0" }) ), React.createElement( "filter", { id: "r", width: "550%", height: "218.8%", x: "-225%", y: "-56.2%", filterUnits: "objectBoundingBox" }, React.createElement("feOffset", { dy: ".5", "in": "SourceAlpha", result: "shadowOffsetOuter1" }), React.createElement("feColorMatrix", { "in": "shadowOffsetOuter1", result: "shadowMatrixOuter1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.46 0" }), React.createElement("feOffset", { "in": "SourceAlpha", result: "shadowOffsetOuter2" }), React.createElement("feGaussianBlur", { "in": "shadowOffsetOuter2", result: "shadowBlurOuter2", stdDeviation: "1.5" }), React.createElement("feColorMatrix", { "in": "shadowBlurOuter2", result: "shadowMatrixOuter2", values: "0 0 0 0 0.529411765 0 0 0 0 0.807843137 0 0 0 0 0.921568627 0 0 0 0.4512851 0" }), React.createElement( "feMerge", null, React.createElement("feMergeNode", { "in": "shadowMatrixOuter1" }), React.createElement("feMergeNode", { "in": "shadowMatrixOuter2" }) ) ), React.createElement( "filter", { id: "t", width: "425%", height: "187.5%", x: "-162.5%", y: "-40.6%", filterUnits: "objectBoundingBox" }, React.createElement("feOffset", { dy: ".5", "in": "SourceAlpha", result: "shadowOffsetInner1" }), React.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), React.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0" }) ), React.createElement( "linearGradient", { id: "p", x1: "0%", x2: "0%", y1: "100%", y2: "100%" }, React.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".5" }), React.createElement("stop", { offset: "100%", stopColor: "#000000", stopOpacity: "0" }) ), React.createElement( "radialGradient", { id: "q", cy: "0%", r: "100%", fx: "0%", fy: "0%" }, React.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".5" }), React.createElement("stop", { offset: "100%", stopColor: "#000000", stopOpacity: ".5" }) ), React.createElement( "filter", { id: "a", width: "100.4%", height: "100.5%", x: "-.1%", y: "-.1%", filterUnits: "objectBoundingBox" }, React.createElement("feMorphology", { "in": "SourceAlpha", operator: "dilate", radius: ".05", result: "shadowSpreadOuter1" }), React.createElement("feOffset", { dx: ".1", dy: ".1", "in": "shadowSpreadOuter1", result: "shadowOffsetOuter1" }), React.createElement("feColorMatrix", { "in": "shadowOffsetOuter1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.11291327 0" }) ), React.createElement( "filter", { id: "d", width: "102.5%", height: "102.8%", x: "-1.1%", y: "-1.3%", filterUnits: "objectBoundingBox" }, React.createElement("feGaussianBlur", { "in": "SourceAlpha", result: "shadowBlurInner1", stdDeviation: ".25" }), React.createElement("feOffset", { "in": "shadowBlurInner1", result: "shadowOffsetInner1" }), React.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), React.createElement("feColorMatrix", { "in": "shadowInnerInner1", result: "shadowMatrixInner1", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" }), React.createElement("feGaussianBlur", { "in": "SourceAlpha", result: "shadowBlurInner2", stdDeviation: "1" }), React.createElement("feOffset", { "in": "shadowBlurInner2", result: "shadowOffsetInner2" }), React.createElement("feComposite", { "in": "shadowOffsetInner2", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner2" }), React.createElement("feColorMatrix", { "in": "shadowInnerInner2", result: "shadowMatrixInner2", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0" }), React.createElement( "feMerge", null, React.createElement("feMergeNode", { "in": "shadowMatrixInner1" }), React.createElement("feMergeNode", { "in": "shadowMatrixInner2" }) ) ), React.createElement( "linearGradient", { id: "c", x1: "50%", x2: "50%", y1: "0%", y2: "100%" }, React.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".5" }), React.createElement("stop", { offset: "100%", stopColor: "#323a3e", stopOpacity: ".2" }) ), React.createElement( "filter", { id: "e", width: "171%", height: "117.7%", x: "-35.5%", y: "-8.8%", filterUnits: "objectBoundingBox" }, React.createElement("feOffset", { "in": "SourceAlpha", result: "shadowOffsetOuter1" }), React.createElement("feGaussianBlur", { "in": "shadowOffsetOuter1", result: "shadowBlurOuter1", stdDeviation: "2" }), React.createElement("feColorMatrix", { "in": "shadowBlurOuter1", values: "0 0 0 0 0.529411765 0 0 0 0 0.807843137 0 0 0 0 0.921568627 0 0 0 0.5 0" }) ), React.createElement( "radialGradient", { id: "g", cx: "90.826%", cy: "1.233%", r: "154.848%", fx: "90.826%", fy: "1.233%", gradientTransform: "scale(1 .24903) rotate(72.947 .883 .03)" }, React.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".7" }), React.createElement("stop", { offset: "100%", stopColor: "#000000" }) ) ); var darkLEDDefs = exports.darkLEDDefs = React.createElement( "defs", null, React.createElement( "filter", { id: "darkLED-a", width: "111.8%", height: "107.8%", x: "-2.9%", y: "-2%", filterUnits: "objectBoundingBox" }, React.createElement("feOffset", { dx: "1", dy: "1", "in": "SourceAlpha", result: "shadowOffsetOuter1" }), React.createElement("feGaussianBlur", { "in": "shadowOffsetOuter1", result: "shadowBlurOuter1", stdDeviation: ".5" }), React.createElement("feColorMatrix", { "in": "shadowBlurOuter1", result: "shadowMatrixOuter1", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" }), React.createElement( "feMerge", null, React.createElement("feMergeNode", { "in": "shadowMatrixOuter1" }), React.createElement("feMergeNode", { "in": "SourceGraphic" }) ) ), React.createElement( "radialGradient", { id: "darkLED-c", cx: "0%", cy: "0%", r: "141.421%", fx: "0%", fy: "0%", gradientTransform: "matrix(.22147 .22147 -.0503 .97517 0 0)" }, React.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), React.createElement("stop", { offset: "100%", stopOpacity: ".6" }) ), React.createElement( "linearGradient", { id: "darkLED-d", x1: "0%", y1: "0%", y2: "100%" }, React.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), React.createElement("stop", { offset: "100%", stopOpacity: "0" }) ), React.createElement("path", { id: "darkLED-b", d: "M5.71 5.181L3.308 2.778 5.71.375h16.357l2.403 2.403-2.403 2.403z" }), React.createElement( "filter", { id: "darkLED-e", width: "101.2%", height: "105.2%", x: "-.6%", y: "-2.6%", filterUnits: "objectBoundingBox" }, React.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), React.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), React.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" }) ), React.createElement( "radialGradient", { id: "darkLED-g", cx: "0%", cy: "0%", r: "141.421%", fx: "0%", fy: "0%", gradientTransform: "matrix(.22147 .22147 -.97517 .0503 0 0)" }, React.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), React.createElement("stop", { offset: "100%", stopOpacity: ".6" }) ), React.createElement("path", { id: "darkLED-f", d: "M22.597 5.71L25 3.308l2.403 2.402v16.357L25 24.47l-2.403-2.403z" }), React.createElement( "filter", { id: "darkLED-h", width: "105.2%", height: "101.2%", x: "-2.6%", y: "-.6%", filterUnits: "objectBoundingBox" }, React.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), React.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), React.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" }) ), React.createElement( "radialGradient", { id: "darkLED-j", cx: "0%", cy: "0%", r: "141.421%", fx: "0%", fy: "0%", gradientTransform: "scale(1 .22711) rotate(77.204)" }, React.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), React.createElement("stop", { offset: "100%", stopOpacity: ".6" }) ), React.createElement("path", { id: "darkLED-i", d: "M22.597 27.933L25 25.53l2.403 2.403v16.356L25 46.692l-2.403-2.403z" }), React.createElement( "filter", { id: "darkLED-k", width: "105.2%", height: "101.2%", x: "-2.6%", y: "-.6%", filterUnits: "objectBoundingBox" }, React.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), React.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), React.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" }) ), React.createElement("path", { id: "darkLED-l", d: "M22.067 44.819l2.403 2.403-2.403 2.403H5.71l-2.402-2.403 2.402-2.403z" }), React.createElement( "filter", { id: "darkLED-m", width: "101.2%", height: "105.2%", x: "-.6%", y: "-2.6%", filterUnits: "objectBoundingBox" }, React.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), React.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), React.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" }) ), React.createElement("path", { id: "darkLED-n", d: "M5.181 44.289l-2.403 2.403-2.403-2.403V27.933l2.403-2.403 2.403 2.403z" }), React.createElement( "filter", { id: "darkLED-o", width: "105.2%", height: "101.2%", x: "-2.6%", y: "-.6%", filterUnits: "objectBoundingBox" }, React.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), React.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), React.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" }) ), React.createElement("path", { id: "darkLED-p", d: "M5.181 22.067L2.778 24.47.375 22.067V5.71l2.403-2.402L5.181 5.71z" }), React.createElement( "filter", { id: "darkLED-q", width: "105.2%", height: "101.2%", x: "-2.6%", y: "-.6%", filterUnits: "objectBoundingBox" }, React.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), React.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), React.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" }) ), React.createElement("path", { id: "darkLED-r", d: "M5.71 27.403L3.308 25l2.402-2.403h16.357L24.47 25l-2.403 2.403z" }), React.createElement( "filter", { id: "darkLED-s", width: "101.2%", height: "105.2%", x: "-.6%", y: "-2.6%", filterUnits: "objectBoundingBox" }, React.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), React.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), React.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" }) ), React.createElement( "radialGradient", { id: "darkLED-u", cx: "0%", cy: "0%", r: "141.421%", fx: "0%", fy: "0%" }, React.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), React.createElement("stop", { offset: "100%", stopOpacity: ".6" }) ), React.createElement("path", { id: "darkLED-t", d: "M31 50.625a2.625 2.625 0 1 1 0-5.25 2.625 2.625 0 0 1 0 5.25z" }), React.createElement("path", { id: "darkLED-y", d: "M35,40.625 C33.5502525,40.625 32.375,39.4497475 32.375,38 C32.375,36.5502525 33.5502525,35.375 35,35.375 C36.4497475,35.375 37.625,36.5502525 37.625,38 C37.625,39.4497475 36.4497475,40.625 35,40.625 Z" }), React.createElement( "filter", { id: "darkLED-v", width: "104.8%", height: "104.8%", x: "-2.4%", y: "-2.4%", filterUnits: "objectBoundingBox" }, React.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), React.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), React.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" }) ), React.createElement("path", { id: "darkLED-w", d: "M35,13.625 C33.5502525,13.625 32.375,12.4497475 32.375,11 C32.375,9.55025253 33.5502525,8.375 35,8.375 C36.4497475,8.375 37.625,9.55025253 37.625,11 C37.625,12.4497475 36.4497475,13.625 35,13.625 Z" }), React.createElement( "filter", { id: "darkLED-x", width: "104.8%", height: "104.8%", x: "-2.4%", y: "-2.4%", filterUnits: "objectBoundingBox" }, React.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), React.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), React.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" }) ) ); var A = React.createElement( "g", null, React.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-b" }), React.createElement("use", { fill: "url(#darkLED-c)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-b" }), React.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-b" }), React.createElement("use", { fill: "#000", filter: "url(#darkLED-e)", xlinkHref: "#darkLED-b" }) ); var B = React.createElement( "g", null, React.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-f" }), React.createElement("use", { fill: "url(#darkLED-g)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-f" }), React.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-f" }), React.createElement("use", { fill: "#000", filter: "url(#darkLED-h)", xlinkHref: "#darkLED-f" }) ); var C = React.createElement( "g", null, React.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-i" }), React.createElement("use", { fill: "url(#darkLED-j)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-i" }), React.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-i" }), React.createElement("use", { fill: "#000", filter: "url(#darkLED-k)", xlinkHref: "#darkLED-i" }) ); var D = React.createElement( "g", null, React.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-l" }), React.createElement("use", { fill: "url(#darkLED-c)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-l" }), React.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-l" }), React.createElement("use", { fill: "#000", filter: "url(#darkLED-m)", xlinkHref: "#darkLED-l" }) ); var E = React.createElement( "g", null, React.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-n" }), React.createElement("use", { fill: "url(#darkLED-j)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-n" }), React.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-n" }), React.createElement("use", { fill: "#000", filter: "url(#darkLED-o)", xlinkHref: "#darkLED-n" }) ); var F = React.createElement( "g", null, React.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-p" }), React.createElement("use", { fill: "url(#darkLED-g)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-p" }), React.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-p" }), React.createElement("use", { fill: "#000", filter: "url(#darkLED-q)", xlinkHref: "#darkLED-p" }) ); var G = React.createElement( "g", null, React.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-r" }), React.createElement("use", { fill: "url(#darkLED-c)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-r" }), React.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-r" }), React.createElement("use", { fill: "#000", filter: "url(#darkLED-s)", xlinkHref: "#darkLED-r" }) ); // See the following link for segment mappings: // https://en.wikipedia.org/wiki/Seven-segment_display#/media/File:7_segment_display_labeled.svg var DARK_SEGMENTS = exports.DARK_SEGMENTS = { A: A, B: B, C: C, D: D, E: E, F: F, G: G }; var darkDecimal = exports.darkDecimal = React.createElement( "g", { fill: "none", fillRule: "evenodd", filter: "url(#darkLED-a)" }, React.createElement( "g", { fillRule: "nonzero" }, React.createElement("use", { className: "darkLED-fill", fillRule: "evenodd", xlinkHref: "#darkLED-t" }), React.createElement("use", { fill: "url(#darkLED-u)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-t" }), React.createElement("use", { fill: "url(#darkLED-d)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-t" }), React.createElement("use", { fill: "#000", filter: "url(#darkLED-v)", xlinkHref: "#darkLED-t" }) ) ); var darkColon = exports.darkColon = React.createElement( "g", null, React.createElement( "g", { fillRule: "nonzero" }, React.createElement("use", { className: "darkLED-fill", fillRule: "evenodd", xlinkHref: "#darkLED-y" }), React.createElement("use", { fill: "url(#darkLED-u)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-y" }), React.createElement("use", { fill: "url(#darkLED-d)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-y" }), React.createElement("use", { fill: "black", filter: "url(#darkLED-v)", xlinkHref: "#darkLED-y" }) ), React.createElement( "g", { fillRule: "nonzero" }, React.createElement("use", { className: "darkLED-fill", fillRule: "evenodd", xlinkHref: "#darkLED-w" }), React.createElement("use", { fill: "url(#darkLED-u)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-w" }), React.createElement("use", { fill: "url(#darkLED-d)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-w" }), React.createElement("use", { fill: "black", filter: "url(#darkLED-x)", xlinkHref: "#darkLED-w" }) ) ); exports.default = darkGradientDefs; /***/ }), /* 416 */ /*!*************************!*\ !*** ./helpers/util.js ***! \*************************/ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var longestString = exports.longestString = function longestString(arr) { return arr.sort(function (a, b) { return b.length - a.length; })[0]; }; var decimalify = exports.decimalify = function decimalify() { var num = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; var step = arguments[1]; if (isNaN(num)) { return num; } // eslint-disable-next-line var _step$toString$split = step.toString().split('.'), _step$toString$split2 = _slicedToArray(_step$toString$split, 2), characteristic = _step$toString$split2[0], mantissa = _step$toString$split2[1]; var numDecimalPoints = mantissa ? mantissa.length : 0; return num.toFixed(numDecimalPoints); }; var sanitizeRangeValue = exports.sanitizeRangeValue = function sanitizeRangeValue(_ref) { var min = _ref.min, max = _ref.max, value = _ref.value; if (value == null) return min; if (value < min) { return min; } else if (value > max) { return max; } else { return value; } }; var computeProgress = exports.computeProgress = function computeProgress(_ref2) { var min = _ref2.min, max = _ref2.max, value = _ref2.value, _ref2$progressionTarg = _ref2.progressionTarget, progressionTarget = _ref2$progressionTarg === undefined ? 100 : _ref2$progressionTarg; value = Number(value); var adjustedValue = Math.abs(value - min) * 1.0; var range = Math.abs(max - min); return adjustedValue / range * progressionTarget; }; var roundToDecimal = exports.roundToDecimal = function roundToDecimal(value, decimals) { return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals); }; var getRandomInt = exports.getRandomInt = function getRandomInt() { var min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 9999; return Math.floor(Math.random() * (max - min + 1)) + min; }; exports.default = { decimalify: decimalify, sanitizeRangeValue: sanitizeRangeValue, computeProgress: computeProgress, longestString: longestString, roundToDecimal: roundToDecimal, getRandomInt: getRandomInt }; /***/ }), /* 417 */ /*!************************************!*\ !*** ./helpers/shared/TrackSvg.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.drawScale = exports.lightTrack = exports.colorRangesTrack = undefined; var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _util = __webpack_require__(/*! ../../helpers/util */ 416); var longestString = _util.longestString; var getRandomInt = _util.getRandomInt; var computeProgress = _util.computeProgress; var _colorRanges = __webpack_require__(/*! ../../helpers/colorRanges */ 418); var isContiguous = _colorRanges.isContiguous; var getSortedEntries = _colorRanges.getSortedEntries; var _constants = __webpack_require__(/*! ../../styled/constants */ 18); var RADIAN = _constants.RADIAN; var TRACK_TOTAL_DEG = _constants.TRACK_TOTAL_DEG; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var colorRangesTrack = exports.colorRangesTrack = function colorRangesTrack(props, dimensions) { var color = props.color, max = props.max; var CX = dimensions.CX, CY = dimensions.CY, GAUGE_RAD = dimensions.GAUGE_RAD, CIRCLE_CIR = dimensions.CIRCLE_CIR, GAP_ARC_LENGTH = dimensions.GAP_ARC_LENGTH; var TRACK_ARC_DEG = 270; var GAP_ARC_DEG = 90; var GRADIENT_BLEND = 25; if (!isContiguous(props)) return null; // calculate stops var stops = getSortedEntries(color.ranges).map(function (_ref, i) { var _ref2 = _slicedToArray(_ref, 2), colorValue = _ref2[0], range = _ref2[1]; var startDeg = range[0] * 1.0 / max * TRACK_ARC_DEG + GAP_ARC_DEG; var endDeg = range[1] * 1.0 / max * TRACK_ARC_DEG + GAP_ARC_DEG; if (color.gradient) { // no transition between black band and first color if (i === 0) { return colorValue + ' 0'; } return colorValue + ' ' + (startDeg + GRADIENT_BLEND) + 'deg, ' + colorValue + ' ' + (endDeg - GRADIENT_BLEND) + 'deg'; } return colorValue + ' ' + startDeg + 'deg, ' + colorValue + ' ' + endDeg + 'deg'; }); stops.unshift(['black ' + GAP_ARC_DEG + 'deg']); // add black band for bottom gap if (typeof window === 'undefined') { return null; } if (!window.ConicGradient) { // eslint-disable-next-line __webpack_require__(/*! conic-gradient */ 420); // globally sets ConicGradient } var ConicGradient = window.ConicGradient; var gradient = new ConicGradient({ stops: stops.join(', '), size: 400 }); // unique id for each track var id = 'colorRangesImage-' + getRandomInt(); return React.createElement( 'g', null, React.createElement( 'defs', null, React.createElement( 'pattern', { id: id, patternUnits: 'userSpaceOnUse', width: '100%', height: '100%' }, React.createElement('image', { xlinkHref: gradient.dataURL, width: '100%', height: '100%' }) ) ), React.createElement('circle', { className: 'color-ranges', cx: CX, cy: CY, r: GAUGE_RAD, fill: 'none', stroke: 'url(#' + id + ')', strokeWidth: '6px', strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH, transform: 'rotate(-225 ' + CX + ' ' + CY + ')' }) ); }; var lightTrack = exports.lightTrack = function lightTrack(props, dimensions) { var color = props.color, progress = props.progress; var CX = dimensions.CX, CY = dimensions.CY, GAUGE_RAD = dimensions.GAUGE_RAD, CIRCLE_CIR = dimensions.CIRCLE_CIR, GAP_ARC_LENGTH = dimensions.GAP_ARC_LENGTH, TRACK_ARC_LENGTH = dimensions.TRACK_ARC_LENGTH; return React.createElement( 'g', null, React.createElement('circle', { className: 'track', cx: CX, cy: CY, r: GAUGE_RAD, fill: 'none', strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH, strokeWidth: '6', transform: 'rotate(-225 ' + CX + ' ' + CY + ')' }), React.createElement('circle', { className: 'track progress', cx: CX, cy: CY, r: GAUGE_RAD, fill: 'none', strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH + (1 - progress) * TRACK_ARC_LENGTH, strokeWidth: '6', transform: 'rotate(-225 ' + CX + ' ' + CY + ')' }), color && color.ranges && colorRangesTrack(props, dimensions) ); }; var getScaleString = function getScaleString(v) { if (!v) return ''; // is jsx element? if (v.props) return v.props.children[0] + ' '; return v && v.label || v; }; var drawScale = exports.drawScale = function drawScale(_ref3, _ref4) { var min = _ref3.min, max = _ref3.max, step = _ref3.step, scale = _ref3.scale; var CX = _ref4.CX, CY = _ref4.CY, SCALE_TICK_OUTER_RAD = _ref4.SCALE_TICK_OUTER_RAD, SCALE_TICK_INNER_RAD = _ref4.SCALE_TICK_INNER_RAD, SCALE_TEXT_RAD = _ref4.SCALE_TEXT_RAD, IS_GAUGE = _ref4.IS_GAUGE; var START_ANGLE_OFFSET = -225; var DEFAULT_LONGEST_STRING = 3; var scaleItems = []; var count = 0; var offset = Math.max(longestString(Object.values(scale).map(getScaleString)).length, DEFAULT_LONGEST_STRING) * 2; var sr1 = SCALE_TICK_OUTER_RAD; var sr2 = SCALE_TICK_INNER_RAD; var srT = IS_GAUGE ? SCALE_TEXT_RAD - offset : SCALE_TEXT_RAD + offset; Object.keys(scale).forEach(function (key) { var markValue = scale[key]; var degreesProgressed = computeProgress({ min: min, max: max, value: key, progressionTarget: TRACK_TOTAL_DEG }); var markAngle = START_ANGLE_OFFSET + degreesProgressed; if (markValue !== null) { // draw full mark var sx1 = CX + sr1 * Math.cos(markAngle * RADIAN); var sy1 = CY + sr1 * Math.sin(markAngle * RADIAN); var sx2 = CX + sr2 * Math.cos(markAngle * RADIAN); var sy2 = CY + sr2 * Math.sin(markAngle * RADIAN); var sxT = CX + srT * Math.cos(markAngle * RADIAN); var syT = CY + srT * Math.sin(markAngle * RADIAN) + 4; scaleItems.push(React.createElement('line', { key: 'line' + count, className: 'tick', x1: sx1, y1: sy1, x2: sx2, y2: sy2, strokeLinecap: 'round' }), React.createElement( 'text', { key: 'text' + count, x: sxT, y: syT, textAnchor: 'middle', style: markValue && markValue.style ? markValue.style : null }, markValue && markValue.label || markValue )); } else { // draw mini mark var _sx = CX + sr1 * Math.cos(markAngle * RADIAN); var _sy = CY + sr1 * Math.sin(markAngle * RADIAN); var _sx2 = CX + (sr2 + 3) * Math.cos(markAngle * RADIAN); var _sy2 = CY + (sr2 + 3) * Math.sin(markAngle * RADIAN); scaleItems.push(React.createElement('line', { key: 'line' + count, className: 'tick', x1: _sx, y1: _sy, x2: _sx2, y2: _sy2, strokeLinecap: 'round' })); } count++; }); return scaleItems; }; /***/ }), /* 418 */ /*!********************************!*\ !*** ./helpers/colorRanges.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.getColorValue = exports.getLinearGradientCSS = exports.getGradientObject = exports.getSortedEntries = exports.isContiguous = undefined; var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _tinygradient = __webpack_require__(/*! tinygradient */ 419); var tinygradient = _interopRequireDefault(_tinygradient).default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var isContiguous = exports.isContiguous = function isContiguous(_ref) { var color = _ref.color, min = _ref.min, max = _ref.max; var ranges = Object.values(color.ranges); ranges.sort(function (r1, r2) { return r1[0] - r2[0]; }); // color ranges start at min and end at max if (ranges[0][0] !== min || ranges[ranges.length - 1][1] !== max) return false; // color ranges are contiguous for (var i = 0; i < ranges.length - 1; i++) { if (ranges[i][1] !== ranges[i + 1][0]) return false; } return true; }; var getSortedEntries = exports.getSortedEntries = function getSortedEntries(scale) { var entries = Object.entries(scale); entries.sort(function (_ref2, _ref3) { var _ref5 = _slicedToArray(_ref2, 2), r1 = _ref5[1]; var _ref4 = _slicedToArray(_ref3, 2), r2 = _ref4[1]; return r1[0] - r2[0]; }); return entries; }; var getGradientObject = exports.getGradientObject = function getGradientObject(_ref6) { var color = _ref6.color, min = _ref6.min, max = _ref6.max; var currentPos = 0; var stops = getSortedEntries(color.ranges).map(function (_ref7) { var _ref8 = _slicedToArray(_ref7, 2), colorValue = _ref8[0], range = _ref8[1]; var rangeLength = (range[1] - range[0]) * 1.0 / (max - min); var start = currentPos; var end = currentPos + rangeLength; currentPos = end; return { color: colorValue, pos: start }; }); return tinygradient(stops); }; var getLinearGradientCSS = exports.getLinearGradientCSS = function getLinearGradientCSS(_ref9) { var color = _ref9.color, min = _ref9.min, max = _ref9.max, _ref9$vertical = _ref9.vertical, vertical = _ref9$vertical === undefined ? false : _ref9$vertical; var currentPercentage = 0; var stops = getSortedEntries(color.ranges).map(function (_ref10, i) { var _ref11 = _slicedToArray(_ref10, 2), colorValue = _ref11[0], range = _ref11[1]; var rangeLength = (range[1] - range[0]) * 1.0 / (max - min) * 100; var start = currentPercentage; var end = currentPercentage + rangeLength; currentPercentage = end; if (color.gradient) { return i === 0 ? colorValue : colorValue + ' ' + start + '%'; } return i === 0 ? colorValue + ', ' + colorValue + ' ' + end + '%' : colorValue + ' ' + start + '%, ' + colorValue + ' ' + end + '%'; }); stops.unshift(vertical ? 'to top' : 'to right'); return 'linear-gradient(' + stops.join(', ') + ')'; }; var getColorValue = exports.getColorValue = function getColorValue(color) { return color && (typeof color === 'string' ? color : color.default); }; exports.default = { isContiguous: isContiguous, getSortedEntries: getSortedEntries, getLinearGradientCSS: getLinearGradientCSS, getColorValue: getColorValue }; /***/ }), /* 419 */ /*!*****************************************!*\ !*** ../~/tinygradient/tinygradient.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! * TinyGradient 0.4.3 * Copyright 2014-2018 Damien "Mistic" Sorel (http://www.strangeplanet.fr) * Licensed under MIT (http://opensource.org/licenses/MIT) */ (function (root, factory) { if (typeof module !== "undefined" && module.exports) { module.exports = factory(__webpack_require__(/*! tinycolor2 */ 315)); } else if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! tinycolor2 */ 315)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else { root.tinygradient = factory(root.tinycolor); } }(this, function (tinycolor) { "use strict"; var RGBA_MAX = {r: 256, g: 256, b: 256, a: 1}; var HSVA_MAX = {h: 360, s: 1, v: 1, a: 1}; /** * Linearly compute the step size between start and end (not normalized) * @param {Object} start - rgba or hsva * @param {Object} end - rgba or hsva * @param {int} steps - number of desired steps * @return {Object} rgba or hsva */ function stepize(start, end, steps) { var step = {}; for (var k in start) { if (start.hasOwnProperty(k)) { step[k] = steps === 0 ? 0 : (end[k] - start[k]) / steps; } } return step; } /** * Compute the final step color * @param {Object} step - rgba or hsva from `stepize` * @param {Object} start - rgba or hsva * @param {int} i - color index * @param {Object} max - rgba or hsva of maximum values for each channel * @return {Object} rgba or hsva */ function interpolate(step, start, i, max) { var color = {}; for (var k in start) { if (start.hasOwnProperty(k)) { color[k] = step[k] * i + start[k]; color[k] = color[k] < 0 ? color[k] + max[k] : ( max[k] !== 1 ? color[k] % max[k] : color[k] ); } } return color; } /** * Generate gradient with RGBa interpolation * @param {Object} stop1 * @param {Object} stop2 * @param {int} steps * @return {tinycolor[]} color1 included, color2 excluded */ function interpolateRgb(stop1, stop2, steps) { var start = stop1.color.toRgb(), end = stop2.color.toRgb(), gradient = [stop1.color], step = stepize(start, end, steps), color; for (var i = 1; i < steps; i++) { color = interpolate(step, start, i, RGBA_MAX); gradient.push(tinycolor(color)); } return gradient; } /** * Generate gradient with HSVa interpolation * @param {Object} stop1 * @param {Object} stop2 * @param {int} steps * @param {Boolean} trigonometric - true to step in trigonometric order * @return {tinycolor[]} color1 included, color2 excluded */ function interpolateHsv(stop1, stop2, steps, trigonometric) { var start = stop1.color.toHsv(), end = stop2.color.toHsv(), gradient = [stop1.color], step = stepize(start, end, steps), diff, color; // recompute hue if ((start.h <= end.h && !trigonometric) || (start.h >= end.h && trigonometric)) { diff = end.h - start.h; } else if (trigonometric) { diff = 360 - end.h + start.h; } else { diff = 360 - start.h + end.h; } step.h = Math.pow(-1, trigonometric ? 1 : 0) * Math.abs(diff) / steps; for (var i = 1; i < steps; i++) { color = interpolate(step, start, i, HSVA_MAX); gradient.push(tinycolor(color)); } return gradient; } /** * Compute substeps between each stops * @param {Object[]} stops * @param {int} steps * @return {int[]} */ function computeSubsteps(stops, steps) { var l = stops.length; // validation steps = parseInt(steps); if (isNaN(steps) || steps < 2) { throw new Error('Invalid number of steps (< 2)'); } if (steps < l) { throw new Error('Number of steps cannot be inferior to number of stops'); } // compute substeps from stop positions var substeps = []; for (var i = 1; i < l; i++) { var step = (steps - 1) * (stops[i].pos - stops[i - 1].pos); substeps.push(Math.max(1, Math.round(step))); } // adjust number of steps var totalSubsteps = 1; for (var n = l - 1; n--;) totalSubsteps += substeps[n]; while (totalSubsteps !== steps) { if (totalSubsteps < steps) { var min = Math.min.apply(null, substeps); substeps[substeps.indexOf(min)]++; totalSubsteps++; } else { var max = Math.max.apply(null, substeps); substeps[substeps.indexOf(max)]--; totalSubsteps--; } } return substeps; } /** * Compute the color at a specific position * @param {Object[]} stops * @param {float} pos * @param {string} method * @param {Object} max * @returns {tinycolor} */ function computeAt(stops, pos, method, max) { if (pos < 0 || pos > 1) { throw new Error('Position must be between 0 and 1'); } var start, end; for (var i = 0, l = stops.length; i < l - 1; i++) { if (pos >= stops[i].pos && pos < stops[i + 1].pos) { start = stops[i]; end = stops[i + 1]; break; } } if (!start) { start = end = stops[stops.length - 1]; } var step = stepize(start.color[method](), end.color[method](), (end.pos - start.pos) * 100); var color = interpolate(step, start.color[method](), Math.round((pos - start.pos) * 100), max); return tinycolor(color); } /** * @class tinygradient * @param {*} stops */ var TinyGradient = function (stops) { // varargs if (arguments.length === 1) { if (!(arguments[0] instanceof Array)) { throw new Error('"stops" is not an array'); } stops = arguments[0]; } else { stops = Array.prototype.slice.call(arguments); } // if we are called as a function, call using new instead if (!(this instanceof TinyGradient)) { return new TinyGradient(stops); } // validation if (stops.length < 2) { throw new Error('Invalid number of stops (< 2)'); } var havingPositions = stops[0].pos !== undefined, l = stops.length, p = -1; // create tinycolor objects and clean positions this.stops = stops.map(function (stop, i) { var hasPosition = stop.pos !== undefined; if (havingPositions ^ hasPosition) { throw new Error('Cannot mix positionned and not posionned color stops'); } if (hasPosition) { stop = { color: tinycolor(stop.color), pos : stop.pos }; if (stop.pos < 0 || stop.pos > 1) { throw new Error('Color stops positions must be between 0 and 1'); } else if (stop.pos <= p) { throw new Error('Color stops positions are not ordered'); } p = stop.pos; } else { stop = { color: tinycolor(stop), pos : i / (l - 1) }; } return stop; }); if (this.stops[0].pos !== 0) { this.stops.unshift({ color: this.stops[0].color, pos : 0 }); } if (this.stops[this.stops.length - 1].pos !== 1) { this.stops.push({ color: this.stops[this.stops.length - 1].color, pos : 1 }); } }; /** * Return new instance with reversed stops * @return {tinygradient} */ TinyGradient.prototype.reverse = function () { var stops = []; this.stops.forEach(function (stop) { stops.push({ color: stop.color, pos : 1 - stop.pos }); }); return new TinyGradient(stops.reverse()); }; /** * Generate gradient with RGBa interpolation * @param {int} steps * @return {tinycolor[]} */ TinyGradient.prototype.rgb = function (steps) { var substeps = computeSubsteps(this.stops, steps), gradient = []; for (var i = 0, l = this.stops.length; i < l - 1; i++) { gradient = gradient.concat(interpolateRgb(this.stops[i], this.stops[i + 1], substeps[i])); } gradient.push(this.stops[l - 1].color); return gradient; }; /** * Generate gradient with HSVa interpolation * @param {int} steps * @param {Boolean|String} [mode=false] * - false to step in clockwise * - true to step in trigonometric order * - 'short' to use the shortest way * - 'long' to use the longest way * @return {tinycolor[]} */ TinyGradient.prototype.hsv = function (steps, mode) { var substeps = computeSubsteps(this.stops, steps), trigonometric = mode === true, parametrized = typeof mode === 'string', gradient = [], start, end, trig; for (var i = 0, l = this.stops.length; i < l - 1; i++) { start = this.stops[i].color.toHsv(); end = this.stops[i + 1].color.toHsv(); if (parametrized) { trig = (start.h < end.h && end.h - start.h < 180) || (start.h > end.h && start.h - end.h > 180); } // rgb interpolation if one of the steps in grayscale if (start.s === 0 || end.s === 0) { gradient = gradient.concat(interpolateRgb(this.stops[i], this.stops[i + 1], substeps[i])); } else { gradient = gradient.concat(interpolateHsv(this.stops[i], this.stops[i + 1], substeps[i], (mode === 'long' && trig) || (mode === 'short' && !trig) || (!parametrized && trigonometric) )); } } gradient.push(this.stops[l - 1].color); return gradient; }; /** * Generate CSS3 command (no prefix) for this gradient * @param {String} [mode=linear] - 'linear' or 'radial' * @param {String} [direction] - default is 'to right' or 'ellipse at center' * @return {String} */ TinyGradient.prototype.css = function (mode, direction) { mode = mode || 'linear'; direction = direction || (mode === 'linear' ? 'to right' : 'ellipse at center'); var css = mode + '-gradient(' + direction; this.stops.forEach(function (stop) { css += ', ' + stop.color.toRgbString() + ' ' + (stop.pos * 100) + '%'; }); css += ')'; return css; }; /** * Returns the color at specific position with RGBa interpolation * @param {float} pos, between 0 and 1 * @return {tinycolor} */ TinyGradient.prototype.rgbAt = function (pos) { return computeAt(this.stops, pos, 'toRgb', RGBA_MAX); }; /** * Returns the color at specific position with HSVa interpolation * @param {float} pos, between 0 and 1 * @return {tinycolor} */ TinyGradient.prototype.hsvAt = function (pos) { return computeAt(this.stops, pos, 'toHsv', HSVA_MAX); }; var STATIC_FNS = { 'rgb' : 1, 'hsv' : 2, 'css' : 2, 'rgbAt': 1, 'hsvAt': 1 }; Object.keys(STATIC_FNS).forEach(function (fn) { TinyGradient[fn] = function () { var colors = Array.prototype.slice.call(arguments); var args = colors.splice(-STATIC_FNS[fn]); var gradient = new TinyGradient(colors); return gradient[fn].apply(gradient, args); }; }); // export return TinyGradient; })); /***/ }), /* 420 */ /*!*********************************************!*\ !*** ../~/conic-gradient/conic-gradient.js ***! \*********************************************/ /***/ (function(module, exports) { /** * CSS conic-gradient() polyfill * By Lea Verou — http://lea.verou.me * MIT license */ (function(){ var π = Math.PI; var τ = 2 * π; var ε = .00001; var deg = π/180; var dummy = document.createElement("div"); document.head.appendChild(dummy); var _ = self.ConicGradient = function(o) { var me = this; _.all.push(this); o = o || {}; this.canvas = document.createElement("canvas"); this.context = this.canvas.getContext("2d"); this.repeating = !!o.repeating; this.size = o.size || Math.max(innerWidth, innerHeight); this.canvas.width = this.canvas.height = this.size; var stops = o.stops; this.stops = (stops || "").split(/\s*,(?![^(]*\))\s*/); // commas that are not followed by a ) without a ( first this.from = 0; for (var i=0; i 0) { var first = this.stops[0].clone(); first.pos = 0; this.stops.unshift(first); } // Add dummy last stop or set first stop’s position to 100% if it doesn’t have one if (this.stops[this.stops.length - 1].pos === undefined) { this.stops[this.stops.length - 1].pos = 1; } else if (!this.repeating && this.stops[this.stops.length - 1].pos < 1) { var last = this.stops[this.stops.length - 1].clone(); last.pos = 1; this.stops.push(last); } this.stops.forEach(function(stop, i){ if (stop.pos === undefined) { // Evenly space color stops with no position for (var j=i+1; this[j]; j++) { if (this[j].pos !== undefined) { stop.pos = this[i-1].pos + (this[j].pos - this[i-1].pos)/(j-i+1); break; } } } else if (i > 0) { // Normalize color stops whose position is smaller than the position of the stop before them stop.pos = Math.max(stop.pos, this[i-1].pos); } }, this.stops); if (this.repeating) { // Repeat color stops until >= 1 var stops = this.stops.slice(); var lastStop = stops[stops.length-1]; var difference = lastStop.pos - stops[0].pos; for (var i=0; this.stops[this.stops.length-1].pos < 1 && i<10000; i++) { for (var j=0; j' + '' + ''; }, get png() { return this.canvas.toDataURL(); }, get r() { return Math.sqrt(2) * this.size / 2; }, // Paint the conical gradient on the canvas // Algorithm inspired from http://jsdo.it/akm2/yr9B paint: function() { var c = this.context; var radius = this.r; var x = this.size / 2; var stopIndex = 0; // The index of the current color var stop = this.stops[stopIndex], prevStop; var diff, t; // Transform coordinate system so that angles start from the top left, like in CSS c.translate(this.size/2, this.size/2); c.rotate(-90*deg); c.rotate(this.from*deg); c.translate(-this.size/2, -this.size/2); for (var i = 0; i < 360;) { if (i/360 + ε >= stop.pos) { // Switch color stop do { prevStop = stop; stopIndex++; stop = this.stops[stopIndex]; } while(stop && stop != prevStop && stop.pos === prevStop.pos); if (!stop) { break; } var sameColor = prevStop.color + "" === stop.color + "" && prevStop != stop; diff = prevStop.color.map(function(c, i){ return stop.color[i] - c; }); } t = (i/360 - prevStop.pos) / (stop.pos - prevStop.pos); var interpolated = sameColor? stop.color : diff.map(function(d,i){ var ret = d * t + prevStop.color[i]; return i < 3? ret & 255 : ret; }); // Draw a series of arcs, 1deg each c.fillStyle = 'rgba(' + interpolated.join(",") + ')'; c.beginPath(); c.moveTo(x, x); if (sameColor) { var θ = 360 * (stop.pos - prevStop.pos); } else { var θ = .5; } var beginArg = i*deg; beginArg = Math.min(360*deg, beginArg); // .02: To prevent empty blank line and corresponding moire // only non-alpha colors are cared now var endArg = beginArg + θ*deg; endArg = Math.min(360*deg, endArg + .02); c.arc(x, x, radius, beginArg, endArg); c.closePath(); c.fill(); i += θ; } } }; _.ColorStop = function(gradient, stop) { this.gradient = gradient; if (stop) { var parts = stop.match(/^(.+?)(?:\s+([\d.]+)(%|deg|turn|grad|rad)?)?(?:\s+([\d.]+)(%|deg|turn|grad|rad)?)?\s*$/); this.color = _.ColorStop.colorToRGBA(parts[1]); if (parts[2]) { var unit = parts[3]; if (unit == "%" || parts[2] === "0" && !unit) { this.pos = parts[2]/100; } else if (unit == "turn") { this.pos = +parts[2]; } else if (unit == "deg") { this.pos = parts[2] / 360; } else if (unit == "grad") { this.pos = parts[2] / 400; } else if (unit == "rad") { this.pos = parts[2] / τ; } } if (parts[4]) { this.next = new _.ColorStop(gradient, parts[1] + " " + parts[4] + parts[5]); } } } _.ColorStop.prototype = { clone: function() { var ret = new _.ColorStop(this.gradient); ret.color = this.color; ret.pos = this.pos; return ret; }, toString: function() { return "rgba(" + this.color.join(", ") + ") " + this.pos * 100 + "%"; } }; _.ColorStop.colorToRGBA = function(color) { if (!Array.isArray(color) && color.indexOf("from") == -1) { dummy.style.color = color; var rgba = getComputedStyle(dummy).color.match(/rgba?\(([\d.]+), ([\d.]+), ([\d.]+)(?:, ([\d.]+))?\)/); if (rgba) { rgba.shift(); rgba = rgba.map(function(a) { return +a }); rgba[3] = isNaN(rgba[3])? 1 : rgba[3]; } return rgba || [0,0,0,0]; } return color; }; })(); if (self.StyleFix) { // Test if conic gradients are supported first: (function(){ var dummy = document.createElement("p"); dummy.style.backgroundImage = "conic-gradient(white, black)"; dummy.style.backgroundImage = PrefixFree.prefix + "conic-gradient(white, black)"; if (!dummy.style.backgroundImage) { // Not supported, use polyfill StyleFix.register(function(css, raw) { if (css.indexOf("conic-gradient") > -1) { css = css.replace(/(?:repeating-)?conic-gradient\(\s*((?:\([^()]+\)|[^;()}])+?)\)/g, function(gradient, stops) { return new ConicGradient({ stops: stops, repeating: gradient.indexOf("repeating-") > -1 }); }); } return css; }); } })(); } /***/ }), /* 421 */ /*!********************************!*\ !*** ./styled/Gauge.styled.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _templateObject = _taggedTemplateLiteral(['\n & svg {\n text-align: center;\n }\n\n & circle {\n user-select: none;\n }\n\n & .scale {\n font-size: 12px;\n\n fill: ', ';\n user-select: none;\n }\n\n & .tick {\n stroke: ', ';\n stroke-width: 2;\n }\n\n & .tick.small {\n stroke: #2b2f32;\n }\n\n & .needle {\n stroke: ', ';\n stroke-width: 3;\n }\n\n ', ';\n'], ['\n & svg {\n text-align: center;\n }\n\n & circle {\n user-select: none;\n }\n\n & .scale {\n font-size: 12px;\n\n fill: ', ';\n user-select: none;\n }\n\n & .tick {\n stroke: ', ';\n stroke-width: 2;\n }\n\n & .tick.small {\n stroke: #2b2f32;\n }\n\n & .needle {\n stroke: ', ';\n stroke-width: 3;\n }\n\n ', ';\n']), _templateObject2 = _taggedTemplateLiteral(['\n & .needle-knob {\n stroke: ', ';\n stroke-width: 2;\n }\n\n & .track {\n stroke: ', ';\n }\n\n & .track.progress {\n stroke: ', ';\n }\n'], ['\n & .needle-knob {\n stroke: ', ';\n stroke-width: 2;\n }\n\n & .track {\n stroke: ', ';\n }\n\n & .track.progress {\n stroke: ', ';\n }\n']); var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = styled.div(_templateObject, function (_ref) { var theme = _ref.theme; return theme.dark ? '#fff' : '#5b6268'; }, function (props) { return props.theme.detail; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? '#fff' : '#5b6268'; }, function (_ref3) { var theme = _ref3.theme; return !theme.dark && lightTheme; }); var lightTheme = css(_templateObject2, function (_ref4) { var theme = _ref4.theme; return theme.secondary; }, function (props) { return props.theme.secondary; }, function (_ref5) { var color = _ref5.color, theme = _ref5.theme; return color || theme.primary; }); Container.defaultProps = { theme: light }; exports.default = Container; /***/ }), /* 422 */ /*!***************************************!*\ !*** ./styled/CurrentValue.styled.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.ValueLabel = exports.Value = undefined; var _templateObject = _taggedTemplateLiteral(['\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n\n top: 50%;\n transform: translateY(-50%);\n text-align: center;\n font-size: 32px;\n ', ';\n'], ['\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n\n top: 50%;\n transform: translateY(-50%);\n text-align: center;\n font-size: 32px;\n ', ';\n']), _templateObject2 = _taggedTemplateLiteral(['\n ', ';\n '], ['\n ', ';\n ']), _templateObject3 = _taggedTemplateLiteral(['\n color: ', ';\n ', ';\n'], ['\n color: ', ';\n ', ';\n']), _templateObject4 = _taggedTemplateLiteral(['\n text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.4);\n '], ['\n text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.4);\n ']), _templateObject5 = _taggedTemplateLiteral(['\n margin-top: -4px;\n text-transform: uppercase;\n font-size: 8px;\n color: #535d63;\n'], ['\n margin-top: -4px;\n text-transform: uppercase;\n font-size: 8px;\n color: #535d63;\n']); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; var _constants = __webpack_require__(/*! ./constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var ValueContainer = styled.div(_templateObject, function (props) { return props.css ? css(_templateObject2, props.css) : ''; }); var Value = exports.Value = styled.div(_templateObject3, function (_ref) { var theme = _ref.theme, color = _ref.color; return theme.dark ? '#fff' : color || theme.primary; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? css(_templateObject4) : ''; }); Value.defaultProps = { theme: light }; var ValueLabel = exports.ValueLabel = styled.label(_templateObject5); exports.default = function (props) { return React.createElement( ValueContainer, { css: props.css }, React.createElement( Value, { color: props.valueColor }, props.children ), props.units ? React.createElement( ValueLabel, null, props.units ) : null ); }; /***/ }), /* 423 */ /*!******************************!*\ !*** ./helpers/logarithm.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _templateObject = _taggedTemplateLiteral(['\n font-size: 0.9em;\n margin-left: -10px;\n\n & sup {\n font-size: 0.6em;\n }\n'], ['\n font-size: 0.9em;\n margin-left: -10px;\n\n & sup {\n font-size: 0.6em;\n }\n']); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var _util = __webpack_require__(/*! ./util */ 416); var roundToDecimal = _util.roundToDecimal; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } function compute(value) { var base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10; if (base === 'e') base = Math.exp(1); return Math.log(value) / Math.log(base); } function generateLogFormatter(_ref) { var _ref$base = _ref.base, base = _ref$base === undefined ? 10 : _ref$base, _ref$isSVG = _ref.isSVG, isSVG = _ref$isSVG === undefined ? false : _ref$isSVG; return function (value) { return isSVG ? React.createElement( 'tspan', null, base, React.createElement( 'tspan', { dy: '-6px' }, value ) ) : React.createElement( 'span', null, base, React.createElement( 'sup', null, value ) ); }; } function genLogMarks(_ref2, isSVG) { var min = _ref2.min, max = _ref2.max, _ref2$step = _ref2.step, step = _ref2$step === undefined ? 1 : _ref2$step, _ref2$base = _ref2.base, base = _ref2$base === undefined ? 10 : _ref2$base, marks = _ref2.marks; // if no marks given, compute default marks if (!marks) { var curr = min; marks = {}; while (curr <= max) { marks[curr] = true; curr += step; } } Object.keys(marks).forEach(function (key) { if (typeof marks[key] !== 'boolean') { // custom mark label, do not format return; } marks[key] = isSVG ? React.createElement( 'tspan', null, base, React.createElement( 'tspan', { dy: '-6px' }, key ) ) : React.createElement( 'span', null, base, React.createElement( 'sup', null, key ) ); }); return marks; } function formatValue(value, base) { return React.createElement( Value, null, '~', base, React.createElement( 'sup', null, roundToDecimal(value, 2) ) ); } var Value = styled.div(_templateObject); exports.default = { compute: compute, generateLogFormatter: generateLogFormatter, formatValue: formatValue, genLogMarks: genLogMarks }; /***/ }), /* 424 */ /*!**************************!*\ !*** ./helpers/scale.js ***! \**************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; exports.default = generateScale; var _util = __webpack_require__(/*! ./util */ 416); var decimalify = _util.decimalify; // magic numbers var DEFAULT_NUM_INTERVALS = 10; var DEFAULT_LABEL_INTERVAL = 2; function generateScale(input) { var config = processInput(input); var scale = _extends({}, config.custom); if (config.onlyRenderCustom) { return scale; } scale[config.min] = config.formatter(config.min); scale[config.max] = config.formatter(config.max); var curr = config.start; var markCount = 0; while (curr <= config.max) { var needsLabel = markCount % config.labelInterval === 0; var currValue = Number(decimalify(curr, config.interval)); var alreadyMarked = typeof scale[currValue] !== 'undefined'; curr += config.interval; markCount++; if (alreadyMarked) continue; var label = needsLabel ? config.formatter(currValue) : null; scale[currValue] = label; } return scale; } // private function processInput(_ref) { var min = _ref.min, max = _ref.max, _ref$scale = _ref.scale, scale = _ref$scale === undefined ? {} : _ref$scale, formatter = _ref.formatter; var config = {}; var START_FLAG = scale.start != null; var INTERVAL_FLAG = scale.interval != null; var LABEL_INTERVAL_FLAG = scale.labelInterval != null; config.min = min; config.max = max; config.start = START_FLAG ? scale.start : min; config.interval = INTERVAL_FLAG ? scale.interval : computeInterval(config.start, max); config.labelInterval = LABEL_INTERVAL_FLAG ? scale.labelInterval : DEFAULT_LABEL_INTERVAL; config.custom = scale.custom || {}; config.formatter = formatter || identityFunc; var noConfigPassed = !START_FLAG && !INTERVAL_FLAG && !LABEL_INTERVAL_FLAG; var customTicks = Object.keys(config.custom).length; config.onlyRenderCustom = customTicks && noConfigPassed; return config; } function identityFunc(x) { return x; } function computeInterval(min, max) { var ROUND_TO_WHOLE = Math.ceil; var ROUND_TO_FRACTION = function ROUND_TO_FRACTION(x) { return Number(x.toFixed(2)); }; var range = Math.abs(max - min) * 1.0; var intervalEstimate = range / DEFAULT_NUM_INTERVALS; var interval = intervalEstimate > 1 ? ROUND_TO_WHOLE(intervalEstimate) : ROUND_TO_FRACTION(intervalEstimate); return interval; } /***/ }), /* 425 */ /*!******************************************!*\ !*** ./components/GraduatedBar.react.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; var _colorRanges = __webpack_require__(/*! ../helpers/colorRanges */ 418); var getColorValue = _colorRanges.getColorValue; var isContiguous = _colorRanges.isContiguous; var getGradientObject = _colorRanges.getGradientObject; var _GraduatedBar = __webpack_require__(/*! ../styled/GraduatedBar.styled */ 426); var Container = _GraduatedBar.Container; var Block = _GraduatedBar.Block; var Value = _GraduatedBar.Value; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var valueColor = function valueColor(value, color) { var entry = Object.entries(color.ranges).filter(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), range = _ref2[1]; return value >= range[0] && value <= range[1]; })[0]; return entry && entry[0]; }; /** * A graduated bar component that displays * a value within some range as a * percentage. */ var GraduatedBar = function GraduatedBar(props) { var step = props.step, min = props.min, max = props.max, label = props.label, labelPosition = props.labelPosition, id = props.id, className = props.className, color = props.color, size = props.size, style = props.style, showCurrentValue = props.showCurrentValue, vertical = props.vertical; var value = props.value || min; var gradient = null; var progressBlocks = []; var normalizedValue = Math.max(Math.min(max, value), min); if (color.gradient && isContiguous({ color: color, min: min, max: max })) { gradient = getGradientObject({ color: color, min: min, max: max }); } for (var i = min; i < normalizedValue; i += step) { var blockProps = _extends({}, props, { color: getColorValue(color) }); if (color.ranges && valueColor(i, color)) { blockProps = _extends({}, props, { color: valueColor(i, color) }); } progressBlocks.push(React.createElement(Block, _extends({ key: i, progress: i / (max - min), gradient: gradient }, blockProps))); } var percent = normalizedValue / (max - min) * 100; if (!isFinite(percent)) percent = 0; return React.createElement( 'div', { id: id, className: className, style: style }, React.createElement( LabelContainer, { label: label, labelPosition: labelPosition }, React.createElement( Container, { vertical: vertical, size: size }, progressBlocks, showCurrentValue && React.createElement( Value, { vertical: vertical }, percent.toFixed(0), '%' ) ) ) ); }; GraduatedBar.defaultProps = { min: 0, max: 10, size: 250, step: 0.5, labelPosition: 'top', color: light.primary }; GraduatedBar.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The value of the graduated bar */ value: PropTypes.number, /** * Color configuration for the graduated bar's * progress blocks. */ color: PropTypes.oneOfType([ /** * Color used for graduated bar's track/indicator */ PropTypes.string, /** * Color ranges configuration. */ PropTypes.shape({ /** * Fallback color to use when color.ranges * has gaps. */ default: PropTypes.string, /** * Display ranges as a gradient between given colors. * Requires color.ranges to be contiguous along * the entirety of the graduated bar's range of values. */ gradient: PropTypes.bool, /** * Define multiple color ranges on the graduated bar's track. * The key determines the color of the range and * the value is the start,end of the range itself. */ ranges: PropTypes.shape({ color: PropTypes.arrayOf(PropTypes.number) }) })]), /** * The size (length) of the graduated bar in pixels */ size: PropTypes.number, /** * If true, will display bar vertically instead of horizontally */ vertical: PropTypes.bool, /** * The minimum value of the graduated bar */ min: PropTypes.number, /** * The maximum value of the graduated bar */ max: PropTypes.number, /** * Value by which progress blocks appear */ step: PropTypes.number, /** * If true, the current percentage * of the bar will be displayed */ showCurrentValue: PropTypes.bool, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object }; exports.default = GraduatedBar; /***/ }), /* 426 */ /*!***************************************!*\ !*** ./styled/GraduatedBar.styled.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Value = exports.Block = exports.Container = undefined; var _templateObject = _taggedTemplateLiteral(['\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n ', ';\n ', ';\n'], ['\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n ', ';\n ', ';\n']), _templateObject2 = _taggedTemplateLiteral(['\n flex-direction: column-reverse;\n width: 30px;\n height: ', ';\n'], ['\n flex-direction: column-reverse;\n width: 30px;\n height: ', ';\n']), _templateObject3 = _taggedTemplateLiteral(['\n flex-direction: row;\n width: ', ';\n height: 30px;\n'], ['\n flex-direction: row;\n width: ', ';\n height: 30px;\n']), _templateObject4 = _taggedTemplateLiteral(['\n text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);\n padding: 3px;\n color: #fff;\n border: none;\n border-radius: 0px;\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n'], ['\n text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);\n padding: 3px;\n color: #fff;\n border: none;\n border-radius: 0px;\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n']), _templateObject5 = _taggedTemplateLiteral(['\n background-color: ', ';\n'], ['\n background-color: ', ';\n']), _templateObject6 = _taggedTemplateLiteral(['\n display: block;\n box-sizing: border-box;\n\n ', '\n\n ', '\n\n ', ';\n'], ['\n display: block;\n box-sizing: border-box;\n\n ', '\n\n ', '\n\n ', ';\n']), _templateObject7 = _taggedTemplateLiteral(['\n background-image: linear-gradient(', ', ', ', ', ');\n '], ['\n background-image: linear-gradient(', ', ', ', ', ');\n ']), _templateObject8 = _taggedTemplateLiteral(['\n background-color: ', ';\n '], ['\n background-color: ', ';\n ']), _templateObject9 = _taggedTemplateLiteral(['\n height: ', ';\n width: ', ';\n margin: ', ';\n '], ['\n height: ', ';\n width: ', ';\n margin: ', ';\n ']), _templateObject10 = _taggedTemplateLiteral(['\n ', ' box-shadow: ', ';\n'], ['\n ', ' box-shadow: ', ';\n']), _templateObject11 = _taggedTemplateLiteral(['\n background-color: ', ';\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.5) 0%,\n rgba(0, 0, 0, 0.4) 100%\n );\n background-blend-mode: overlay;\n '], ['\n background-color: ', ';\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.5) 0%,\n rgba(0, 0, 0, 0.4) 100%\n );\n background-blend-mode: overlay;\n ']), _templateObject12 = _taggedTemplateLiteral(['\n position: absolute;\n right: 4%;\n top: 50%;\n transform: translateY(-50%);\n\n ', ';\n'], ['\n position: absolute;\n right: 4%;\n top: 50%;\n transform: translateY(-50%);\n\n ', ';\n']), _templateObject13 = _taggedTemplateLiteral(['\n font-size: 11px;\n right: auto;\n '], ['\n font-size: 11px;\n right: auto;\n ']); var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; var _constants = __webpack_require__(/*! ./constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = exports.Container = styled.div(_templateObject, function (_ref) { var vertical = _ref.vertical; return vertical ? verticalContainer : horizontalContainer; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? darkContainer : lightContainer; }); Container.defaultProps = { theme: light }; var verticalContainer = css(_templateObject2, function (_ref3) { var size = _ref3.size; return size + 'px'; }); var horizontalContainer = css(_templateObject3, function (_ref4) { var size = _ref4.size; return size + 'px'; }); var darkContainer = css(_templateObject4); var lightContainer = css(_templateObject5, function (props) { return props.theme.secondary; }); var Block = exports.Block = styled.div(_templateObject6, function (_ref5) { var gradient = _ref5.gradient, progress = _ref5.progress, color = _ref5.color, theme = _ref5.theme, max = _ref5.max, min = _ref5.min, step = _ref5.step, size = _ref5.size, vertical = _ref5.vertical; if (gradient) { var TOTAL_STEPS = (max - min) / step; var STEP_SIZE = size / TOTAL_STEPS; var STEP_SIZE_PERCENT = STEP_SIZE / size; var start = gradient.rgbAt(progress).toString(); var end = gradient.rgbAt(progress + STEP_SIZE_PERCENT).toString(); return css(_templateObject7, vertical ? 'to top' : 'to right', start, end); } return css(_templateObject8, color || theme.primary); }, function (props) { var TOTAL_STEPS = (props.max - props.min) / props.step; var STEP_SIZE = props.size / TOTAL_STEPS; var MARGIN = STEP_SIZE >= 10 ? STEP_SIZE * 0.05 : 0.5; var BOX_SIZE = STEP_SIZE - 2 * MARGIN; return css(_templateObject9, props.vertical ? BOX_SIZE + 'px' : '100%', props.vertical ? '100%' : BOX_SIZE + 'px', props.vertical ? MARGIN + 'px 0' : '0 ' + MARGIN + 'px'); }, function (_ref6) { var theme = _ref6.theme; return theme.dark && darkBlock; }); Block.defaultProps = { theme: light }; var darkBlock = css(_templateObject10, function (_ref7) { var color = _ref7.color, theme = _ref7.theme, gradient = _ref7.gradient; if (gradient) return; return css(_templateObject11, color || theme.primary); }, function (_ref8) { var color = _ref8.color, theme = _ref8.theme; return '2px 2px 6px 1px rgba(0, 0, 0, 0.45), inset 1px 1px 2px 0 rgba(255, 255, 255, 0.3),\n 1px 1px 1px 0px rgba(0, 0, 0, 0.6), 0 0 3px 0px ' + (color || theme.primary); }); var Value = exports.Value = styled.div(_templateObject12, function (_ref9) { var vertical = _ref9.vertical; return vertical ? css(_templateObject13) : ''; }); /***/ }), /* 427 */ /*!***************************************!*\ !*** ./components/Indicator.react.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _color = __webpack_require__(/*! color */ 404); var color = _interopRequireDefault(_color).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var withTheme = _styledComponents.withTheme; var _Indicator = __webpack_require__(/*! ../styled/shared/Indicator.styled */ 20); var IndicatorLight = _interopRequireDefault(_Indicator).default; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var colors = _constants.colors; var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * A boolean indicator LED. */ var Indicator = function Indicator(props) { var bg = color(props.color).desaturate(0.2).lighten(0.2).rgb().toString(); return React.createElement( 'div', { id: props.id, className: props.className, style: props.style }, React.createElement( LabelContainer, props, React.createElement(IndicatorLight, { size: props.size, width: props.width, height: props.height, rectangular: props.width && props.height, main: true, on: props.value, primary: props.color, secondary: !props.theme.dark && bg }) ) ); }; Indicator.defaultProps = { color: colors.DARKER_PRIMARY, size: 15, theme: light, labelPosition: 'top' }; Indicator.propTypes = { /** * The ID used to identify the indicator in Dash callbacks */ id: PropTypes.string, /** * If true, indicator is illuminated */ value: PropTypes.bool, /** * Color of the indicator */ color: PropTypes.string, /** * Size of the component. Either use this or width and height */ size: PropTypes.number, /** * Width of the component. Set both width and height for a rectangular indicator */ width: PropTypes.number, /** * Height of the component. Set both width and height for a rectangular indicator */ height: PropTypes.number, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the indicator label is positioned */ labelPosition: PropTypes.oneOf(['top', 'bottom', 'right', 'left']), /** * Class to apply to the root component element */ className: PropTypes.string, /** * Style to apply to the root component element */ style: PropTypes.object }; exports.default = withTheme(Indicator); /***/ }), /* 428 */ /*!**********************************!*\ !*** ./components/Knob.react.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var Component = _react.Component; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var withTheme = _styledComponents.withTheme; var _KnobSvg = __webpack_require__(/*! ../helpers/KnobSvg.react */ 429); var KnobSvg = _interopRequireDefault(_KnobSvg).default; var _Knob = __webpack_require__(/*! ../styled/Knob.styled */ 430); var Container = _interopRequireDefault(_Knob).default; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; var TRACK_TOTAL_DEG = _constants.TRACK_TOTAL_DEG; var _util = __webpack_require__(/*! ../helpers/util */ 416); var computeProgress = _util.computeProgress; var roundToDecimal = _util.roundToDecimal; var _colorRanges = __webpack_require__(/*! ../helpers/colorRanges */ 418); var getColorValue = _colorRanges.getColorValue; var _scale = __webpack_require__(/*! ../helpers/scale */ 424); var generateScale = _interopRequireDefault(_scale).default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var RESET_START_ANGLE = -1; var valueToDeg = function valueToDeg(_ref) { var min = _ref.min, max = _ref.max, value = _ref.value; return computeProgress({ min: min, max: max, value: value, progressionTarget: TRACK_TOTAL_DEG }); }; var degToValue = function degToValue(_ref2) { var min = _ref2.min, max = _ref2.max, deg = _ref2.deg; return computeProgress({ min: 0, max: TRACK_TOTAL_DEG, value: deg, progressionTarget: max - min }) + min; }; /** * A knob component that can be turned * to a value between some range. */ var Knob = function (_Component) { _inherits(Knob, _Component); function Knob(props) { _classCallCheck(this, Knob); var _this = _possibleConstructorReturn(this, (Knob.__proto__ || Object.getPrototypeOf(Knob)).call(this, props)); var currentDeg = valueToDeg({ min: props.min, max: props.max, value: props.value != null ? props.value : props.min }); _this.state = { min: props.min, max: props.max, value: props.value || props.min, scale: generateScale(props), isDragging: false, startAngle: RESET_START_ANGLE, rotation: currentDeg, currentDeg: currentDeg }; _this.onMouseDown = _this.onMouseDown.bind(_this); _this.onMouseUp = _this.onMouseUp.bind(_this); _this.onMouseMove = _this.onMouseMove.bind(_this); _this.setValue = _this.setValue.bind(_this); return _this; } _createClass(Knob, [{ key: 'noop', value: function noop() {} }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(newProps) { if (typeof newProps.value !== 'undefined') this.setState({ value: newProps.value }); } }, { key: 'componentDidMount', value: function componentDidMount() { window.addEventListener('mouseup', this.onMouseUp, false); // eslint-disable-next-line __webpack_require__(/*! conic-gradient */ 420); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { window.removeEventListener('mouseup', this.onMouseUp, false); } }, { key: 'onMouseDown', value: function onMouseDown() { this.setState({ isDragging: true }); } }, { key: 'onMouseUp', value: function onMouseUp() { if (this.state.isDragging) { this.setState(function (state) { return { rotation: state.currentDeg, isDragging: false, startAngle: RESET_START_ANGLE }; }); } } }, { key: 'onMouseMove', value: function onMouseMove(e) { if (!this.state.isDragging) { return; } var _props = this.props, min = _props.min, max = _props.max; var rotation = this.state.rotation; var startAngle = this.state.startAngle; if (e.touches) { e = e.touches[0]; } var rect = this.knobElement.getBoundingClientRect(); var centerX = rect.width / 2 + rect.left; var centerY = rect.height / 2 + rect.top; var radians = Math.atan2(e.clientX - centerX, e.clientY - centerY); var angle = radians * (180 / Math.PI); if (e.clientX - centerX >= 0) { angle = Math.abs(360 - angle) + 180; } else { angle = angle - 180; } angle = Math.abs(angle); if (startAngle === RESET_START_ANGLE) { startAngle = angle; this.setState({ startAngle: startAngle }); } var tmp = Math.floor(angle - startAngle + rotation); tmp = Math.min(tmp, TRACK_TOTAL_DEG); tmp = Math.max(tmp, 0); this.setState({ currentDeg: tmp }); this.setValue(roundToDecimal(degToValue({ min: min, max: max, deg: tmp }), 2)); } }, { key: 'setValue', value: function setValue(value) { this.setState({ value: value }); if (this.props.setProps) this.props.setProps({ value: value }); } }, { key: 'render', value: function render() { var _this2 = this; var _state = this.state, min = _state.min, max = _state.max, value = _state.value; var progress = computeProgress({ min: min, max: max, value: value, progressionTarget: 1 }); return React.createElement( 'div', { id: this.props.id, className: this.props.className, style: this.props.style }, React.createElement( LabelContainer, _extends({}, this.props, { labelCSS: this.props.labelPosition === 'top' ? null : 'transform: translateY(-40px);' }), React.createElement( Container, { color: getColorValue(this.props.color) }, React.createElement(KnobSvg, _extends({ progress: progress }, this.props, this.state, { refFunc: function refFunc(ele) { return _this2.knobElement = ele; }, onMouseDown: this.props.disabled ? this.noop : this.onMouseDown, onMouseUp: this.props.disabled ? this.noop : this.onMouseUp, onMouseMove: this.props.disabled ? this.noop : this.onMouseMove })) ) ) ); } }]); return Knob; }(Component); Knob.defaultProps = { min: 0, max: 10, theme: light, labelPosition: 'top' }; Knob.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The value of knob */ value: PropTypes.number, /** * Color configuration for the knob's track. */ color: PropTypes.oneOfType([ /** * Color used for knob's track/indicator */ PropTypes.string, /** * Color ranges configuration. */ PropTypes.shape({ /** * Color used for current value text and other minor accents */ default: PropTypes.string, /** * Display ranges as a gradient between given colors. */ gradient: PropTypes.bool, /** * Define multiple color ranges on the knob's track. * The key determines the color of the range and * the value is the start,end of the range itself. * Ranges must be contiguous along the entirety * of the knob's range of values. */ ranges: PropTypes.shape({ color: PropTypes.arrayOf(PropTypes.number) }) })]), /** * The size (diameter) of the knob in pixels */ size: PropTypes.number, /** * The minimum value of the knob */ min: PropTypes.number, /** * The maximum value of the knob */ max: PropTypes.number, /** * If true, knob cannot be moved. */ disabled: PropTypes.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the knob label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: PropTypes.shape({ /** * Value to start the scale from. Defaults * to min. */ start: PropTypes.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: PropTypes.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: PropTypes.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: PropTypes.oneOfType([ /** * Label for the mark */ PropTypes.number, /** * Style object with label */ PropTypes.shape({ style: PropTypes.string, label: PropTypes.string })]) }), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object, /** * Dash-assigned callback that gets fired when selected * value changes. */ setProps: PropTypes.func }; exports.default = withTheme(Knob); /***/ }), /* 429 */ /*!**********************************!*\ !*** ./helpers/KnobSvg.react.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; var _DarkGradient = __webpack_require__(/*! ../styled/shared/DarkGradient */ 415); var darkGradientDefs = _interopRequireDefault(_DarkGradient).default; var _util = __webpack_require__(/*! ./util */ 416); var getRandomInt = _util.getRandomInt; var _TrackSvg = __webpack_require__(/*! ./shared/TrackSvg */ 417); var drawScale = _TrackSvg.drawScale; var colorRangesTrack = _TrackSvg.colorRangesTrack; var lightTrack = _TrackSvg.lightTrack; var _colorRanges = __webpack_require__(/*! ./colorRanges */ 418); var getColorValue = _colorRanges.getColorValue; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var START_ANGLE_OFFSET = -225; var lightKnob = function lightKnob(newAngle, _ref) { var CX = _ref.CX, CY = _ref.CY, KNOB_RAD = _ref.KNOB_RAD; return React.createElement( 'g', { transform: 'translate(' + CX + ' ' + CY + ') rotate(' + newAngle + ')' }, React.createElement('circle', { className: 'base', cx: '0', cy: '0', r: KNOB_RAD, fill: '#fff' }), React.createElement('circle', { className: 'indent', cx: KNOB_RAD * (2 / 3), cy: '0', r: KNOB_RAD / 6, fill: '#fff' }) ); }; var darkKnob = function darkKnob(color, newAngle, _ref2) { var CX = _ref2.CX, CY = _ref2.CY, KNOB_RAD = _ref2.KNOB_RAD; var id = getRandomInt(); return React.createElement( 'g', { transform: 'translate(' + CX + ' ' + CY + ')' }, React.createElement( 'defs', null, React.createElement('path', { id: 'base-edge-' + id, strokeWidth: '2px', fill: 'none', d: 'M-' + KNOB_RAD + ',0a' + KNOB_RAD + ',' + KNOB_RAD + ' 0 1,0 ' + KNOB_RAD * 2 + ',0a' + KNOB_RAD + ',' + KNOB_RAD + ' 0 1,0 -' + KNOB_RAD * 2 + ',0' }), React.createElement('circle', { id: 'base-' + id, className: 'base', cx: '0', cy: '0', r: KNOB_RAD }), React.createElement('rect', { id: 'indent-' + id, width: '8', height: '2', x: KNOB_RAD - 16, y: '0', rx: '1' }) ), React.createElement('use', { fill: '#141414', xlinkHref: '#base-' + id }), React.createElement('use', { fill: 'url(#l)', style: { mixBlendMode: 'overlay' }, xlinkHref: '#base-' + id }), React.createElement('use', { fill: 'url(#m)', style: { mixBlendMode: 'overlay' }, xlinkHref: '#base-' + id }), React.createElement('use', { fill: '#141414', filter: 'url(#n)', xlinkHref: '#base-' + id }), React.createElement('use', { stroke: '#000000', xlinkHref: '#base-edge-' + id }), React.createElement('use', { stroke: 'url(#p)', style: { mixBlendMode: 'overlay' }, xlinkHref: '#base-edge-' + id }), React.createElement('use', { stroke: 'url(#q)', strokeOpacity: '.4', xlinkHref: '#base-edge-' + id }), React.createElement( 'g', { transform: 'rotate(' + newAngle + ')' }, React.createElement('use', { fill: 'black', filter: 'url(#r)', xlinkHref: '#indent-' + id }), React.createElement('use', { fill: getColorValue(color) || '#ABE2FB', xlinkHref: '#indent-' + id }), React.createElement('use', { fill: 'black', filter: 'url(#t)', xlinkHref: '#indent-' + id }) ) ); }; var darkTrack = function darkTrack(props, dimensions) { var progress = props.progress; var CX = dimensions.CX, CY = dimensions.CY, GAUGE_RAD = dimensions.GAUGE_RAD, CIRCLE_CIR = dimensions.CIRCLE_CIR, GAP_ARC_LENGTH = dimensions.GAP_ARC_LENGTH, TRACK_ARC_LENGTH = dimensions.TRACK_ARC_LENGTH; var id = getRandomInt(); var hasColorRanges = props.color && props.color.ranges; return React.createElement( 'g', null, React.createElement( 'defs', null, React.createElement('circle', { id: 'knob-track-' + id, className: 'track', cx: CX, cy: CY, r: GAUGE_RAD, fill: 'none', strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH, strokeWidth: '6', transform: 'rotate(-225 ' + CX + ' ' + CY + ')' }), React.createElement('circle', { id: 'knob-track-progress-' + id, className: 'track progress', cx: CX, cy: CY, r: GAUGE_RAD, fill: 'none', strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH + (1 - progress) * TRACK_ARC_LENGTH, strokeWidth: '6', transform: 'rotate(-225 ' + CX + ' ' + CY + ')' }) ), React.createElement('use', { stroke: '#15181A', filter: 'url(#a)', xlinkHref: '#knob-track-' + id }), hasColorRanges && React.createElement('use', { stroke: '#15181A', xlinkHref: '#knob-track-' + id }), React.createElement('use', { stroke: 'url(#c)', style: { mixBlendMode: 'overlay' }, xlinkHref: '#knob-track-' + id }), React.createElement('use', { stroke: '#15181A', filter: 'url(#d)', xlinkHref: '#knob-track-' + id }), !hasColorRanges && React.createElement('use', { stroke: 'black', filter: 'url(#e)', xlinkHref: '#knob-track-progress-' + id }), React.createElement('use', { stroke: 'url(#g)', style: { mixBlendMode: 'overlay' }, xlinkHref: '#knob-track-progress-' + id }), React.createElement('use', { stroke: getColorValue(props.color) || '#ABE2FB', xlinkHref: '#knob-track-progress-' + id }), props.color && props.color.ranges && colorRangesTrack(props, dimensions) ); }; var KnobSvg = function KnobSvg(props) { var theme = props.theme, currentDeg = props.currentDeg, disabled = props.disabled, color = props.color; var newAngle = currentDeg + START_ANGLE_OFFSET; var dimensions = calcDimensions(props); var knob = theme.dark ? darkKnob(color, newAngle, dimensions) : lightKnob(newAngle, dimensions); var track = theme.dark ? darkTrack(props, dimensions) : lightTrack(props, dimensions); return React.createElement( 'svg', { width: dimensions.SVG_WIDTH, height: dimensions.SVG_WIDTH, viewBox: '0 0 ' + dimensions.SVG_WIDTH + ' ' + dimensions.SVG_WIDTH }, theme.dark && darkGradientDefs, React.createElement( 'g', { className: 'scale' }, drawScale(props, dimensions) ), React.createElement( 'g', { ref: props.refFunc, onMouseDown: props.onMouseDown, onMouseUp: props.onMouseUp, onMouseMove: props.onMouseMove, className: 'knob ' + (disabled ? 'disabled' : '') }, knob ), track ); }; KnobSvg.defaultProps = { theme: light, size: 144 }; exports.default = KnobSvg; // private helpers function calcDimensions(_ref3) { var size = _ref3.size; var OFFSET = 36; var d = {}; d.SVG_WIDTH = size + 80; d.CY = ~~(d.SVG_WIDTH / 2); d.CX = ~~(d.SVG_WIDTH / 2); d.GAUGE_RAD = size / 2; d.SCALE_RAD = d.GAUGE_RAD + OFFSET; d.KNOB_RAD = d.GAUGE_RAD - 12; d.CIRCLE_CIR = 2 * Math.PI * d.GAUGE_RAD; d.GAP_ARC_LENGTH = 90 / 360 * (2 * Math.PI * d.GAUGE_RAD); d.TRACK_ARC_LENGTH = d.CIRCLE_CIR - d.GAP_ARC_LENGTH; d.SCALE_TICK_OUTER_RAD = d.SCALE_RAD - 27; d.SCALE_TICK_INNER_RAD = d.SCALE_TICK_OUTER_RAD - 0.5; d.SCALE_TEXT_RAD = d.SCALE_RAD - 20; return d; } /***/ }), /* 430 */ /*!*******************************!*\ !*** ./styled/Knob.styled.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _templateObject = _taggedTemplateLiteral(['\n & svg {\n text-align: center;\n }\n\n & circle {\n user-select: none;\n }\n\n & .scale {\n font-size: 12px;\n user-select: none;\n }\n\n & .tick {\n stroke: ', ';\n stroke-width: 2;\n }\n\n & .knob {\n cursor: pointer;\n }\n\n & .disabled {\n opacity: ', ';\n cursor: not-allowed;\n }\n\n & .track.progress {\n stroke: ', ';\n }\n\n ', ';\n'], ['\n & svg {\n text-align: center;\n }\n\n & circle {\n user-select: none;\n }\n\n & .scale {\n font-size: 12px;\n user-select: none;\n }\n\n & .tick {\n stroke: ', ';\n stroke-width: 2;\n }\n\n & .knob {\n cursor: pointer;\n }\n\n & .disabled {\n opacity: ', ';\n cursor: not-allowed;\n }\n\n & .track.progress {\n stroke: ', ';\n }\n\n ', ';\n']), _templateObject2 = _taggedTemplateLiteral(['\n & .scale {\n fill: #5b6268;\n }\n\n & .track {\n stroke: #e6e6e6;\n }\n\n & .knob .base,\n .knob .indent {\n stroke: #e6e6e6;\n stroke-width: 2;\n }\n'], ['\n & .scale {\n fill: #5b6268;\n }\n\n & .track {\n stroke: #e6e6e6;\n }\n\n & .knob .base,\n .knob .indent {\n stroke: #e6e6e6;\n stroke-width: 2;\n }\n']), _templateObject3 = _taggedTemplateLiteral(['\n & .scale {\n fill: #fff;\n }\n'], ['\n & .scale {\n fill: #fff;\n }\n']); var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; var _constants = __webpack_require__(/*! ./constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = styled.div(_templateObject, function (props) { return props.theme.detail; }, function (_ref) { var theme = _ref.theme; return theme.dark ? 1 : 0.65; }, function (_ref2) { var color = _ref2.color, theme = _ref2.theme; return color || theme.primary; }, function (_ref3) { var theme = _ref3.theme; return theme.dark ? darkTheme : lightTheme; }); var lightTheme = css(_templateObject2); var darkTheme = css(_templateObject3); Container.defaultProps = { theme: light }; exports.default = Container; /***/ }), /* 431 */ /*!****************************************!*\ !*** ./components/LEDDisplay.react.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var withTheme = _styledComponents.withTheme; var _LEDDisplaySvg = __webpack_require__(/*! ../helpers/LEDDisplaySvg.react */ 432); var Digit = _LEDDisplaySvg.Digit; var _LEDDisplay = __webpack_require__(/*! ../styled/LEDDisplay.styled */ 433); var LEDContainer = _LEDDisplay.LEDContainer; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var colors = _constants.colors; var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var VALID_INPUT = /^(\-)?((\.|:)?[0-9])*$/; var isValidInput = VALID_INPUT.test.bind(VALID_INPUT); /** * A 7-bar LED display component. */ var LEDDisplay = function LEDDisplay(props) { var digits = isValidInput(props.value) ? extractDigits(props) : null; var led = React.createElement( LEDContainer, { backgroundColor: props.backgroundColor }, digits ); return React.createElement( 'div', { id: props.id, className: props.className, style: props.style }, React.createElement( LabelContainer, props, digits ? led : 'Invalid Input' ) ); }; function extractDigits(_ref) { var value = _ref.value, color = _ref.color, backgroundColor = _ref.backgroundColor, theme = _ref.theme, size = _ref.size; var digitStack = value.toString().split('').reverse(); var formattedDigits = []; addLeadingZeroIfNeeded(digitStack); var currKey = 0; while (digitStack.length) { var currDigit = digitStack.pop(); var nextDigit = digitStack.pop(); formattedDigits.push(React.createElement(Digit, { theme: theme, key: currKey++, value: currDigit, hasColon: nextDigit === ':', hasDecimal: nextDigit === '.', color: color, backgroundColor: backgroundColor, size: size })); if (nextDigit && nextDigit !== '.' && nextDigit !== ':') digitStack.push(nextDigit); } return formattedDigits; } function addLeadingZeroIfNeeded(digits) { var isNegative = false; if (digits[digits.length - 1] === '-') { isNegative = true; digits.pop(); } var leadingDigit = digits[digits.length - 1]; if (['.', ':'].includes(leadingDigit)) digits.push('0'); if (isNegative) digits.push('-'); } LEDDisplay.defaultProps = { color: colors.PRIMARY, backgroundColor: '#fff', size: 42, theme: light, labelPosition: 'top' }; LEDDisplay.propTypes = { /** * The ID used to identify the display in Dash callbacks */ id: PropTypes.string, /** * Value to be displayed. A number or a string * containing only digits (0-9), periods, and colons, * and possibly starting with a minus sign. */ value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * Color of the display */ color: PropTypes.string, /** * Color of the display's background */ backgroundColor: PropTypes.string, /** * Size of the display */ size: PropTypes.number, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the display label is positioned */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element */ className: PropTypes.string, /** * Style to apply to the root component element */ style: PropTypes.object }; exports.default = withTheme(LEDDisplay); /***/ }), /* 432 */ /*!****************************************!*\ !*** ./helpers/LEDDisplaySvg.react.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Digit = undefined; var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _color = __webpack_require__(/*! color */ 404); var Color = _interopRequireDefault(_color).default; var _LEDDisplay = __webpack_require__(/*! ../styled/LEDDisplay.styled */ 433); var DarkDigitContainer = _LEDDisplay.DarkDigitContainer; var _DarkGradient = __webpack_require__(/*! ../styled/shared/DarkGradient */ 415); var darkLEDDefs = _DarkGradient.darkLEDDefs; var DARK_SEGMENTS = _DarkGradient.DARK_SEGMENTS; var darkColon = _DarkGradient.darkColon; var darkDecimal = _DarkGradient.darkDecimal; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var DIGITS = { 0: ['A', 'B', 'C', 'D', 'E', 'F'], 1: ['B', 'C'], 2: ['A', 'B', 'G', 'E', 'D'], 3: ['A', 'B', 'G', 'C', 'D'], 4: ['F', 'G', 'B', 'C'], 5: ['A', 'F', 'G', 'C', 'D'], 6: ['A', 'F', 'G', 'C', 'D', 'E'], 7: ['A', 'B', 'C'], 8: ['A', 'B', 'C', 'D', 'E', 'F', 'G'], 9: ['A', 'B', 'C', 'D', 'F', 'G'], '-': ['G'] }; // See the following link for segment mappings: // https://en.wikipedia.org/wiki/Seven-segment_display#/media/File:7_segment_display_labeled.svg var LIGHT_SEGMENTS = { A: { base: 'M3.778 3.778L6.555 1h16.667L26 3.778l-2.778 2.778H6.555L3.778 3.778z', stroke: 'M3.778 3.778L6.555 1h16.667L26 3.778l-2.778 2.778H6.555L3.778 3.778z' }, B: { base: 'M26 3.778l2.778 2.777v16.667L26 26l-2.778-2.778V6.555L26 3.778z', stroke: 'M26 3.778l2.778 2.777v16.667L26 26l-2.778-2.778V6.555L26 3.778z' }, C: { base: 'M26 26l2.778 2.778v16.666L26 48.222l-2.778-2.778V28.778L26 26z', stroke: 'M26 26l2.778 2.778v16.666L26 48.222l-2.778-2.778V28.778L26 26z' }, D: { base: 'M26 48.222L23.222 51H6.555l-2.777-2.778 2.777-2.778h16.667L26 48.222z', stroke: 'M26 48.222L23.222 51H6.555l-2.777-2.778 2.777-2.778h16.667L26 48.222z' }, E: { base: 'M3.778 48.222L1 45.444V28.778L3.778 26l2.778 2.778v16.666l-2.778 2.778z', stroke: 'M3.778 48.222L1 45.444V28.778L3.778 26l2.778 2.778v16.666l-2.778 2.778z' }, F: { base: 'M3.778 26L1 23.222V6.555l2.778-2.777 2.778 2.777v16.667L3.778 26z', stroke: 'M3.778 26L1 23.222V6.555l2.778-2.777 2.778 2.777v16.667L3.778 26z' }, G: { base: 'M3.778 26l2.777-2.778h16.667L26 26l-2.778 2.778H6.555L3.778 26z', stroke: 'M3.778 26l2.777-2.778h16.667L26 26l-2.778 2.778H6.555L3.778 26z' } }; var LightSegment = function LightSegment(_ref) { var _ref$paths = _ref.paths, base = _ref$paths.base, stroke = _ref$paths.stroke, fillColor = _ref.fillColor, strokeColor = _ref.strokeColor; return React.createElement( 'g', null, React.createElement('path', { fill: fillColor, fillRule: 'evenodd', d: base, clipRule: 'evenodd' }), React.createElement('path', { stroke: strokeColor, strokeWidth: '.75', d: stroke }) ); }; var LightDecimal = function LightDecimal(_ref2) { var fillColor = _ref2.fillColor, strokeColor = _ref2.strokeColor; return React.createElement( 'g', { transform: 'translate(29 46)' }, React.createElement('circle', { cx: '3', cy: '3', r: '3', fill: fillColor }), React.createElement('circle', { cx: '3', cy: '3', r: '3', stroke: strokeColor, strokeWidth: '.75' }) ); }; var LightColon = function LightColon(_ref3) { var fillColor = _ref3.fillColor, strokeColor = _ref3.strokeColor; return React.createElement( 'g', null, React.createElement( 'g', { transform: 'translate(32 36)' }, React.createElement('circle', { cx: '3', cy: '3', r: '3', fill: fillColor }), React.createElement('circle', { cx: '3', cy: '3', r: '3', stroke: strokeColor, strokeWidth: '.75' }) ), React.createElement( 'g', { transform: 'translate(32 9)' }, React.createElement('circle', { cx: '3', cy: '3', r: '3', fill: fillColor }), React.createElement('circle', { cx: '3', cy: '3', r: '3', stroke: strokeColor, strokeWidth: '.75' }) ) ); }; var LightDigit = function LightDigit(_ref4) { var value = _ref4.value, hasColon = _ref4.hasColon, hasDecimal = _ref4.hasDecimal, color = _ref4.color, backgroundColor = _ref4.backgroundColor, size = _ref4.size; var inactiveSegmentFill = Color(backgroundColor).darken(0.2).fade(0.85); var activeSegments = DIGITS[value].map(function (letter) { return React.createElement(LightSegment, { key: letter, fillColor: color, strokeColor: backgroundColor, paths: LIGHT_SEGMENTS[letter] }); }); var inactiveSegments = ['A', 'B', 'C', 'D', 'E', 'F', 'G'].map(function (letter) { return React.createElement(LightSegment, { key: letter, fillColor: inactiveSegmentFill, strokeColor: backgroundColor, paths: LIGHT_SEGMENTS[letter] }); }); var width = hasColon ? size : size * (6 / 7); var height = size * (9 / 7); return React.createElement( 'svg', { xmlns: 'http://www.w3.org/2000/svg', width: width, height: height }, React.createElement( 'g', { fill: 'none', style: { transform: 'scale(' + Number(size) / 42 + ')' } }, inactiveSegments, activeSegments, hasColon && React.createElement(LightColon, { fillColor: color, strokeColor: backgroundColor }), hasDecimal && React.createElement(LightDecimal, { fillColor: color, strokeColor: backgroundColor }) ) ); }; var DarkDigit = function DarkDigit(_ref5) { var value = _ref5.value, hasColon = _ref5.hasColon, hasDecimal = _ref5.hasDecimal, color = _ref5.color, size = _ref5.size; var segments = DIGITS[value].map(function (letter) { return DARK_SEGMENTS[letter]; }); var width = hasColon ? size : size * (6 / 7); var height = size * (9 / 7); return React.createElement( DarkDigitContainer, { color: color }, React.createElement( 'svg', { xmlns: 'http://www.w3.org/2000/svg', xmlnsXlink: 'http://www.w3.org/1999/xlink', width: width, height: height }, darkLEDDefs, React.createElement( 'g', { fill: 'none', fillRule: 'evenodd', filter: 'url(#darkLED-a)', style: { transform: 'scale(' + Number(size) / 42 + ')' } }, segments, hasColon && darkColon, hasDecimal && darkDecimal ) ) ); }; var Digit = exports.Digit = function Digit(props) { return props.theme.dark ? React.createElement(DarkDigit, props) : React.createElement(LightDigit, props); }; exports.default = Digit; /***/ }), /* 433 */ /*!*************************************!*\ !*** ./styled/LEDDisplay.styled.js ***! \*************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.DarkDigitContainer = exports.LEDContainer = undefined; var _templateObject = _taggedTemplateLiteral(['\n display: inline-flex;\n\n ', ';\n'], ['\n display: inline-flex;\n\n ', ';\n']), _templateObject2 = _taggedTemplateLiteral(['\n padding: 12px 8px 4px 16px;\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n'], ['\n padding: 12px 8px 4px 16px;\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n']), _templateObject3 = _taggedTemplateLiteral(['\n border-radius: 3px;\n padding: 12px 8px 12px 14px;\n border: 1px solid ', ';\n background: ', ';\n'], ['\n border-radius: 3px;\n padding: 12px 8px 12px 14px;\n border: 1px solid ', ';\n background: ', ';\n']), _templateObject4 = _taggedTemplateLiteral(['\n & .darkLED-fill {\n fill: ', ';\n }\n'], ['\n & .darkLED-fill {\n fill: ', ';\n }\n']); var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; var _constants = __webpack_require__(/*! ./constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var LEDContainer = exports.LEDContainer = styled.div(_templateObject, function (_ref) { var theme = _ref.theme; return theme.dark ? darkLEDContainer : lightLEDContainer; }); var darkLEDContainer = css(_templateObject2); var lightLEDContainer = css(_templateObject3, function (_ref2) { var theme = _ref2.theme; return theme.detail; }, function (_ref3) { var backgroundColor = _ref3.backgroundColor; return backgroundColor; }); LEDContainer.defaultProps = { theme: light }; var DarkDigitContainer = exports.DarkDigitContainer = styled.div(_templateObject4, function (_ref4) { var color = _ref4.color; return color; }); exports.default = LEDContainer; /***/ }), /* 434 */ /*!******************************************!*\ !*** ./components/NumericInput.react.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var Component = _react.Component; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var withTheme = _styledComponents.withTheme; var _reactNumericInput = __webpack_require__(/*! react-numeric-input */ 435); var Input = _interopRequireDefault(_reactNumericInput).default; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; var colors = _constants.colors; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * A numeric input component that can be * set to a value between some range. */ var NumericInput = function (_Component) { _inherits(NumericInput, _Component); function NumericInput(props) { _classCallCheck(this, NumericInput); var _this = _possibleConstructorReturn(this, (NumericInput.__proto__ || Object.getPrototypeOf(NumericInput)).call(this, props)); _this.state = { value: props.value || props.min }; _this.setValue = _this.setValue.bind(_this); return _this; } _createClass(NumericInput, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(newProps) { if (newProps.value !== this.state.value) this.setState({ value: newProps.value }); } }, { key: 'setValue', value: function setValue(value) { if (value != null && value >= this.props.min && value <= this.props.max) { this.setState({ value: value }); if (this.props.setProps) this.props.setProps({ value: value }); } } }, { key: 'render', value: function render() { var _props = this.props, size = _props.size, theme = _props.theme; var buttonStyle = { background: 'none', boxShadow: 'none', border: 'none', color: theme.secondary, cursor: 'pointer' }; var padding = Math.max(this.state.value ? 16 - 2 * this.state.value.toString().length : 16, 10); var inputStyle = { borderRadius: 3, border: theme.dark ? 'none' : '1px solid ' + colors.GREY, outline: 'none', paddingRight: padding, paddingLeft: padding, paddingTop: 8, paddingBottom: 8, width: size || 56, color: theme.dark ? '#fff' : colors.OFF_WHITE, fontSize: 14, boxSizing: 'border-box' }; return React.createElement( 'div', { id: this.props.id, className: this.props.className, style: this.props.style }, React.createElement( LabelContainer, this.props, React.createElement(Input, { disabled: this.props.disabled, style: { input: inputStyle, 'input:not(.form-control)': inputStyle, btn: buttonStyle, 'btn:hover': buttonStyle, 'btn:active': buttonStyle, 'input:disabled': { opacity: 0.65, cursor: 'not-allowed' } }, min: this.props.min, max: this.props.max, value: this.state.value, onChange: this.setValue, mobile: false }) ) ); } }]); return NumericInput; }(Component); NumericInput.defaultProps = { min: 0, max: 10, theme: light, labelPosition: 'top' }; NumericInput.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The value of numeric input */ value: PropTypes.number, /** * The size (length) of the numeric input in pixels */ size: PropTypes.number, /** * The minimum value of the numeric input */ min: PropTypes.number, /** * The maximum value of the numeric input */ max: PropTypes.number, /** * If true, numeric input cannot changed. */ disabled: PropTypes.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the numeric input label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object, /** * Dash-assigned callback that gets fired when selected * value changes. */ setProps: PropTypes.func }; exports.default = withTheme(NumericInput); /***/ }), /* 435 */ /*!*****************************************!*\ !*** ../~/react-numeric-input/index.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(2); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var KEYCODE_UP = 38; var KEYCODE_DOWN = 40; var IS_BROWSER = typeof document != 'undefined'; var RE_NUMBER = /^[+-]?((\.\d+)|(\d+(\.\d+)?))$/; var RE_INCOMPLETE_NUMBER = /^([+-]|\.0*|[+-]\.0*|[+-]?\d+\.)?$/; function addClass(element, className) { if (element.classList) { return element.classList.add(className); } if (!element.className.search(new RegExp("\\b" + className + "\\b"))) { element.className = " " + className; } } function removeClass(element, className) { if (element.className) { if (element.classList) { return element.classList.remove(className); } element.className = element.className.replace(new RegExp("\\b" + className + "\\b", "g"), ""); } } function access(object, prop, defaultValue) { var result = object[prop]; if (typeof result == "function") { for (var _len = arguments.length, args = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { args[_key - 3] = arguments[_key]; } result = result.apply(undefined, args); } return result === undefined ? defaultValue : result; } var NumericInput = function (_Component) { _inherits(NumericInput, _Component); function NumericInput() { var _ref; _classCallCheck(this, NumericInput); for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } var _this = _possibleConstructorReturn(this, (_ref = NumericInput.__proto__ || Object.getPrototypeOf(NumericInput)).call.apply(_ref, [this].concat(args))); _this._isStrict = !!_this.props.strict; _this.state = _extends({ btnDownHover: false, btnDownActive: false, btnUpHover: false, btnUpActive: false, stringValue: "" }, _this._propsToState(_this.props)); _this.stop = _this.stop.bind(_this); _this.onTouchEnd = _this.onTouchEnd.bind(_this); _this.refsInput = {}; _this.refsWrapper = {}; return _this; } _createClass(NumericInput, [{ key: '_propsToState', value: function _propsToState(props) { var out = {}; if (props.hasOwnProperty("value")) { out.stringValue = String(props.value || props.value === 0 ? props.value : '').trim(); out.value = out.stringValue !== '' ? this._parse(props.value) : null; } else if (!this._isMounted && props.hasOwnProperty("defaultValue")) { out.stringValue = String(props.defaultValue || props.defaultValue === 0 ? props.defaultValue : '').trim(); out.value = props.defaultValue !== '' ? this._parse(props.defaultValue) : null; } return out; } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(props) { var _this2 = this; this._isStrict = !!props.strict; var nextState = this._propsToState(props); if (Object.keys(nextState).length) { this._ignoreValueChange = true; this.setState(nextState, function () { _this2._ignoreValueChange = false; }); } } }, { key: 'componentWillUpdate', value: function componentWillUpdate() { this.saveSelection(); } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { if (!this._ignoreValueChange && prevState.value !== this.state.value && (!isNaN(this.state.value) || this.state.value === null)) { this._invokeEventCallback("onChange", this.state.value, this.refsInput.value, this.refsInput); } if (this._inputFocus) { this.refsInput.focus(); if (this.state.selectionStart || this.state.selectionStart === 0) { this.refsInput.selectionStart = this.state.selectionStart; } if (this.state.selectionEnd || this.state.selectionEnd === 0) { this.refsInput.selectionEnd = this.state.selectionEnd; } } this.checkValidity(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this._isMounted = false; this.stop(); } }, { key: 'componentDidMount', value: function componentDidMount() { var _this3 = this; this._isMounted = true; this.refsInput.getValueAsNumber = function () { return _this3.state.value || 0; }; this.refsInput.setValue = function (value) { _this3.setState({ value: _this3._parse(value), stringValue: value }); }; if (!this._inputFocus && IS_BROWSER && document.activeElement === this.refsInput) { this._inputFocus = true; this.refsInput.focus(); this._invokeEventCallback("onFocus", { target: this.refsInput, type: "focus" }); } this.checkValidity(); } }, { key: 'saveSelection', value: function saveSelection() { this.state.selectionStart = this.refsInput.selectionStart; this.state.selectionEnd = this.refsInput.selectionEnd; } }, { key: 'checkValidity', value: function checkValidity() { var valid = void 0, validationError = ""; var supportsValidation = !!this.refsInput.checkValidity; var noValidate = !!(this.props.noValidate && this.props.noValidate != "false"); this.refsInput.noValidate = noValidate; valid = noValidate || !supportsValidation; if (valid) { validationError = ""; } else { if (this.refsInput.pattern === "") { this.refsInput.pattern = this.props.required ? ".+" : ".*"; } if (supportsValidation) { this.refsInput.checkValidity(); valid = this.refsInput.validity.valid; if (!valid) { validationError = this.refsInput.validationMessage; } } if (valid && supportsValidation && this.props.maxLength) { if (this.refsInput.value.length > this.props.maxLength) { validationError = "This value is too long"; } } } validationError = validationError || (valid ? "" : this.refsInput.validationMessage || "Unknown Error"); var validStateChanged = this._valid !== validationError; this._valid = validationError; if (validationError) { addClass(this.refsWrapper, "has-error"); if (validStateChanged) { this._invokeEventCallback("onInvalid", validationError, this.state.value, this.refsInput.value); } } else { removeClass(this.refsWrapper, "has-error"); if (validStateChanged) { this._invokeEventCallback("onValid", this.state.value, this.refsInput.value); } } } }, { key: '_toNumber', value: function _toNumber(x) { var n = parseFloat(x); if (isNaN(n) || !isFinite(n)) { n = 0; } if (this._isStrict) { var precision = access(this.props, "precision", null, this); var q = Math.pow(10, precision === null ? 10 : precision); var _min = +access(this.props, "min", NumericInput.defaultProps.min, this); var _max = +access(this.props, "max", NumericInput.defaultProps.max, this); n = Math.min(Math.max(n, _min), _max); n = Math.round(n * q) / q; } return n; } }, { key: '_parse', value: function _parse(x) { x = String(x); if (typeof this.props.parse == 'function') { return parseFloat(this.props.parse(x)); } return parseFloat(x); } }, { key: '_format', value: function _format(n) { var _n = this._toNumber(n); var precision = access(this.props, "precision", null, this); if (precision !== null) { _n = n.toFixed(precision); } _n += ""; if (this.props.format) { return this.props.format(_n); } return _n; } }, { key: '_step', value: function _step(n, callback) { var _isStrict = this._isStrict; this._isStrict = true; var _step = +access(this.props, "step", NumericInput.defaultProps.step, this, n > 0 ? NumericInput.DIRECTION_UP : NumericInput.DIRECTION_DOWN); var _n = this._toNumber((this.state.value || 0) + _step * n); if (this.props.snap) { _n = Math.round(_n / _step) * _step; } this._isStrict = _isStrict; if (_n !== this.state.value) { this.setState({ value: _n, stringValue: _n + "" }, callback); return true; } return false; } }, { key: '_onKeyDown', value: function _onKeyDown() { for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { args[_key3] = arguments[_key3]; } args[0].persist(); this._invokeEventCallback.apply(this, ["onKeyDown"].concat(args)); var e = args[0]; if (!e.isDefaultPrevented()) { if (e.keyCode === KEYCODE_UP) { e.preventDefault(); this._step(e.ctrlKey || e.metaKey ? 0.1 : e.shiftKey ? 10 : 1); } else if (e.keyCode === KEYCODE_DOWN) { e.preventDefault(); this._step(e.ctrlKey || e.metaKey ? -0.1 : e.shiftKey ? -10 : -1); } else { var _value = this.refsInput.value, length = _value.length; if (e.keyCode === 8) { if (this.refsInput.selectionStart == this.refsInput.selectionEnd && this.refsInput.selectionEnd > 0 && _value.length && _value.charAt(this.refsInput.selectionEnd - 1) === ".") { e.preventDefault(); this.refsInput.selectionStart = this.refsInput.selectionEnd = this.refsInput.selectionEnd - 1; } } else if (e.keyCode === 46) { if (this.refsInput.selectionStart == this.refsInput.selectionEnd && this.refsInput.selectionEnd < length + 1 && _value.length && _value.charAt(this.refsInput.selectionEnd) === ".") { e.preventDefault(); this.refsInput.selectionStart = this.refsInput.selectionEnd = this.refsInput.selectionEnd + 1; } } } } } }, { key: 'stop', value: function stop() { if (this._timer) { clearTimeout(this._timer); } } }, { key: 'increase', value: function increase() { var _this4 = this; var _recursive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var callback = arguments[1]; this.stop(); this._step(1, callback); var _max = +access(this.props, "max", NumericInput.defaultProps.max, this); if (isNaN(this.state.value) || +this.state.value < _max) { this._timer = setTimeout(function () { _this4.increase(true); }, _recursive ? NumericInput.SPEED : NumericInput.DELAY); } } }, { key: 'decrease', value: function decrease() { var _this5 = this; var _recursive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var callback = arguments[1]; this.stop(); this._step(-1, callback); var _min = +access(this.props, "min", NumericInput.defaultProps.min, this); if (isNaN(this.state.value) || +this.state.value > _min) { this._timer = setTimeout(function () { _this5.decrease(true); }, _recursive ? NumericInput.SPEED : NumericInput.DELAY); } } }, { key: 'onMouseDown', value: function onMouseDown(dir, callback) { if (dir == 'down') { this.decrease(false, callback); } else if (dir == 'up') { this.increase(false, callback); } } }, { key: 'onTouchStart', value: function onTouchStart(dir, e) { e.preventDefault(); if (dir == 'down') { this.decrease(); } else if (dir == 'up') { this.increase(); } } }, { key: 'onTouchEnd', value: function onTouchEnd(e) { e.preventDefault(); this.stop(); } }, { key: '_invokeEventCallback', value: function _invokeEventCallback(callbackName) { if (typeof this.props[callbackName] == "function") { var _props$callbackName; for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { args[_key4 - 1] = arguments[_key4]; } (_props$callbackName = this.props[callbackName]).call.apply(_props$callbackName, [null].concat(args)); } } }, { key: 'render', value: function render() { var _this6 = this; var props = this.props; var state = this.state; var css = {}; var _props = this.props, step = _props.step, min = _props.min, max = _props.max, precision = _props.precision, parse = _props.parse, format = _props.format, mobile = _props.mobile, snap = _props.snap, componentClass = _props.componentClass, value = _props.value, type = _props.type, style = _props.style, defaultValue = _props.defaultValue, onInvalid = _props.onInvalid, onValid = _props.onValid, strict = _props.strict, noStyle = _props.noStyle, rest = _objectWithoutProperties(_props, ['step', 'min', 'max', 'precision', 'parse', 'format', 'mobile', 'snap', 'componentClass', 'value', 'type', 'style', 'defaultValue', 'onInvalid', 'onValid', 'strict', 'noStyle']); noStyle = noStyle || style === false; for (var x in NumericInput.style) { css[x] = _extends({}, NumericInput.style[x], style ? style[x] || {} : {}); } var hasFormControl = props.className && /\bform-control\b/.test(props.className); if (mobile == 'auto') { mobile = IS_BROWSER && 'ontouchstart' in document; } if (typeof mobile == "function") { mobile = mobile.call(this); } mobile = !!mobile; var attrs = { wrap: { style: noStyle ? null : css.wrap, className: 'react-numeric-input', ref: function ref(e) { if (e != null && e != undefined) { _this6.refsWrapper = e; } }, onMouseUp: undefined, onMouseLeave: undefined }, input: _extends({ ref: function ref(e) { if (e != null && e != undefined) { _this6.refsInput = e; } }, type: 'text', style: noStyle ? null : _extends({}, css.input, !hasFormControl ? css['input:not(.form-control)'] : {}, this._inputFocus ? css['input:focus'] : {}) }, rest), btnUp: { onMouseEnter: undefined, onMouseDown: undefined, onMouseUp: undefined, onMouseLeave: undefined, onTouchStart: undefined, onTouchEnd: undefined, style: noStyle ? null : _extends({}, css.btn, css.btnUp, props.disabled || props.readOnly ? css['btn:disabled'] : state.btnUpActive ? css['btn:active'] : state.btnUpHover ? css['btn:hover'] : {}) }, btnDown: { onMouseEnter: undefined, onMouseDown: undefined, onMouseUp: undefined, onMouseLeave: undefined, onTouchStart: undefined, onTouchEnd: undefined, style: noStyle ? null : _extends({}, css.btn, css.btnDown, props.disabled || props.readOnly ? css['btn:disabled'] : state.btnDownActive ? css['btn:active'] : state.btnDownHover ? css['btn:hover'] : {}) } }; var stringValue = String(state.stringValue || (state.value || state.value === 0 ? state.value : "") || ""); var loose = !this._isStrict && (this._inputFocus || !this._isMounted); if (loose && RE_INCOMPLETE_NUMBER.test(stringValue)) { attrs.input.value = stringValue; } else if (loose && stringValue && !RE_NUMBER.test(stringValue)) { attrs.input.value = stringValue; } else if (state.value || state.value === 0) { attrs.input.value = this._format(state.value); } else { attrs.input.value = ""; } if (hasFormControl && !noStyle) { _extends(attrs.wrap.style, css['wrap.hasFormControl']); } if (mobile && !noStyle) { _extends(attrs.input.style, css['input.mobile']); _extends(attrs.btnUp.style, css['btnUp.mobile']); _extends(attrs.btnDown.style, css['btnDown.mobile']); } if (!props.disabled && !props.readOnly) { _extends(attrs.wrap, { onMouseUp: this.stop, onMouseLeave: this.stop }); _extends(attrs.btnUp, { onTouchStart: this.onTouchStart.bind(this, 'up'), onTouchEnd: this.onTouchEnd, onMouseEnter: function onMouseEnter() { _this6.setState({ btnUpHover: true }); }, onMouseLeave: function onMouseLeave() { _this6.stop(); _this6.setState({ btnUpHover: false, btnUpActive: false }); }, onMouseUp: function onMouseUp() { _this6.setState({ btnUpHover: true, btnUpActive: false }); }, onMouseDown: function onMouseDown() { for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { args[_key5] = arguments[_key5]; } args[0].preventDefault(); args[0].persist(); _this6._inputFocus = true; _this6.setState({ btnUpHover: true, btnUpActive: true }, function () { _this6._invokeEventCallback.apply(_this6, ["onFocus"].concat(args)); _this6.onMouseDown('up'); }); } }); _extends(attrs.btnDown, { onTouchStart: this.onTouchStart.bind(this, 'down'), onTouchEnd: this.onTouchEnd, onMouseEnter: function onMouseEnter() { _this6.setState({ btnDownHover: true }); }, onMouseLeave: function onMouseLeave() { _this6.stop(); _this6.setState({ btnDownHover: false, btnDownActive: false }); }, onMouseUp: function onMouseUp() { _this6.setState({ btnDownHover: true, btnDownActive: false }); }, onMouseDown: function onMouseDown() { for (var _len6 = arguments.length, args = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { args[_key6] = arguments[_key6]; } args[0].preventDefault(); args[0].persist(); _this6._inputFocus = true; _this6.setState({ btnDownHover: true, btnDownActive: true }, function () { _this6._invokeEventCallback.apply(_this6, ["onFocus"].concat(args)); _this6.onMouseDown('down'); }); } }); _extends(attrs.input, { onChange: function onChange(e) { var original = e.target.value; var val = _this6._parse(original); if (isNaN(val)) { val = null; } _this6.setState({ value: _this6._isStrict ? _this6._toNumber(val) : val, stringValue: original }); }, onKeyDown: this._onKeyDown.bind(this), onInput: function onInput() { for (var _len7 = arguments.length, args = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { args[_key7] = arguments[_key7]; } _this6.saveSelection(); _this6._invokeEventCallback.apply(_this6, ["onInput"].concat(args)); }, onSelect: function onSelect() { for (var _len8 = arguments.length, args = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { args[_key8] = arguments[_key8]; } _this6.saveSelection(); _this6._invokeEventCallback.apply(_this6, ["onSelect"].concat(args)); }, onFocus: function onFocus() { for (var _len9 = arguments.length, args = Array(_len9), _key9 = 0; _key9 < _len9; _key9++) { args[_key9] = arguments[_key9]; } args[0].persist(); _this6._inputFocus = true; var val = _this6._parse(args[0].target.value); _this6.setState({ value: val, stringValue: val || val === 0 ? val + "" : "" }, function () { _this6._invokeEventCallback.apply(_this6, ["onFocus"].concat(args)); }); }, onBlur: function onBlur() { for (var _len10 = arguments.length, args = Array(_len10), _key10 = 0; _key10 < _len10; _key10++) { args[_key10] = arguments[_key10]; } var _isStrict = _this6._isStrict; _this6._isStrict = true; args[0].persist(); _this6._inputFocus = false; var val = _this6._parse(args[0].target.value); _this6.setState({ value: val }, function () { _this6._invokeEventCallback.apply(_this6, ["onBlur"].concat(args)); _this6._isStrict = _isStrict; }); } }); } else { if (!noStyle && props.disabled) { _extends(attrs.input.style, css['input:disabled']); } } var InputTag = componentClass || 'input'; if (mobile) { return _react2.default.createElement( 'span', attrs.wrap, _react2.default.createElement(InputTag, attrs.input), _react2.default.createElement( 'b', attrs.btnUp, _react2.default.createElement('i', { style: noStyle ? null : css.minus }), _react2.default.createElement('i', { style: noStyle ? null : css.plus }) ), _react2.default.createElement( 'b', attrs.btnDown, _react2.default.createElement('i', { style: noStyle ? null : css.minus }) ) ); } return _react2.default.createElement( 'span', attrs.wrap, _react2.default.createElement(InputTag, attrs.input), _react2.default.createElement( 'b', attrs.btnUp, _react2.default.createElement('i', { style: noStyle ? null : css.arrowUp }) ), _react2.default.createElement( 'b', attrs.btnDown, _react2.default.createElement('i', { style: noStyle ? null : css.arrowDown }) ) ); } }]); return NumericInput; }(_react.Component); NumericInput.propTypes = { step: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.func]), min: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.func]), max: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.func]), precision: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.func]), maxLength: _propTypes2.default.number, parse: _propTypes2.default.func, format: _propTypes2.default.func, className: _propTypes2.default.string, disabled: _propTypes2.default.bool, readOnly: _propTypes2.default.bool, required: _propTypes2.default.bool, snap: _propTypes2.default.bool, noValidate: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.string]), style: _propTypes2.default.oneOfType([_propTypes2.default.object, _propTypes2.default.bool]), noStyle: _propTypes2.default.bool, type: _propTypes2.default.string, pattern: _propTypes2.default.string, onFocus: _propTypes2.default.func, onBlur: _propTypes2.default.func, onKeyDown: _propTypes2.default.func, onChange: _propTypes2.default.func, onInvalid: _propTypes2.default.func, onValid: _propTypes2.default.func, onInput: _propTypes2.default.func, onSelect: _propTypes2.default.func, size: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]), value: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]), defaultValue: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]), strict: _propTypes2.default.bool, componentClass: _propTypes2.default.string, mobile: function mobile(props, propName) { var prop = props[propName]; if (prop !== true && prop !== false && prop !== 'auto' && typeof prop != 'function') { return new Error('The "mobile" prop must be true, false, "auto" or a function'); } } }; NumericInput.defaultProps = { step: 1, min: Number.MIN_SAFE_INTEGER || -9007199254740991, max: Number.MAX_SAFE_INTEGER || 9007199254740991, precision: null, parse: null, format: null, mobile: 'auto', strict: false, componentClass: "input", style: {} }; NumericInput.style = { wrap: { position: 'relative', display: 'inline-block' }, 'wrap.hasFormControl': { display: 'block' }, arrowUp: { position: 'absolute', top: '50%', left: '50%', width: 0, height: 0, borderWidth: '0 0.6ex 0.6ex 0.6ex', borderColor: 'transparent transparent rgba(0, 0, 0, 0.7)', borderStyle: 'solid', margin: '-0.3ex 0 0 -0.56ex' }, arrowDown: { position: 'absolute', top: '50%', left: '50%', width: 0, height: 0, borderWidth: '0.6ex 0.6ex 0 0.6ex', borderColor: 'rgba(0, 0, 0, 0.7) transparent transparent', borderStyle: 'solid', margin: '-0.3ex 0 0 -0.56ex' }, plus: { position: 'absolute', top: '50%', left: '50%', width: 2, height: 10, background: 'rgba(0,0,0,.7)', margin: '-5px 0 0 -1px' }, minus: { position: 'absolute', top: '50%', left: '50%', width: 10, height: 2, background: 'rgba(0,0,0,.7)', margin: '-1px 0 0 -5px' }, btn: { position: 'absolute', right: 2, width: '2.26ex', borderColor: 'rgba(0,0,0,.1)', borderStyle: 'solid', textAlign: 'center', cursor: 'default', transition: 'all 0.1s', background: 'rgba(0,0,0,.1)', boxShadow: '-1px -1px 3px rgba(0,0,0,.1) inset,' + '1px 1px 3px rgba(255,255,255,.7) inset' }, btnUp: { top: 2, bottom: '50%', borderRadius: '2px 2px 0 0', borderWidth: '1px 1px 0 1px' }, 'btnUp.mobile': { width: '3.3ex', bottom: 2, boxShadow: 'none', borderRadius: 2, borderWidth: 1 }, btnDown: { top: '50%', bottom: 2, borderRadius: '0 0 2px 2px', borderWidth: '0 1px 1px 1px' }, 'btnDown.mobile': { width: '3.3ex', bottom: 2, left: 2, top: 2, right: 'auto', boxShadow: 'none', borderRadius: 2, borderWidth: 1 }, 'btn:hover': { background: 'rgba(0,0,0,.2)' }, 'btn:active': { background: 'rgba(0,0,0,.3)', boxShadow: '0 1px 3px rgba(0,0,0,.2) inset,' + '-1px -1px 4px rgba(255,255,255,.5) inset' }, 'btn:disabled': { opacity: 0.5, boxShadow: 'none', cursor: 'not-allowed' }, input: { paddingRight: '3ex', boxSizing: 'border-box', fontSize: 'inherit' }, 'input:not(.form-control)': { border: '1px solid #ccc', borderRadius: 2, paddingLeft: 4, display: 'block', WebkitAppearance: 'none', lineHeight: 'normal' }, 'input.mobile': { paddingLeft: ' 3.4ex', paddingRight: '3.4ex', textAlign: 'center' }, 'input:focus': {}, 'input:disabled': { color: 'rgba(0, 0, 0, 0.3)', textShadow: '0 1px 0 rgba(255, 255, 255, 0.8)' } }; NumericInput.SPEED = 50; NumericInput.DELAY = 500; NumericInput.DIRECTION_UP = "up"; NumericInput.DIRECTION_DOWN = "down"; module.exports = NumericInput; /***/ }), /* 1 */ /***/ (function(module, exports) { module.exports = __webpack_require__(/*! react */ 2); /***/ }), /* 2 */ /***/ (function(module, exports) { module.exports = __webpack_require__(/*! prop-types */ 3); /***/ }) /******/ ]); /***/ }), /* 436 */ /*!*****************************************!*\ !*** ./components/PowerButton.react.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var Component = _react.Component; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var withTheme = _styledComponents.withTheme; var _PowerButton = __webpack_require__(/*! ../styled/PowerButton.styled */ 437); var Container = _PowerButton.Container; var Button = _PowerButton.Button; var _PowerButtonSvg = __webpack_require__(/*! ../helpers/PowerButtonSvg.react */ 438); var PowerButtonSvg = _interopRequireDefault(_PowerButtonSvg).default; var _Indicator = __webpack_require__(/*! ../styled/shared/Indicator.styled */ 20); var Indicator = _interopRequireDefault(_Indicator).default; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * A power button component can be * turned on and off. */ var PowerButton = function (_Component) { _inherits(PowerButton, _Component); function PowerButton(props) { _classCallCheck(this, PowerButton); var _this = _possibleConstructorReturn(this, (PowerButton.__proto__ || Object.getPrototypeOf(PowerButton)).call(this, props)); _this.state = { on: _this.props.on }; _this.onClick = _this.onClick.bind(_this); return _this; } _createClass(PowerButton, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(newProps) { if (newProps.on !== this.state.on) this.setState({ on: newProps.on }); } }, { key: 'onClick', value: function onClick() { var newOnValue = !this.state.on; this.setState({ on: newOnValue }); if (this.props.setProps) this.props.setProps({ on: newOnValue }); } }, { key: 'render', value: function render() { var INDICATOR_SIZE = this.props.size / 10 * 1.25; return React.createElement( 'div', { id: this.props.id, className: this.props.className, style: this.props.style }, React.createElement( LabelContainer, this.props, React.createElement( Container, null, React.createElement( Button, { on: this.state.on, color: this.props.color, size: this.props.size, disabled: this.props.disabled, onClick: this.onClick }, React.createElement(PowerButtonSvg, { on: this.state.on, color: this.props.color, size: this.props.size * 0.3 }) ), React.createElement(Indicator, { on: this.state.on, primary: this.props.color, main: true, size: INDICATOR_SIZE }) ) ) ); } }]); return PowerButton; }(Component); PowerButton.defaultProps = { on: false, theme: light, size: 48, labelPosition: 'top' }; PowerButton.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * Whether or not the power button is on */ on: PropTypes.bool, /** * The indicator color to display when power button is on */ color: PropTypes.string, /** * The size (diameter) of the power button in pixels */ size: PropTypes.number, /** * If true, power button cannot be clicked */ disabled: PropTypes.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the button. To control styling, pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the button label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object, /** * Dash-assigned callback that gets fired when * button is clicked. */ setProps: PropTypes.func }; exports.default = withTheme(PowerButton); /***/ }), /* 437 */ /*!**************************************!*\ !*** ./styled/PowerButton.styled.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Button = exports.Container = undefined; var _templateObject = _taggedTemplateLiteral(['\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n\n & svg {\n margin: 0 auto;\n }\n'], ['\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n\n & svg {\n margin: 0 auto;\n }\n']), _templateObject2 = _taggedTemplateLiteral(['\n cursor: pointer;\n outline: none;\n display: flex;\n justify-content: center;\n align-items: center;\n\n &:disabled {\n opacity: ', ';\n cursor: not-allowed;\n }\n\n ', ';\n'], ['\n cursor: pointer;\n outline: none;\n display: flex;\n justify-content: center;\n align-items: center;\n\n &:disabled {\n opacity: ', ';\n cursor: not-allowed;\n }\n\n ', ';\n']), _templateObject3 = _taggedTemplateLiteral(['\n border-radius: 50%;\n box-sizing: border-box;\n background: #fff;\n border: 1px solid ', ';\n ', ' margin-bottom: ', ';\n padding: 0;\n\n &:focus,\n &:hover {\n border-color: ', ';\n }\n'], ['\n border-radius: 50%;\n box-sizing: border-box;\n background: #fff;\n border: 1px solid ', ';\n ', ' margin-bottom: ', ';\n padding: 0;\n\n &:focus,\n &:hover {\n border-color: ', ';\n }\n']), _templateObject4 = _taggedTemplateLiteral(['\n width: ', 'px;\n height: ', 'px;\n '], ['\n width: ', 'px;\n height: ', 'px;\n ']), _templateObject5 = _taggedTemplateLiteral(['\n ', ' border-radius: 100%;\n padding: 0;\n margin-bottom: 8px;\n\n &::before,\n &::after {\n left: 4%;\n border-radius: 100%;\n transition: all 0.1s ease-in;\n }\n\n &::before {\n top: 8%;\n width: 86%;\n height: 86%;\n }\n\n &::after {\n top: 4%;\n width: 92%;\n height: 92%;\n\n ', ';\n }\n\n &:hover::before {\n background-color: rgba(0, 0, 0, 0.8);\n }\n\n &:hover::after {\n box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.66);\n }\n\n &:focus::after,\n &:active::after {\n box-shadow: ', ';\n }\n'], ['\n ', ' border-radius: 100%;\n padding: 0;\n margin-bottom: 8px;\n\n &::before,\n &::after {\n left: 4%;\n border-radius: 100%;\n transition: all 0.1s ease-in;\n }\n\n &::before {\n top: 8%;\n width: 86%;\n height: 86%;\n }\n\n &::after {\n top: 4%;\n width: 92%;\n height: 92%;\n\n ', ';\n }\n\n &:hover::before {\n background-color: rgba(0, 0, 0, 0.8);\n }\n\n &:hover::after {\n box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.66);\n }\n\n &:focus::after,\n &:active::after {\n box-shadow: ', ';\n }\n']), _templateObject6 = _taggedTemplateLiteral(['\n box-shadow: 0 0 8px 2px ', ';\n '], ['\n box-shadow: 0 0 8px 2px ', ';\n ']); var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = exports.Container = styled('div')(_templateObject); var Button = exports.Button = styled.button(_templateObject2, function (_ref) { var theme = _ref.theme; return theme.dark ? 1 : 0.65; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? darkTheme : lightTheme; }); var lightTheme = css(_templateObject3, function (props) { return props.theme.secondary; }, function (_ref3) { var size = _ref3.size; return css(_templateObject4, size, size); }, function (_ref4) { var size = _ref4.size; return size * 0.0625 + 'px'; }, function (props) { return props.theme.secondary; }); var darkTheme = css(_templateObject5, function (_ref5) { var size = _ref5.size; return css(_templateObject4, size, size); }, function (_ref6) { var on = _ref6.on, color = _ref6.color, theme = _ref6.theme; return on ? css(_templateObject6, color || theme.primary) : ''; }, function (_ref7) { var on = _ref7.on, color = _ref7.color, theme = _ref7.theme; return on ? '0 0 8px 2px ' + (color || theme.primary) : '0 0 3px 0 rgba(0,0,0,0.66)'; }); Button.defaultProps = { theme: light }; /***/ }), /* 438 */ /*!*****************************************!*\ !*** ./helpers/PowerButtonSvg.react.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var PowerButtonSvg = function PowerButtonSvg(_ref) { var color = _ref.color, theme = _ref.theme, on = _ref.on, size = _ref.size; return React.createElement( 'svg', { xmlns: 'http://www.w3.org/2000/svg', width: size, height: size, viewBox: '0 0 14 14' }, React.createElement('path', { fill: on ? color || theme.primary : theme.secondary, fillRule: 'evenodd', d: 'M24.5173333,14.68 C25.2764482,15.3271143 25.8799978,16.1111065 26.328,17.032 C26.7760022,17.9777825 27,18.9671059 27,20 C27,21.2693397 26.6826698,22.4453279 26.048,23.528 C25.4257747,24.5857831 24.5857831,25.4257747 23.528,26.048 C22.4453279,26.6826698 21.2693397,27 20,27 C18.7306603,27 17.5546721,26.6826698 16.472,26.048 C15.4142169,25.4257747 14.5742253,24.5857831 13.952,23.528 C13.3173302,22.4453279 13,21.2693397 13,20 C13,18.9671059 13.2302199,17.9777825 13.6906667,17.032 C14.1262244,16.1111065 14.7235518,15.3271143 15.4826667,14.68 L16.5653333,15.7626667 C15.9555525,16.2728914 15.4764462,16.8888853 15.128,17.6106667 C14.7546648,18.3697816 14.568,19.1662181 14.568,20 C14.568,20.9955605 14.8106642,21.9102181 15.296,22.744 C15.7813358,23.5653374 16.4346626,24.2186642 17.256,24.704 C18.0897819,25.1893358 19.0044395,25.432 20,25.432 C20.9955605,25.432 21.9102181,25.1893358 22.744,24.704 C23.5653374,24.2186642 24.2186642,23.5653374 24.704,22.744 C25.1893358,21.9102181 25.432,20.9955605 25.432,20 C25.432,19.1537735 25.2546684,18.3666703 24.9,17.6386667 C24.5453316,16.910663 24.056892,16.2977803 23.4346667,15.8 L24.5173333,14.68 Z M20.7653333,13 L20.7653333,20.7653333 L19.2346667,20.7653333 L19.2346667,13 L20.7653333,13 Z', transform: 'translate(-13 -13)' }) ); }; PowerButtonSvg.defaultProps = { theme: light }; exports.default = PowerButtonSvg; /***/ }), /* 439 */ /*!********************************************!*\ !*** ./components/PrecisionInput.react.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var Component = _react.Component; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var withTheme = _styledComponents.withTheme; var _reactNumericInput = __webpack_require__(/*! react-numeric-input */ 435); var Input = _interopRequireDefault(_reactNumericInput).default; var _PrecisionInput = __webpack_require__(/*! ../styled/PrecisionInput.styled */ 440); var Container = _PrecisionInput.Container; var Digit = _PrecisionInput.Digit; var ExponentialDigit = _PrecisionInput.ExponentialDigit; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; var colors = _constants.colors; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var defaultRootStyles = { display: 'flex', flexDirection: 'column', justifyContent: 'space-between', alignItems: 'flex-start' }; /** * A numeric input component that converts * an input value to the desired precision. */ var PrecisionInput = function (_Component) { _inherits(PrecisionInput, _Component); function PrecisionInput(props) { _classCallCheck(this, PrecisionInput); var _this = _possibleConstructorReturn(this, (PrecisionInput.__proto__ || Object.getPrototypeOf(PrecisionInput)).call(this, props)); _this.formatPrecision = _this.formatPrecision.bind(_this); _this.setTempValue = _this.setTempValue.bind(_this); _this.blur = _this.blur.bind(_this); _this.setValue = _this.setValue.bind(_this); _this.toggleInput = _this.toggleInput.bind(_this); _this.state = { value: props.value != null ? _this.formatPrecision(props.value) : _this.formatPrecision(props.min), isInput: false, tempValue: null }; return _this; } _createClass(PrecisionInput, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(newProps) { if (newProps.value != null && newProps.value !== this.state.value) this.setState({ value: this.formatPrecision(newProps.value) }); } }, { key: 'formatPrecision', value: function formatPrecision(value) { return Number(Number(value.toPrecision(this.props.precision))); } }, { key: 'setValue', value: function setValue(value) { if (value != null && value >= this.props.min && value <= this.props.max) { var newValue = this.formatPrecision(value); this.setState({ value: newValue }); if (this.props.setProps) { this.props.setProps({ value: newValue }); } } } }, { key: 'toggleInput', value: function toggleInput() { if (this.props.disabled) return; var isInput = !this.state.isInput; this.setState({ isInput: isInput }); if (isInput) { this.setState({ tempValue: this.state.value }); } } }, { key: 'setTempValue', value: function setTempValue(tempValue) { this.setState({ tempValue: tempValue }); } }, { key: 'blur', value: function blur() { if (this.state.tempValue != null) { this.setValue(this.state.tempValue); } this.setState({ tempValue: null }); this.toggleInput(); } }, { key: 'render', value: function render() { var _props = this.props, size = _props.size, theme = _props.theme; var buttonStyle = { background: 'none', boxShadow: 'none', border: 'none', color: theme.secondary, cursor: 'pointer' }; var MINIMUM_PADDING = 10; var dynamicPadding = this.state.value ? 16 - 2 * this.state.value.toString().length : 16; var padding = Math.max(dynamicPadding, MINIMUM_PADDING); var inputStyle = { borderRadius: 3, border: theme.dark ? 'none' : '1px solid ' + colors.GREY, outline: 'none', paddingRight: padding, paddingLeft: padding, paddingTop: 4, paddingBottom: 4, width: size || 56 + this.props.precision * 20, height: 36, color: theme.dark ? '#fff' : colors.OFF_WHITE, fontSize: 14, lineHeight: 14, boxSizing: 'border-box' }; var precisionInput = React.createElement(Input, { autoFocus: true, disabled: this.props.disabled, style: { input: inputStyle, 'input:not(.form-control)': inputStyle, btn: buttonStyle, 'btn:hover': buttonStyle, 'btn:active': buttonStyle, 'input:disabled': { opacity: 0.65, cursor: 'not-allowed' } }, min: this.props.min, max: this.props.max, value: this.state.tempValue, onChange: this.setTempValue, onBlur: this.blur }); var precisionOutput = React.createElement(PrecisionOutput, { value: this.state.value, size: this.props.size, onClick: this.toggleInput }); return React.createElement( 'div', { id: this.props.id, className: this.props.className, style: Object.assign({}, defaultRootStyles, this.props.style) }, React.createElement( LabelContainer, this.props, this.state.isInput ? precisionInput : precisionOutput ) ); } }]); return PrecisionInput; }(Component); var toScientificNotation = function toScientificNotation(value) { var scientificNum = Number(value).toExponential(); return scientificNum.replace('+', ''); }; var mergeLeadingNegative = function mergeLeadingNegative(digits) { if (digits[0] === '-') { digits.shift(); var leading = digits.shift(); digits.unshift('-' + leading); } return digits; }; var PrecisionOutput = function PrecisionOutput(_ref) { var value = _ref.value, onClick = _ref.onClick, size = _ref.size; var _toScientificNotation = toScientificNotation(value).split('e'), _toScientificNotation2 = _slicedToArray(_toScientificNotation, 2), characteristic = _toScientificNotation2[0], mantissa = _toScientificNotation2[1]; var characteristicDigits = mergeLeadingNegative(characteristic.split('')); var mantissaDigits = mergeLeadingNegative(mantissa.split('')); return React.createElement( Container, { size: size, onClick: onClick }, characteristicDigits.map(function (digit, i) { return React.createElement( Digit, { key: 'd' + i }, digit ); }), React.createElement( ExponentialDigit, null, 'E' ), mantissaDigits.map(function (digit, i) { return React.createElement( ExponentialDigit, { key: 'e' + i }, digit ); }) ); }; PrecisionInput.defaultProps = { min: 0, max: Number.MAX_SAFE_INTEGER, theme: light, labelPosition: 'top' }; PrecisionInput.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The value of numeric input */ value: PropTypes.number, /** * The size (length) of the numeric input in pixels */ size: PropTypes.number, /** * The minimum value of the numeric input */ min: PropTypes.number, /** * The maximum value of the numeric input */ max: PropTypes.number, /** * Number of significant figures */ precision: PropTypes.number.isRequired, /** * If true, numeric input cannot be changed. */ disabled: PropTypes.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the scientific notation. To control styling, * pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the numeric input label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object, /** * Dash-assigned callback that gets fired when selected * value changes. */ setProps: PropTypes.func }; exports.default = withTheme(PrecisionInput); /***/ }), /* 440 */ /*!*****************************************!*\ !*** ./styled/PrecisionInput.styled.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExponentialDigit = exports.Digit = exports.Container = undefined; var _templateObject = _taggedTemplateLiteral(['\n margin: 0 auto;\n display: flex;\n justify-content: flex-end;\n width: ', ';\n cursor: text;\n\n ', ';\n'], ['\n margin: 0 auto;\n display: flex;\n justify-content: flex-end;\n width: ', ';\n cursor: text;\n\n ', ';\n']), _templateObject2 = _taggedTemplateLiteral(['\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n'], ['\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n']), _templateObject3 = _taggedTemplateLiteral(['\n background: #ffffff;\n border-radius: 2px;\n border: 1px solid #d3d3d3;\n'], ['\n background: #ffffff;\n border-radius: 2px;\n border: 1px solid #d3d3d3;\n']), _templateObject4 = _taggedTemplateLiteral(['\n padding: 8px 6px;\n box-sizing: border-box;\n display: inline-block;\n font-size: 14px;\n line-height: 16px;\n text-align: center;\n\n ', ';\n'], ['\n padding: 8px 6px;\n box-sizing: border-box;\n display: inline-block;\n font-size: 14px;\n line-height: 16px;\n text-align: center;\n\n ', ';\n']), _templateObject5 = _taggedTemplateLiteral(['\n border-right: 1px solid rgba(0, 0, 0, 0.4);\n'], ['\n border-right: 1px solid rgba(0, 0, 0, 0.4);\n']), _templateObject6 = _taggedTemplateLiteral(['\n color: #15181a;\n border-right: 1px solid #f2f2f2;\n'], ['\n color: #15181a;\n border-right: 1px solid #f2f2f2;\n']), _templateObject7 = _taggedTemplateLiteral(['\n border: none;\n ', ';\n'], ['\n border: none;\n ', ';\n']), _templateObject8 = _taggedTemplateLiteral(['\n color: ', ';\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.9),\n 0 0 9px ', ';\n '], ['\n color: ', ';\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.9),\n 0 0 9px ', ';\n ']), _templateObject9 = _taggedTemplateLiteral(['\n background: #f2f2f2;\n '], ['\n background: #f2f2f2;\n ']); var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = exports.Container = styled.div(_templateObject, function (_ref) { var size = _ref.size; return size + 'px' || 'auto'; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? darkContainer : lightContainer; }); var darkContainer = css(_templateObject2); var lightContainer = css(_templateObject3); var Digit = exports.Digit = styled.div(_templateObject4, function (_ref3) { var theme = _ref3.theme; return theme.dark ? darkDigit : lightDigit; }); var darkDigit = css(_templateObject5); var lightDigit = css(_templateObject6); var ExponentialDigit = exports.ExponentialDigit = styled(Digit)(_templateObject7, function (_ref4) { var theme = _ref4.theme; return theme.dark ? css(_templateObject8, function (_ref5) { var color = _ref5.color, theme = _ref5.theme; return color || theme.primary; }, function (_ref6) { var color = _ref6.color, theme = _ref6.theme; return color || theme.primary; }) : css(_templateObject9); }); /***/ }), /* 441 */ /*!****************************************!*\ !*** ./components/StopButton.react.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _StopButton = __webpack_require__(/*! ../styled/StopButton.styled */ 442); var Button = _StopButton.Button; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * A Stop button component */ var StopButton = function StopButton(props) { return React.createElement( 'div', { id: props.id, className: props.className, style: props.style }, React.createElement( LabelContainer, props, React.createElement( Button, { size: props.size, disabled: props.disabled, onClick: function onClick() { if (props.setProps) props.setProps({ n_clicks: props.n_clicks + 1 }); } }, props.children || props.buttonText ) ) ); }; StopButton.defaultProps = { buttonText: 'Stop', n_clicks: 0, size: 92, labelPosition: 'top' }; StopButton.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The size (width) of the stop button in pixels */ size: PropTypes.number, /** * Text displayed in the button */ buttonText: PropTypes.string, /** * Number of times the button was clicked */ n_clicks: PropTypes.number, /** * If true, button cannot be pressesd. */ disabled: PropTypes.bool, /** * The children of the button. */ children: PropTypes.node, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the button. * To control styling, pass an object with label and * style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object, /** * Dash-assigned callback that gets fired when the * button is clicked. */ setProps: PropTypes.func }; exports.default = StopButton; /***/ }), /* 442 */ /*!*************************************!*\ !*** ./styled/StopButton.styled.js ***! \*************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Button = undefined; var _templateObject = _taggedTemplateLiteral(['\n outline: none;\n transition: all 0.1s ease-in;\n ', ';\n\n &:disabled {\n opacity: ', ';\n cursor: not-allowed;\n }\n'], ['\n outline: none;\n transition: all 0.1s ease-in;\n ', ';\n\n &:disabled {\n opacity: ', ';\n cursor: not-allowed;\n }\n']), _templateObject2 = _taggedTemplateLiteral(['\n display: block;\n box-sizing: border-box;\n color: white;\n border: none;\n border-radius: 2px;\n font-weight: bold;\n font-size: 12px;\n text-transform: uppercase;\n padding: 0;\n width: ', ';\n height: ', ';\n text-align: center;\n cursor: pointer;\n background-color: #ff5e5e;\n letter-spacing: 0.1;\n line-height: 1;\n\n &:hover,\n &:focus,\n &:active {\n color: #fff;\n }\n\n &:hover {\n background-color: #ff8585;\n }\n\n &:active {\n background-color: #e64545;\n }\n'], ['\n display: block;\n box-sizing: border-box;\n color: white;\n border: none;\n border-radius: 2px;\n font-weight: bold;\n font-size: 12px;\n text-transform: uppercase;\n padding: 0;\n width: ', ';\n height: ', ';\n text-align: center;\n cursor: pointer;\n background-color: #ff5e5e;\n letter-spacing: 0.1;\n line-height: 1;\n\n &:hover,\n &:focus,\n &:active {\n color: #fff;\n }\n\n &:hover {\n background-color: #ff8585;\n }\n\n &:active {\n background-color: #e64545;\n }\n']), _templateObject3 = _taggedTemplateLiteral(['\n display: inline-flex;\n justify-content: center;\n width: ', ';\n height: ', ';\n line-height: ', ';\n\n &::before,\n &::after {\n transition: all 0.1s ease-in;\n background-color: #e03a3a;\n }\n\n &:hover::before,\n &:hover::after {\n background-color: #e64545;\n }\n\n &:active::before,\n &:active::after {\n background-color: #c72121;\n }\n\n &:hover::after,\n &:active::after,\n &:focus::after {\n box-shadow: none;\n }\n'], ['\n display: inline-flex;\n justify-content: center;\n width: ', ';\n height: ', ';\n line-height: ', ';\n\n &::before,\n &::after {\n transition: all 0.1s ease-in;\n background-color: #e03a3a;\n }\n\n &:hover::before,\n &:hover::after {\n background-color: #e64545;\n }\n\n &:active::before,\n &:active::after {\n background-color: #c72121;\n }\n\n &:hover::after,\n &:active::after,\n &:focus::after {\n box-shadow: none;\n }\n']); var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; var _constants = __webpack_require__(/*! ./constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Button = exports.Button = styled.button(_templateObject, function (_ref) { var theme = _ref.theme; return theme.dark ? darkButton : lightButton; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? 1 : 0.65; }); Button.defaultProps = { theme: light }; var lightButton = css(_templateObject2, function (_ref3) { var size = _ref3.size; return size + 'px'; }, function (_ref4) { var size = _ref4.size; return size * 0.42 + 'px'; }); var darkButton = css(_templateObject3, function (_ref5) { var size = _ref5.size; return size + 'px'; }, function (_ref6) { var size = _ref6.size; return size * 0.42 + 'px'; }, function (_ref7) { var size = _ref7.size; return size * 0.42 + 'px'; }); exports.default = Button; /***/ }), /* 443 */ /*!************************************!*\ !*** ./components/Slider.react.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var Component = _react.Component; var _rcSlider = __webpack_require__(/*! rc-slider */ 444); var ReactSlider = _interopRequireDefault(_rcSlider).default; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var withTheme = _styledComponents.withTheme; var _ramda = __webpack_require__(/*! ramda */ 605); var omit = _ramda.omit; var _deepEqual = __webpack_require__(/*! deep-equal */ 924); var deepEqual = _interopRequireDefault(_deepEqual).default; var _colorRanges = __webpack_require__(/*! ../helpers/colorRanges */ 418); var getLinearGradientCSS = _colorRanges.getLinearGradientCSS; var isContiguous = _colorRanges.isContiguous; var getColorValue = _colorRanges.getColorValue; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; var colors = _constants.colors; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; var _Slider = __webpack_require__(/*! ../styled/Slider.styled */ 927); var SliderContainer = _Slider.SliderContainer; var Handle = _Slider.Handle; var HandleContainer = _Slider.HandleContainer; var targetStyles = _Slider.targetStyles; var Label = _Slider.Label; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var renderHandle = function renderHandle(props) { var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, isTarget = _ref.isTarget, showLabel = _ref.showLabel; var label = React.createElement( Label, _extends({ isTarget: isTarget }, props), React.createElement( 'div', { className: 'label' }, props.label ), React.createElement( 'div', { className: 'value' }, props.value ) ); return React.createElement( HandleContainer, _extends({ isTarget: isTarget }, props), showLabel && label, React.createElement(Handle, _extends({ isTarget: isTarget, showLabel: showLabel }, props)) ); }; var getTrackStyle = function getTrackStyle(props) { if (!props.color.ranges || !isContiguous(props)) { var colorValue = getColorValue(props.color); return { trackStyle: { backgroundColor: colorValue }, activeDotStyle: props.theme.dark ? { background: colorValue, boxShadow: '0 0 6px 1px ' + colorValue } : { borderColor: colorValue } }; } return { railStyle: { backgroundImage: getLinearGradientCSS(props) + ', linear-gradient(0deg, #000, #000)', backgroundBlendMode: props.theme.dark ? 'none' : 'overlay' }, trackStyle: { mixBlendMode: 'overlay', background: props.theme.dark ? '#fff' : '#000' }, dotStyle: { display: 'none' } }; }; /** * A slider component with support for * a target value. */ var Slider = function (_Component) { _inherits(Slider, _Component); function Slider(props) { _classCallCheck(this, Slider); var _this = _possibleConstructorReturn(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, props)); _this.state = { value: props.value || props.min, trackStyle: getTrackStyle(props) }; _this.onChange = _this.onChange.bind(_this); _this.onAfterChange = _this.onAfterChange.bind(_this); _this.renderSliderHandle = _this.renderSliderHandle.bind(_this); _this.renderTargets = _this.renderTargets.bind(_this); _this.calcLabelOffset = _this.calcLabelOffset.bind(_this); return _this; } _createClass(Slider, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(newProps) { var updates = {}; if (typeof newProps.value !== 'undefined' && newProps.value !== this.state.value) { updates.value = newProps.value; } if (!deepEqual(newProps.color, this.props.color)) { updates.trackStyle = getTrackStyle(_extends({}, this.props, newProps)); } this.setState(updates); } }, { key: 'onChange', value: function onChange(value) { var _props = this.props, updatemode = _props.updatemode, setProps = _props.setProps; if (!this.props.value || updatemode !== 'drag') { this.setState({ value: value }); } if (updatemode === 'drag') { if (setProps) setProps({ value: value }); } } }, { key: 'onAfterChange', value: function onAfterChange(value) { var _props2 = this.props, updatemode = _props2.updatemode, setProps = _props2.setProps; if (updatemode === 'mouseup') { if (setProps) setProps({ value: value }); } } }, { key: 'renderSliderHandle', value: function renderSliderHandle(props) { var handleLabel = this.props.handleLabel; var handleProps = _extends({}, this.props, props); if (!handleLabel) { return renderHandle(handleProps); } var value = handleLabel.showCurrentValue && this.state.value; handleProps = _extends({}, handleProps, { value: value, label: handleLabel.label || handleLabel, color: handleLabel.color || getColorValue(this.props.color), style: handleLabel.style }); return renderHandle(handleProps, { showLabel: true }); } }, { key: 'renderTargets', value: function renderTargets() { var _this2 = this; return Object.entries(this.props.targets).reduce(function (acc, _ref2) { var _ref3 = _slicedToArray(_ref2, 2), k = _ref3[0], v = _ref3[1]; var props = _extends({}, _this2.props, { label: v.label || v, value: v.showCurrentValue && k, color: v.color, style: v.style }); var Handle = renderHandle(props, { isTarget: true, showLabel: !!v }); // use rc-slider's props.marks format acc[k] = { style: targetStyles, label: Handle }; return acc; }, {}); } }, { key: 'calcLabelOffset', value: function calcLabelOffset(_ref4) { var vertical = _ref4.vertical, labelPosition = _ref4.labelPosition, marks = _ref4.marks, targets = _ref4.targets, handleLabel = _ref4.handleLabel; if (vertical) return null; if (labelPosition === 'bottom') { return 'transform: translateY(' + (marks ? 20 : 0) + 'px);'; } var showingCurrentValue = false; Object.values(targets).map(function (target) { if (target.showCurrentValue) showingCurrentValue = true; }); if (handleLabel && handleLabel.showCurrentValue) { showingCurrentValue = true; } return 'transform: translateY(' + (showingCurrentValue ? -38 : -16) + 'px);'; } }, { key: 'render', value: function render() { var value = this.state.value; return React.createElement( 'div', { id: this.props.id, style: this.props.style, className: this.props.className }, React.createElement( LabelContainer, _extends({ labelCSS: this.props.label ? this.calcLabelOffset(this.props) : null }, this.props), React.createElement( SliderContainer, { size: this.props.size, vertical: this.props.vertical }, React.createElement(ReactSlider, _extends({ onChange: this.onChange, onAfterChange: this.onAfterChange, value: value, handle: this.renderSliderHandle, marks: _extends({}, this.props.marks, this.renderTargets()) }, this.state.trackStyle, omit(['setProps', 'updatemode', 'value', 'marks'], this.props))) ) ) ); } }]); return Slider; }(Component); Slider.defaultProps = { theme: light, targets: {}, updatemode: 'mouseup', color: colors.DARKER_PRIMARY, min: 0, size: 265, labelPosition: 'bottom' }; Slider.propTypes = { /** * The ID used to identify this component in Dash callbacks */ id: PropTypes.string, /** * Marks on the slider. * The key determines the position, * and the value determines what will show. * If you want to set the style of a specific mark point, * the value should be an object which * contains style and label properties. */ marks: PropTypes.shape({ number: PropTypes.oneOfType([ /** * The label of the mark */ PropTypes.string, /** * The style and label of the mark */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]) }), /** * Color configuration for the slider's track. */ color: PropTypes.oneOfType([ /** * Color used for slider's track/indicator */ PropTypes.string, /** * Color ranges configuration. */ PropTypes.shape({ /** * Fallback color to use when color.ranges * has gaps. */ default: PropTypes.string, /** * Display ranges as a gradient between given colors. * Requires color.ranges to be contiguous along * the entirety of the gauge's range of values. */ gradient: PropTypes.bool, /** * Define multiple color ranges on the slider's track. * The key determines the color of the range and * the value is the start,end of the range itself. */ ranges: PropTypes.shape({ color: PropTypes.arrayOf(PropTypes.number) }) })]), /** * The value of the input. */ value: PropTypes.number, /** * Additional CSS class for the root DOM node. */ className: PropTypes.string, /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * If true, the handles can't be moved. */ disabled: PropTypes.bool, /** * When the step value is greater than 1, * you can set the dots to true if you want to * render the slider with dots. * * Note: dots are disabled automatically when * using color.ranges */ dots: PropTypes.bool, /** * If the value is true, it means a continuous * value is included. Otherwise, it is an independent value. */ included: PropTypes.bool, /** * Minimum allowed value of the slider. */ min: PropTypes.number, /** * Maximum allowed value of the slider. */ max: PropTypes.number, /** * Value by which increments or decrements are made. */ step: PropTypes.number, /** * If true, the slider will be vertical. */ vertical: PropTypes.bool, /** * Size of the slider in pixels. */ size: PropTypes.number, /** * Targets on the slider. * The key determines the position, * and the value determines what will show. * If you want to set the style of a specific target point, * the value should be an object which * contains style and label properties. */ targets: PropTypes.shape({ number: PropTypes.oneOfType([ /** * The label of the mark */ PropTypes.string, /** * The style and label of the mark */ PropTypes.shape({ showCurrentValue: PropTypes.bool, label: PropTypes.string, color: PropTypes.string, style: PropTypes.object })]) }), /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Configuration of the slider handle's label. * Passing falsy value will disable the label. */ handleLabel: PropTypes.oneOfType([ /** * The label of the handle */ PropTypes.string, /** * The style and label of the handle */ PropTypes.shape({ showCurrentValue: PropTypes.bool, label: PropTypes.string, color: PropTypes.string, style: PropTypes.object })]), /** * Determines when the component should update * its value. If `mouseup`, then the slider * will only trigger its value when the user has * finished dragging the slider. If `drag`, then * the slider will update its value continuously * as it is being dragged. * Only use `drag` if your updates are fast. */ updatemode: PropTypes.oneOf(['mouseup', 'drag']), /** * Dash-assigned callback that gets fired when the value changes. */ setProps: PropTypes.func }; exports.default = withTheme(Slider); /***/ }), /* 444 */ /*!***********************************!*\ !*** ../~/rc-slider/lib/index.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.createSliderWithTooltip = exports.Handle = exports.Range = undefined; var _Slider = __webpack_require__(/*! ./Slider */ 445); var _Slider2 = _interopRequireDefault(_Slider); var _Range = __webpack_require__(/*! ./Range */ 566); var _Range2 = _interopRequireDefault(_Range); var _Handle = __webpack_require__(/*! ./Handle */ 553); var _Handle2 = _interopRequireDefault(_Handle); var _createSliderWithTooltip = __webpack_require__(/*! ./createSliderWithTooltip */ 568); var _createSliderWithTooltip2 = _interopRequireDefault(_createSliderWithTooltip); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } _Slider2['default'].Range = _Range2['default']; _Slider2['default'].Handle = _Handle2['default']; _Slider2['default'].createSliderWithTooltip = _createSliderWithTooltip2['default']; exports['default'] = _Slider2['default']; exports.Range = _Range2['default']; exports.Handle = _Handle2['default']; exports.createSliderWithTooltip = _createSliderWithTooltip2['default']; /***/ }), /* 445 */ /*!************************************!*\ !*** ../~/rc-slider/lib/Slider.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 446); var _extends3 = _interopRequireDefault(_extends2); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ 486); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _warning = __webpack_require__(/*! warning */ 532); var _warning2 = _interopRequireDefault(_warning); var _Track = __webpack_require__(/*! ./common/Track */ 533); var _Track2 = _interopRequireDefault(_Track); var _createSlider = __webpack_require__(/*! ./common/createSlider */ 534); var _createSlider2 = _interopRequireDefault(_createSlider); var _utils = __webpack_require__(/*! ./utils */ 554); var utils = _interopRequireWildcard(_utils); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /* eslint-disable react/prop-types */ var Slider = function (_React$Component) { (0, _inherits3['default'])(Slider, _React$Component); function Slider(props) { (0, _classCallCheck3['default'])(this, Slider); var _this = (0, _possibleConstructorReturn3['default'])(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, props)); _this.onEnd = function (force) { var dragging = _this.state.dragging; _this.removeDocumentEvents(); if (dragging || force) { _this.props.onAfterChange(_this.getValue()); } _this.setState({ dragging: false }); }; var defaultValue = props.defaultValue !== undefined ? props.defaultValue : props.min; var value = props.value !== undefined ? props.value : defaultValue; _this.state = { value: _this.trimAlignValue(value), dragging: false }; if (utils.isDev()) { (0, _warning2['default'])(!('minimumTrackStyle' in props), 'minimumTrackStyle will be deprecated, please use trackStyle instead.'); (0, _warning2['default'])(!('maximumTrackStyle' in props), 'maximumTrackStyle will be deprecated, please use railStyle instead.'); } return _this; } (0, _createClass3['default'])(Slider, [{ key: 'componentDidMount', value: function componentDidMount() { var _props = this.props, autoFocus = _props.autoFocus, disabled = _props.disabled; if (autoFocus && !disabled) { this.focus(); } } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if (!('value' in nextProps || 'min' in nextProps || 'max' in nextProps)) return; var prevValue = this.state.value; var value = nextProps.value !== undefined ? nextProps.value : prevValue; var nextValue = this.trimAlignValue(value, nextProps); if (nextValue === prevValue) return; this.setState({ value: nextValue }); if (utils.isValueOutOfRange(value, nextProps)) { this.props.onChange(nextValue); } } }, { key: 'onChange', value: function onChange(state) { var props = this.props; var isNotControlled = !('value' in props); var nextState = state.value > this.props.max ? (0, _extends3['default'])({}, state, { value: this.props.max }) : state; if (isNotControlled) { this.setState(nextState); } var changedValue = nextState.value; props.onChange(changedValue); } }, { key: 'onStart', value: function onStart(position) { this.setState({ dragging: true }); var props = this.props; var prevValue = this.getValue(); props.onBeforeChange(prevValue); var value = this.calcValueByPos(position); this.startValue = value; this.startPosition = position; if (value === prevValue) return; this.prevMovedHandleIndex = 0; this.onChange({ value: value }); } }, { key: 'onMove', value: function onMove(e, position) { utils.pauseEvent(e); var oldValue = this.state.value; var value = this.calcValueByPos(position); if (value === oldValue) return; this.onChange({ value: value }); } }, { key: 'onKeyboard', value: function onKeyboard(e) { var valueMutator = utils.getKeyboardValueMutator(e); if (valueMutator) { utils.pauseEvent(e); var state = this.state; var oldValue = state.value; var mutatedValue = valueMutator(oldValue, this.props); var value = this.trimAlignValue(mutatedValue); if (value === oldValue) return; this.onChange({ value: value }); this.props.onAfterChange(value); this.onEnd(); } } }, { key: 'getValue', value: function getValue() { return this.state.value; } }, { key: 'getLowerBound', value: function getLowerBound() { return this.props.min; } }, { key: 'getUpperBound', value: function getUpperBound() { return this.state.value; } }, { key: 'trimAlignValue', value: function trimAlignValue(v) { var nextProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (v === null) { return null; } var mergedProps = (0, _extends3['default'])({}, this.props, nextProps); var val = utils.ensureValueInRange(v, mergedProps); return utils.ensureValuePrecision(val, mergedProps); } }, { key: 'render', value: function render() { var _this2 = this; var _props2 = this.props, prefixCls = _props2.prefixCls, vertical = _props2.vertical, included = _props2.included, disabled = _props2.disabled, minimumTrackStyle = _props2.minimumTrackStyle, trackStyle = _props2.trackStyle, handleStyle = _props2.handleStyle, tabIndex = _props2.tabIndex, min = _props2.min, max = _props2.max, handleGenerator = _props2.handle; var _state = this.state, value = _state.value, dragging = _state.dragging; var offset = this.calcOffset(value); var handle = handleGenerator({ className: prefixCls + '-handle', prefixCls: prefixCls, vertical: vertical, offset: offset, value: value, dragging: dragging, disabled: disabled, min: min, max: max, index: 0, tabIndex: tabIndex, style: handleStyle[0] || handleStyle, ref: function ref(h) { return _this2.saveHandle(0, h); } }); var _trackStyle = trackStyle[0] || trackStyle; var track = _react2['default'].createElement(_Track2['default'], { className: prefixCls + '-track', vertical: vertical, included: included, offset: 0, length: offset, style: (0, _extends3['default'])({}, minimumTrackStyle, _trackStyle) }); return { tracks: track, handles: handle }; } }]); return Slider; }(_react2['default'].Component); Slider.propTypes = { defaultValue: _propTypes2['default'].number, value: _propTypes2['default'].number, disabled: _propTypes2['default'].bool, autoFocus: _propTypes2['default'].bool, tabIndex: _propTypes2['default'].number, min: _propTypes2['default'].number, max: _propTypes2['default'].number }; exports['default'] = (0, _createSlider2['default'])(Slider); module.exports = exports['default']; /***/ }), /* 446 */ /*!*********************************************!*\ !*** ../~/babel-runtime/helpers/extends.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _assign = __webpack_require__(/*! ../core-js/object/assign */ 447); var _assign2 = _interopRequireDefault(_assign); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = _assign2.default || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /***/ }), /* 447 */ /*!***************************************************!*\ !*** ../~/babel-runtime/core-js/object/assign.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/assign */ 448), __esModule: true }; /***/ }), /* 448 */ /*!************************************************!*\ !*** ../~/core-js/library/fn/object/assign.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.assign */ 449); module.exports = __webpack_require__(/*! ../../modules/_core */ 452).Object.assign; /***/ }), /* 449 */ /*!*********************************************************!*\ !*** ../~/core-js/library/modules/es6.object.assign.js ***! \*********************************************************/ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(/*! ./_export */ 450); $export($export.S + $export.F, 'Object', { assign: __webpack_require__(/*! ./_object-assign */ 466) }); /***/ }), /* 450 */ /*!***********************************************!*\ !*** ../~/core-js/library/modules/_export.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ./_global */ 451); var core = __webpack_require__(/*! ./_core */ 452); var ctx = __webpack_require__(/*! ./_ctx */ 453); var hide = __webpack_require__(/*! ./_hide */ 455); var has = __webpack_require__(/*! ./_has */ 465); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var IS_WRAP = type & $export.W; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE]; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; var key, own, out; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; if (own && has(exports, key)) continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function (C) { var F = function (a, b, c) { if (this instanceof C) { switch (arguments.length) { case 0: return new C(); case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if (IS_PROTO) { (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /* 451 */ /*!***********************************************!*\ !*** ../~/core-js/library/modules/_global.js ***! \***********************************************/ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ }), /* 452 */ /*!*********************************************!*\ !*** ../~/core-js/library/modules/_core.js ***! \*********************************************/ /***/ (function(module, exports) { var core = module.exports = { version: '2.6.5' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /* 453 */ /*!********************************************!*\ !*** ../~/core-js/library/modules/_ctx.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(/*! ./_a-function */ 454); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /* 454 */ /*!***************************************************!*\ !*** ../~/core-js/library/modules/_a-function.js ***! \***************************************************/ /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /* 455 */ /*!*********************************************!*\ !*** ../~/core-js/library/modules/_hide.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(/*! ./_object-dp */ 456); var createDesc = __webpack_require__(/*! ./_property-desc */ 464); module.exports = __webpack_require__(/*! ./_descriptors */ 460) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /* 456 */ /*!**************************************************!*\ !*** ../~/core-js/library/modules/_object-dp.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(/*! ./_an-object */ 457); var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ 459); var toPrimitive = __webpack_require__(/*! ./_to-primitive */ 463); var dP = Object.defineProperty; exports.f = __webpack_require__(/*! ./_descriptors */ 460) ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /* 457 */ /*!**************************************************!*\ !*** ../~/core-js/library/modules/_an-object.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./_is-object */ 458); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /* 458 */ /*!**************************************************!*\ !*** ../~/core-js/library/modules/_is-object.js ***! \**************************************************/ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 459 */ /*!*******************************************************!*\ !*** ../~/core-js/library/modules/_ie8-dom-define.js ***! \*******************************************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(/*! ./_descriptors */ 460) && !__webpack_require__(/*! ./_fails */ 461)(function () { return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ 462)('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 460 */ /*!****************************************************!*\ !*** ../~/core-js/library/modules/_descriptors.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(/*! ./_fails */ 461)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 461 */ /*!**********************************************!*\ !*** ../~/core-js/library/modules/_fails.js ***! \**********************************************/ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /* 462 */ /*!***************************************************!*\ !*** ../~/core-js/library/modules/_dom-create.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./_is-object */ 458); var document = __webpack_require__(/*! ./_global */ 451).document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; /***/ }), /* 463 */ /*!*****************************************************!*\ !*** ../~/core-js/library/modules/_to-primitive.js ***! \*****************************************************/ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(/*! ./_is-object */ 458); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /* 464 */ /*!******************************************************!*\ !*** ../~/core-js/library/modules/_property-desc.js ***! \******************************************************/ /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /* 465 */ /*!********************************************!*\ !*** ../~/core-js/library/modules/_has.js ***! \********************************************/ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /* 466 */ /*!******************************************************!*\ !*** ../~/core-js/library/modules/_object-assign.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = __webpack_require__(/*! ./_object-keys */ 467); var gOPS = __webpack_require__(/*! ./_object-gops */ 482); var pIE = __webpack_require__(/*! ./_object-pie */ 483); var toObject = __webpack_require__(/*! ./_to-object */ 484); var IObject = __webpack_require__(/*! ./_iobject */ 470); var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(/*! ./_fails */ 461)(function () { var A = {}; var B = {}; // eslint-disable-next-line no-undef var S = Symbol(); var K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function (k) { B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars var T = toObject(target); var aLen = arguments.length; var index = 1; var getSymbols = gOPS.f; var isEnum = pIE.f; while (aLen > index) { var S = IObject(arguments[index++]); var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); var length = keys.length; var j = 0; var key; while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; } return T; } : $assign; /***/ }), /* 467 */ /*!****************************************************!*\ !*** ../~/core-js/library/modules/_object-keys.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(/*! ./_object-keys-internal */ 468); var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ 481); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /* 468 */ /*!*************************************************************!*\ !*** ../~/core-js/library/modules/_object-keys-internal.js ***! \*************************************************************/ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(/*! ./_has */ 465); var toIObject = __webpack_require__(/*! ./_to-iobject */ 469); var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ 473)(false); var IE_PROTO = __webpack_require__(/*! ./_shared-key */ 477)('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }), /* 469 */ /*!***************************************************!*\ !*** ../~/core-js/library/modules/_to-iobject.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(/*! ./_iobject */ 470); var defined = __webpack_require__(/*! ./_defined */ 472); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /* 470 */ /*!************************************************!*\ !*** ../~/core-js/library/modules/_iobject.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(/*! ./_cof */ 471); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), /* 471 */ /*!********************************************!*\ !*** ../~/core-js/library/modules/_cof.js ***! \********************************************/ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /* 472 */ /*!************************************************!*\ !*** ../~/core-js/library/modules/_defined.js ***! \************************************************/ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /* 473 */ /*!*******************************************************!*\ !*** ../~/core-js/library/modules/_array-includes.js ***! \*******************************************************/ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(/*! ./_to-iobject */ 469); var toLength = __webpack_require__(/*! ./_to-length */ 474); var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ 476); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); var length = toLength(O.length); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }), /* 474 */ /*!**************************************************!*\ !*** ../~/core-js/library/modules/_to-length.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(/*! ./_to-integer */ 475); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /* 475 */ /*!***************************************************!*\ !*** ../~/core-js/library/modules/_to-integer.js ***! \***************************************************/ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /* 476 */ /*!**********************************************************!*\ !*** ../~/core-js/library/modules/_to-absolute-index.js ***! \**********************************************************/ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(/*! ./_to-integer */ 475); var max = Math.max; var min = Math.min; module.exports = function (index, length) { index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }), /* 477 */ /*!***************************************************!*\ !*** ../~/core-js/library/modules/_shared-key.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(/*! ./_shared */ 478)('keys'); var uid = __webpack_require__(/*! ./_uid */ 480); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /* 478 */ /*!***********************************************!*\ !*** ../~/core-js/library/modules/_shared.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(/*! ./_core */ 452); var global = __webpack_require__(/*! ./_global */ 451); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: __webpack_require__(/*! ./_library */ 479) ? 'pure' : 'global', copyright: '© 2019 Denis Pushkarev (zloirock.ru)' }); /***/ }), /* 479 */ /*!************************************************!*\ !*** ../~/core-js/library/modules/_library.js ***! \************************************************/ /***/ (function(module, exports) { module.exports = true; /***/ }), /* 480 */ /*!********************************************!*\ !*** ../~/core-js/library/modules/_uid.js ***! \********************************************/ /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /* 481 */ /*!******************************************************!*\ !*** ../~/core-js/library/modules/_enum-bug-keys.js ***! \******************************************************/ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /* 482 */ /*!****************************************************!*\ !*** ../~/core-js/library/modules/_object-gops.js ***! \****************************************************/ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /* 483 */ /*!***************************************************!*\ !*** ../~/core-js/library/modules/_object-pie.js ***! \***************************************************/ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), /* 484 */ /*!**************************************************!*\ !*** ../~/core-js/library/modules/_to-object.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(/*! ./_defined */ 472); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /* 485 */ /*!****************************************************!*\ !*** ../~/babel-runtime/helpers/classCallCheck.js ***! \****************************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; /***/ }), /* 486 */ /*!*************************************************!*\ !*** ../~/babel-runtime/helpers/createClass.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(/*! ../core-js/object/define-property */ 487); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; (0, _defineProperty2.default)(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /***/ }), /* 487 */ /*!************************************************************!*\ !*** ../~/babel-runtime/core-js/object/define-property.js ***! \************************************************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/define-property */ 488), __esModule: true }; /***/ }), /* 488 */ /*!*********************************************************!*\ !*** ../~/core-js/library/fn/object/define-property.js ***! \*********************************************************/ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.define-property */ 489); var $Object = __webpack_require__(/*! ../../modules/_core */ 452).Object; module.exports = function defineProperty(it, key, desc) { return $Object.defineProperty(it, key, desc); }; /***/ }), /* 489 */ /*!******************************************************************!*\ !*** ../~/core-js/library/modules/es6.object.define-property.js ***! \******************************************************************/ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(/*! ./_export */ 450); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ 460), 'Object', { defineProperty: __webpack_require__(/*! ./_object-dp */ 456).f }); /***/ }), /* 490 */ /*!***************************************************************!*\ !*** ../~/babel-runtime/helpers/possibleConstructorReturn.js ***! \***************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _typeof2 = __webpack_require__(/*! ../helpers/typeof */ 491); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; }; /***/ }), /* 491 */ /*!********************************************!*\ !*** ../~/babel-runtime/helpers/typeof.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _iterator = __webpack_require__(/*! ../core-js/symbol/iterator */ 492); var _iterator2 = _interopRequireDefault(_iterator); var _symbol = __webpack_require__(/*! ../core-js/symbol */ 511); var _symbol2 = _interopRequireDefault(_symbol); var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { return typeof obj === "undefined" ? "undefined" : _typeof(obj); } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); }; /***/ }), /* 492 */ /*!*****************************************************!*\ !*** ../~/babel-runtime/core-js/symbol/iterator.js ***! \*****************************************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/symbol/iterator */ 493), __esModule: true }; /***/ }), /* 493 */ /*!**************************************************!*\ !*** ../~/core-js/library/fn/symbol/iterator.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.string.iterator */ 494); __webpack_require__(/*! ../../modules/web.dom.iterable */ 506); module.exports = __webpack_require__(/*! ../../modules/_wks-ext */ 510).f('iterator'); /***/ }), /* 494 */ /*!***********************************************************!*\ !*** ../~/core-js/library/modules/es6.string.iterator.js ***! \***********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var $at = __webpack_require__(/*! ./_string-at */ 495)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(/*! ./_iter-define */ 496)(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function () { var O = this._t; var index = this._i; var point; if (index >= O.length) return { value: undefined, done: true }; point = $at(O, index); this._i += point.length; return { value: point, done: false }; }); /***/ }), /* 495 */ /*!**************************************************!*\ !*** ../~/core-js/library/modules/_string-at.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(/*! ./_to-integer */ 475); var defined = __webpack_require__(/*! ./_defined */ 472); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { return function (that, pos) { var s = String(defined(that)); var i = toInteger(pos); var l = s.length; var a, b; if (i < 0 || i >= l) return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }), /* 496 */ /*!****************************************************!*\ !*** ../~/core-js/library/modules/_iter-define.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var LIBRARY = __webpack_require__(/*! ./_library */ 479); var $export = __webpack_require__(/*! ./_export */ 450); var redefine = __webpack_require__(/*! ./_redefine */ 497); var hide = __webpack_require__(/*! ./_hide */ 455); var Iterators = __webpack_require__(/*! ./_iterators */ 498); var $iterCreate = __webpack_require__(/*! ./_iter-create */ 499); var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ 503); var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ 505); var ITERATOR = __webpack_require__(/*! ./_wks */ 504)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix native if ($anyNative) { IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }), /* 497 */ /*!*************************************************!*\ !*** ../~/core-js/library/modules/_redefine.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(/*! ./_hide */ 455); /***/ }), /* 498 */ /*!**************************************************!*\ !*** ../~/core-js/library/modules/_iterators.js ***! \**************************************************/ /***/ (function(module, exports) { module.exports = {}; /***/ }), /* 499 */ /*!****************************************************!*\ !*** ../~/core-js/library/modules/_iter-create.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var create = __webpack_require__(/*! ./_object-create */ 500); var descriptor = __webpack_require__(/*! ./_property-desc */ 464); var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ 503); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(/*! ./_hide */ 455)(IteratorPrototype, __webpack_require__(/*! ./_wks */ 504)('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }), /* 500 */ /*!******************************************************!*\ !*** ../~/core-js/library/modules/_object-create.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(/*! ./_an-object */ 457); var dPs = __webpack_require__(/*! ./_object-dps */ 501); var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ 481); var IE_PROTO = __webpack_require__(/*! ./_shared-key */ 477)('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(/*! ./_dom-create */ 462)('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; __webpack_require__(/*! ./_html */ 502).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }), /* 501 */ /*!***************************************************!*\ !*** ../~/core-js/library/modules/_object-dps.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(/*! ./_object-dp */ 456); var anObject = __webpack_require__(/*! ./_an-object */ 457); var getKeys = __webpack_require__(/*! ./_object-keys */ 467); module.exports = __webpack_require__(/*! ./_descriptors */ 460) ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = getKeys(Properties); var length = keys.length; var i = 0; var P; while (length > i) dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }), /* 502 */ /*!*********************************************!*\ !*** ../~/core-js/library/modules/_html.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var document = __webpack_require__(/*! ./_global */ 451).document; module.exports = document && document.documentElement; /***/ }), /* 503 */ /*!**********************************************************!*\ !*** ../~/core-js/library/modules/_set-to-string-tag.js ***! \**********************************************************/ /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(/*! ./_object-dp */ 456).f; var has = __webpack_require__(/*! ./_has */ 465); var TAG = __webpack_require__(/*! ./_wks */ 504)('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; /***/ }), /* 504 */ /*!********************************************!*\ !*** ../~/core-js/library/modules/_wks.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(/*! ./_shared */ 478)('wks'); var uid = __webpack_require__(/*! ./_uid */ 480); var Symbol = __webpack_require__(/*! ./_global */ 451).Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }), /* 505 */ /*!***************************************************!*\ !*** ../~/core-js/library/modules/_object-gpo.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(/*! ./_has */ 465); var toObject = __webpack_require__(/*! ./_to-object */ 484); var IE_PROTO = __webpack_require__(/*! ./_shared-key */ 477)('IE_PROTO'); var ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function (O) { O = toObject(O); if (has(O, IE_PROTO)) return O[IE_PROTO]; if (typeof O.constructor == 'function' && O instanceof O.constructor) { return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }), /* 506 */ /*!********************************************************!*\ !*** ../~/core-js/library/modules/web.dom.iterable.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ./es6.array.iterator */ 507); var global = __webpack_require__(/*! ./_global */ 451); var hide = __webpack_require__(/*! ./_hide */ 455); var Iterators = __webpack_require__(/*! ./_iterators */ 498); var TO_STRING_TAG = __webpack_require__(/*! ./_wks */ 504)('toStringTag'); var DOMIterables = ('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(','); for (var i = 0; i < DOMIterables.length; i++) { var NAME = DOMIterables[i]; var Collection = global[NAME]; var proto = Collection && Collection.prototype; if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } /***/ }), /* 507 */ /*!**********************************************************!*\ !*** ../~/core-js/library/modules/es6.array.iterator.js ***! \**********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ 508); var step = __webpack_require__(/*! ./_iter-step */ 509); var Iterators = __webpack_require__(/*! ./_iterators */ 498); var toIObject = __webpack_require__(/*! ./_to-iobject */ 469); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = __webpack_require__(/*! ./_iter-define */ 496)(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function () { var O = this._t; var kind = this._k; var index = this._i++; if (!O || index >= O.length) { this._t = undefined; return step(1); } if (kind == 'keys') return step(0, index); if (kind == 'values') return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }), /* 508 */ /*!***********************************************************!*\ !*** ../~/core-js/library/modules/_add-to-unscopables.js ***! \***********************************************************/ /***/ (function(module, exports) { module.exports = function () { /* empty */ }; /***/ }), /* 509 */ /*!**************************************************!*\ !*** ../~/core-js/library/modules/_iter-step.js ***! \**************************************************/ /***/ (function(module, exports) { module.exports = function (done, value) { return { value: value, done: !!done }; }; /***/ }), /* 510 */ /*!************************************************!*\ !*** ../~/core-js/library/modules/_wks-ext.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { exports.f = __webpack_require__(/*! ./_wks */ 504); /***/ }), /* 511 */ /*!********************************************!*\ !*** ../~/babel-runtime/core-js/symbol.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/symbol */ 512), __esModule: true }; /***/ }), /* 512 */ /*!***********************************************!*\ !*** ../~/core-js/library/fn/symbol/index.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.symbol */ 513); __webpack_require__(/*! ../../modules/es6.object.to-string */ 521); __webpack_require__(/*! ../../modules/es7.symbol.async-iterator */ 522); __webpack_require__(/*! ../../modules/es7.symbol.observable */ 523); module.exports = __webpack_require__(/*! ../../modules/_core */ 452).Symbol; /***/ }), /* 513 */ /*!**************************************************!*\ !*** ../~/core-js/library/modules/es6.symbol.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; // ECMAScript 6 symbols shim var global = __webpack_require__(/*! ./_global */ 451); var has = __webpack_require__(/*! ./_has */ 465); var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ 460); var $export = __webpack_require__(/*! ./_export */ 450); var redefine = __webpack_require__(/*! ./_redefine */ 497); var META = __webpack_require__(/*! ./_meta */ 514).KEY; var $fails = __webpack_require__(/*! ./_fails */ 461); var shared = __webpack_require__(/*! ./_shared */ 478); var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ 503); var uid = __webpack_require__(/*! ./_uid */ 480); var wks = __webpack_require__(/*! ./_wks */ 504); var wksExt = __webpack_require__(/*! ./_wks-ext */ 510); var wksDefine = __webpack_require__(/*! ./_wks-define */ 515); var enumKeys = __webpack_require__(/*! ./_enum-keys */ 516); var isArray = __webpack_require__(/*! ./_is-array */ 517); var anObject = __webpack_require__(/*! ./_an-object */ 457); var isObject = __webpack_require__(/*! ./_is-object */ 458); var toIObject = __webpack_require__(/*! ./_to-iobject */ 469); var toPrimitive = __webpack_require__(/*! ./_to-primitive */ 463); var createDesc = __webpack_require__(/*! ./_property-desc */ 464); var _create = __webpack_require__(/*! ./_object-create */ 500); var gOPNExt = __webpack_require__(/*! ./_object-gopn-ext */ 518); var $GOPD = __webpack_require__(/*! ./_object-gopd */ 520); var $DP = __webpack_require__(/*! ./_object-dp */ 456); var $keys = __webpack_require__(/*! ./_object-keys */ 467); var gOPD = $GOPD.f; var dP = $DP.f; var gOPN = gOPNExt.f; var $Symbol = global.Symbol; var $JSON = global.JSON; var _stringify = $JSON && $JSON.stringify; var PROTOTYPE = 'prototype'; var HIDDEN = wks('_hidden'); var TO_PRIMITIVE = wks('toPrimitive'); var isEnum = {}.propertyIsEnumerable; var SymbolRegistry = shared('symbol-registry'); var AllSymbols = shared('symbols'); var OPSymbols = shared('op-symbols'); var ObjectProto = Object[PROTOTYPE]; var USE_NATIVE = typeof $Symbol == 'function'; var QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function () { return _create(dP({}, 'a', { get: function () { return dP(this, 'a', { value: 7 }).a; } })).a != 7; }) ? function (it, key, D) { var protoDesc = gOPD(ObjectProto, key); if (protoDesc) delete ObjectProto[key]; dP(it, key, D); if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); } : dP; var wrap = function (tag) { var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { return typeof it == 'symbol'; } : function (it) { return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D) { if (it === ObjectProto) $defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if (has(AllSymbols, key)) { if (!D.enumerable) { if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; D = _create(D, { enumerable: createDesc(0, false) }); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P) { anObject(it); var keys = enumKeys(P = toIObject(P)); var i = 0; var l = keys.length; var key; while (l > i) $defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P) { return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key) { var E = isEnum.call(this, key = toPrimitive(key, true)); if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { it = toIObject(it); key = toPrimitive(key, true); if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; var D = gOPD(it, key); if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it) { var names = gOPN(toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { var IS_OP = it === ObjectProto; var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if (!USE_NATIVE) { $Symbol = function Symbol() { if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function (value) { if (this === ObjectProto) $set.call(OPSymbols, value); if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString() { return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; __webpack_require__(/*! ./_object-gopn */ 519).f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__(/*! ./_object-pie */ 483).f = $propertyIsEnumerable; __webpack_require__(/*! ./_object-gops */ 482).f = $getOwnPropertySymbols; if (DESCRIPTORS && !__webpack_require__(/*! ./_library */ 479)) { redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function (name) { return wrap(wks(name)); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); for (var es6Symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function (key) { return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; }, useSetter: function () { setter = true; }, useSimple: function () { setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it) { var args = [it]; var i = 1; var replacer, $replacer; while (arguments.length > i) args.push(arguments[i++]); $replacer = replacer = args[1]; if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined if (!isArray(replacer)) replacer = function (key, value) { if (typeof $replacer == 'function') value = $replacer.call(this, key, value); if (!isSymbol(value)) return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(/*! ./_hide */ 455)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); /***/ }), /* 514 */ /*!*********************************************!*\ !*** ../~/core-js/library/modules/_meta.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(/*! ./_uid */ 480)('meta'); var isObject = __webpack_require__(/*! ./_is-object */ 458); var has = __webpack_require__(/*! ./_has */ 465); var setDesc = __webpack_require__(/*! ./_object-dp */ 456).f; var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; var FREEZE = !__webpack_require__(/*! ./_fails */ 461)(function () { return isExtensible(Object.preventExtensions({})); }); var setMeta = function (it) { setDesc(it, META, { value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function (it, create) { if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }), /* 515 */ /*!***************************************************!*\ !*** ../~/core-js/library/modules/_wks-define.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ./_global */ 451); var core = __webpack_require__(/*! ./_core */ 452); var LIBRARY = __webpack_require__(/*! ./_library */ 479); var wksExt = __webpack_require__(/*! ./_wks-ext */ 510); var defineProperty = __webpack_require__(/*! ./_object-dp */ 456).f; module.exports = function (name) { var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; /***/ }), /* 516 */ /*!**************************************************!*\ !*** ../~/core-js/library/modules/_enum-keys.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(/*! ./_object-keys */ 467); var gOPS = __webpack_require__(/*! ./_object-gops */ 482); var pIE = __webpack_require__(/*! ./_object-pie */ 483); module.exports = function (it) { var result = getKeys(it); var getSymbols = gOPS.f; if (getSymbols) { var symbols = getSymbols(it); var isEnum = pIE.f; var i = 0; var key; while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); } return result; }; /***/ }), /* 517 */ /*!*************************************************!*\ !*** ../~/core-js/library/modules/_is-array.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(/*! ./_cof */ 471); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; /***/ }), /* 518 */ /*!********************************************************!*\ !*** ../~/core-js/library/modules/_object-gopn-ext.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(/*! ./_to-iobject */ 469); var gOPN = __webpack_require__(/*! ./_object-gopn */ 519).f; var toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function (it) { try { return gOPN(it); } catch (e) { return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it) { return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; /***/ }), /* 519 */ /*!****************************************************!*\ !*** ../~/core-js/library/modules/_object-gopn.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__(/*! ./_object-keys-internal */ 468); var hiddenKeys = __webpack_require__(/*! ./_enum-bug-keys */ 481).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; /***/ }), /* 520 */ /*!****************************************************!*\ !*** ../~/core-js/library/modules/_object-gopd.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__(/*! ./_object-pie */ 483); var createDesc = __webpack_require__(/*! ./_property-desc */ 464); var toIObject = __webpack_require__(/*! ./_to-iobject */ 469); var toPrimitive = __webpack_require__(/*! ./_to-primitive */ 463); var has = __webpack_require__(/*! ./_has */ 465); var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ 459); var gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(/*! ./_descriptors */ 460) ? gOPD : function getOwnPropertyDescriptor(O, P) { O = toIObject(O); P = toPrimitive(P, true); if (IE8_DOM_DEFINE) try { return gOPD(O, P); } catch (e) { /* empty */ } if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); }; /***/ }), /* 521 */ /*!************************************************************!*\ !*** ../~/core-js/library/modules/es6.object.to-string.js ***! \************************************************************/ /***/ (function(module, exports) { /***/ }), /* 522 */ /*!*****************************************************************!*\ !*** ../~/core-js/library/modules/es7.symbol.async-iterator.js ***! \*****************************************************************/ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ./_wks-define */ 515)('asyncIterator'); /***/ }), /* 523 */ /*!*************************************************************!*\ !*** ../~/core-js/library/modules/es7.symbol.observable.js ***! \*************************************************************/ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ./_wks-define */ 515)('observable'); /***/ }), /* 524 */ /*!**********************************************!*\ !*** ../~/babel-runtime/helpers/inherits.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _setPrototypeOf = __webpack_require__(/*! ../core-js/object/set-prototype-of */ 525); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); var _create = __webpack_require__(/*! ../core-js/object/create */ 529); var _create2 = _interopRequireDefault(_create); var _typeof2 = __webpack_require__(/*! ../helpers/typeof */ 491); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); } subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; }; /***/ }), /* 525 */ /*!*************************************************************!*\ !*** ../~/babel-runtime/core-js/object/set-prototype-of.js ***! \*************************************************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/set-prototype-of */ 526), __esModule: true }; /***/ }), /* 526 */ /*!**********************************************************!*\ !*** ../~/core-js/library/fn/object/set-prototype-of.js ***! \**********************************************************/ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.set-prototype-of */ 527); module.exports = __webpack_require__(/*! ../../modules/_core */ 452).Object.setPrototypeOf; /***/ }), /* 527 */ /*!*******************************************************************!*\ !*** ../~/core-js/library/modules/es6.object.set-prototype-of.js ***! \*******************************************************************/ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = __webpack_require__(/*! ./_export */ 450); $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(/*! ./_set-proto */ 528).set }); /***/ }), /* 528 */ /*!**************************************************!*\ !*** ../~/core-js/library/modules/_set-proto.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = __webpack_require__(/*! ./_is-object */ 458); var anObject = __webpack_require__(/*! ./_an-object */ 457); var check = function (O, proto) { anObject(O); if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function (test, buggy, set) { try { set = __webpack_require__(/*! ./_ctx */ 453)(Function.call, __webpack_require__(/*! ./_object-gopd */ 520).f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch (e) { buggy = true; } return function setPrototypeOf(O, proto) { check(O, proto); if (buggy) O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; /***/ }), /* 529 */ /*!***************************************************!*\ !*** ../~/babel-runtime/core-js/object/create.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/create */ 530), __esModule: true }; /***/ }), /* 530 */ /*!************************************************!*\ !*** ../~/core-js/library/fn/object/create.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.create */ 531); var $Object = __webpack_require__(/*! ../../modules/_core */ 452).Object; module.exports = function create(P, D) { return $Object.create(P, D); }; /***/ }), /* 531 */ /*!*********************************************************!*\ !*** ../~/core-js/library/modules/es6.object.create.js ***! \*********************************************************/ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(/*! ./_export */ 450); // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', { create: __webpack_require__(/*! ./_object-create */ 500) }); /***/ }), /* 532 */ /*!*******************************!*\ !*** ../~/warning/warning.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { /** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var __DEV__ = ("development") !== 'production'; var warning = function() {}; if (__DEV__) { var printWarning = function printWarning(format, args) { var len = arguments.length; args = new Array(len > 1 ? len - 1 : 0); for (var key = 1; key < len; key++) { args[key - 1] = arguments[key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function() { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} } warning = function(condition, format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (!condition) { printWarning.apply(null, [format].concat(args)); } }; } module.exports = warning; /***/ }), /* 533 */ /*!******************************************!*\ !*** ../~/rc-slider/lib/common/Track.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 446); var _extends3 = _interopRequireDefault(_extends2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var Track = function Track(props) { var className = props.className, included = props.included, vertical = props.vertical, offset = props.offset, length = props.length, style = props.style; var positonStyle = vertical ? { bottom: offset + '%', height: length + '%' } : { left: offset + '%', width: length + '%' }; var elStyle = (0, _extends3['default'])({}, style, positonStyle); return included ? _react2['default'].createElement('div', { className: className, style: elStyle }) : null; }; /* eslint-disable react/prop-types */ exports['default'] = Track; module.exports = exports['default']; /***/ }), /* 534 */ /*!*************************************************!*\ !*** ../~/rc-slider/lib/common/createSlider.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _objectWithoutProperties2 = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 535); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 446); var _extends3 = _interopRequireDefault(_extends2); var _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ 536); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ 486); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _get2 = __webpack_require__(/*! babel-runtime/helpers/get */ 537); var _get3 = _interopRequireDefault(_get2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); exports['default'] = createSlider; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _addEventListener = __webpack_require__(/*! rc-util/lib/Dom/addEventListener */ 545); var _addEventListener2 = _interopRequireDefault(_addEventListener); var _classnames = __webpack_require__(/*! classnames */ 550); var _classnames2 = _interopRequireDefault(_classnames); var _warning = __webpack_require__(/*! warning */ 532); var _warning2 = _interopRequireDefault(_warning); var _Steps = __webpack_require__(/*! ./Steps */ 551); var _Steps2 = _interopRequireDefault(_Steps); var _Marks = __webpack_require__(/*! ./Marks */ 552); var _Marks2 = _interopRequireDefault(_Marks); var _Handle = __webpack_require__(/*! ../Handle */ 553); var _Handle2 = _interopRequireDefault(_Handle); var _utils = __webpack_require__(/*! ../utils */ 554); var utils = _interopRequireWildcard(_utils); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function noop() {} function createSlider(Component) { var _class, _temp; return _temp = _class = function (_Component) { (0, _inherits3['default'])(ComponentEnhancer, _Component); function ComponentEnhancer(props) { (0, _classCallCheck3['default'])(this, ComponentEnhancer); var _this = (0, _possibleConstructorReturn3['default'])(this, (ComponentEnhancer.__proto__ || Object.getPrototypeOf(ComponentEnhancer)).call(this, props)); _this.onMouseDown = function (e) { if (e.button !== 0) { return; } var isVertical = _this.props.vertical; var position = utils.getMousePosition(isVertical, e); if (!utils.isEventFromHandle(e, _this.handlesRefs)) { _this.dragOffset = 0; } else { var handlePosition = utils.getHandleCenterPosition(isVertical, e.target); _this.dragOffset = position - handlePosition; position = handlePosition; } _this.removeDocumentEvents(); _this.onStart(position); _this.addDocumentMouseEvents(); }; _this.onTouchStart = function (e) { if (utils.isNotTouchEvent(e)) return; var isVertical = _this.props.vertical; var position = utils.getTouchPosition(isVertical, e); if (!utils.isEventFromHandle(e, _this.handlesRefs)) { _this.dragOffset = 0; } else { var handlePosition = utils.getHandleCenterPosition(isVertical, e.target); _this.dragOffset = position - handlePosition; position = handlePosition; } _this.onStart(position); _this.addDocumentTouchEvents(); utils.pauseEvent(e); }; _this.onFocus = function (e) { var _this$props = _this.props, onFocus = _this$props.onFocus, vertical = _this$props.vertical; if (utils.isEventFromHandle(e, _this.handlesRefs)) { var handlePosition = utils.getHandleCenterPosition(vertical, e.target); _this.dragOffset = 0; _this.onStart(handlePosition); utils.pauseEvent(e); if (onFocus) { onFocus(e); } } }; _this.onBlur = function (e) { var onBlur = _this.props.onBlur; _this.onEnd(); if (onBlur) { onBlur(e); } }; _this.onMouseUp = function () { if (_this.handlesRefs[_this.prevMovedHandleIndex]) { _this.handlesRefs[_this.prevMovedHandleIndex].clickFocus(); } }; _this.onMouseMove = function (e) { if (!_this.sliderRef) { _this.onEnd(); return; } var position = utils.getMousePosition(_this.props.vertical, e); _this.onMove(e, position - _this.dragOffset); }; _this.onTouchMove = function (e) { if (utils.isNotTouchEvent(e) || !_this.sliderRef) { _this.onEnd(); return; } var position = utils.getTouchPosition(_this.props.vertical, e); _this.onMove(e, position - _this.dragOffset); }; _this.onKeyDown = function (e) { if (_this.sliderRef && utils.isEventFromHandle(e, _this.handlesRefs)) { _this.onKeyboard(e); } }; _this.onClickMarkLabel = function (e, value) { e.stopPropagation(); _this.onChange({ value: value }); _this.setState({ value: value }, function () { return _this.onEnd(true); }); }; _this.saveSlider = function (slider) { _this.sliderRef = slider; }; if (utils.isDev()) { var step = props.step, max = props.max, min = props.min; var isPointDiffEven = isFinite(max - min) ? (max - min) % step === 0 : true; // eslint-disable-line (0, _warning2['default'])(step && Math.floor(step) === step ? isPointDiffEven : true, 'Slider[max] - Slider[min] (%s) should be a multiple of Slider[step] (%s)', max - min, step); } _this.handlesRefs = {}; return _this; } (0, _createClass3['default'])(ComponentEnhancer, [{ key: 'componentDidMount', value: function componentDidMount() { // Snapshot testing cannot handle refs, so be sure to null-check this. this.document = this.sliderRef && this.sliderRef.ownerDocument; } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if ((0, _get3['default'])(ComponentEnhancer.prototype.__proto__ || Object.getPrototypeOf(ComponentEnhancer.prototype), 'componentWillUnmount', this)) (0, _get3['default'])(ComponentEnhancer.prototype.__proto__ || Object.getPrototypeOf(ComponentEnhancer.prototype), 'componentWillUnmount', this).call(this); this.removeDocumentEvents(); } }, { key: 'getSliderStart', value: function getSliderStart() { var slider = this.sliderRef; var rect = slider.getBoundingClientRect(); return this.props.vertical ? rect.top : rect.left + window.pageXOffset; } }, { key: 'getSliderLength', value: function getSliderLength() { var slider = this.sliderRef; if (!slider) { return 0; } var coords = slider.getBoundingClientRect(); return this.props.vertical ? coords.height : coords.width; } }, { key: 'addDocumentTouchEvents', value: function addDocumentTouchEvents() { // just work for Chrome iOS Safari and Android Browser this.onTouchMoveListener = (0, _addEventListener2['default'])(this.document, 'touchmove', this.onTouchMove); this.onTouchUpListener = (0, _addEventListener2['default'])(this.document, 'touchend', this.onEnd); } }, { key: 'addDocumentMouseEvents', value: function addDocumentMouseEvents() { this.onMouseMoveListener = (0, _addEventListener2['default'])(this.document, 'mousemove', this.onMouseMove); this.onMouseUpListener = (0, _addEventListener2['default'])(this.document, 'mouseup', this.onEnd); } }, { key: 'removeDocumentEvents', value: function removeDocumentEvents() { /* eslint-disable no-unused-expressions */ this.onTouchMoveListener && this.onTouchMoveListener.remove(); this.onTouchUpListener && this.onTouchUpListener.remove(); this.onMouseMoveListener && this.onMouseMoveListener.remove(); this.onMouseUpListener && this.onMouseUpListener.remove(); /* eslint-enable no-unused-expressions */ } }, { key: 'focus', value: function focus() { if (!this.props.disabled) { this.handlesRefs[0].focus(); } } }, { key: 'blur', value: function blur() { var _this2 = this; if (!this.props.disabled) { Object.keys(this.handlesRefs).forEach(function (key) { if (_this2.handlesRefs[key] && _this2.handlesRefs[key].blur) { _this2.handlesRefs[key].blur(); } }); } } }, { key: 'calcValue', value: function calcValue(offset) { var _props = this.props, vertical = _props.vertical, min = _props.min, max = _props.max; var ratio = Math.abs(Math.max(offset, 0) / this.getSliderLength()); var value = vertical ? (1 - ratio) * (max - min) + min : ratio * (max - min) + min; return value; } }, { key: 'calcValueByPos', value: function calcValueByPos(position) { var pixelOffset = position - this.getSliderStart(); var nextValue = this.trimAlignValue(this.calcValue(pixelOffset)); return nextValue; } }, { key: 'calcOffset', value: function calcOffset(value) { var _props2 = this.props, min = _props2.min, max = _props2.max; var ratio = (value - min) / (max - min); return ratio * 100; } }, { key: 'saveHandle', value: function saveHandle(index, handle) { this.handlesRefs[index] = handle; } }, { key: 'render', value: function render() { var _classNames; var _props3 = this.props, prefixCls = _props3.prefixCls, className = _props3.className, marks = _props3.marks, dots = _props3.dots, step = _props3.step, included = _props3.included, disabled = _props3.disabled, vertical = _props3.vertical, min = _props3.min, max = _props3.max, children = _props3.children, maximumTrackStyle = _props3.maximumTrackStyle, style = _props3.style, railStyle = _props3.railStyle, dotStyle = _props3.dotStyle, activeDotStyle = _props3.activeDotStyle; var _get$call = (0, _get3['default'])(ComponentEnhancer.prototype.__proto__ || Object.getPrototypeOf(ComponentEnhancer.prototype), 'render', this).call(this), tracks = _get$call.tracks, handles = _get$call.handles; var sliderClassName = (0, _classnames2['default'])(prefixCls, (_classNames = {}, (0, _defineProperty3['default'])(_classNames, prefixCls + '-with-marks', Object.keys(marks).length), (0, _defineProperty3['default'])(_classNames, prefixCls + '-disabled', disabled), (0, _defineProperty3['default'])(_classNames, prefixCls + '-vertical', vertical), (0, _defineProperty3['default'])(_classNames, className, className), _classNames)); return _react2['default'].createElement( 'div', { ref: this.saveSlider, className: sliderClassName, onTouchStart: disabled ? noop : this.onTouchStart, onMouseDown: disabled ? noop : this.onMouseDown, onMouseUp: disabled ? noop : this.onMouseUp, onKeyDown: disabled ? noop : this.onKeyDown, onFocus: disabled ? noop : this.onFocus, onBlur: disabled ? noop : this.onBlur, style: style }, _react2['default'].createElement('div', { className: prefixCls + '-rail', style: (0, _extends3['default'])({}, maximumTrackStyle, railStyle) }), tracks, _react2['default'].createElement(_Steps2['default'], { prefixCls: prefixCls, vertical: vertical, marks: marks, dots: dots, step: step, included: included, lowerBound: this.getLowerBound(), upperBound: this.getUpperBound(), max: max, min: min, dotStyle: dotStyle, activeDotStyle: activeDotStyle }), handles, _react2['default'].createElement(_Marks2['default'], { className: prefixCls + '-mark', onClickLabel: disabled ? noop : this.onClickMarkLabel, vertical: vertical, marks: marks, included: included, lowerBound: this.getLowerBound(), upperBound: this.getUpperBound(), max: max, min: min }), children ); } }]); return ComponentEnhancer; }(Component), _class.displayName = 'ComponentEnhancer(' + Component.displayName + ')', _class.propTypes = (0, _extends3['default'])({}, Component.propTypes, { min: _propTypes2['default'].number, max: _propTypes2['default'].number, step: _propTypes2['default'].number, marks: _propTypes2['default'].object, included: _propTypes2['default'].bool, className: _propTypes2['default'].string, prefixCls: _propTypes2['default'].string, disabled: _propTypes2['default'].bool, children: _propTypes2['default'].any, onBeforeChange: _propTypes2['default'].func, onChange: _propTypes2['default'].func, onAfterChange: _propTypes2['default'].func, handle: _propTypes2['default'].func, dots: _propTypes2['default'].bool, vertical: _propTypes2['default'].bool, style: _propTypes2['default'].object, minimumTrackStyle: _propTypes2['default'].object, // just for compatibility, will be deperecate maximumTrackStyle: _propTypes2['default'].object, // just for compatibility, will be deperecate handleStyle: _propTypes2['default'].oneOfType([_propTypes2['default'].object, _propTypes2['default'].arrayOf(_propTypes2['default'].object)]), trackStyle: _propTypes2['default'].oneOfType([_propTypes2['default'].object, _propTypes2['default'].arrayOf(_propTypes2['default'].object)]), railStyle: _propTypes2['default'].object, dotStyle: _propTypes2['default'].object, activeDotStyle: _propTypes2['default'].object, autoFocus: _propTypes2['default'].bool, onFocus: _propTypes2['default'].func, onBlur: _propTypes2['default'].func }), _class.defaultProps = (0, _extends3['default'])({}, Component.defaultProps, { prefixCls: 'rc-slider', className: '', min: 0, max: 100, step: 1, marks: {}, handle: function handle(_ref) { var index = _ref.index, restProps = (0, _objectWithoutProperties3['default'])(_ref, ['index']); delete restProps.dragging; if (restProps.value === null) { return null; } return _react2['default'].createElement(_Handle2['default'], (0, _extends3['default'])({}, restProps, { key: index })); }, onBeforeChange: noop, onChange: noop, onAfterChange: noop, included: true, disabled: false, dots: false, vertical: false, trackStyle: [{}], handleStyle: [{}], railStyle: {}, dotStyle: {}, activeDotStyle: {} }), _temp; } module.exports = exports['default']; /***/ }), /* 535 */ /*!*************************************************************!*\ !*** ../~/babel-runtime/helpers/objectWithoutProperties.js ***! \*************************************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }; /***/ }), /* 536 */ /*!****************************************************!*\ !*** ../~/babel-runtime/helpers/defineProperty.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(/*! ../core-js/object/define-property */ 487); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (obj, key, value) { if (key in obj) { (0, _defineProperty2.default)(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }; /***/ }), /* 537 */ /*!*****************************************!*\ !*** ../~/babel-runtime/helpers/get.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _getPrototypeOf = __webpack_require__(/*! ../core-js/object/get-prototype-of */ 538); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); var _getOwnPropertyDescriptor = __webpack_require__(/*! ../core-js/object/get-own-property-descriptor */ 542); var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); if (desc === undefined) { var parent = (0, _getPrototypeOf2.default)(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; /***/ }), /* 538 */ /*!*************************************************************!*\ !*** ../~/babel-runtime/core-js/object/get-prototype-of.js ***! \*************************************************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/get-prototype-of */ 539), __esModule: true }; /***/ }), /* 539 */ /*!**********************************************************!*\ !*** ../~/core-js/library/fn/object/get-prototype-of.js ***! \**********************************************************/ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.get-prototype-of */ 540); module.exports = __webpack_require__(/*! ../../modules/_core */ 452).Object.getPrototypeOf; /***/ }), /* 540 */ /*!*******************************************************************!*\ !*** ../~/core-js/library/modules/es6.object.get-prototype-of.js ***! \*******************************************************************/ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 Object.getPrototypeOf(O) var toObject = __webpack_require__(/*! ./_to-object */ 484); var $getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ 505); __webpack_require__(/*! ./_object-sap */ 541)('getPrototypeOf', function () { return function getPrototypeOf(it) { return $getPrototypeOf(toObject(it)); }; }); /***/ }), /* 541 */ /*!***************************************************!*\ !*** ../~/core-js/library/modules/_object-sap.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(/*! ./_export */ 450); var core = __webpack_require__(/*! ./_core */ 452); var fails = __webpack_require__(/*! ./_fails */ 461); module.exports = function (KEY, exec) { var fn = (core.Object || {})[KEY] || Object[KEY]; var exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; /***/ }), /* 542 */ /*!************************************************************************!*\ !*** ../~/babel-runtime/core-js/object/get-own-property-descriptor.js ***! \************************************************************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/get-own-property-descriptor */ 543), __esModule: true }; /***/ }), /* 543 */ /*!*********************************************************************!*\ !*** ../~/core-js/library/fn/object/get-own-property-descriptor.js ***! \*********************************************************************/ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.get-own-property-descriptor */ 544); var $Object = __webpack_require__(/*! ../../modules/_core */ 452).Object; module.exports = function getOwnPropertyDescriptor(it, key) { return $Object.getOwnPropertyDescriptor(it, key); }; /***/ }), /* 544 */ /*!******************************************************************************!*\ !*** ../~/core-js/library/modules/es6.object.get-own-property-descriptor.js ***! \******************************************************************************/ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = __webpack_require__(/*! ./_to-iobject */ 469); var $getOwnPropertyDescriptor = __webpack_require__(/*! ./_object-gopd */ 520).f; __webpack_require__(/*! ./_object-sap */ 541)('getOwnPropertyDescriptor', function () { return function getOwnPropertyDescriptor(it, key) { return $getOwnPropertyDescriptor(toIObject(it), key); }; }); /***/ }), /* 545 */ /*!************************************************!*\ !*** ../~/rc-util/lib/Dom/addEventListener.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports['default'] = addEventListenerWrap; var _addDomEventListener = __webpack_require__(/*! add-dom-event-listener */ 546); var _addDomEventListener2 = _interopRequireDefault(_addDomEventListener); var _reactDom = __webpack_require__(/*! react-dom */ 549); var _reactDom2 = _interopRequireDefault(_reactDom); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function addEventListenerWrap(target, eventType, cb, option) { /* eslint camelcase: 2 */ var callback = _reactDom2['default'].unstable_batchedUpdates ? function run(e) { _reactDom2['default'].unstable_batchedUpdates(cb, e); } : cb; return (0, _addDomEventListener2['default'])(target, eventType, callback, option); } module.exports = exports['default']; /***/ }), /* 546 */ /*!************************************************!*\ !*** ../~/add-dom-event-listener/lib/index.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); exports['default'] = addEventListener; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _EventObject = __webpack_require__(/*! ./EventObject */ 547); var _EventObject2 = _interopRequireDefault(_EventObject); function addEventListener(target, eventType, callback, option) { function wrapCallback(e) { var ne = new _EventObject2['default'](e); callback.call(target, ne); } if (target.addEventListener) { var _ret = (function () { var useCapture = false; if (typeof option === 'object') { useCapture = option.capture || false; } else if (typeof option === 'boolean') { useCapture = option; } target.addEventListener(eventType, wrapCallback, option || false); return { v: { remove: function remove() { target.removeEventListener(eventType, wrapCallback, useCapture); } } }; })(); if (typeof _ret === 'object') return _ret.v; } else if (target.attachEvent) { target.attachEvent('on' + eventType, wrapCallback); return { remove: function remove() { target.detachEvent('on' + eventType, wrapCallback); } }; } } module.exports = exports['default']; /***/ }), /* 547 */ /*!******************************************************!*\ !*** ../~/add-dom-event-listener/lib/EventObject.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { /** * @ignore * event object for dom * @author yiminghe@gmail.com */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _EventBaseObject = __webpack_require__(/*! ./EventBaseObject */ 548); var _EventBaseObject2 = _interopRequireDefault(_EventBaseObject); var _objectAssign = __webpack_require__(/*! object-assign */ 7); var _objectAssign2 = _interopRequireDefault(_objectAssign); var TRUE = true; var FALSE = false; var commonProps = ['altKey', 'bubbles', 'cancelable', 'ctrlKey', 'currentTarget', 'eventPhase', 'metaKey', 'shiftKey', 'target', 'timeStamp', 'view', 'type']; function isNullOrUndefined(w) { return w === null || w === undefined; } var eventNormalizers = [{ reg: /^key/, props: ['char', 'charCode', 'key', 'keyCode', 'which'], fix: function fix(event, nativeEvent) { if (isNullOrUndefined(event.which)) { event.which = !isNullOrUndefined(nativeEvent.charCode) ? nativeEvent.charCode : nativeEvent.keyCode; } // add metaKey to non-Mac browsers (use ctrl for PC 's and Meta for Macs) if (event.metaKey === undefined) { event.metaKey = event.ctrlKey; } } }, { reg: /^touch/, props: ['touches', 'changedTouches', 'targetTouches'] }, { reg: /^hashchange$/, props: ['newURL', 'oldURL'] }, { reg: /^gesturechange$/i, props: ['rotation', 'scale'] }, { reg: /^(mousewheel|DOMMouseScroll)$/, props: [], fix: function fix(event, nativeEvent) { var deltaX = undefined; var deltaY = undefined; var delta = undefined; var wheelDelta = nativeEvent.wheelDelta; var axis = nativeEvent.axis; var wheelDeltaY = nativeEvent.wheelDeltaY; var wheelDeltaX = nativeEvent.wheelDeltaX; var detail = nativeEvent.detail; // ie/webkit if (wheelDelta) { delta = wheelDelta / 120; } // gecko if (detail) { // press control e.detail == 1 else e.detail == 3 delta = 0 - (detail % 3 === 0 ? detail / 3 : detail); } // Gecko if (axis !== undefined) { if (axis === event.HORIZONTAL_AXIS) { deltaY = 0; deltaX = 0 - delta; } else if (axis === event.VERTICAL_AXIS) { deltaX = 0; deltaY = delta; } } // Webkit if (wheelDeltaY !== undefined) { deltaY = wheelDeltaY / 120; } if (wheelDeltaX !== undefined) { deltaX = -1 * wheelDeltaX / 120; } // 默认 deltaY (ie) if (!deltaX && !deltaY) { deltaY = delta; } if (deltaX !== undefined) { /** * deltaX of mousewheel event * @property deltaX * @member Event.DomEvent.Object */ event.deltaX = deltaX; } if (deltaY !== undefined) { /** * deltaY of mousewheel event * @property deltaY * @member Event.DomEvent.Object */ event.deltaY = deltaY; } if (delta !== undefined) { /** * delta of mousewheel event * @property delta * @member Event.DomEvent.Object */ event.delta = delta; } } }, { reg: /^mouse|contextmenu|click|mspointer|(^DOMMouseScroll$)/i, props: ['buttons', 'clientX', 'clientY', 'button', 'offsetX', 'relatedTarget', 'which', 'fromElement', 'toElement', 'offsetY', 'pageX', 'pageY', 'screenX', 'screenY'], fix: function fix(event, nativeEvent) { var eventDoc = undefined; var doc = undefined; var body = undefined; var target = event.target; var button = nativeEvent.button; // Calculate pageX/Y if missing and clientX/Y available if (target && isNullOrUndefined(event.pageX) && !isNullOrUndefined(nativeEvent.clientX)) { eventDoc = target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = nativeEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); event.pageY = nativeEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); } // which for click: 1 === left; 2 === middle; 3 === right // do not use button if (!event.which && button !== undefined) { if (button & 1) { event.which = 1; } else if (button & 2) { event.which = 3; } else if (button & 4) { event.which = 2; } else { event.which = 0; } } // add relatedTarget, if necessary if (!event.relatedTarget && event.fromElement) { event.relatedTarget = event.fromElement === target ? event.toElement : event.fromElement; } return event; } }]; function retTrue() { return TRUE; } function retFalse() { return FALSE; } function DomEventObject(nativeEvent) { var type = nativeEvent.type; var isNative = typeof nativeEvent.stopPropagation === 'function' || typeof nativeEvent.cancelBubble === 'boolean'; _EventBaseObject2['default'].call(this); this.nativeEvent = nativeEvent; // in case dom event has been mark as default prevented by lower dom node var isDefaultPrevented = retFalse; if ('defaultPrevented' in nativeEvent) { isDefaultPrevented = nativeEvent.defaultPrevented ? retTrue : retFalse; } else if ('getPreventDefault' in nativeEvent) { // https://bugzilla.mozilla.org/show_bug.cgi?id=691151 isDefaultPrevented = nativeEvent.getPreventDefault() ? retTrue : retFalse; } else if ('returnValue' in nativeEvent) { isDefaultPrevented = nativeEvent.returnValue === FALSE ? retTrue : retFalse; } this.isDefaultPrevented = isDefaultPrevented; var fixFns = []; var fixFn = undefined; var l = undefined; var prop = undefined; var props = commonProps.concat(); eventNormalizers.forEach(function (normalizer) { if (type.match(normalizer.reg)) { props = props.concat(normalizer.props); if (normalizer.fix) { fixFns.push(normalizer.fix); } } }); l = props.length; // clone properties of the original event object while (l) { prop = props[--l]; this[prop] = nativeEvent[prop]; } // fix target property, if necessary if (!this.target && isNative) { this.target = nativeEvent.srcElement || document; // srcElement might not be defined either } // check if target is a text node (safari) if (this.target && this.target.nodeType === 3) { this.target = this.target.parentNode; } l = fixFns.length; while (l) { fixFn = fixFns[--l]; fixFn(this, nativeEvent); } this.timeStamp = nativeEvent.timeStamp || Date.now(); } var EventBaseObjectProto = _EventBaseObject2['default'].prototype; (0, _objectAssign2['default'])(DomEventObject.prototype, EventBaseObjectProto, { constructor: DomEventObject, preventDefault: function preventDefault() { var e = this.nativeEvent; // if preventDefault exists run it on the original event if (e.preventDefault) { e.preventDefault(); } else { // otherwise set the returnValue property of the original event to FALSE (IE) e.returnValue = FALSE; } EventBaseObjectProto.preventDefault.call(this); }, stopPropagation: function stopPropagation() { var e = this.nativeEvent; // if stopPropagation exists run it on the original event if (e.stopPropagation) { e.stopPropagation(); } else { // otherwise set the cancelBubble property of the original event to TRUE (IE) e.cancelBubble = TRUE; } EventBaseObjectProto.stopPropagation.call(this); } }); exports['default'] = DomEventObject; module.exports = exports['default']; /***/ }), /* 548 */ /*!**********************************************************!*\ !*** ../~/add-dom-event-listener/lib/EventBaseObject.js ***! \**********************************************************/ /***/ (function(module, exports) { /** * @ignore * base event object for custom and dom event. * @author yiminghe@gmail.com */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function returnFalse() { return false; } function returnTrue() { return true; } function EventBaseObject() { this.timeStamp = Date.now(); this.target = undefined; this.currentTarget = undefined; } EventBaseObject.prototype = { isEventObject: 1, constructor: EventBaseObject, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, preventDefault: function preventDefault() { this.isDefaultPrevented = returnTrue; }, stopPropagation: function stopPropagation() { this.isPropagationStopped = returnTrue; }, stopImmediatePropagation: function stopImmediatePropagation() { this.isImmediatePropagationStopped = returnTrue; // fixed 1.2 // call stopPropagation implicitly this.stopPropagation(); }, halt: function halt(immediate) { if (immediate) { this.stopImmediatePropagation(); } else { this.stopPropagation(); } this.preventDefault(); } }; exports["default"] = EventBaseObject; module.exports = exports["default"]; /***/ }), /* 549 */ /*!***************************!*\ !*** external "ReactDOM" ***! \***************************/ /***/ (function(module, exports) { (function() { module.exports = this["ReactDOM"]; }()); /***/ }), /* 550 */ /*!********************************!*\ !*** ../~/classnames/index.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames () { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg) && arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } else if (argType === 'object') { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } return classes.join(' '); } if (typeof module !== 'undefined' && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () { return classNames; }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else { window.classNames = classNames; } }()); /***/ }), /* 551 */ /*!******************************************!*\ !*** ../~/rc-slider/lib/common/Steps.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ 536); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 446); var _extends3 = _interopRequireDefault(_extends2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(/*! classnames */ 550); var _classnames2 = _interopRequireDefault(_classnames); var _warning = __webpack_require__(/*! warning */ 532); var _warning2 = _interopRequireDefault(_warning); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var calcPoints = function calcPoints(vertical, marks, dots, step, min, max) { (0, _warning2['default'])(dots ? step > 0 : true, '`Slider[step]` should be a positive number in order to make Slider[dots] work.'); var points = Object.keys(marks).map(parseFloat).sort(function (a, b) { return a - b; }); if (dots) { for (var i = min; i <= max; i += step) { if (points.indexOf(i) === -1) { points.push(i); } } } return points; }; var Steps = function Steps(_ref) { var prefixCls = _ref.prefixCls, vertical = _ref.vertical, marks = _ref.marks, dots = _ref.dots, step = _ref.step, included = _ref.included, lowerBound = _ref.lowerBound, upperBound = _ref.upperBound, max = _ref.max, min = _ref.min, dotStyle = _ref.dotStyle, activeDotStyle = _ref.activeDotStyle; var range = max - min; var elements = calcPoints(vertical, marks, dots, step, min, max).map(function (point) { var _classNames; var offset = Math.abs(point - min) / range * 100 + '%'; var isActived = !included && point === upperBound || included && point <= upperBound && point >= lowerBound; var style = vertical ? (0, _extends3['default'])({ bottom: offset }, dotStyle) : (0, _extends3['default'])({ left: offset }, dotStyle); if (isActived) { style = (0, _extends3['default'])({}, style, activeDotStyle); } var pointClassName = (0, _classnames2['default'])((_classNames = {}, (0, _defineProperty3['default'])(_classNames, prefixCls + '-dot', true), (0, _defineProperty3['default'])(_classNames, prefixCls + '-dot-active', isActived), _classNames)); return _react2['default'].createElement('span', { className: pointClassName, style: style, key: point }); }); return _react2['default'].createElement( 'div', { className: prefixCls + '-step' }, elements ); }; Steps.propTypes = { prefixCls: _propTypes2['default'].string, activeDotStyle: _propTypes2['default'].object, dotStyle: _propTypes2['default'].object, min: _propTypes2['default'].number, max: _propTypes2['default'].number, upperBound: _propTypes2['default'].number, lowerBound: _propTypes2['default'].number, included: _propTypes2['default'].bool, dots: _propTypes2['default'].bool, step: _propTypes2['default'].number, marks: _propTypes2['default'].object, vertical: _propTypes2['default'].bool }; exports['default'] = Steps; module.exports = exports['default']; /***/ }), /* 552 */ /*!******************************************!*\ !*** ../~/rc-slider/lib/common/Marks.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 446); var _extends3 = _interopRequireDefault(_extends2); var _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ 536); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(/*! classnames */ 550); var _classnames2 = _interopRequireDefault(_classnames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var Marks = function Marks(_ref) { var className = _ref.className, vertical = _ref.vertical, marks = _ref.marks, included = _ref.included, upperBound = _ref.upperBound, lowerBound = _ref.lowerBound, max = _ref.max, min = _ref.min, onClickLabel = _ref.onClickLabel; var marksKeys = Object.keys(marks); var range = max - min; var elements = marksKeys.map(parseFloat).sort(function (a, b) { return a - b; }).map(function (point) { var _classNames; var markPoint = marks[point]; var markPointIsObject = typeof markPoint === 'object' && !_react2['default'].isValidElement(markPoint); var markLabel = markPointIsObject ? markPoint.label : markPoint; if (!markLabel && markLabel !== 0) { return null; } var isActive = !included && point === upperBound || included && point <= upperBound && point >= lowerBound; var markClassName = (0, _classnames2['default'])((_classNames = {}, (0, _defineProperty3['default'])(_classNames, className + '-text', true), (0, _defineProperty3['default'])(_classNames, className + '-text-active', isActive), _classNames)); var bottomStyle = { marginBottom: '-50%', bottom: (point - min) / range * 100 + '%' }; var leftStyle = { left: (point - min) / range * 100 + '%', transform: 'translateX(-50%)', msTransform: 'translateX(-50%)' }; var style = vertical ? bottomStyle : leftStyle; var markStyle = markPointIsObject ? (0, _extends3['default'])({}, style, markPoint.style) : style; return _react2['default'].createElement( 'span', { className: markClassName, style: markStyle, key: point, onMouseDown: function onMouseDown(e) { return onClickLabel(e, point); }, onTouchStart: function onTouchStart(e) { return onClickLabel(e, point); } }, markLabel ); }); return _react2['default'].createElement( 'div', { className: className }, elements ); }; Marks.propTypes = { className: _propTypes2['default'].string, vertical: _propTypes2['default'].bool, marks: _propTypes2['default'].object, included: _propTypes2['default'].bool, upperBound: _propTypes2['default'].number, lowerBound: _propTypes2['default'].number, max: _propTypes2['default'].number, min: _propTypes2['default'].number, onClickLabel: _propTypes2['default'].func }; exports['default'] = Marks; module.exports = exports['default']; /***/ }), /* 553 */ /*!************************************!*\ !*** ../~/rc-slider/lib/Handle.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 446); var _extends3 = _interopRequireDefault(_extends2); var _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ 536); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _objectWithoutProperties2 = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 535); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ 486); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(/*! classnames */ 550); var _classnames2 = _interopRequireDefault(_classnames); var _addEventListener = __webpack_require__(/*! rc-util/lib/Dom/addEventListener */ 545); var _addEventListener2 = _interopRequireDefault(_addEventListener); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var Handle = function (_React$Component) { (0, _inherits3['default'])(Handle, _React$Component); function Handle() { var _ref; var _temp, _this, _ret; (0, _classCallCheck3['default'])(this, Handle); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, (_ref = Handle.__proto__ || Object.getPrototypeOf(Handle)).call.apply(_ref, [this].concat(args))), _this), _this.state = { clickFocused: false }, _this.setHandleRef = function (node) { _this.handle = node; }, _this.handleMouseUp = function () { if (document.activeElement === _this.handle) { _this.setClickFocus(true); } }, _this.handleMouseDown = function () { // fix https://github.com/ant-design/ant-design/issues/15324 _this.focus(); }, _this.handleBlur = function () { _this.setClickFocus(false); }, _this.handleKeyDown = function () { _this.setClickFocus(false); }, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret); } (0, _createClass3['default'])(Handle, [{ key: 'componentDidMount', value: function componentDidMount() { // mouseup won't trigger if mouse moved out of handle, // so we listen on document here. this.onMouseUpListener = (0, _addEventListener2['default'])(document, 'mouseup', this.handleMouseUp); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.onMouseUpListener) { this.onMouseUpListener.remove(); } } }, { key: 'setClickFocus', value: function setClickFocus(focused) { this.setState({ clickFocused: focused }); } }, { key: 'clickFocus', value: function clickFocus() { this.setClickFocus(true); this.focus(); } }, { key: 'focus', value: function focus() { this.handle.focus(); } }, { key: 'blur', value: function blur() { this.handle.blur(); } }, { key: 'render', value: function render() { var _props = this.props, prefixCls = _props.prefixCls, vertical = _props.vertical, offset = _props.offset, style = _props.style, disabled = _props.disabled, min = _props.min, max = _props.max, value = _props.value, tabIndex = _props.tabIndex, restProps = (0, _objectWithoutProperties3['default'])(_props, ['prefixCls', 'vertical', 'offset', 'style', 'disabled', 'min', 'max', 'value', 'tabIndex']); var className = (0, _classnames2['default'])(this.props.className, (0, _defineProperty3['default'])({}, prefixCls + '-handle-click-focused', this.state.clickFocused)); var postionStyle = vertical ? { bottom: offset + '%' } : { left: offset + '%' }; var elStyle = (0, _extends3['default'])({}, style, postionStyle); var _tabIndex = tabIndex || 0; if (disabled || tabIndex === null) { _tabIndex = null; } return _react2['default'].createElement('div', (0, _extends3['default'])({ ref: this.setHandleRef, tabIndex: _tabIndex }, restProps, { className: className, style: elStyle, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, onMouseDown: this.handleMouseDown // aria attribute , role: 'slider', 'aria-valuemin': min, 'aria-valuemax': max, 'aria-valuenow': value, 'aria-disabled': !!disabled })); } }]); return Handle; }(_react2['default'].Component); exports['default'] = Handle; Handle.propTypes = { prefixCls: _propTypes2['default'].string, className: _propTypes2['default'].string, vertical: _propTypes2['default'].bool, offset: _propTypes2['default'].number, style: _propTypes2['default'].object, disabled: _propTypes2['default'].bool, min: _propTypes2['default'].number, max: _propTypes2['default'].number, value: _propTypes2['default'].number, tabIndex: _propTypes2['default'].number }; module.exports = exports['default']; /***/ }), /* 554 */ /*!***********************************!*\ !*** ../~/rc-slider/lib/utils.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _toConsumableArray2 = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ 555); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); exports.isDev = isDev; exports.isEventFromHandle = isEventFromHandle; exports.isValueOutOfRange = isValueOutOfRange; exports.isNotTouchEvent = isNotTouchEvent; exports.getClosestPoint = getClosestPoint; exports.getPrecision = getPrecision; exports.getMousePosition = getMousePosition; exports.getTouchPosition = getTouchPosition; exports.getHandleCenterPosition = getHandleCenterPosition; exports.ensureValueInRange = ensureValueInRange; exports.ensureValuePrecision = ensureValuePrecision; exports.pauseEvent = pauseEvent; exports.calculateNextValue = calculateNextValue; exports.getKeyboardValueMutator = getKeyboardValueMutator; var _reactDom = __webpack_require__(/*! react-dom */ 549); var _KeyCode = __webpack_require__(/*! rc-util/lib/KeyCode */ 565); var _KeyCode2 = _interopRequireDefault(_KeyCode); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function isDev() { return ("development") !== 'production'; } function isEventFromHandle(e, handles) { try { return Object.keys(handles).some(function (key) { return e.target === (0, _reactDom.findDOMNode)(handles[key]); }); } catch (error) { return false; } } function isValueOutOfRange(value, _ref) { var min = _ref.min, max = _ref.max; return value < min || value > max; } function isNotTouchEvent(e) { return e.touches.length > 1 || e.type.toLowerCase() === 'touchend' && e.touches.length > 0; } function getClosestPoint(val, _ref2) { var marks = _ref2.marks, step = _ref2.step, min = _ref2.min, max = _ref2.max; var points = Object.keys(marks).map(parseFloat); if (step !== null) { var maxSteps = Math.floor((max - min) / step); var steps = Math.min((val - min) / step, maxSteps); var closestStep = Math.round(steps) * step + min; points.push(closestStep); } var diffs = points.map(function (point) { return Math.abs(val - point); }); return points[diffs.indexOf(Math.min.apply(Math, (0, _toConsumableArray3['default'])(diffs)))]; } function getPrecision(step) { var stepString = step.toString(); var precision = 0; if (stepString.indexOf('.') >= 0) { precision = stepString.length - stepString.indexOf('.') - 1; } return precision; } function getMousePosition(vertical, e) { return vertical ? e.clientY : e.pageX; } function getTouchPosition(vertical, e) { return vertical ? e.touches[0].clientY : e.touches[0].pageX; } function getHandleCenterPosition(vertical, handle) { var coords = handle.getBoundingClientRect(); return vertical ? coords.top + coords.height * 0.5 : window.pageXOffset + coords.left + coords.width * 0.5; } function ensureValueInRange(val, _ref3) { var max = _ref3.max, min = _ref3.min; if (val <= min) { return min; } if (val >= max) { return max; } return val; } function ensureValuePrecision(val, props) { var step = props.step; var closestPoint = isFinite(getClosestPoint(val, props)) ? getClosestPoint(val, props) : 0; // eslint-disable-line return step === null ? closestPoint : parseFloat(closestPoint.toFixed(getPrecision(step))); } function pauseEvent(e) { e.stopPropagation(); e.preventDefault(); } function calculateNextValue(func, value, props) { var operations = { increase: function increase(a, b) { return a + b; }, decrease: function decrease(a, b) { return a - b; } }; var indexToGet = operations[func](Object.keys(props.marks).indexOf(JSON.stringify(value)), 1); var keyToGet = Object.keys(props.marks)[indexToGet]; if (props.step) { return operations[func](value, props.step); } else if (!!Object.keys(props.marks).length && !!props.marks[keyToGet]) { return props.marks[keyToGet]; } return value; } function getKeyboardValueMutator(e) { switch (e.keyCode) { case _KeyCode2['default'].UP: case _KeyCode2['default'].RIGHT: return function (value, props) { return calculateNextValue('increase', value, props); }; case _KeyCode2['default'].DOWN: case _KeyCode2['default'].LEFT: return function (value, props) { return calculateNextValue('decrease', value, props); }; case _KeyCode2['default'].END: return function (value, props) { return props.max; }; case _KeyCode2['default'].HOME: return function (value, props) { return props.min; }; case _KeyCode2['default'].PAGE_UP: return function (value, props) { return value + props.step * 2; }; case _KeyCode2['default'].PAGE_DOWN: return function (value, props) { return value - props.step * 2; }; default: return undefined; } } /***/ }), /* 555 */ /*!*******************************************************!*\ !*** ../~/babel-runtime/helpers/toConsumableArray.js ***! \*******************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _from = __webpack_require__(/*! ../core-js/array/from */ 556); var _from2 = _interopRequireDefault(_from); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return (0, _from2.default)(arr); } }; /***/ }), /* 556 */ /*!************************************************!*\ !*** ../~/babel-runtime/core-js/array/from.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/array/from */ 557), __esModule: true }; /***/ }), /* 557 */ /*!*********************************************!*\ !*** ../~/core-js/library/fn/array/from.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.string.iterator */ 494); __webpack_require__(/*! ../../modules/es6.array.from */ 558); module.exports = __webpack_require__(/*! ../../modules/_core */ 452).Array.from; /***/ }), /* 558 */ /*!******************************************************!*\ !*** ../~/core-js/library/modules/es6.array.from.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var ctx = __webpack_require__(/*! ./_ctx */ 453); var $export = __webpack_require__(/*! ./_export */ 450); var toObject = __webpack_require__(/*! ./_to-object */ 484); var call = __webpack_require__(/*! ./_iter-call */ 559); var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ 560); var toLength = __webpack_require__(/*! ./_to-length */ 474); var createProperty = __webpack_require__(/*! ./_create-property */ 561); var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ 562); $export($export.S + $export.F * !__webpack_require__(/*! ./_iter-detect */ 564)(function (iter) { Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var O = toObject(arrayLike); var C = typeof this == 'function' ? this : Array; var aLen = arguments.length; var mapfn = aLen > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var index = 0; var iterFn = getIterFn(O); var length, result, step, iterator; if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for (result = new C(length); length > index; index++) { createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); /***/ }), /* 559 */ /*!**************************************************!*\ !*** ../~/core-js/library/modules/_iter-call.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(/*! ./_an-object */ 457); module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (e) { var ret = iterator['return']; if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; /***/ }), /* 560 */ /*!******************************************************!*\ !*** ../~/core-js/library/modules/_is-array-iter.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(/*! ./_iterators */ 498); var ITERATOR = __webpack_require__(/*! ./_wks */ 504)('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }), /* 561 */ /*!********************************************************!*\ !*** ../~/core-js/library/modules/_create-property.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var $defineProperty = __webpack_require__(/*! ./_object-dp */ 456); var createDesc = __webpack_require__(/*! ./_property-desc */ 464); module.exports = function (object, index, value) { if (index in object) $defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }), /* 562 */ /*!****************************************************************!*\ !*** ../~/core-js/library/modules/core.get-iterator-method.js ***! \****************************************************************/ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(/*! ./_classof */ 563); var ITERATOR = __webpack_require__(/*! ./_wks */ 504)('iterator'); var Iterators = __webpack_require__(/*! ./_iterators */ 498); module.exports = __webpack_require__(/*! ./_core */ 452).getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), /* 563 */ /*!************************************************!*\ !*** ../~/core-js/library/modules/_classof.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(/*! ./_cof */ 471); var TAG = __webpack_require__(/*! ./_wks */ 504)('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }), /* 564 */ /*!****************************************************!*\ !*** ../~/core-js/library/modules/_iter-detect.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(/*! ./_wks */ 504)('iterator'); var SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function () { SAFE_CLOSING = true; }; // eslint-disable-next-line no-throw-literal Array.from(riter, function () { throw 2; }); } catch (e) { /* empty */ } module.exports = function (exec, skipClosing) { if (!skipClosing && !SAFE_CLOSING) return false; var safe = false; try { var arr = [7]; var iter = arr[ITERATOR](); iter.next = function () { return { done: safe = true }; }; arr[ITERATOR] = function () { return iter; }; exec(arr); } catch (e) { /* empty */ } return safe; }; /***/ }), /* 565 */ /*!***********************************!*\ !*** ../~/rc-util/lib/KeyCode.js ***! \***********************************/ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); /** * @ignore * some key-codes definition and utils from closure-library * @author yiminghe@gmail.com */ var KeyCode = { /** * MAC_ENTER */ MAC_ENTER: 3, /** * BACKSPACE */ BACKSPACE: 8, /** * TAB */ TAB: 9, /** * NUMLOCK on FF/Safari Mac */ NUM_CENTER: 12, // NUMLOCK on FF/Safari Mac /** * ENTER */ ENTER: 13, /** * SHIFT */ SHIFT: 16, /** * CTRL */ CTRL: 17, /** * ALT */ ALT: 18, /** * PAUSE */ PAUSE: 19, /** * CAPS_LOCK */ CAPS_LOCK: 20, /** * ESC */ ESC: 27, /** * SPACE */ SPACE: 32, /** * PAGE_UP */ PAGE_UP: 33, // also NUM_NORTH_EAST /** * PAGE_DOWN */ PAGE_DOWN: 34, // also NUM_SOUTH_EAST /** * END */ END: 35, // also NUM_SOUTH_WEST /** * HOME */ HOME: 36, // also NUM_NORTH_WEST /** * LEFT */ LEFT: 37, // also NUM_WEST /** * UP */ UP: 38, // also NUM_NORTH /** * RIGHT */ RIGHT: 39, // also NUM_EAST /** * DOWN */ DOWN: 40, // also NUM_SOUTH /** * PRINT_SCREEN */ PRINT_SCREEN: 44, /** * INSERT */ INSERT: 45, // also NUM_INSERT /** * DELETE */ DELETE: 46, // also NUM_DELETE /** * ZERO */ ZERO: 48, /** * ONE */ ONE: 49, /** * TWO */ TWO: 50, /** * THREE */ THREE: 51, /** * FOUR */ FOUR: 52, /** * FIVE */ FIVE: 53, /** * SIX */ SIX: 54, /** * SEVEN */ SEVEN: 55, /** * EIGHT */ EIGHT: 56, /** * NINE */ NINE: 57, /** * QUESTION_MARK */ QUESTION_MARK: 63, // needs localization /** * A */ A: 65, /** * B */ B: 66, /** * C */ C: 67, /** * D */ D: 68, /** * E */ E: 69, /** * F */ F: 70, /** * G */ G: 71, /** * H */ H: 72, /** * I */ I: 73, /** * J */ J: 74, /** * K */ K: 75, /** * L */ L: 76, /** * M */ M: 77, /** * N */ N: 78, /** * O */ O: 79, /** * P */ P: 80, /** * Q */ Q: 81, /** * R */ R: 82, /** * S */ S: 83, /** * T */ T: 84, /** * U */ U: 85, /** * V */ V: 86, /** * W */ W: 87, /** * X */ X: 88, /** * Y */ Y: 89, /** * Z */ Z: 90, /** * META */ META: 91, // WIN_KEY_LEFT /** * WIN_KEY_RIGHT */ WIN_KEY_RIGHT: 92, /** * CONTEXT_MENU */ CONTEXT_MENU: 93, /** * NUM_ZERO */ NUM_ZERO: 96, /** * NUM_ONE */ NUM_ONE: 97, /** * NUM_TWO */ NUM_TWO: 98, /** * NUM_THREE */ NUM_THREE: 99, /** * NUM_FOUR */ NUM_FOUR: 100, /** * NUM_FIVE */ NUM_FIVE: 101, /** * NUM_SIX */ NUM_SIX: 102, /** * NUM_SEVEN */ NUM_SEVEN: 103, /** * NUM_EIGHT */ NUM_EIGHT: 104, /** * NUM_NINE */ NUM_NINE: 105, /** * NUM_MULTIPLY */ NUM_MULTIPLY: 106, /** * NUM_PLUS */ NUM_PLUS: 107, /** * NUM_MINUS */ NUM_MINUS: 109, /** * NUM_PERIOD */ NUM_PERIOD: 110, /** * NUM_DIVISION */ NUM_DIVISION: 111, /** * F1 */ F1: 112, /** * F2 */ F2: 113, /** * F3 */ F3: 114, /** * F4 */ F4: 115, /** * F5 */ F5: 116, /** * F6 */ F6: 117, /** * F7 */ F7: 118, /** * F8 */ F8: 119, /** * F9 */ F9: 120, /** * F10 */ F10: 121, /** * F11 */ F11: 122, /** * F12 */ F12: 123, /** * NUMLOCK */ NUMLOCK: 144, /** * SEMICOLON */ SEMICOLON: 186, // needs localization /** * DASH */ DASH: 189, // needs localization /** * EQUALS */ EQUALS: 187, // needs localization /** * COMMA */ COMMA: 188, // needs localization /** * PERIOD */ PERIOD: 190, // needs localization /** * SLASH */ SLASH: 191, // needs localization /** * APOSTROPHE */ APOSTROPHE: 192, // needs localization /** * SINGLE_QUOTE */ SINGLE_QUOTE: 222, // needs localization /** * OPEN_SQUARE_BRACKET */ OPEN_SQUARE_BRACKET: 219, // needs localization /** * BACKSLASH */ BACKSLASH: 220, // needs localization /** * CLOSE_SQUARE_BRACKET */ CLOSE_SQUARE_BRACKET: 221, // needs localization /** * WIN_KEY */ WIN_KEY: 224, /** * MAC_FF_META */ MAC_FF_META: 224, // Firefox (Gecko) fires this for the meta key instead of 91 /** * WIN_IME */ WIN_IME: 229 }; /* whether text and modified key is entered at the same time. */ KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) { var keyCode = e.keyCode; if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) { return false; } // The following keys are quite harmless, even in combination with // CTRL, ALT or SHIFT. switch (keyCode) { case KeyCode.ALT: case KeyCode.CAPS_LOCK: case KeyCode.CONTEXT_MENU: case KeyCode.CTRL: case KeyCode.DOWN: case KeyCode.END: case KeyCode.ESC: case KeyCode.HOME: case KeyCode.INSERT: case KeyCode.LEFT: case KeyCode.MAC_FF_META: case KeyCode.META: case KeyCode.NUMLOCK: case KeyCode.NUM_CENTER: case KeyCode.PAGE_DOWN: case KeyCode.PAGE_UP: case KeyCode.PAUSE: case KeyCode.PRINT_SCREEN: case KeyCode.RIGHT: case KeyCode.SHIFT: case KeyCode.UP: case KeyCode.WIN_KEY: case KeyCode.WIN_KEY_RIGHT: return false; default: return true; } }; /* whether character is entered. */ KeyCode.isCharacterKey = function isCharacterKey(keyCode) { if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) { return true; } if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) { return true; } if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) { return true; } // Safari sends zero key code for non-latin characters. if (window.navigation.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) { return true; } switch (keyCode) { case KeyCode.SPACE: case KeyCode.QUESTION_MARK: case KeyCode.NUM_PLUS: case KeyCode.NUM_MINUS: case KeyCode.NUM_PERIOD: case KeyCode.NUM_DIVISION: case KeyCode.SEMICOLON: case KeyCode.DASH: case KeyCode.EQUALS: case KeyCode.COMMA: case KeyCode.PERIOD: case KeyCode.SLASH: case KeyCode.APOSTROPHE: case KeyCode.SINGLE_QUOTE: case KeyCode.OPEN_SQUARE_BRACKET: case KeyCode.BACKSLASH: case KeyCode.CLOSE_SQUARE_BRACKET: return true; default: return false; } }; exports['default'] = KeyCode; module.exports = exports['default']; /***/ }), /* 566 */ /*!***********************************!*\ !*** ../~/rc-slider/lib/Range.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ 536); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 446); var _extends3 = _interopRequireDefault(_extends2); var _toConsumableArray2 = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ 555); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ 486); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(/*! classnames */ 550); var _classnames2 = _interopRequireDefault(_classnames); var _shallowequal = __webpack_require__(/*! shallowequal */ 567); var _shallowequal2 = _interopRequireDefault(_shallowequal); var _Track = __webpack_require__(/*! ./common/Track */ 533); var _Track2 = _interopRequireDefault(_Track); var _createSlider = __webpack_require__(/*! ./common/createSlider */ 534); var _createSlider2 = _interopRequireDefault(_createSlider); var _utils = __webpack_require__(/*! ./utils */ 554); var utils = _interopRequireWildcard(_utils); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var Range = function (_React$Component) { (0, _inherits3['default'])(Range, _React$Component); function Range(props) { (0, _classCallCheck3['default'])(this, Range); var _this = (0, _possibleConstructorReturn3['default'])(this, (Range.__proto__ || Object.getPrototypeOf(Range)).call(this, props)); _this.onEnd = function (force) { var handle = _this.state.handle; _this.removeDocumentEvents(); if (handle !== null || force) { _this.props.onAfterChange(_this.getValue()); } _this.setState({ handle: null }); }; var count = props.count, min = props.min, max = props.max; var initialValue = Array.apply(undefined, (0, _toConsumableArray3['default'])(Array(count + 1))).map(function () { return min; }); var defaultValue = 'defaultValue' in props ? props.defaultValue : initialValue; var value = props.value !== undefined ? props.value : defaultValue; var bounds = value.map(function (v, i) { return _this.trimAlignValue(v, i); }); var recent = bounds[0] === max ? 0 : bounds.length - 1; _this.state = { handle: null, recent: recent, bounds: bounds }; return _this; } (0, _createClass3['default'])(Range, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { var _this2 = this; if (!('value' in nextProps || 'min' in nextProps || 'max' in nextProps)) return; if (this.props.min === nextProps.min && this.props.max === nextProps.max && (0, _shallowequal2['default'])(this.props.value, nextProps.value)) { return; } var bounds = this.state.bounds; var value = nextProps.value || bounds; var nextBounds = value.map(function (v, i) { return _this2.trimAlignValue(v, i, nextProps); }); if (nextBounds.length === bounds.length && nextBounds.every(function (v, i) { return v === bounds[i]; })) return; this.setState({ bounds: nextBounds }); if (value.some(function (v) { return utils.isValueOutOfRange(v, nextProps); })) { var newValues = value.map(function (v) { return utils.ensureValueInRange(v, nextProps); }); this.props.onChange(newValues); } } }, { key: 'onChange', value: function onChange(state) { var props = this.props; var isNotControlled = !('value' in props); if (isNotControlled) { this.setState(state); } else if (state.handle !== undefined) { this.setState({ handle: state.handle }); } var data = (0, _extends3['default'])({}, this.state, state); var changedValue = data.bounds; props.onChange(changedValue); } }, { key: 'onStart', value: function onStart(position) { var props = this.props; var state = this.state; var bounds = this.getValue(); props.onBeforeChange(bounds); var value = this.calcValueByPos(position); this.startValue = value; this.startPosition = position; var closestBound = this.getClosestBound(value); this.prevMovedHandleIndex = this.getBoundNeedMoving(value, closestBound); this.setState({ handle: this.prevMovedHandleIndex, recent: this.prevMovedHandleIndex }); var prevValue = bounds[this.prevMovedHandleIndex]; if (value === prevValue) return; var nextBounds = [].concat((0, _toConsumableArray3['default'])(state.bounds)); nextBounds[this.prevMovedHandleIndex] = value; this.onChange({ bounds: nextBounds }); } }, { key: 'onMove', value: function onMove(e, position) { utils.pauseEvent(e); var state = this.state; var value = this.calcValueByPos(position); var oldValue = state.bounds[state.handle]; if (value === oldValue) return; this.moveTo(value); } }, { key: 'onKeyboard', value: function onKeyboard(e) { var valueMutator = utils.getKeyboardValueMutator(e); if (valueMutator) { utils.pauseEvent(e); var state = this.state, props = this.props; var bounds = state.bounds, handle = state.handle; var oldValue = bounds[handle === null ? state.recent : handle]; var mutatedValue = valueMutator(oldValue, props); var value = this.trimAlignValue(mutatedValue); if (value === oldValue) return; var isFromKeyboardEvent = true; this.moveTo(value, isFromKeyboardEvent); } } }, { key: 'getValue', value: function getValue() { return this.state.bounds; } }, { key: 'getClosestBound', value: function getClosestBound(value) { var bounds = this.state.bounds; var closestBound = 0; for (var i = 1; i < bounds.length - 1; ++i) { if (value > bounds[i]) { closestBound = i; } } if (Math.abs(bounds[closestBound + 1] - value) < Math.abs(bounds[closestBound] - value)) { closestBound += 1; } return closestBound; } }, { key: 'getBoundNeedMoving', value: function getBoundNeedMoving(value, closestBound) { var _state = this.state, bounds = _state.bounds, recent = _state.recent; var boundNeedMoving = closestBound; var isAtTheSamePoint = bounds[closestBound + 1] === bounds[closestBound]; if (isAtTheSamePoint && bounds[recent] === bounds[closestBound]) { boundNeedMoving = recent; } if (isAtTheSamePoint && value !== bounds[closestBound + 1]) { boundNeedMoving = value < bounds[closestBound + 1] ? closestBound : closestBound + 1; } return boundNeedMoving; } }, { key: 'getLowerBound', value: function getLowerBound() { return this.state.bounds[0]; } }, { key: 'getUpperBound', value: function getUpperBound() { var bounds = this.state.bounds; return bounds[bounds.length - 1]; } /** * Returns an array of possible slider points, taking into account both * `marks` and `step`. The result is cached. */ }, { key: 'getPoints', value: function getPoints() { var _props = this.props, marks = _props.marks, step = _props.step, min = _props.min, max = _props.max; var cache = this._getPointsCache; if (!cache || cache.marks !== marks || cache.step !== step) { var pointsObject = (0, _extends3['default'])({}, marks); if (step !== null) { for (var point = min; point <= max; point += step) { pointsObject[point] = point; } } var points = Object.keys(pointsObject).map(parseFloat); points.sort(function (a, b) { return a - b; }); this._getPointsCache = { marks: marks, step: step, points: points }; } return this._getPointsCache.points; } }, { key: 'moveTo', value: function moveTo(value, isFromKeyboardEvent) { var _this3 = this; var state = this.state, props = this.props; var nextBounds = [].concat((0, _toConsumableArray3['default'])(state.bounds)); var handle = state.handle === null ? state.recent : state.handle; nextBounds[handle] = value; var nextHandle = handle; if (props.pushable !== false) { this.pushSurroundingHandles(nextBounds, nextHandle); } else if (props.allowCross) { nextBounds.sort(function (a, b) { return a - b; }); nextHandle = nextBounds.indexOf(value); } this.onChange({ handle: nextHandle, bounds: nextBounds }); if (isFromKeyboardEvent) { // known problem: because setState is async, // so trigger focus will invoke handler's onEnd and another handler's onStart too early, // cause onBeforeChange and onAfterChange receive wrong value. // here use setState callback to hack,but not elegant this.props.onAfterChange(nextBounds); this.setState({}, function () { _this3.handlesRefs[nextHandle].focus(); }); this.onEnd(); } } }, { key: 'pushSurroundingHandles', value: function pushSurroundingHandles(bounds, handle) { var value = bounds[handle]; var threshold = this.props.pushable; threshold = Number(threshold); var direction = 0; if (bounds[handle + 1] - value < threshold) { direction = +1; // push to right } if (value - bounds[handle - 1] < threshold) { direction = -1; // push to left } if (direction === 0) { return; } var nextHandle = handle + direction; var diffToNext = direction * (bounds[nextHandle] - value); if (!this.pushHandle(bounds, nextHandle, direction, threshold - diffToNext)) { // revert to original value if pushing is impossible bounds[handle] = bounds[nextHandle] - direction * threshold; } } }, { key: 'pushHandle', value: function pushHandle(bounds, handle, direction, amount) { var originalValue = bounds[handle]; var currentValue = bounds[handle]; while (direction * (currentValue - originalValue) < amount) { if (!this.pushHandleOnePoint(bounds, handle, direction)) { // can't push handle enough to create the needed `amount` gap, so we // revert its position to the original value bounds[handle] = originalValue; return false; } currentValue = bounds[handle]; } // the handle was pushed enough to create the needed `amount` gap return true; } }, { key: 'pushHandleOnePoint', value: function pushHandleOnePoint(bounds, handle, direction) { var points = this.getPoints(); var pointIndex = points.indexOf(bounds[handle]); var nextPointIndex = pointIndex + direction; if (nextPointIndex >= points.length || nextPointIndex < 0) { // reached the minimum or maximum available point, can't push anymore return false; } var nextHandle = handle + direction; var nextValue = points[nextPointIndex]; var threshold = this.props.pushable; var diffToNext = direction * (bounds[nextHandle] - nextValue); if (!this.pushHandle(bounds, nextHandle, direction, threshold - diffToNext)) { // couldn't push next handle, so we won't push this one either return false; } // push the handle bounds[handle] = nextValue; return true; } }, { key: 'trimAlignValue', value: function trimAlignValue(v, handle) { var nextProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var mergedProps = (0, _extends3['default'])({}, this.props, nextProps); var valInRange = utils.ensureValueInRange(v, mergedProps); var valNotConflict = this.ensureValueNotConflict(handle, valInRange, mergedProps); return utils.ensureValuePrecision(valNotConflict, mergedProps); } }, { key: 'ensureValueNotConflict', value: function ensureValueNotConflict(handle, val, _ref) { var allowCross = _ref.allowCross, thershold = _ref.pushable; var state = this.state || {}; var bounds = state.bounds; handle = handle === undefined ? state.handle : handle; thershold = Number(thershold); /* eslint-disable eqeqeq */ if (!allowCross && handle != null && bounds !== undefined) { if (handle > 0 && val <= bounds[handle - 1] + thershold) { return bounds[handle - 1] + thershold; } if (handle < bounds.length - 1 && val >= bounds[handle + 1] - thershold) { return bounds[handle + 1] - thershold; } } /* eslint-enable eqeqeq */ return val; } }, { key: 'render', value: function render() { var _this4 = this; var _state2 = this.state, handle = _state2.handle, bounds = _state2.bounds; var _props2 = this.props, prefixCls = _props2.prefixCls, vertical = _props2.vertical, included = _props2.included, disabled = _props2.disabled, min = _props2.min, max = _props2.max, handleGenerator = _props2.handle, trackStyle = _props2.trackStyle, handleStyle = _props2.handleStyle, tabIndex = _props2.tabIndex; var offsets = bounds.map(function (v) { return _this4.calcOffset(v); }); var handleClassName = prefixCls + '-handle'; var handles = bounds.map(function (v, i) { var _classNames; var _tabIndex = tabIndex[i] || 0; if (disabled || tabIndex[i] === null) { _tabIndex = null; } return handleGenerator({ className: (0, _classnames2['default'])((_classNames = {}, (0, _defineProperty3['default'])(_classNames, handleClassName, true), (0, _defineProperty3['default'])(_classNames, handleClassName + '-' + (i + 1), true), _classNames)), prefixCls: prefixCls, vertical: vertical, offset: offsets[i], value: v, dragging: handle === i, index: i, tabIndex: _tabIndex, min: min, max: max, disabled: disabled, style: handleStyle[i], ref: function ref(h) { return _this4.saveHandle(i, h); } }); }); var tracks = bounds.slice(0, -1).map(function (_, index) { var _classNames2; var i = index + 1; var trackClassName = (0, _classnames2['default'])((_classNames2 = {}, (0, _defineProperty3['default'])(_classNames2, prefixCls + '-track', true), (0, _defineProperty3['default'])(_classNames2, prefixCls + '-track-' + i, true), _classNames2)); return _react2['default'].createElement(_Track2['default'], { className: trackClassName, vertical: vertical, included: included, offset: offsets[i - 1], length: offsets[i] - offsets[i - 1], style: trackStyle[index], key: i }); }); return { tracks: tracks, handles: handles }; } }]); return Range; }(_react2['default'].Component); /* eslint-disable react/prop-types */ Range.displayName = 'Range'; Range.propTypes = { defaultValue: _propTypes2['default'].arrayOf(_propTypes2['default'].number), value: _propTypes2['default'].arrayOf(_propTypes2['default'].number), count: _propTypes2['default'].number, pushable: _propTypes2['default'].oneOfType([_propTypes2['default'].bool, _propTypes2['default'].number]), allowCross: _propTypes2['default'].bool, disabled: _propTypes2['default'].bool, tabIndex: _propTypes2['default'].arrayOf(_propTypes2['default'].number), min: _propTypes2['default'].number, max: _propTypes2['default'].number }; Range.defaultProps = { count: 1, allowCross: true, pushable: false, tabIndex: [] }; exports['default'] = (0, _createSlider2['default'])(Range); module.exports = exports['default']; /***/ }), /* 567 */ /*!**********************************!*\ !*** ../~/shallowequal/index.js ***! \**********************************/ /***/ (function(module, exports) { // module.exports = function shallowEqual(objA, objB, compare, compareContext) { var ret = compare ? compare.call(compareContext, objA, objB) : void 0; if (ret !== void 0) { return !!ret; } if (objA === objB) { return true; } if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); // Test for A's keys different from B. for (var idx = 0; idx < keysA.length; idx++) { var key = keysA[idx]; if (!bHasOwnProperty(key)) { return false; } var valueA = objA[key]; var valueB = objB[key]; ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; if (ret === false || (ret === void 0 && valueA !== valueB)) { return false; } } return true; }; /***/ }), /* 568 */ /*!*****************************************************!*\ !*** ../~/rc-slider/lib/createSliderWithTooltip.js ***! \*****************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _objectWithoutProperties2 = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 535); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ 536); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _extends3 = __webpack_require__(/*! babel-runtime/helpers/extends */ 446); var _extends4 = _interopRequireDefault(_extends3); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ 486); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); exports['default'] = createSliderWithTooltip; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _rcTooltip = __webpack_require__(/*! rc-tooltip */ 569); var _rcTooltip2 = _interopRequireDefault(_rcTooltip); var _Handle = __webpack_require__(/*! ./Handle */ 553); var _Handle2 = _interopRequireDefault(_Handle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function createSliderWithTooltip(Component) { var _class, _temp; return _temp = _class = function (_React$Component) { (0, _inherits3['default'])(ComponentWrapper, _React$Component); function ComponentWrapper(props) { (0, _classCallCheck3['default'])(this, ComponentWrapper); var _this = (0, _possibleConstructorReturn3['default'])(this, (ComponentWrapper.__proto__ || Object.getPrototypeOf(ComponentWrapper)).call(this, props)); _this.handleTooltipVisibleChange = function (index, visible) { _this.setState(function (prevState) { return { visibles: (0, _extends4['default'])({}, prevState.visibles, (0, _defineProperty3['default'])({}, index, visible)) }; }); }; _this.handleWithTooltip = function (_ref) { var value = _ref.value, dragging = _ref.dragging, index = _ref.index, disabled = _ref.disabled, restProps = (0, _objectWithoutProperties3['default'])(_ref, ['value', 'dragging', 'index', 'disabled']); var _this$props = _this.props, tipFormatter = _this$props.tipFormatter, tipProps = _this$props.tipProps, handleStyle = _this$props.handleStyle; var _tipProps$prefixCls = tipProps.prefixCls, prefixCls = _tipProps$prefixCls === undefined ? 'rc-slider-tooltip' : _tipProps$prefixCls, _tipProps$overlay = tipProps.overlay, overlay = _tipProps$overlay === undefined ? tipFormatter(value) : _tipProps$overlay, _tipProps$placement = tipProps.placement, placement = _tipProps$placement === undefined ? 'top' : _tipProps$placement, _tipProps$visible = tipProps.visible, visible = _tipProps$visible === undefined ? false : _tipProps$visible, restTooltipProps = (0, _objectWithoutProperties3['default'])(tipProps, ['prefixCls', 'overlay', 'placement', 'visible']); var handleStyleWithIndex = void 0; if (Array.isArray(handleStyle)) { handleStyleWithIndex = handleStyle[index] || handleStyle[0]; } else { handleStyleWithIndex = handleStyle; } return _react2['default'].createElement( _rcTooltip2['default'], (0, _extends4['default'])({}, restTooltipProps, { prefixCls: prefixCls, overlay: overlay, placement: placement, visible: !disabled && (_this.state.visibles[index] || dragging) || visible, key: index }), _react2['default'].createElement(_Handle2['default'], (0, _extends4['default'])({}, restProps, { style: (0, _extends4['default'])({}, handleStyleWithIndex), value: value, onMouseEnter: function onMouseEnter() { return _this.handleTooltipVisibleChange(index, true); }, onMouseLeave: function onMouseLeave() { return _this.handleTooltipVisibleChange(index, false); } })) ); }; _this.state = { visibles: {} }; return _this; } (0, _createClass3['default'])(ComponentWrapper, [{ key: 'render', value: function render() { return _react2['default'].createElement(Component, (0, _extends4['default'])({}, this.props, { handle: this.handleWithTooltip })); } }]); return ComponentWrapper; }(_react2['default'].Component), _class.propTypes = { tipFormatter: _propTypes2['default'].func, handleStyle: _propTypes2['default'].oneOfType([_propTypes2['default'].object, _propTypes2['default'].arrayOf(_propTypes2['default'].object)]), tipProps: _propTypes2['default'].object }, _class.defaultProps = { tipFormatter: function tipFormatter(value) { return value; }, handleStyle: [{}], tipProps: {} }, _temp; } module.exports = exports['default']; /***/ }), /* 569 */ /*!************************************!*\ !*** ../~/rc-tooltip/lib/index.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _Tooltip = __webpack_require__(/*! ./Tooltip */ 570); var _Tooltip2 = _interopRequireDefault(_Tooltip); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports['default'] = _Tooltip2['default']; module.exports = exports['default']; /***/ }), /* 570 */ /*!**************************************!*\ !*** ../~/rc-tooltip/lib/Tooltip.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 446); var _extends3 = _interopRequireDefault(_extends2); var _objectWithoutProperties2 = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 535); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _rcTrigger = __webpack_require__(/*! rc-trigger */ 571); var _rcTrigger2 = _interopRequireDefault(_rcTrigger); var _placements = __webpack_require__(/*! ./placements */ 603); var _Content = __webpack_require__(/*! ./Content */ 604); var _Content2 = _interopRequireDefault(_Content); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var Tooltip = function (_Component) { (0, _inherits3['default'])(Tooltip, _Component); function Tooltip() { var _temp, _this, _ret; (0, _classCallCheck3['default'])(this, Tooltip); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.getPopupElement = function () { var _this$props = _this.props, arrowContent = _this$props.arrowContent, overlay = _this$props.overlay, prefixCls = _this$props.prefixCls, id = _this$props.id; return [_react2['default'].createElement( 'div', { className: prefixCls + '-arrow', key: 'arrow' }, arrowContent ), _react2['default'].createElement(_Content2['default'], { key: 'content', trigger: _this.trigger, prefixCls: prefixCls, id: id, overlay: overlay })]; }, _this.saveTrigger = function (node) { _this.trigger = node; }, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret); } Tooltip.prototype.getPopupDomNode = function getPopupDomNode() { return this.trigger.getPopupDomNode(); }; Tooltip.prototype.render = function render() { var _props = this.props, overlayClassName = _props.overlayClassName, trigger = _props.trigger, mouseEnterDelay = _props.mouseEnterDelay, mouseLeaveDelay = _props.mouseLeaveDelay, overlayStyle = _props.overlayStyle, prefixCls = _props.prefixCls, children = _props.children, onVisibleChange = _props.onVisibleChange, afterVisibleChange = _props.afterVisibleChange, transitionName = _props.transitionName, animation = _props.animation, placement = _props.placement, align = _props.align, destroyTooltipOnHide = _props.destroyTooltipOnHide, defaultVisible = _props.defaultVisible, getTooltipContainer = _props.getTooltipContainer, restProps = (0, _objectWithoutProperties3['default'])(_props, ['overlayClassName', 'trigger', 'mouseEnterDelay', 'mouseLeaveDelay', 'overlayStyle', 'prefixCls', 'children', 'onVisibleChange', 'afterVisibleChange', 'transitionName', 'animation', 'placement', 'align', 'destroyTooltipOnHide', 'defaultVisible', 'getTooltipContainer']); var extraProps = (0, _extends3['default'])({}, restProps); if ('visible' in this.props) { extraProps.popupVisible = this.props.visible; } return _react2['default'].createElement( _rcTrigger2['default'], (0, _extends3['default'])({ popupClassName: overlayClassName, ref: this.saveTrigger, prefixCls: prefixCls, popup: this.getPopupElement, action: trigger, builtinPlacements: _placements.placements, popupPlacement: placement, popupAlign: align, getPopupContainer: getTooltipContainer, onPopupVisibleChange: onVisibleChange, afterPopupVisibleChange: afterVisibleChange, popupTransitionName: transitionName, popupAnimation: animation, defaultPopupVisible: defaultVisible, destroyPopupOnHide: destroyTooltipOnHide, mouseLeaveDelay: mouseLeaveDelay, popupStyle: overlayStyle, mouseEnterDelay: mouseEnterDelay }, extraProps), children ); }; return Tooltip; }(_react.Component); Tooltip.propTypes = { trigger: _propTypes2['default'].any, children: _propTypes2['default'].any, defaultVisible: _propTypes2['default'].bool, visible: _propTypes2['default'].bool, placement: _propTypes2['default'].string, transitionName: _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].object]), animation: _propTypes2['default'].any, onVisibleChange: _propTypes2['default'].func, afterVisibleChange: _propTypes2['default'].func, overlay: _propTypes2['default'].oneOfType([_propTypes2['default'].node, _propTypes2['default'].func]).isRequired, overlayStyle: _propTypes2['default'].object, overlayClassName: _propTypes2['default'].string, prefixCls: _propTypes2['default'].string, mouseEnterDelay: _propTypes2['default'].number, mouseLeaveDelay: _propTypes2['default'].number, getTooltipContainer: _propTypes2['default'].func, destroyTooltipOnHide: _propTypes2['default'].bool, align: _propTypes2['default'].object, arrowContent: _propTypes2['default'].any, id: _propTypes2['default'].string }; Tooltip.defaultProps = { prefixCls: 'rc-tooltip', mouseEnterDelay: 0, destroyTooltipOnHide: false, mouseLeaveDelay: 0.1, align: {}, placement: 'right', trigger: ['hover'], arrowContent: null }; exports['default'] = Tooltip; module.exports = exports['default']; /***/ }), /* 571 */ /*!************************************!*\ !*** ../~/rc-trigger/lib/index.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 446); var _extends3 = _interopRequireDefault(_extends2); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(/*! react-dom */ 549); var _contains = __webpack_require__(/*! rc-util/lib/Dom/contains */ 572); var _contains2 = _interopRequireDefault(_contains); var _addEventListener = __webpack_require__(/*! rc-util/lib/Dom/addEventListener */ 545); var _addEventListener2 = _interopRequireDefault(_addEventListener); var _ContainerRender = __webpack_require__(/*! rc-util/lib/ContainerRender */ 573); var _ContainerRender2 = _interopRequireDefault(_ContainerRender); var _Portal = __webpack_require__(/*! rc-util/lib/Portal */ 574); var _Portal2 = _interopRequireDefault(_Portal); var _classnames = __webpack_require__(/*! classnames */ 550); var _classnames2 = _interopRequireDefault(_classnames); var _utils = __webpack_require__(/*! ./utils */ 575); var _Popup = __webpack_require__(/*! ./Popup */ 576); var _Popup2 = _interopRequireDefault(_Popup); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function noop() {} function returnEmptyString() { return ''; } function returnDocument() { return window.document; } var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu']; var IS_REACT_16 = !!_reactDom.createPortal; var contextTypes = { rcTrigger: _propTypes2['default'].shape({ onPopupMouseDown: _propTypes2['default'].func }) }; var Trigger = function (_React$Component) { (0, _inherits3['default'])(Trigger, _React$Component); function Trigger(props) { (0, _classCallCheck3['default'])(this, Trigger); var _this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call(this, props)); _initialiseProps.call(_this); var popupVisible = void 0; if ('popupVisible' in props) { popupVisible = !!props.popupVisible; } else { popupVisible = !!props.defaultPopupVisible; } _this.prevPopupVisible = popupVisible; _this.state = { popupVisible: popupVisible }; return _this; } Trigger.prototype.getChildContext = function getChildContext() { return { rcTrigger: { onPopupMouseDown: this.onPopupMouseDown } }; }; Trigger.prototype.componentWillMount = function componentWillMount() { var _this2 = this; ALL_HANDLERS.forEach(function (h) { _this2['fire' + h] = function (e) { _this2.fireEvents(h, e); }; }); }; Trigger.prototype.componentDidMount = function componentDidMount() { this.componentDidUpdate({}, { popupVisible: this.state.popupVisible }); }; Trigger.prototype.componentWillReceiveProps = function componentWillReceiveProps(_ref) { var popupVisible = _ref.popupVisible; if (popupVisible !== undefined) { this.setState({ popupVisible: popupVisible }); } }; Trigger.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) { var props = this.props; var state = this.state; var triggerAfterPopupVisibleChange = function triggerAfterPopupVisibleChange() { if (prevState.popupVisible !== state.popupVisible) { props.afterPopupVisibleChange(state.popupVisible); } }; if (!IS_REACT_16) { this.renderComponent(null, triggerAfterPopupVisibleChange); } this.prevPopupVisible = prevState.popupVisible; // We must listen to `mousedown` or `touchstart`, edge case: // https://github.com/ant-design/ant-design/issues/5804 // https://github.com/react-component/calendar/issues/250 // https://github.com/react-component/trigger/issues/50 if (state.popupVisible) { var currentDocument = void 0; if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) { currentDocument = props.getDocument(); this.clickOutsideHandler = (0, _addEventListener2['default'])(currentDocument, 'mousedown', this.onDocumentClick); } // always hide on mobile if (!this.touchOutsideHandler) { currentDocument = currentDocument || props.getDocument(); this.touchOutsideHandler = (0, _addEventListener2['default'])(currentDocument, 'touchstart', this.onDocumentClick); } // close popup when trigger type contains 'onContextMenu' and document is scrolling. if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) { currentDocument = currentDocument || props.getDocument(); this.contextMenuOutsideHandler1 = (0, _addEventListener2['default'])(currentDocument, 'scroll', this.onContextMenuClose); } // close popup when trigger type contains 'onContextMenu' and window is blur. if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) { this.contextMenuOutsideHandler2 = (0, _addEventListener2['default'])(window, 'blur', this.onContextMenuClose); } return; } this.clearOutsideHandler(); }; Trigger.prototype.componentWillUnmount = function componentWillUnmount() { this.clearDelayTimer(); this.clearOutsideHandler(); clearTimeout(this.mouseDownTimeout); }; Trigger.prototype.getPopupDomNode = function getPopupDomNode() { // for test if (this._component && this._component.getPopupDomNode) { return this._component.getPopupDomNode(); } return null; }; Trigger.prototype.getPopupAlign = function getPopupAlign() { var props = this.props; var popupPlacement = props.popupPlacement, popupAlign = props.popupAlign, builtinPlacements = props.builtinPlacements; if (popupPlacement && builtinPlacements) { return (0, _utils.getAlignFromPlacement)(builtinPlacements, popupPlacement, popupAlign); } return popupAlign; }; /** * @param popupVisible Show or not the popup element * @param event SyntheticEvent, used for `pointAlign` */ Trigger.prototype.setPopupVisible = function setPopupVisible(popupVisible, event) { var alignPoint = this.props.alignPoint; this.clearDelayTimer(); if (this.state.popupVisible !== popupVisible) { if (!('popupVisible' in this.props)) { this.setState({ popupVisible: popupVisible }); } this.props.onPopupVisibleChange(popupVisible); } // Always record the point position since mouseEnterDelay will delay the show if (alignPoint && event) { this.setPoint(event); } }; Trigger.prototype.delaySetPopupVisible = function delaySetPopupVisible(visible, delayS, event) { var _this3 = this; var delay = delayS * 1000; this.clearDelayTimer(); if (delay) { var point = event ? { pageX: event.pageX, pageY: event.pageY } : null; this.delayTimer = setTimeout(function () { _this3.setPopupVisible(visible, point); _this3.clearDelayTimer(); }, delay); } else { this.setPopupVisible(visible, event); } }; Trigger.prototype.clearDelayTimer = function clearDelayTimer() { if (this.delayTimer) { clearTimeout(this.delayTimer); this.delayTimer = null; } }; Trigger.prototype.clearOutsideHandler = function clearOutsideHandler() { if (this.clickOutsideHandler) { this.clickOutsideHandler.remove(); this.clickOutsideHandler = null; } if (this.contextMenuOutsideHandler1) { this.contextMenuOutsideHandler1.remove(); this.contextMenuOutsideHandler1 = null; } if (this.contextMenuOutsideHandler2) { this.contextMenuOutsideHandler2.remove(); this.contextMenuOutsideHandler2 = null; } if (this.touchOutsideHandler) { this.touchOutsideHandler.remove(); this.touchOutsideHandler = null; } }; Trigger.prototype.createTwoChains = function createTwoChains(event) { var childPros = this.props.children.props; var props = this.props; if (childPros[event] && props[event]) { return this['fire' + event]; } return childPros[event] || props[event]; }; Trigger.prototype.isClickToShow = function isClickToShow() { var _props = this.props, action = _props.action, showAction = _props.showAction; return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1; }; Trigger.prototype.isContextMenuToShow = function isContextMenuToShow() { var _props2 = this.props, action = _props2.action, showAction = _props2.showAction; return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1; }; Trigger.prototype.isClickToHide = function isClickToHide() { var _props3 = this.props, action = _props3.action, hideAction = _props3.hideAction; return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1; }; Trigger.prototype.isMouseEnterToShow = function isMouseEnterToShow() { var _props4 = this.props, action = _props4.action, showAction = _props4.showAction; return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1; }; Trigger.prototype.isMouseLeaveToHide = function isMouseLeaveToHide() { var _props5 = this.props, action = _props5.action, hideAction = _props5.hideAction; return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1; }; Trigger.prototype.isFocusToShow = function isFocusToShow() { var _props6 = this.props, action = _props6.action, showAction = _props6.showAction; return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1; }; Trigger.prototype.isBlurToHide = function isBlurToHide() { var _props7 = this.props, action = _props7.action, hideAction = _props7.hideAction; return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1; }; Trigger.prototype.forcePopupAlign = function forcePopupAlign() { if (this.state.popupVisible && this._component && this._component.alignInstance) { this._component.alignInstance.forceAlign(); } }; Trigger.prototype.fireEvents = function fireEvents(type, e) { var childCallback = this.props.children.props[type]; if (childCallback) { childCallback(e); } var callback = this.props[type]; if (callback) { callback(e); } }; Trigger.prototype.close = function close() { this.setPopupVisible(false); }; Trigger.prototype.render = function render() { var _this4 = this; var popupVisible = this.state.popupVisible; var _props8 = this.props, children = _props8.children, forceRender = _props8.forceRender, alignPoint = _props8.alignPoint, className = _props8.className; var child = _react2['default'].Children.only(children); var newChildProps = { key: 'trigger' }; if (this.isContextMenuToShow()) { newChildProps.onContextMenu = this.onContextMenu; } else { newChildProps.onContextMenu = this.createTwoChains('onContextMenu'); } if (this.isClickToHide() || this.isClickToShow()) { newChildProps.onClick = this.onClick; newChildProps.onMouseDown = this.onMouseDown; newChildProps.onTouchStart = this.onTouchStart; } else { newChildProps.onClick = this.createTwoChains('onClick'); newChildProps.onMouseDown = this.createTwoChains('onMouseDown'); newChildProps.onTouchStart = this.createTwoChains('onTouchStart'); } if (this.isMouseEnterToShow()) { newChildProps.onMouseEnter = this.onMouseEnter; if (alignPoint) { newChildProps.onMouseMove = this.onMouseMove; } } else { newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter'); } if (this.isMouseLeaveToHide()) { newChildProps.onMouseLeave = this.onMouseLeave; } else { newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave'); } if (this.isFocusToShow() || this.isBlurToHide()) { newChildProps.onFocus = this.onFocus; newChildProps.onBlur = this.onBlur; } else { newChildProps.onFocus = this.createTwoChains('onFocus'); newChildProps.onBlur = this.createTwoChains('onBlur'); } var childrenClassName = (0, _classnames2['default'])(child && child.props && child.props.className, className); if (childrenClassName) { newChildProps.className = childrenClassName; } var trigger = _react2['default'].cloneElement(child, newChildProps); if (!IS_REACT_16) { return _react2['default'].createElement( _ContainerRender2['default'], { parent: this, visible: popupVisible, autoMount: false, forceRender: forceRender, getComponent: this.getComponent, getContainer: this.getContainer }, function (_ref2) { var renderComponent = _ref2.renderComponent; _this4.renderComponent = renderComponent; return trigger; } ); } var portal = void 0; // prevent unmounting after it's rendered if (popupVisible || this._component || forceRender) { portal = _react2['default'].createElement( _Portal2['default'], { key: 'portal', getContainer: this.getContainer, didUpdate: this.handlePortalUpdate }, this.getComponent() ); } return [trigger, portal]; }; return Trigger; }(_react2['default'].Component); Trigger.propTypes = { children: _propTypes2['default'].any, action: _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].arrayOf(_propTypes2['default'].string)]), showAction: _propTypes2['default'].any, hideAction: _propTypes2['default'].any, getPopupClassNameFromAlign: _propTypes2['default'].any, onPopupVisibleChange: _propTypes2['default'].func, afterPopupVisibleChange: _propTypes2['default'].func, popup: _propTypes2['default'].oneOfType([_propTypes2['default'].node, _propTypes2['default'].func]).isRequired, popupStyle: _propTypes2['default'].object, prefixCls: _propTypes2['default'].string, popupClassName: _propTypes2['default'].string, className: _propTypes2['default'].string, popupPlacement: _propTypes2['default'].string, builtinPlacements: _propTypes2['default'].object, popupTransitionName: _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].object]), popupAnimation: _propTypes2['default'].any, mouseEnterDelay: _propTypes2['default'].number, mouseLeaveDelay: _propTypes2['default'].number, zIndex: _propTypes2['default'].number, focusDelay: _propTypes2['default'].number, blurDelay: _propTypes2['default'].number, getPopupContainer: _propTypes2['default'].func, getDocument: _propTypes2['default'].func, forceRender: _propTypes2['default'].bool, destroyPopupOnHide: _propTypes2['default'].bool, mask: _propTypes2['default'].bool, maskClosable: _propTypes2['default'].bool, onPopupAlign: _propTypes2['default'].func, popupAlign: _propTypes2['default'].object, popupVisible: _propTypes2['default'].bool, defaultPopupVisible: _propTypes2['default'].bool, maskTransitionName: _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].object]), maskAnimation: _propTypes2['default'].string, stretch: _propTypes2['default'].string, alignPoint: _propTypes2['default'].bool // Maybe we can support user pass position in the future }; Trigger.contextTypes = contextTypes; Trigger.childContextTypes = contextTypes; Trigger.defaultProps = { prefixCls: 'rc-trigger-popup', getPopupClassNameFromAlign: returnEmptyString, getDocument: returnDocument, onPopupVisibleChange: noop, afterPopupVisibleChange: noop, onPopupAlign: noop, popupClassName: '', mouseEnterDelay: 0, mouseLeaveDelay: 0.1, focusDelay: 0, blurDelay: 0.15, popupStyle: {}, destroyPopupOnHide: false, popupAlign: {}, defaultPopupVisible: false, mask: false, maskClosable: true, action: [], showAction: [], hideAction: [] }; var _initialiseProps = function _initialiseProps() { var _this5 = this; this.onMouseEnter = function (e) { var mouseEnterDelay = _this5.props.mouseEnterDelay; _this5.fireEvents('onMouseEnter', e); _this5.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e); }; this.onMouseMove = function (e) { _this5.fireEvents('onMouseMove', e); _this5.setPoint(e); }; this.onMouseLeave = function (e) { _this5.fireEvents('onMouseLeave', e); _this5.delaySetPopupVisible(false, _this5.props.mouseLeaveDelay); }; this.onPopupMouseEnter = function () { _this5.clearDelayTimer(); }; this.onPopupMouseLeave = function (e) { // https://github.com/react-component/trigger/pull/13 // react bug? if (e.relatedTarget && !e.relatedTarget.setTimeout && _this5._component && _this5._component.getPopupDomNode && (0, _contains2['default'])(_this5._component.getPopupDomNode(), e.relatedTarget)) { return; } _this5.delaySetPopupVisible(false, _this5.props.mouseLeaveDelay); }; this.onFocus = function (e) { _this5.fireEvents('onFocus', e); // incase focusin and focusout _this5.clearDelayTimer(); if (_this5.isFocusToShow()) { _this5.focusTime = Date.now(); _this5.delaySetPopupVisible(true, _this5.props.focusDelay); } }; this.onMouseDown = function (e) { _this5.fireEvents('onMouseDown', e); _this5.preClickTime = Date.now(); }; this.onTouchStart = function (e) { _this5.fireEvents('onTouchStart', e); _this5.preTouchTime = Date.now(); }; this.onBlur = function (e) { _this5.fireEvents('onBlur', e); _this5.clearDelayTimer(); if (_this5.isBlurToHide()) { _this5.delaySetPopupVisible(false, _this5.props.blurDelay); } }; this.onContextMenu = function (e) { e.preventDefault(); _this5.fireEvents('onContextMenu', e); _this5.setPopupVisible(true, e); }; this.onContextMenuClose = function () { if (_this5.isContextMenuToShow()) { _this5.close(); } }; this.onClick = function (event) { _this5.fireEvents('onClick', event); // focus will trigger click if (_this5.focusTime) { var preTime = void 0; if (_this5.preClickTime && _this5.preTouchTime) { preTime = Math.min(_this5.preClickTime, _this5.preTouchTime); } else if (_this5.preClickTime) { preTime = _this5.preClickTime; } else if (_this5.preTouchTime) { preTime = _this5.preTouchTime; } if (Math.abs(preTime - _this5.focusTime) < 20) { return; } _this5.focusTime = 0; } _this5.preClickTime = 0; _this5.preTouchTime = 0; if (event && event.preventDefault) { event.preventDefault(); } var nextVisible = !_this5.state.popupVisible; if (_this5.isClickToHide() && !nextVisible || nextVisible && _this5.isClickToShow()) { _this5.setPopupVisible(!_this5.state.popupVisible, event); } }; this.onPopupMouseDown = function () { var _context$rcTrigger = _this5.context.rcTrigger, rcTrigger = _context$rcTrigger === undefined ? {} : _context$rcTrigger; _this5.hasPopupMouseDown = true; clearTimeout(_this5.mouseDownTimeout); _this5.mouseDownTimeout = setTimeout(function () { _this5.hasPopupMouseDown = false; }, 0); if (rcTrigger.onPopupMouseDown) { rcTrigger.onPopupMouseDown.apply(rcTrigger, arguments); } }; this.onDocumentClick = function (event) { if (_this5.props.mask && !_this5.props.maskClosable) { return; } var target = event.target; var root = (0, _reactDom.findDOMNode)(_this5); if (!(0, _contains2['default'])(root, target) && !_this5.hasPopupMouseDown) { _this5.close(); } }; this.getRootDomNode = function () { return (0, _reactDom.findDOMNode)(_this5); }; this.getPopupClassNameFromAlign = function (align) { var className = []; var _props9 = _this5.props, popupPlacement = _props9.popupPlacement, builtinPlacements = _props9.builtinPlacements, prefixCls = _props9.prefixCls, alignPoint = _props9.alignPoint, getPopupClassNameFromAlign = _props9.getPopupClassNameFromAlign; if (popupPlacement && builtinPlacements) { className.push((0, _utils.getAlignPopupClassName)(builtinPlacements, prefixCls, align, alignPoint)); } if (getPopupClassNameFromAlign) { className.push(getPopupClassNameFromAlign(align)); } return className.join(' '); }; this.getComponent = function () { var _props10 = _this5.props, prefixCls = _props10.prefixCls, destroyPopupOnHide = _props10.destroyPopupOnHide, popupClassName = _props10.popupClassName, action = _props10.action, onPopupAlign = _props10.onPopupAlign, popupAnimation = _props10.popupAnimation, popupTransitionName = _props10.popupTransitionName, popupStyle = _props10.popupStyle, mask = _props10.mask, maskAnimation = _props10.maskAnimation, maskTransitionName = _props10.maskTransitionName, zIndex = _props10.zIndex, popup = _props10.popup, stretch = _props10.stretch, alignPoint = _props10.alignPoint; var _state = _this5.state, popupVisible = _state.popupVisible, point = _state.point; var align = _this5.getPopupAlign(); var mouseProps = {}; if (_this5.isMouseEnterToShow()) { mouseProps.onMouseEnter = _this5.onPopupMouseEnter; } if (_this5.isMouseLeaveToHide()) { mouseProps.onMouseLeave = _this5.onPopupMouseLeave; } mouseProps.onMouseDown = _this5.onPopupMouseDown; mouseProps.onTouchStart = _this5.onPopupMouseDown; return _react2['default'].createElement( _Popup2['default'], (0, _extends3['default'])({ prefixCls: prefixCls, destroyPopupOnHide: destroyPopupOnHide, visible: popupVisible, point: alignPoint && point, className: popupClassName, action: action, align: align, onAlign: onPopupAlign, animation: popupAnimation, getClassNameFromAlign: _this5.getPopupClassNameFromAlign }, mouseProps, { stretch: stretch, getRootDomNode: _this5.getRootDomNode, style: popupStyle, mask: mask, zIndex: zIndex, transitionName: popupTransitionName, maskAnimation: maskAnimation, maskTransitionName: maskTransitionName, ref: _this5.savePopup }), typeof popup === 'function' ? popup() : popup ); }; this.getContainer = function () { var props = _this5.props; var popupContainer = document.createElement('div'); // Make sure default popup container will never cause scrollbar appearing // https://github.com/react-component/trigger/issues/41 popupContainer.style.position = 'absolute'; popupContainer.style.top = '0'; popupContainer.style.left = '0'; popupContainer.style.width = '100%'; var mountNode = props.getPopupContainer ? props.getPopupContainer((0, _reactDom.findDOMNode)(_this5)) : props.getDocument().body; mountNode.appendChild(popupContainer); return popupContainer; }; this.setPoint = function (point) { var alignPoint = _this5.props.alignPoint; if (!alignPoint || !point) return; _this5.setState({ point: { pageX: point.pageX, pageY: point.pageY } }); }; this.handlePortalUpdate = function () { if (_this5.prevPopupVisible !== _this5.state.popupVisible) { _this5.props.afterPopupVisibleChange(_this5.state.popupVisible); } }; this.savePopup = function (node) { _this5._component = node; }; }; exports['default'] = Trigger; module.exports = exports['default']; /***/ }), /* 572 */ /*!****************************************!*\ !*** ../~/rc-util/lib/Dom/contains.js ***! \****************************************/ /***/ (function(module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = contains; function contains(root, n) { var node = n; while (node) { if (node === root) { return true; } node = node.parentNode; } return false; } module.exports = exports['default']; /***/ }), /* 573 */ /*!*******************************************!*\ !*** ../~/rc-util/lib/ContainerRender.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ 486); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(/*! react-dom */ 549); var _reactDom2 = _interopRequireDefault(_reactDom); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var ContainerRender = function (_React$Component) { (0, _inherits3['default'])(ContainerRender, _React$Component); function ContainerRender() { var _ref; var _temp, _this, _ret; (0, _classCallCheck3['default'])(this, ContainerRender); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, (_ref = ContainerRender.__proto__ || Object.getPrototypeOf(ContainerRender)).call.apply(_ref, [this].concat(args))), _this), _this.removeContainer = function () { if (_this.container) { _reactDom2['default'].unmountComponentAtNode(_this.container); _this.container.parentNode.removeChild(_this.container); _this.container = null; } }, _this.renderComponent = function (props, ready) { var _this$props = _this.props, visible = _this$props.visible, getComponent = _this$props.getComponent, forceRender = _this$props.forceRender, getContainer = _this$props.getContainer, parent = _this$props.parent; if (visible || parent._component || forceRender) { if (!_this.container) { _this.container = getContainer(); } _reactDom2['default'].unstable_renderSubtreeIntoContainer(parent, getComponent(props), _this.container, function callback() { if (ready) { ready.call(this); } }); } }, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret); } (0, _createClass3['default'])(ContainerRender, [{ key: 'componentDidMount', value: function componentDidMount() { if (this.props.autoMount) { this.renderComponent(); } } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { if (this.props.autoMount) { this.renderComponent(); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.props.autoDestroy) { this.removeContainer(); } } }, { key: 'render', value: function render() { return this.props.children({ renderComponent: this.renderComponent, removeContainer: this.removeContainer }); } }]); return ContainerRender; }(_react2['default'].Component); ContainerRender.propTypes = { autoMount: _propTypes2['default'].bool, autoDestroy: _propTypes2['default'].bool, visible: _propTypes2['default'].bool, forceRender: _propTypes2['default'].bool, parent: _propTypes2['default'].any, getComponent: _propTypes2['default'].func.isRequired, getContainer: _propTypes2['default'].func.isRequired, children: _propTypes2['default'].func.isRequired }; ContainerRender.defaultProps = { autoMount: true, autoDestroy: true, forceRender: false }; exports['default'] = ContainerRender; module.exports = exports['default']; /***/ }), /* 574 */ /*!**********************************!*\ !*** ../~/rc-util/lib/Portal.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ 486); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(/*! react-dom */ 549); var _reactDom2 = _interopRequireDefault(_reactDom); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var Portal = function (_React$Component) { (0, _inherits3['default'])(Portal, _React$Component); function Portal() { (0, _classCallCheck3['default'])(this, Portal); return (0, _possibleConstructorReturn3['default'])(this, (Portal.__proto__ || Object.getPrototypeOf(Portal)).apply(this, arguments)); } (0, _createClass3['default'])(Portal, [{ key: 'componentDidMount', value: function componentDidMount() { this.createContainer(); } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { var didUpdate = this.props.didUpdate; if (didUpdate) { didUpdate(prevProps); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.removeContainer(); } }, { key: 'createContainer', value: function createContainer() { this._container = this.props.getContainer(); this.forceUpdate(); } }, { key: 'removeContainer', value: function removeContainer() { if (this._container) { this._container.parentNode.removeChild(this._container); } } }, { key: 'render', value: function render() { if (this._container) { return _reactDom2['default'].createPortal(this.props.children, this._container); } return null; } }]); return Portal; }(_react2['default'].Component); Portal.propTypes = { getContainer: _propTypes2['default'].func.isRequired, children: _propTypes2['default'].node.isRequired, didUpdate: _propTypes2['default'].func }; exports['default'] = Portal; module.exports = exports['default']; /***/ }), /* 575 */ /*!************************************!*\ !*** ../~/rc-trigger/lib/utils.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 446); var _extends3 = _interopRequireDefault(_extends2); exports.getAlignFromPlacement = getAlignFromPlacement; exports.getAlignPopupClassName = getAlignPopupClassName; exports.saveRef = saveRef; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function isPointsEq(a1, a2, isAlignPoint) { if (isAlignPoint) { return a1[0] === a2[0]; } return a1[0] === a2[0] && a1[1] === a2[1]; } function getAlignFromPlacement(builtinPlacements, placementStr, align) { var baseAlign = builtinPlacements[placementStr] || {}; return (0, _extends3['default'])({}, baseAlign, align); } function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) { var points = align.points; for (var placement in builtinPlacements) { if (builtinPlacements.hasOwnProperty(placement)) { if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) { return prefixCls + '-placement-' + placement; } } } return ''; } function saveRef(name, component) { this[name] = component; } /***/ }), /* 576 */ /*!************************************!*\ !*** ../~/rc-trigger/lib/Popup.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 446); var _extends3 = _interopRequireDefault(_extends2); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(/*! react-dom */ 549); var _reactDom2 = _interopRequireDefault(_reactDom); var _rcAlign = __webpack_require__(/*! rc-align */ 577); var _rcAlign2 = _interopRequireDefault(_rcAlign); var _rcAnimate = __webpack_require__(/*! rc-animate */ 593); var _rcAnimate2 = _interopRequireDefault(_rcAnimate); var _PopupInner = __webpack_require__(/*! ./PopupInner */ 601); var _PopupInner2 = _interopRequireDefault(_PopupInner); var _LazyRenderBox = __webpack_require__(/*! ./LazyRenderBox */ 602); var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox); var _utils = __webpack_require__(/*! ./utils */ 575); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var Popup = function (_Component) { (0, _inherits3['default'])(Popup, _Component); function Popup(props) { (0, _classCallCheck3['default'])(this, Popup); var _this = (0, _possibleConstructorReturn3['default'])(this, _Component.call(this, props)); _initialiseProps.call(_this); _this.state = { // Used for stretch stretchChecked: false, targetWidth: undefined, targetHeight: undefined }; _this.savePopupRef = _utils.saveRef.bind(_this, 'popupInstance'); _this.saveAlignRef = _utils.saveRef.bind(_this, 'alignInstance'); return _this; } Popup.prototype.componentDidMount = function componentDidMount() { this.rootNode = this.getPopupDomNode(); this.setStretchSize(); }; Popup.prototype.componentDidUpdate = function componentDidUpdate() { this.setStretchSize(); }; // Record size if stretch needed Popup.prototype.getPopupDomNode = function getPopupDomNode() { return _reactDom2['default'].findDOMNode(this.popupInstance); }; // `target` on `rc-align` can accept as a function to get the bind element or a point. // ref: https://www.npmjs.com/package/rc-align Popup.prototype.getMaskTransitionName = function getMaskTransitionName() { var props = this.props; var transitionName = props.maskTransitionName; var animation = props.maskAnimation; if (!transitionName && animation) { transitionName = props.prefixCls + '-' + animation; } return transitionName; }; Popup.prototype.getTransitionName = function getTransitionName() { var props = this.props; var transitionName = props.transitionName; if (!transitionName && props.animation) { transitionName = props.prefixCls + '-' + props.animation; } return transitionName; }; Popup.prototype.getClassName = function getClassName(currentAlignClassName) { return this.props.prefixCls + ' ' + this.props.className + ' ' + currentAlignClassName; }; Popup.prototype.getPopupElement = function getPopupElement() { var _this2 = this; var savePopupRef = this.savePopupRef; var _state = this.state, stretchChecked = _state.stretchChecked, targetHeight = _state.targetHeight, targetWidth = _state.targetWidth; var _props = this.props, align = _props.align, visible = _props.visible, prefixCls = _props.prefixCls, style = _props.style, getClassNameFromAlign = _props.getClassNameFromAlign, destroyPopupOnHide = _props.destroyPopupOnHide, stretch = _props.stretch, children = _props.children, onMouseEnter = _props.onMouseEnter, onMouseLeave = _props.onMouseLeave, onMouseDown = _props.onMouseDown, onTouchStart = _props.onTouchStart; var className = this.getClassName(this.currentAlignClassName || getClassNameFromAlign(align)); var hiddenClassName = prefixCls + '-hidden'; if (!visible) { this.currentAlignClassName = null; } var sizeStyle = {}; if (stretch) { // Stretch with target if (stretch.indexOf('height') !== -1) { sizeStyle.height = targetHeight; } else if (stretch.indexOf('minHeight') !== -1) { sizeStyle.minHeight = targetHeight; } if (stretch.indexOf('width') !== -1) { sizeStyle.width = targetWidth; } else if (stretch.indexOf('minWidth') !== -1) { sizeStyle.minWidth = targetWidth; } // Delay force align to makes ui smooth if (!stretchChecked) { sizeStyle.visibility = 'hidden'; setTimeout(function () { if (_this2.alignInstance) { _this2.alignInstance.forceAlign(); } }, 0); } } var newStyle = (0, _extends3['default'])({}, sizeStyle, style, this.getZIndexStyle()); var popupInnerProps = { className: className, prefixCls: prefixCls, ref: savePopupRef, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onTouchStart: onTouchStart, style: newStyle }; if (destroyPopupOnHide) { return _react2['default'].createElement( _rcAnimate2['default'], { component: '', exclusive: true, transitionAppear: true, transitionName: this.getTransitionName() }, visible ? _react2['default'].createElement( _rcAlign2['default'], { target: this.getAlignTarget(), key: 'popup', ref: this.saveAlignRef, monitorWindowResize: true, align: align, onAlign: this.onAlign }, _react2['default'].createElement( _PopupInner2['default'], (0, _extends3['default'])({ visible: true }, popupInnerProps), children ) ) : null ); } return _react2['default'].createElement( _rcAnimate2['default'], { component: '', exclusive: true, transitionAppear: true, transitionName: this.getTransitionName(), showProp: 'xVisible' }, _react2['default'].createElement( _rcAlign2['default'], { target: this.getAlignTarget(), key: 'popup', ref: this.saveAlignRef, monitorWindowResize: true, xVisible: visible, childrenProps: { visible: 'xVisible' }, disabled: !visible, align: align, onAlign: this.onAlign }, _react2['default'].createElement( _PopupInner2['default'], (0, _extends3['default'])({ hiddenClassName: hiddenClassName }, popupInnerProps), children ) ) ); }; Popup.prototype.getZIndexStyle = function getZIndexStyle() { var style = {}; var props = this.props; if (props.zIndex !== undefined) { style.zIndex = props.zIndex; } return style; }; Popup.prototype.getMaskElement = function getMaskElement() { var props = this.props; var maskElement = void 0; if (props.mask) { var maskTransition = this.getMaskTransitionName(); maskElement = _react2['default'].createElement(_LazyRenderBox2['default'], { style: this.getZIndexStyle(), key: 'mask', className: props.prefixCls + '-mask', hiddenClassName: props.prefixCls + '-mask-hidden', visible: props.visible }); if (maskTransition) { maskElement = _react2['default'].createElement( _rcAnimate2['default'], { key: 'mask', showProp: 'visible', transitionAppear: true, component: '', transitionName: maskTransition }, maskElement ); } } return maskElement; }; Popup.prototype.render = function render() { return _react2['default'].createElement( 'div', null, this.getMaskElement(), this.getPopupElement() ); }; return Popup; }(_react.Component); Popup.propTypes = { visible: _propTypes2['default'].bool, style: _propTypes2['default'].object, getClassNameFromAlign: _propTypes2['default'].func, onAlign: _propTypes2['default'].func, getRootDomNode: _propTypes2['default'].func, align: _propTypes2['default'].any, destroyPopupOnHide: _propTypes2['default'].bool, className: _propTypes2['default'].string, prefixCls: _propTypes2['default'].string, onMouseEnter: _propTypes2['default'].func, onMouseLeave: _propTypes2['default'].func, onMouseDown: _propTypes2['default'].func, onTouchStart: _propTypes2['default'].func, stretch: _propTypes2['default'].string, children: _propTypes2['default'].node, point: _propTypes2['default'].shape({ pageX: _propTypes2['default'].number, pageY: _propTypes2['default'].number }) }; var _initialiseProps = function _initialiseProps() { var _this3 = this; this.onAlign = function (popupDomNode, align) { var props = _this3.props; var currentAlignClassName = props.getClassNameFromAlign(align); // FIX: https://github.com/react-component/trigger/issues/56 // FIX: https://github.com/react-component/tooltip/issues/79 if (_this3.currentAlignClassName !== currentAlignClassName) { _this3.currentAlignClassName = currentAlignClassName; popupDomNode.className = _this3.getClassName(currentAlignClassName); } props.onAlign(popupDomNode, align); }; this.setStretchSize = function () { var _props2 = _this3.props, stretch = _props2.stretch, getRootDomNode = _props2.getRootDomNode, visible = _props2.visible; var _state2 = _this3.state, stretchChecked = _state2.stretchChecked, targetHeight = _state2.targetHeight, targetWidth = _state2.targetWidth; if (!stretch || !visible) { if (stretchChecked) { _this3.setState({ stretchChecked: false }); } return; } var $ele = getRootDomNode(); if (!$ele) return; var height = $ele.offsetHeight; var width = $ele.offsetWidth; if (targetHeight !== height || targetWidth !== width || !stretchChecked) { _this3.setState({ stretchChecked: true, targetHeight: height, targetWidth: width }); } }; this.getTargetElement = function () { return _this3.props.getRootDomNode(); }; this.getAlignTarget = function () { var point = _this3.props.point; if (point) { return point; } return _this3.getTargetElement; }; }; exports['default'] = Popup; module.exports = exports['default']; /***/ }), /* 577 */ /*!**********************************!*\ !*** ../~/rc-align/lib/index.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Align = __webpack_require__(/*! ./Align */ 578); var _Align2 = _interopRequireDefault(_Align); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports['default'] = _Align2['default']; // export this package's api module.exports = exports['default']; /***/ }), /* 578 */ /*!**********************************!*\ !*** ../~/rc-align/lib/Align.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ 486); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(/*! react-dom */ 549); var _reactDom2 = _interopRequireDefault(_reactDom); var _domAlign = __webpack_require__(/*! dom-align */ 579); var _addEventListener = __webpack_require__(/*! rc-util/lib/Dom/addEventListener */ 545); var _addEventListener2 = _interopRequireDefault(_addEventListener); var _util = __webpack_require__(/*! ./util */ 592); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function getElement(func) { if (typeof func !== 'function' || !func) return null; return func(); } function getPoint(point) { if (typeof point !== 'object' || !point) return null; return point; } var Align = function (_Component) { (0, _inherits3['default'])(Align, _Component); function Align() { var _ref; var _temp, _this, _ret; (0, _classCallCheck3['default'])(this, Align); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, (_ref = Align.__proto__ || Object.getPrototypeOf(Align)).call.apply(_ref, [this].concat(args))), _this), _this.forceAlign = function () { var _this$props = _this.props, disabled = _this$props.disabled, target = _this$props.target, align = _this$props.align, onAlign = _this$props.onAlign; if (!disabled && target) { var source = _reactDom2['default'].findDOMNode(_this); var result = void 0; var element = getElement(target); var point = getPoint(target); // IE lose focus after element realign // We should record activeElement and restore later var activeElement = document.activeElement; if (element) { result = (0, _domAlign.alignElement)(source, element, align); } else if (point) { result = (0, _domAlign.alignPoint)(source, point, align); } (0, _util.restoreFocus)(activeElement, source); if (onAlign) { onAlign(source, result); } } }, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret); } (0, _createClass3['default'])(Align, [{ key: 'componentDidMount', value: function componentDidMount() { var props = this.props; // if parent ref not attached .... use document.getElementById this.forceAlign(); if (!props.disabled && props.monitorWindowResize) { this.startMonitorWindowResize(); } } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { var reAlign = false; var props = this.props; if (!props.disabled) { var source = _reactDom2['default'].findDOMNode(this); var sourceRect = source ? source.getBoundingClientRect() : null; if (prevProps.disabled) { reAlign = true; } else { var lastElement = getElement(prevProps.target); var currentElement = getElement(props.target); var lastPoint = getPoint(prevProps.target); var currentPoint = getPoint(props.target); if ((0, _util.isWindow)(lastElement) && (0, _util.isWindow)(currentElement)) { // Skip if is window reAlign = false; } else if (lastElement !== currentElement || // Element change lastElement && !currentElement && currentPoint || // Change from element to point lastPoint && currentPoint && currentElement || // Change from point to element currentPoint && !(0, _util.isSamePoint)(lastPoint, currentPoint)) { reAlign = true; } // If source element size changed var preRect = this.sourceRect || {}; if (!reAlign && source && (!(0, _util.isSimilarValue)(preRect.width, sourceRect.width) || !(0, _util.isSimilarValue)(preRect.height, sourceRect.height))) { reAlign = true; } } this.sourceRect = sourceRect; } if (reAlign) { this.forceAlign(); } if (props.monitorWindowResize && !props.disabled) { this.startMonitorWindowResize(); } else { this.stopMonitorWindowResize(); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.stopMonitorWindowResize(); } }, { key: 'startMonitorWindowResize', value: function startMonitorWindowResize() { if (!this.resizeHandler) { this.bufferMonitor = (0, _util.buffer)(this.forceAlign, this.props.monitorBufferTime); this.resizeHandler = (0, _addEventListener2['default'])(window, 'resize', this.bufferMonitor); } } }, { key: 'stopMonitorWindowResize', value: function stopMonitorWindowResize() { if (this.resizeHandler) { this.bufferMonitor.clear(); this.resizeHandler.remove(); this.resizeHandler = null; } } }, { key: 'render', value: function render() { var _this2 = this; var _props = this.props, childrenProps = _props.childrenProps, children = _props.children; var child = _react2['default'].Children.only(children); if (childrenProps) { var newProps = {}; var propList = Object.keys(childrenProps); propList.forEach(function (prop) { newProps[prop] = _this2.props[childrenProps[prop]]; }); return _react2['default'].cloneElement(child, newProps); } return child; } }]); return Align; }(_react.Component); Align.propTypes = { childrenProps: _propTypes2['default'].object, align: _propTypes2['default'].object.isRequired, target: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].shape({ clientX: _propTypes2['default'].number, clientY: _propTypes2['default'].number, pageX: _propTypes2['default'].number, pageY: _propTypes2['default'].number })]), onAlign: _propTypes2['default'].func, monitorBufferTime: _propTypes2['default'].number, monitorWindowResize: _propTypes2['default'].bool, disabled: _propTypes2['default'].bool, children: _propTypes2['default'].any }; Align.defaultProps = { target: function target() { return window; }, monitorBufferTime: 50, monitorWindowResize: false, disabled: false }; exports['default'] = Align; module.exports = exports['default']; /***/ }), /* 579 */ /*!***********************************!*\ !*** ../~/dom-align/lib/index.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.alignPoint = exports.alignElement = undefined; var _alignElement = __webpack_require__(/*! ./align/alignElement */ 580); var _alignElement2 = _interopRequireDefault(_alignElement); var _alignPoint = __webpack_require__(/*! ./align/alignPoint */ 591); var _alignPoint2 = _interopRequireDefault(_alignPoint); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports.alignElement = _alignElement2['default']; exports.alignPoint = _alignPoint2['default']; exports['default'] = _alignElement2['default']; /***/ }), /* 580 */ /*!************************************************!*\ !*** ../~/dom-align/lib/align/alignElement.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _align = __webpack_require__(/*! ./align */ 581); var _align2 = _interopRequireDefault(_align); var _getOffsetParent = __webpack_require__(/*! ../getOffsetParent */ 585); var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent); var _getVisibleRectForElement = __webpack_require__(/*! ../getVisibleRectForElement */ 584); var _getVisibleRectForElement2 = _interopRequireDefault(_getVisibleRectForElement); var _getRegion = __webpack_require__(/*! ../getRegion */ 588); var _getRegion2 = _interopRequireDefault(_getRegion); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function isOutOfVisibleRect(target) { var visibleRect = (0, _getVisibleRectForElement2['default'])(target); var targetRegion = (0, _getRegion2['default'])(target); return !visibleRect || targetRegion.left + targetRegion.width <= visibleRect.left || targetRegion.top + targetRegion.height <= visibleRect.top || targetRegion.left >= visibleRect.right || targetRegion.top >= visibleRect.bottom; } function alignElement(el, refNode, align) { var target = align.target || refNode; var refNodeRegion = (0, _getRegion2['default'])(target); var isTargetNotOutOfVisible = !isOutOfVisibleRect(target); return (0, _align2['default'])(el, refNodeRegion, align, isTargetNotOutOfVisible); } alignElement.__getOffsetParent = _getOffsetParent2['default']; alignElement.__getVisibleRectForElement = _getVisibleRectForElement2['default']; exports['default'] = alignElement; module.exports = exports['default']; /***/ }), /* 581 */ /*!*****************************************!*\ !*** ../~/dom-align/lib/align/align.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(/*! ../utils */ 582); var _utils2 = _interopRequireDefault(_utils); var _getVisibleRectForElement = __webpack_require__(/*! ../getVisibleRectForElement */ 584); var _getVisibleRectForElement2 = _interopRequireDefault(_getVisibleRectForElement); var _adjustForViewport = __webpack_require__(/*! ../adjustForViewport */ 587); var _adjustForViewport2 = _interopRequireDefault(_adjustForViewport); var _getRegion = __webpack_require__(/*! ../getRegion */ 588); var _getRegion2 = _interopRequireDefault(_getRegion); var _getElFuturePos = __webpack_require__(/*! ../getElFuturePos */ 589); var _getElFuturePos2 = _interopRequireDefault(_getElFuturePos); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } // http://yiminghe.iteye.com/blog/1124720 function isFailX(elFuturePos, elRegion, visibleRect) { return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right; } /** * align dom node flexibly * @author yiminghe@gmail.com */ function isFailY(elFuturePos, elRegion, visibleRect) { return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom; } function isCompleteFailX(elFuturePos, elRegion, visibleRect) { return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left; } function isCompleteFailY(elFuturePos, elRegion, visibleRect) { return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top; } function flip(points, reg, map) { var ret = []; _utils2['default'].each(points, function (p) { ret.push(p.replace(reg, function (m) { return map[m]; })); }); return ret; } function flipOffset(offset, index) { offset[index] = -offset[index]; return offset; } function convertOffset(str, offsetLen) { var n = void 0; if (/%$/.test(str)) { n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen; } else { n = parseInt(str, 10); } return n || 0; } function normalizeOffset(offset, el) { offset[0] = convertOffset(offset[0], el.width); offset[1] = convertOffset(offset[1], el.height); } /** * @param el * @param tgtRegion 参照节点所占的区域: { left, top, width, height } * @param align */ function doAlign(el, tgtRegion, align, isTgtRegionVisible) { var points = align.points; var offset = align.offset || [0, 0]; var targetOffset = align.targetOffset || [0, 0]; var overflow = align.overflow; var source = align.source || el; offset = [].concat(offset); targetOffset = [].concat(targetOffset); overflow = overflow || {}; var newOverflowCfg = {}; var fail = 0; // 当前节点可以被放置的显示区域 var visibleRect = (0, _getVisibleRectForElement2['default'])(source); // 当前节点所占的区域, left/top/width/height var elRegion = (0, _getRegion2['default'])(source); // 将 offset 转换成数值,支持百分比 normalizeOffset(offset, elRegion); normalizeOffset(targetOffset, tgtRegion); // 当前节点将要被放置的位置 var elFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, points, offset, targetOffset); // 当前节点将要所处的区域 var newElRegion = _utils2['default'].merge(elRegion, elFuturePos); // 如果可视区域不能完全放置当前节点时允许调整 if (visibleRect && (overflow.adjustX || overflow.adjustY) && isTgtRegionVisible) { if (overflow.adjustX) { // 如果横向不能放下 if (isFailX(elFuturePos, elRegion, visibleRect)) { // 对齐位置反下 var newPoints = flip(points, /[lr]/ig, { l: 'r', r: 'l' }); // 偏移量也反下 var newOffset = flipOffset(offset, 0); var newTargetOffset = flipOffset(targetOffset, 0); var newElFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, newPoints, newOffset, newTargetOffset); if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) { fail = 1; points = newPoints; offset = newOffset; targetOffset = newTargetOffset; } } } if (overflow.adjustY) { // 如果纵向不能放下 if (isFailY(elFuturePos, elRegion, visibleRect)) { // 对齐位置反下 var _newPoints = flip(points, /[tb]/ig, { t: 'b', b: 't' }); // 偏移量也反下 var _newOffset = flipOffset(offset, 1); var _newTargetOffset = flipOffset(targetOffset, 1); var _newElFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset); if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) { fail = 1; points = _newPoints; offset = _newOffset; targetOffset = _newTargetOffset; } } } // 如果失败,重新计算当前节点将要被放置的位置 if (fail) { elFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, points, offset, targetOffset); _utils2['default'].mix(newElRegion, elFuturePos); } var isStillFailX = isFailX(elFuturePos, elRegion, visibleRect); var isStillFailY = isFailY(elFuturePos, elRegion, visibleRect); // 检查反下后的位置是否可以放下了,如果仍然放不下: // 1. 复原修改过的定位参数 if (isStillFailX || isStillFailY) { points = align.points; offset = align.offset || [0, 0]; targetOffset = align.targetOffset || [0, 0]; } // 2. 只有指定了可以调整当前方向才调整 newOverflowCfg.adjustX = overflow.adjustX && isStillFailX; newOverflowCfg.adjustY = overflow.adjustY && isStillFailY; // 确实要调整,甚至可能会调整高度宽度 if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) { newElRegion = (0, _adjustForViewport2['default'])(elFuturePos, elRegion, visibleRect, newOverflowCfg); } } // need judge to in case set fixed with in css on height auto element if (newElRegion.width !== elRegion.width) { _utils2['default'].css(source, 'width', _utils2['default'].width(source) + newElRegion.width - elRegion.width); } if (newElRegion.height !== elRegion.height) { _utils2['default'].css(source, 'height', _utils2['default'].height(source) + newElRegion.height - elRegion.height); } // https://github.com/kissyteam/kissy/issues/190 // 相对于屏幕位置没变,而 left/top 变了 // 例如
_utils2['default'].offset(source, { left: newElRegion.left, top: newElRegion.top }, { useCssRight: align.useCssRight, useCssBottom: align.useCssBottom, useCssTransform: align.useCssTransform, ignoreShake: align.ignoreShake }); return { points: points, offset: offset, targetOffset: targetOffset, overflow: newOverflowCfg }; } exports['default'] = doAlign; /** * 2012-04-26 yiminghe@gmail.com * - 优化智能对齐算法 * - 慎用 resizeXX * * 2011-07-13 yiminghe@gmail.com note: * - 增加智能对齐,以及大小调整选项 **/ module.exports = exports['default']; /***/ }), /* 582 */ /*!***********************************!*\ !*** ../~/dom-align/lib/utils.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _propertyUtils = __webpack_require__(/*! ./propertyUtils */ 583); var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; var getComputedStyleX = void 0; // https://stackoverflow.com/a/3485654/3040605 function forceRelayout(elem) { var originalStyle = elem.style.display; elem.style.display = 'none'; elem.offsetHeight; // eslint-disable-line elem.style.display = originalStyle; } function css(el, name, v) { var value = v; if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') { for (var i in name) { if (name.hasOwnProperty(i)) { css(el, i, name[i]); } } return undefined; } if (typeof value !== 'undefined') { if (typeof value === 'number') { value = value + 'px'; } el.style[name] = value; return undefined; } return getComputedStyleX(el, name); } function getClientPosition(elem) { var box = void 0; var x = void 0; var y = void 0; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin x = box.left; y = box.top; // In IE, most of the time, 2 extra pixels are added to the top and left // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and // IE6 standards mode, this border can be overridden by setting the // document element's border to zero -- thus, we cannot rely on the // offset always being 2 pixels. // In quirks mode, the offset can be determined by querying the body's // clientLeft/clientTop, but in standards mode, it is found by querying // the document element's clientLeft/clientTop. Since we already called // getClientBoundingRect we have already forced a reflow, so it is not // too expensive just to query them all. // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 // 窗口边框标准是设 documentElement ,quirks 时设置 body // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 // 标准 ie 下 docElem.clientTop 就是 border-top // ie7 html 即窗口边框改变不了。永远为 2 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function getScroll(w, top) { var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; var method = 'scroll' + (top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getScrollLeft(w) { return getScroll(w); } function getScrollTop(w) { return getScroll(w, true); } function getOffset(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScrollLeft(w); pos.top += getScrollTop(w); return pos; } /** * A crude way of determining if an object is a window * @member util */ function isWindow(obj) { // must use == for ie8 /* eslint eqeqeq:0 */ return obj !== null && obj !== undefined && obj == obj.window; } function getDocument(node) { if (isWindow(node)) { return node.document; } if (node.nodeType === 9) { return node; } return node.ownerDocument; } function _getComputedStyle(elem, name, cs) { var computedStyle = cs; var val = ''; var d = getDocument(elem); computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61 if (computedStyle) { val = computedStyle.getPropertyValue(name) || computedStyle[name]; } return val; } var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i'); var RE_POS = /^(top|right|bottom|left)$/; var CURRENT_STYLE = 'currentStyle'; var RUNTIME_STYLE = 'runtimeStyle'; var LEFT = 'left'; var PX = 'px'; function _getComputedStyleIE(elem, name) { // currentStyle maybe null // http://msdn.microsoft.com/en-us/library/ms535231.aspx var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 // 在 ie 下不对,需要直接用 offset 方式 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // exclude left right for relativity if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { // Remember the original values var style = elem.style; var left = style[LEFT]; var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; ret = style.pixelLeft + PX; // Revert the changed values style[LEFT] = left; elem[RUNTIME_STYLE][LEFT] = rsLeft; } return ret === '' ? 'auto' : ret; } if (typeof window !== 'undefined') { getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; } function getOffsetDirection(dir, option) { if (dir === 'left') { return option.useCssRight ? 'right' : dir; } return option.useCssBottom ? 'bottom' : dir; } function oppositeOffsetDirection(dir) { if (dir === 'left') { return 'right'; } else if (dir === 'right') { return 'left'; } else if (dir === 'top') { return 'bottom'; } else if (dir === 'bottom') { return 'top'; } } // 设置 elem 相对 elem.ownerDocument 的坐标 function setLeftTop(elem, offset, option) { // set position first, in-case top/left are set even on static elem if (css(elem, 'position') === 'static') { elem.style.position = 'relative'; } var presetH = -999; var presetV = -999; var horizontalProperty = getOffsetDirection('left', option); var verticalProperty = getOffsetDirection('top', option); var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty); var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty); if (horizontalProperty !== 'left') { presetH = 999; } if (verticalProperty !== 'top') { presetV = 999; } var originalTransition = ''; var originalOffset = getOffset(elem); if ('left' in offset || 'top' in offset) { originalTransition = (0, _propertyUtils.getTransitionProperty)(elem) || ''; (0, _propertyUtils.setTransitionProperty)(elem, 'none'); } if ('left' in offset) { elem.style[oppositeHorizontalProperty] = ''; elem.style[horizontalProperty] = presetH + 'px'; } if ('top' in offset) { elem.style[oppositeVerticalProperty] = ''; elem.style[verticalProperty] = presetV + 'px'; } // force relayout forceRelayout(elem); var old = getOffset(elem); var originalStyle = {}; for (var key in offset) { if (offset.hasOwnProperty(key)) { var dir = getOffsetDirection(key, option); var preset = key === 'left' ? presetH : presetV; var off = originalOffset[key] - old[key]; if (dir === key) { originalStyle[dir] = preset + off; } else { originalStyle[dir] = preset - off; } } } css(elem, originalStyle); // force relayout forceRelayout(elem); if ('left' in offset || 'top' in offset) { (0, _propertyUtils.setTransitionProperty)(elem, originalTransition); } var ret = {}; for (var _key in offset) { if (offset.hasOwnProperty(_key)) { var _dir = getOffsetDirection(_key, option); var _off = offset[_key] - originalOffset[_key]; if (_key === _dir) { ret[_dir] = originalStyle[_dir] + _off; } else { ret[_dir] = originalStyle[_dir] - _off; } } } css(elem, ret); } function setTransform(elem, offset) { var originalOffset = getOffset(elem); var originalXY = (0, _propertyUtils.getTransformXY)(elem); var resultXY = { x: originalXY.x, y: originalXY.y }; if ('left' in offset) { resultXY.x = originalXY.x + offset.left - originalOffset.left; } if ('top' in offset) { resultXY.y = originalXY.y + offset.top - originalOffset.top; } (0, _propertyUtils.setTransformXY)(elem, resultXY); } function setOffset(elem, offset, option) { if (option.ignoreShake) { var oriOffset = getOffset(elem); var oLeft = oriOffset.left.toFixed(0); var oTop = oriOffset.top.toFixed(0); var tLeft = offset.left.toFixed(0); var tTop = offset.top.toFixed(0); if (oLeft === tLeft && oTop === tTop) { return; } } if (option.useCssRight || option.useCssBottom) { setLeftTop(elem, offset, option); } else if (option.useCssTransform && (0, _propertyUtils.getTransformName)() in document.body.style) { setTransform(elem, offset, option); } else { setLeftTop(elem, offset, option); } } function each(arr, fn) { for (var i = 0; i < arr.length; i++) { fn(arr[i]); } } function isBorderBoxFn(elem) { return getComputedStyleX(elem, 'boxSizing') === 'border-box'; } var BOX_MODELS = ['margin', 'border', 'padding']; var CONTENT_INDEX = -1; var PADDING_INDEX = 2; var BORDER_INDEX = 1; var MARGIN_INDEX = 0; function swap(elem, options, callback) { var old = {}; var style = elem.style; var name = void 0; // Remember the old values, and insert the new ones for (name in options) { if (options.hasOwnProperty(name)) { old[name] = style[name]; style[name] = options[name]; } } callback.call(elem); // Revert the old values for (name in options) { if (options.hasOwnProperty(name)) { style[name] = old[name]; } } } function getPBMWidth(elem, props, which) { var value = 0; var prop = void 0; var j = void 0; var i = void 0; for (j = 0; j < props.length; j++) { prop = props[j]; if (prop) { for (i = 0; i < which.length; i++) { var cssProp = void 0; if (prop === 'border') { cssProp = '' + prop + which[i] + 'Width'; } else { cssProp = prop + which[i]; } value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; } } } return value; } var domUtils = {}; each(['Width', 'Height'], function (name) { domUtils['doc' + name] = function (refWin) { var d = refWin.document; return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight // ie standard mode : documentElement.scrollHeight> body.scrollHeight d.documentElement['scroll' + name], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? d.body['scroll' + name], domUtils['viewport' + name](d)); }; domUtils['viewport' + name] = function (win) { // pc browser includes scrollbar in window.innerWidth var prop = 'client' + name; var doc = win.document; var body = doc.body; var documentElement = doc.documentElement; var documentElementProp = documentElement[prop]; // 标准模式取 documentElement // backcompat 取 body return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; }; }); /* 得到元素的大小信息 @param elem @param name @param {String} [extra] 'padding' : (css width) + padding 'border' : (css width) + padding + border 'margin' : (css width) + padding + border + margin */ function getWH(elem, name, ex) { var extra = ex; if (isWindow(elem)) { return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); } else if (elem.nodeType === 9) { return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); } var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; var borderBoxValue = name === 'width' ? elem.getBoundingClientRect().width : elem.getBoundingClientRect().height; var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem, computedStyle); var cssBoxValue = 0; if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) { borderBoxValue = undefined; // Fall back to computed then un computed css if necessary cssBoxValue = getComputedStyleX(elem, name); if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) { cssBoxValue = elem.style[name] || 0; } // Normalize '', auto, and prepare for extra cssBoxValue = parseFloat(cssBoxValue) || 0; } if (extra === undefined) { extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; } var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; var val = borderBoxValue || cssBoxValue; if (extra === CONTENT_INDEX) { if (borderBoxValueOrIsBorderBox) { return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle); } return cssBoxValue; } else if (borderBoxValueOrIsBorderBox) { if (extra === BORDER_INDEX) { return val; } return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle)); } return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle); } var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; // fix #119 : https://github.com/kissyteam/kissy/issues/119 function getWHIgnoreDisplay() { for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) { args[_key2] = arguments[_key2]; } var val = void 0; var elem = args[0]; // in case elem is window // elem.offsetWidth === undefined if (elem.offsetWidth !== 0) { val = getWH.apply(undefined, args); } else { swap(elem, cssShow, function () { val = getWH.apply(undefined, args); }); } return val; } each(['width', 'height'], function (name) { var first = name.charAt(0).toUpperCase() + name.slice(1); domUtils['outer' + first] = function (el, includeMargin) { return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); }; var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; domUtils[name] = function (elem, v) { var val = v; if (val !== undefined) { if (elem) { var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); if (isBorderBox) { val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle); } return css(elem, name, val); } return undefined; } return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); }; }); function mix(to, from) { for (var i in from) { if (from.hasOwnProperty(i)) { to[i] = from[i]; } } return to; } var utils = { getWindow: function getWindow(node) { if (node && node.document && node.setTimeout) { return node; } var doc = node.ownerDocument || node; return doc.defaultView || doc.parentWindow; }, getDocument: getDocument, offset: function offset(el, value, option) { if (typeof value !== 'undefined') { setOffset(el, value, option || {}); } else { return getOffset(el); } }, isWindow: isWindow, each: each, css: css, clone: function clone(obj) { var i = void 0; var ret = {}; for (i in obj) { if (obj.hasOwnProperty(i)) { ret[i] = obj[i]; } } var overflow = obj.overflow; if (overflow) { for (i in obj) { if (obj.hasOwnProperty(i)) { ret.overflow[i] = obj.overflow[i]; } } } return ret; }, mix: mix, getWindowScrollLeft: function getWindowScrollLeft(w) { return getScrollLeft(w); }, getWindowScrollTop: function getWindowScrollTop(w) { return getScrollTop(w); }, merge: function merge() { var ret = {}; for (var _len2 = arguments.length, args = Array(_len2), _key3 = 0; _key3 < _len2; _key3++) { args[_key3] = arguments[_key3]; } for (var i = 0; i < args.length; i++) { utils.mix(ret, args[i]); } return ret; }, viewportWidth: 0, viewportHeight: 0 }; mix(utils, domUtils); exports['default'] = utils; module.exports = exports['default']; /***/ }), /* 583 */ /*!*******************************************!*\ !*** ../~/dom-align/lib/propertyUtils.js ***! \*******************************************/ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTransformName = getTransformName; exports.setTransitionProperty = setTransitionProperty; exports.getTransitionProperty = getTransitionProperty; exports.getTransformXY = getTransformXY; exports.setTransformXY = setTransformXY; var vendorPrefix = void 0; var jsCssMap = { Webkit: '-webkit-', Moz: '-moz-', // IE did it wrong again ... ms: '-ms-', O: '-o-' }; function getVendorPrefix() { if (vendorPrefix !== undefined) { return vendorPrefix; } vendorPrefix = ''; var style = document.createElement('p').style; var testProp = 'Transform'; for (var key in jsCssMap) { if (key + testProp in style) { vendorPrefix = key; } } return vendorPrefix; } function getTransitionName() { return getVendorPrefix() ? getVendorPrefix() + 'TransitionProperty' : 'transitionProperty'; } function getTransformName() { return getVendorPrefix() ? getVendorPrefix() + 'Transform' : 'transform'; } function setTransitionProperty(node, value) { var name = getTransitionName(); if (name) { node.style[name] = value; if (name !== 'transitionProperty') { node.style.transitionProperty = value; } } } function setTransform(node, value) { var name = getTransformName(); if (name) { node.style[name] = value; if (name !== 'transform') { node.style.transform = value; } } } function getTransitionProperty(node) { return node.style.transitionProperty || node.style[getTransitionName()]; } function getTransformXY(node) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var matrix = transform.replace(/[^0-9\-.,]/g, '').split(','); return { x: parseFloat(matrix[12] || matrix[4], 0), y: parseFloat(matrix[13] || matrix[5], 0) }; } return { x: 0, y: 0 }; } var matrix2d = /matrix\((.*)\)/; var matrix3d = /matrix3d\((.*)\)/; function setTransformXY(node, xy) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var arr = void 0; var match2d = transform.match(matrix2d); if (match2d) { match2d = match2d[1]; arr = match2d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[4] = xy.x; arr[5] = xy.y; setTransform(node, 'matrix(' + arr.join(',') + ')'); } else { var match3d = transform.match(matrix3d)[1]; arr = match3d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[12] = xy.x; arr[13] = xy.y; setTransform(node, 'matrix3d(' + arr.join(',') + ')'); } } else { setTransform(node, 'translateX(' + xy.x + 'px) translateY(' + xy.y + 'px) translateZ(0)'); } } /***/ }), /* 584 */ /*!******************************************************!*\ !*** ../~/dom-align/lib/getVisibleRectForElement.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(/*! ./utils */ 582); var _utils2 = _interopRequireDefault(_utils); var _getOffsetParent = __webpack_require__(/*! ./getOffsetParent */ 585); var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent); var _isAncestorFixed = __webpack_require__(/*! ./isAncestorFixed */ 586); var _isAncestorFixed2 = _interopRequireDefault(_isAncestorFixed); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * 获得元素的显示部分的区域 */ function getVisibleRectForElement(element) { var visibleRect = { left: 0, right: Infinity, top: 0, bottom: Infinity }; var el = (0, _getOffsetParent2['default'])(element); var doc = _utils2['default'].getDocument(element); var win = doc.defaultView || doc.parentWindow; var body = doc.body; var documentElement = doc.documentElement; // Determine the size of the visible rect by climbing the dom accounting for // all scrollable containers. while (el) { // clientWidth is zero for inline block elements in ie. if ((navigator.userAgent.indexOf('MSIE') === -1 || el.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire // viewport. In some browsers, el.offsetParent may be // document.documentElement, so check for that too. el !== body && el !== documentElement && _utils2['default'].css(el, 'overflow') !== 'visible') { var pos = _utils2['default'].offset(el); // add border pos.left += el.clientLeft; pos.top += el.clientTop; visibleRect.top = Math.max(visibleRect.top, pos.top); visibleRect.right = Math.min(visibleRect.right, // consider area without scrollBar pos.left + el.clientWidth); visibleRect.bottom = Math.min(visibleRect.bottom, pos.top + el.clientHeight); visibleRect.left = Math.max(visibleRect.left, pos.left); } else if (el === body || el === documentElement) { break; } el = (0, _getOffsetParent2['default'])(el); } // Set element position to fixed // make sure absolute element itself don't affect it's visible area // https://github.com/ant-design/ant-design/issues/7601 var originalPosition = null; if (!_utils2['default'].isWindow(element) && element.nodeType !== 9) { originalPosition = element.style.position; var position = _utils2['default'].css(element, 'position'); if (position === 'absolute') { element.style.position = 'fixed'; } } var scrollX = _utils2['default'].getWindowScrollLeft(win); var scrollY = _utils2['default'].getWindowScrollTop(win); var viewportWidth = _utils2['default'].viewportWidth(win); var viewportHeight = _utils2['default'].viewportHeight(win); var documentWidth = documentElement.scrollWidth; var documentHeight = documentElement.scrollHeight; // scrollXXX on html is sync with body which means overflow: hidden on body gets wrong scrollXXX. // We should cut this ourself. var bodyStyle = window.getComputedStyle(body); if (bodyStyle.overflowX === 'hidden') { documentWidth = win.innerWidth; } if (bodyStyle.overflowY === 'hidden') { documentHeight = win.innerHeight; } // Reset element position after calculate the visible area if (element.style) { element.style.position = originalPosition; } if ((0, _isAncestorFixed2['default'])(element)) { // Clip by viewport's size. visibleRect.left = Math.max(visibleRect.left, scrollX); visibleRect.top = Math.max(visibleRect.top, scrollY); visibleRect.right = Math.min(visibleRect.right, scrollX + viewportWidth); visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + viewportHeight); } else { // Clip by document's size. var maxVisibleWidth = Math.max(documentWidth, scrollX + viewportWidth); visibleRect.right = Math.min(visibleRect.right, maxVisibleWidth); var maxVisibleHeight = Math.max(documentHeight, scrollY + viewportHeight); visibleRect.bottom = Math.min(visibleRect.bottom, maxVisibleHeight); } return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null; } exports['default'] = getVisibleRectForElement; module.exports = exports['default']; /***/ }), /* 585 */ /*!*********************************************!*\ !*** ../~/dom-align/lib/getOffsetParent.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(/*! ./utils */ 582); var _utils2 = _interopRequireDefault(_utils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * 得到会导致元素显示不全的祖先元素 */ function getOffsetParent(element) { if (_utils2['default'].isWindow(element) || element.nodeType === 9) { return null; } // ie 这个也不是完全可行 /*
元素 6 高 100px 宽 50px
*/ // element.offsetParent does the right thing in ie7 and below. Return parent with layout! // In other browsers it only includes elements with position absolute, relative or // fixed, not elements with overflow set to auto or scroll. // if (UA.ie && ieMode < 8) { // return element.offsetParent; // } // 统一的 offsetParent 方法 var doc = _utils2['default'].getDocument(element); var body = doc.body; var parent = void 0; var positionStyle = _utils2['default'].css(element, 'position'); var skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute'; if (!skipStatic) { return element.nodeName.toLowerCase() === 'html' ? null : element.parentNode; } for (parent = element.parentNode; parent && parent !== body; parent = parent.parentNode) { positionStyle = _utils2['default'].css(parent, 'position'); if (positionStyle !== 'static') { return parent; } } return null; } exports['default'] = getOffsetParent; module.exports = exports['default']; /***/ }), /* 586 */ /*!*********************************************!*\ !*** ../~/dom-align/lib/isAncestorFixed.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports['default'] = isAncestorFixed; var _utils = __webpack_require__(/*! ./utils */ 582); var _utils2 = _interopRequireDefault(_utils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function isAncestorFixed(element) { if (_utils2['default'].isWindow(element) || element.nodeType === 9) { return false; } var doc = _utils2['default'].getDocument(element); var body = doc.body; var parent = null; for (parent = element.parentNode; parent && parent !== body; parent = parent.parentNode) { var positionStyle = _utils2['default'].css(parent, 'position'); if (positionStyle === 'fixed') { return true; } } return false; } module.exports = exports['default']; /***/ }), /* 587 */ /*!***********************************************!*\ !*** ../~/dom-align/lib/adjustForViewport.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(/*! ./utils */ 582); var _utils2 = _interopRequireDefault(_utils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) { var pos = _utils2['default'].clone(elFuturePos); var size = { width: elRegion.width, height: elRegion.height }; if (overflow.adjustX && pos.left < visibleRect.left) { pos.left = visibleRect.left; } // Left edge inside and right edge outside viewport, try to resize it. if (overflow.resizeWidth && pos.left >= visibleRect.left && pos.left + size.width > visibleRect.right) { size.width -= pos.left + size.width - visibleRect.right; } // Right edge outside viewport, try to move it. if (overflow.adjustX && pos.left + size.width > visibleRect.right) { // 保证左边界和可视区域左边界对齐 pos.left = Math.max(visibleRect.right - size.width, visibleRect.left); } // Top edge outside viewport, try to move it. if (overflow.adjustY && pos.top < visibleRect.top) { pos.top = visibleRect.top; } // Top edge inside and bottom edge outside viewport, try to resize it. if (overflow.resizeHeight && pos.top >= visibleRect.top && pos.top + size.height > visibleRect.bottom) { size.height -= pos.top + size.height - visibleRect.bottom; } // Bottom edge outside viewport, try to move it. if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) { // 保证上边界和可视区域上边界对齐 pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top); } return _utils2['default'].mix(pos, size); } exports['default'] = adjustForViewport; module.exports = exports['default']; /***/ }), /* 588 */ /*!***************************************!*\ !*** ../~/dom-align/lib/getRegion.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(/*! ./utils */ 582); var _utils2 = _interopRequireDefault(_utils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function getRegion(node) { var offset = void 0; var w = void 0; var h = void 0; if (!_utils2['default'].isWindow(node) && node.nodeType !== 9) { offset = _utils2['default'].offset(node); w = _utils2['default'].outerWidth(node); h = _utils2['default'].outerHeight(node); } else { var win = _utils2['default'].getWindow(node); offset = { left: _utils2['default'].getWindowScrollLeft(win), top: _utils2['default'].getWindowScrollTop(win) }; w = _utils2['default'].viewportWidth(win); h = _utils2['default'].viewportHeight(win); } offset.width = w; offset.height = h; return offset; } exports['default'] = getRegion; module.exports = exports['default']; /***/ }), /* 589 */ /*!********************************************!*\ !*** ../~/dom-align/lib/getElFuturePos.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _getAlignOffset = __webpack_require__(/*! ./getAlignOffset */ 590); var _getAlignOffset2 = _interopRequireDefault(_getAlignOffset); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) { var p1 = (0, _getAlignOffset2['default'])(refNodeRegion, points[1]); var p2 = (0, _getAlignOffset2['default'])(elRegion, points[0]); var diff = [p2.left - p1.left, p2.top - p1.top]; return { left: elRegion.left - diff[0] + offset[0] - targetOffset[0], top: elRegion.top - diff[1] + offset[1] - targetOffset[1] }; } exports['default'] = getElFuturePos; module.exports = exports['default']; /***/ }), /* 590 */ /*!********************************************!*\ !*** ../~/dom-align/lib/getAlignOffset.js ***! \********************************************/ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); /** * 获取 node 上的 align 对齐点 相对于页面的坐标 */ function getAlignOffset(region, align) { var V = align.charAt(0); var H = align.charAt(1); var w = region.width; var h = region.height; var x = region.left; var y = region.top; if (V === 'c') { y += h / 2; } else if (V === 'b') { y += h; } if (H === 'c') { x += w / 2; } else if (H === 'r') { x += w; } return { left: x, top: y }; } exports['default'] = getAlignOffset; module.exports = exports['default']; /***/ }), /* 591 */ /*!**********************************************!*\ !*** ../~/dom-align/lib/align/alignPoint.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _utils = __webpack_require__(/*! ../utils */ 582); var _utils2 = _interopRequireDefault(_utils); var _align = __webpack_require__(/*! ./align */ 581); var _align2 = _interopRequireDefault(_align); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * `tgtPoint`: { pageX, pageY } or { clientX, clientY }. * If client position provided, will internal convert to page position. */ function alignPoint(el, tgtPoint, align) { var pageX = void 0; var pageY = void 0; var doc = _utils2['default'].getDocument(el); var win = doc.defaultView || doc.parentWindow; var scrollX = _utils2['default'].getWindowScrollLeft(win); var scrollY = _utils2['default'].getWindowScrollTop(win); var viewportWidth = _utils2['default'].viewportWidth(win); var viewportHeight = _utils2['default'].viewportHeight(win); if ('pageX' in tgtPoint) { pageX = tgtPoint.pageX; } else { pageX = scrollX + tgtPoint.clientX; } if ('pageY' in tgtPoint) { pageY = tgtPoint.pageY; } else { pageY = scrollY + tgtPoint.clientY; } var tgtRegion = { left: pageX, top: pageY, width: 0, height: 0 }; var pointInView = pageX >= 0 && pageX <= scrollX + viewportWidth && pageY >= 0 && pageY <= scrollY + viewportHeight; // Provide default target point var points = [align.points[0], 'cc']; return (0, _align2['default'])(el, tgtRegion, _extends({}, align, { points: points }), pointInView); } exports['default'] = alignPoint; module.exports = exports['default']; /***/ }), /* 592 */ /*!*********************************!*\ !*** ../~/rc-align/lib/util.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.buffer = buffer; exports.isSamePoint = isSamePoint; exports.isWindow = isWindow; exports.isSimilarValue = isSimilarValue; exports.restoreFocus = restoreFocus; var _contains = __webpack_require__(/*! rc-util/lib/Dom/contains */ 572); var _contains2 = _interopRequireDefault(_contains); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function buffer(fn, ms) { var timer = void 0; function clear() { if (timer) { clearTimeout(timer); timer = null; } } function bufferFn() { clear(); timer = setTimeout(fn, ms); } bufferFn.clear = clear; return bufferFn; } function isSamePoint(prev, next) { if (prev === next) return true; if (!prev || !next) return false; if ('pageX' in next && 'pageY' in next) { return prev.pageX === next.pageX && prev.pageY === next.pageY; } if ('clientX' in next && 'clientY' in next) { return prev.clientX === next.clientX && prev.clientY === next.clientY; } return false; } function isWindow(obj) { return obj && typeof obj === 'object' && obj.window === obj; } function isSimilarValue(val1, val2) { var int1 = Math.floor(val1); var int2 = Math.floor(val2); return Math.abs(int1 - int2) <= 1; } function restoreFocus(activeElement, container) { // Focus back if is in the container if (activeElement !== document.activeElement && (0, _contains2['default'])(container, activeElement)) { activeElement.focus(); } } /***/ }), /* 593 */ /*!**************************************!*\ !*** ../~/rc-animate/lib/Animate.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 446); var _extends3 = _interopRequireDefault(_extends2); var _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ 536); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ 486); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _ChildrenUtils = __webpack_require__(/*! ./ChildrenUtils */ 594); var _AnimateChild = __webpack_require__(/*! ./AnimateChild */ 595); var _AnimateChild2 = _interopRequireDefault(_AnimateChild); var _animate = __webpack_require__(/*! ./util/animate */ 600); var _animate2 = _interopRequireDefault(_animate); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var defaultKey = 'rc_animate_' + Date.now(); function getChildrenFromProps(props) { var children = props.children; if (_react2['default'].isValidElement(children)) { if (!children.key) { return _react2['default'].cloneElement(children, { key: defaultKey }); } } return children; } function noop() {} var Animate = function (_React$Component) { (0, _inherits3['default'])(Animate, _React$Component); // eslint-disable-line function Animate(props) { (0, _classCallCheck3['default'])(this, Animate); var _this = (0, _possibleConstructorReturn3['default'])(this, (Animate.__proto__ || Object.getPrototypeOf(Animate)).call(this, props)); _initialiseProps.call(_this); _this.currentlyAnimatingKeys = {}; _this.keysToEnter = []; _this.keysToLeave = []; _this.state = { children: (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)) }; _this.childrenRefs = {}; return _this; } (0, _createClass3['default'])(Animate, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; var showProp = this.props.showProp; var children = this.state.children; if (showProp) { children = children.filter(function (child) { return !!child.props[showProp]; }); } children.forEach(function (child) { if (child) { _this2.performAppear(child.key); } }); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { var _this3 = this; this.nextProps = nextProps; var nextChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(nextProps)); var props = this.props; // exclusive needs immediate response if (props.exclusive) { Object.keys(this.currentlyAnimatingKeys).forEach(function (key) { _this3.stop(key); }); } var showProp = props.showProp; var currentlyAnimatingKeys = this.currentlyAnimatingKeys; // last props children if exclusive var currentChildren = props.exclusive ? (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)) : this.state.children; // in case destroy in showProp mode var newChildren = []; if (showProp) { currentChildren.forEach(function (currentChild) { var nextChild = currentChild && (0, _ChildrenUtils.findChildInChildrenByKey)(nextChildren, currentChild.key); var newChild = void 0; if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) { newChild = _react2['default'].cloneElement(nextChild || currentChild, (0, _defineProperty3['default'])({}, showProp, true)); } else { newChild = nextChild; } if (newChild) { newChildren.push(newChild); } }); nextChildren.forEach(function (nextChild) { if (!nextChild || !(0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, nextChild.key)) { newChildren.push(nextChild); } }); } else { newChildren = (0, _ChildrenUtils.mergeChildren)(currentChildren, nextChildren); } // need render to avoid update this.setState({ children: newChildren }); nextChildren.forEach(function (child) { var key = child && child.key; if (child && currentlyAnimatingKeys[key]) { return; } var hasPrev = child && (0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, key); if (showProp) { var showInNext = child.props[showProp]; if (hasPrev) { var showInNow = (0, _ChildrenUtils.findShownChildInChildrenByKey)(currentChildren, key, showProp); if (!showInNow && showInNext) { _this3.keysToEnter.push(key); } } else if (showInNext) { _this3.keysToEnter.push(key); } } else if (!hasPrev) { _this3.keysToEnter.push(key); } }); currentChildren.forEach(function (child) { var key = child && child.key; if (child && currentlyAnimatingKeys[key]) { return; } var hasNext = child && (0, _ChildrenUtils.findChildInChildrenByKey)(nextChildren, key); if (showProp) { var showInNow = child.props[showProp]; if (hasNext) { var showInNext = (0, _ChildrenUtils.findShownChildInChildrenByKey)(nextChildren, key, showProp); if (!showInNext && showInNow) { _this3.keysToLeave.push(key); } } else if (showInNow) { _this3.keysToLeave.push(key); } } else if (!hasNext) { _this3.keysToLeave.push(key); } }); } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { var keysToEnter = this.keysToEnter; this.keysToEnter = []; keysToEnter.forEach(this.performEnter); var keysToLeave = this.keysToLeave; this.keysToLeave = []; keysToLeave.forEach(this.performLeave); } }, { key: 'isValidChildByKey', value: function isValidChildByKey(currentChildren, key) { var showProp = this.props.showProp; if (showProp) { return (0, _ChildrenUtils.findShownChildInChildrenByKey)(currentChildren, key, showProp); } return (0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, key); } }, { key: 'stop', value: function stop(key) { delete this.currentlyAnimatingKeys[key]; var component = this.childrenRefs[key]; if (component) { component.stop(); } } }, { key: 'render', value: function render() { var _this4 = this; var props = this.props; this.nextProps = props; var stateChildren = this.state.children; var children = null; if (stateChildren) { children = stateChildren.map(function (child) { if (child === null || child === undefined) { return child; } if (!child.key) { throw new Error('must set key for children'); } return _react2['default'].createElement( _AnimateChild2['default'], { key: child.key, ref: function ref(node) { _this4.childrenRefs[child.key] = node; }, animation: props.animation, transitionName: props.transitionName, transitionEnter: props.transitionEnter, transitionAppear: props.transitionAppear, transitionLeave: props.transitionLeave }, child ); }); } var Component = props.component; if (Component) { var passedProps = props; if (typeof Component === 'string') { passedProps = (0, _extends3['default'])({ className: props.className, style: props.style }, props.componentProps); } return _react2['default'].createElement( Component, passedProps, children ); } return children[0] || null; } }]); return Animate; }(_react2['default'].Component); Animate.isAnimate = true; Animate.propTypes = { component: _propTypes2['default'].any, componentProps: _propTypes2['default'].object, animation: _propTypes2['default'].object, transitionName: _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].object]), transitionEnter: _propTypes2['default'].bool, transitionAppear: _propTypes2['default'].bool, exclusive: _propTypes2['default'].bool, transitionLeave: _propTypes2['default'].bool, onEnd: _propTypes2['default'].func, onEnter: _propTypes2['default'].func, onLeave: _propTypes2['default'].func, onAppear: _propTypes2['default'].func, showProp: _propTypes2['default'].string, children: _propTypes2['default'].node }; Animate.defaultProps = { animation: {}, component: 'span', componentProps: {}, transitionEnter: true, transitionLeave: true, transitionAppear: false, onEnd: noop, onEnter: noop, onLeave: noop, onAppear: noop }; var _initialiseProps = function _initialiseProps() { var _this5 = this; this.performEnter = function (key) { // may already remove by exclusive if (_this5.childrenRefs[key]) { _this5.currentlyAnimatingKeys[key] = true; _this5.childrenRefs[key].componentWillEnter(_this5.handleDoneAdding.bind(_this5, key, 'enter')); } }; this.performAppear = function (key) { if (_this5.childrenRefs[key]) { _this5.currentlyAnimatingKeys[key] = true; _this5.childrenRefs[key].componentWillAppear(_this5.handleDoneAdding.bind(_this5, key, 'appear')); } }; this.handleDoneAdding = function (key, type) { var props = _this5.props; delete _this5.currentlyAnimatingKeys[key]; // if update on exclusive mode, skip check if (props.exclusive && props !== _this5.nextProps) { return; } var currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)); if (!_this5.isValidChildByKey(currentChildren, key)) { // exclusive will not need this _this5.performLeave(key); } else if (type === 'appear') { if (_animate2['default'].allowAppearCallback(props)) { props.onAppear(key); props.onEnd(key, true); } } else if (_animate2['default'].allowEnterCallback(props)) { props.onEnter(key); props.onEnd(key, true); } }; this.performLeave = function (key) { // may already remove by exclusive if (_this5.childrenRefs[key]) { _this5.currentlyAnimatingKeys[key] = true; _this5.childrenRefs[key].componentWillLeave(_this5.handleDoneLeaving.bind(_this5, key)); } }; this.handleDoneLeaving = function (key) { var props = _this5.props; delete _this5.currentlyAnimatingKeys[key]; // if update on exclusive mode, skip check if (props.exclusive && props !== _this5.nextProps) { return; } var currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)); // in case state change is too fast if (_this5.isValidChildByKey(currentChildren, key)) { _this5.performEnter(key); } else { var end = function end() { if (_animate2['default'].allowLeaveCallback(props)) { props.onLeave(key); props.onEnd(key, false); } }; if (!(0, _ChildrenUtils.isSameChildren)(_this5.state.children, currentChildren, props.showProp)) { _this5.setState({ children: currentChildren }, end); } else { end(); } } }; }; exports['default'] = Animate; module.exports = exports['default']; /***/ }), /* 594 */ /*!********************************************!*\ !*** ../~/rc-animate/lib/ChildrenUtils.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.toArrayChildren = toArrayChildren; exports.findChildInChildrenByKey = findChildInChildrenByKey; exports.findShownChildInChildrenByKey = findShownChildInChildrenByKey; exports.findHiddenChildInChildrenByKey = findHiddenChildInChildrenByKey; exports.isSameChildren = isSameChildren; exports.mergeChildren = mergeChildren; var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function toArrayChildren(children) { var ret = []; _react2['default'].Children.forEach(children, function (child) { ret.push(child); }); return ret; } function findChildInChildrenByKey(children, key) { var ret = null; if (children) { children.forEach(function (child) { if (ret) { return; } if (child && child.key === key) { ret = child; } }); } return ret; } function findShownChildInChildrenByKey(children, key, showProp) { var ret = null; if (children) { children.forEach(function (child) { if (child && child.key === key && child.props[showProp]) { if (ret) { throw new Error('two child with same key for children'); } ret = child; } }); } return ret; } function findHiddenChildInChildrenByKey(children, key, showProp) { var found = 0; if (children) { children.forEach(function (child) { if (found) { return; } found = child && child.key === key && !child.props[showProp]; }); } return found; } function isSameChildren(c1, c2, showProp) { var same = c1.length === c2.length; if (same) { c1.forEach(function (child, index) { var child2 = c2[index]; if (child && child2) { if (child && !child2 || !child && child2) { same = false; } else if (child.key !== child2.key) { same = false; } else if (showProp && child.props[showProp] !== child2.props[showProp]) { same = false; } } }); } return same; } function mergeChildren(prev, next) { var ret = []; // For each key of `next`, the list of keys to insert before that key in // the combined list var nextChildrenPending = {}; var pendingChildren = []; prev.forEach(function (child) { if (child && findChildInChildrenByKey(next, child.key)) { if (pendingChildren.length) { nextChildrenPending[child.key] = pendingChildren; pendingChildren = []; } } else { pendingChildren.push(child); } }); next.forEach(function (child) { if (child && Object.prototype.hasOwnProperty.call(nextChildrenPending, child.key)) { ret = ret.concat(nextChildrenPending[child.key]); } ret.push(child); }); ret = ret.concat(pendingChildren); return ret; } /***/ }), /* 595 */ /*!*******************************************!*\ !*** ../~/rc-animate/lib/AnimateChild.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ 486); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(/*! react-dom */ 549); var _reactDom2 = _interopRequireDefault(_reactDom); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _cssAnimation = __webpack_require__(/*! css-animation */ 596); var _cssAnimation2 = _interopRequireDefault(_cssAnimation); var _animate = __webpack_require__(/*! ./util/animate */ 600); var _animate2 = _interopRequireDefault(_animate); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var transitionMap = { enter: 'transitionEnter', appear: 'transitionAppear', leave: 'transitionLeave' }; var AnimateChild = function (_React$Component) { (0, _inherits3['default'])(AnimateChild, _React$Component); function AnimateChild() { (0, _classCallCheck3['default'])(this, AnimateChild); return (0, _possibleConstructorReturn3['default'])(this, (AnimateChild.__proto__ || Object.getPrototypeOf(AnimateChild)).apply(this, arguments)); } (0, _createClass3['default'])(AnimateChild, [{ key: 'componentWillUnmount', value: function componentWillUnmount() { this.stop(); } }, { key: 'componentWillEnter', value: function componentWillEnter(done) { if (_animate2['default'].isEnterSupported(this.props)) { this.transition('enter', done); } else { done(); } } }, { key: 'componentWillAppear', value: function componentWillAppear(done) { if (_animate2['default'].isAppearSupported(this.props)) { this.transition('appear', done); } else { done(); } } }, { key: 'componentWillLeave', value: function componentWillLeave(done) { if (_animate2['default'].isLeaveSupported(this.props)) { this.transition('leave', done); } else { // always sync, do not interupt with react component life cycle // update hidden -> animate hidden -> // didUpdate -> animate leave -> unmount (if animate is none) done(); } } }, { key: 'transition', value: function transition(animationType, finishCallback) { var _this2 = this; var node = _reactDom2['default'].findDOMNode(this); var props = this.props; var transitionName = props.transitionName; var nameIsObj = typeof transitionName === 'object'; this.stop(); var end = function end() { _this2.stopper = null; finishCallback(); }; if ((_cssAnimation.isCssAnimationSupported || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) { var name = nameIsObj ? transitionName[animationType] : transitionName + '-' + animationType; var activeName = name + '-active'; if (nameIsObj && transitionName[animationType + 'Active']) { activeName = transitionName[animationType + 'Active']; } this.stopper = (0, _cssAnimation2['default'])(node, { name: name, active: activeName }, end); } else { this.stopper = props.animation[animationType](node, end); } } }, { key: 'stop', value: function stop() { var stopper = this.stopper; if (stopper) { this.stopper = null; stopper.stop(); } } }, { key: 'render', value: function render() { return this.props.children; } }]); return AnimateChild; }(_react2['default'].Component); AnimateChild.propTypes = { children: _propTypes2['default'].any }; exports['default'] = AnimateChild; module.exports = exports['default']; /***/ }), /* 596 */ /*!***************************************!*\ !*** ../~/css-animation/lib/index.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.isCssAnimationSupported = undefined; var _typeof2 = __webpack_require__(/*! babel-runtime/helpers/typeof */ 491); var _typeof3 = _interopRequireDefault(_typeof2); var _Event = __webpack_require__(/*! ./Event */ 597); var _Event2 = _interopRequireDefault(_Event); var _componentClasses = __webpack_require__(/*! component-classes */ 598); var _componentClasses2 = _interopRequireDefault(_componentClasses); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var isCssAnimationSupported = _Event2['default'].endEvents.length !== 0; var capitalPrefixes = ['Webkit', 'Moz', 'O', // ms is special .... ! 'ms']; var prefixes = ['-webkit-', '-moz-', '-o-', 'ms-', '']; function getStyleProperty(node, name) { // old ff need null, https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle var style = window.getComputedStyle(node, null); var ret = ''; for (var i = 0; i < prefixes.length; i++) { ret = style.getPropertyValue(prefixes[i] + name); if (ret) { break; } } return ret; } function fixBrowserByTimeout(node) { if (isCssAnimationSupported) { var transitionDelay = parseFloat(getStyleProperty(node, 'transition-delay')) || 0; var transitionDuration = parseFloat(getStyleProperty(node, 'transition-duration')) || 0; var animationDelay = parseFloat(getStyleProperty(node, 'animation-delay')) || 0; var animationDuration = parseFloat(getStyleProperty(node, 'animation-duration')) || 0; var time = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay); // sometimes, browser bug node.rcEndAnimTimeout = setTimeout(function () { node.rcEndAnimTimeout = null; if (node.rcEndListener) { node.rcEndListener(); } }, time * 1000 + 200); } } function clearBrowserBugTimeout(node) { if (node.rcEndAnimTimeout) { clearTimeout(node.rcEndAnimTimeout); node.rcEndAnimTimeout = null; } } var cssAnimation = function cssAnimation(node, transitionName, endCallback) { var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : (0, _typeof3['default'])(transitionName)) === 'object'; var className = nameIsObj ? transitionName.name : transitionName; var activeClassName = nameIsObj ? transitionName.active : transitionName + '-active'; var end = endCallback; var start = void 0; var active = void 0; var nodeClasses = (0, _componentClasses2['default'])(node); if (endCallback && Object.prototype.toString.call(endCallback) === '[object Object]') { end = endCallback.end; start = endCallback.start; active = endCallback.active; } if (node.rcEndListener) { node.rcEndListener(); } node.rcEndListener = function (e) { if (e && e.target !== node) { return; } if (node.rcAnimTimeout) { clearTimeout(node.rcAnimTimeout); node.rcAnimTimeout = null; } clearBrowserBugTimeout(node); nodeClasses.remove(className); nodeClasses.remove(activeClassName); _Event2['default'].removeEndEventListener(node, node.rcEndListener); node.rcEndListener = null; // Usually this optional end is used for informing an owner of // a leave animation and telling it to remove the child. if (end) { end(); } }; _Event2['default'].addEndEventListener(node, node.rcEndListener); if (start) { start(); } nodeClasses.add(className); node.rcAnimTimeout = setTimeout(function () { node.rcAnimTimeout = null; nodeClasses.add(activeClassName); if (active) { setTimeout(active, 0); } fixBrowserByTimeout(node); // 30ms for firefox }, 30); return { stop: function stop() { if (node.rcEndListener) { node.rcEndListener(); } } }; }; cssAnimation.style = function (node, style, callback) { if (node.rcEndListener) { node.rcEndListener(); } node.rcEndListener = function (e) { if (e && e.target !== node) { return; } if (node.rcAnimTimeout) { clearTimeout(node.rcAnimTimeout); node.rcAnimTimeout = null; } clearBrowserBugTimeout(node); _Event2['default'].removeEndEventListener(node, node.rcEndListener); node.rcEndListener = null; // Usually this optional callback is used for informing an owner of // a leave animation and telling it to remove the child. if (callback) { callback(); } }; _Event2['default'].addEndEventListener(node, node.rcEndListener); node.rcAnimTimeout = setTimeout(function () { for (var s in style) { if (style.hasOwnProperty(s)) { node.style[s] = style[s]; } } node.rcAnimTimeout = null; fixBrowserByTimeout(node); }, 0); }; cssAnimation.setTransition = function (node, p, value) { var property = p; var v = value; if (value === undefined) { v = property; property = ''; } property = property || ''; capitalPrefixes.forEach(function (prefix) { node.style[prefix + 'Transition' + property] = v; }); }; cssAnimation.isCssAnimationSupported = isCssAnimationSupported; exports.isCssAnimationSupported = isCssAnimationSupported; exports['default'] = cssAnimation; /***/ }), /* 597 */ /*!***************************************!*\ !*** ../~/css-animation/lib/Event.js ***! \***************************************/ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var START_EVENT_NAME_MAP = { transitionstart: { transition: 'transitionstart', WebkitTransition: 'webkitTransitionStart', MozTransition: 'mozTransitionStart', OTransition: 'oTransitionStart', msTransition: 'MSTransitionStart' }, animationstart: { animation: 'animationstart', WebkitAnimation: 'webkitAnimationStart', MozAnimation: 'mozAnimationStart', OAnimation: 'oAnimationStart', msAnimation: 'MSAnimationStart' } }; var END_EVENT_NAME_MAP = { transitionend: { transition: 'transitionend', WebkitTransition: 'webkitTransitionEnd', MozTransition: 'mozTransitionEnd', OTransition: 'oTransitionEnd', msTransition: 'MSTransitionEnd' }, animationend: { animation: 'animationend', WebkitAnimation: 'webkitAnimationEnd', MozAnimation: 'mozAnimationEnd', OAnimation: 'oAnimationEnd', msAnimation: 'MSAnimationEnd' } }; var startEvents = []; var endEvents = []; function detectEvents() { var testEl = document.createElement('div'); var style = testEl.style; if (!('AnimationEvent' in window)) { delete START_EVENT_NAME_MAP.animationstart.animation; delete END_EVENT_NAME_MAP.animationend.animation; } if (!('TransitionEvent' in window)) { delete START_EVENT_NAME_MAP.transitionstart.transition; delete END_EVENT_NAME_MAP.transitionend.transition; } function process(EVENT_NAME_MAP, events) { for (var baseEventName in EVENT_NAME_MAP) { if (EVENT_NAME_MAP.hasOwnProperty(baseEventName)) { var baseEvents = EVENT_NAME_MAP[baseEventName]; for (var styleName in baseEvents) { if (styleName in style) { events.push(baseEvents[styleName]); break; } } } } } process(START_EVENT_NAME_MAP, startEvents); process(END_EVENT_NAME_MAP, endEvents); } if (typeof window !== 'undefined' && typeof document !== 'undefined') { detectEvents(); } function addEventListener(node, eventName, eventListener) { node.addEventListener(eventName, eventListener, false); } function removeEventListener(node, eventName, eventListener) { node.removeEventListener(eventName, eventListener, false); } var TransitionEvents = { // Start events startEvents: startEvents, addStartEventListener: function addStartEventListener(node, eventListener) { if (startEvents.length === 0) { window.setTimeout(eventListener, 0); return; } startEvents.forEach(function (startEvent) { addEventListener(node, startEvent, eventListener); }); }, removeStartEventListener: function removeStartEventListener(node, eventListener) { if (startEvents.length === 0) { return; } startEvents.forEach(function (startEvent) { removeEventListener(node, startEvent, eventListener); }); }, // End events endEvents: endEvents, addEndEventListener: function addEndEventListener(node, eventListener) { if (endEvents.length === 0) { window.setTimeout(eventListener, 0); return; } endEvents.forEach(function (endEvent) { addEventListener(node, endEvent, eventListener); }); }, removeEndEventListener: function removeEndEventListener(node, eventListener) { if (endEvents.length === 0) { return; } endEvents.forEach(function (endEvent) { removeEventListener(node, endEvent, eventListener); }); } }; exports['default'] = TransitionEvents; module.exports = exports['default']; /***/ }), /* 598 */ /*!***************************************!*\ !*** ../~/component-classes/index.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { /** * Module dependencies. */ try { var index = __webpack_require__(/*! indexof */ 599); } catch (err) { var index = __webpack_require__(/*! component-indexof */ 599); } /** * Whitespace regexp. */ var re = /\s+/; /** * toString reference. */ var toString = Object.prototype.toString; /** * Wrap `el` in a `ClassList`. * * @param {Element} el * @return {ClassList} * @api public */ module.exports = function(el){ return new ClassList(el); }; /** * Initialize a new ClassList for `el`. * * @param {Element} el * @api private */ function ClassList(el) { if (!el || !el.nodeType) { throw new Error('A DOM element reference is required'); } this.el = el; this.list = el.classList; } /** * Add class `name` if not already present. * * @param {String} name * @return {ClassList} * @api public */ ClassList.prototype.add = function(name){ // classList if (this.list) { this.list.add(name); return this; } // fallback var arr = this.array(); var i = index(arr, name); if (!~i) arr.push(name); this.el.className = arr.join(' '); return this; }; /** * Remove class `name` when present, or * pass a regular expression to remove * any which match. * * @param {String|RegExp} name * @return {ClassList} * @api public */ ClassList.prototype.remove = function(name){ if ('[object RegExp]' == toString.call(name)) { return this.removeMatching(name); } // classList if (this.list) { this.list.remove(name); return this; } // fallback var arr = this.array(); var i = index(arr, name); if (~i) arr.splice(i, 1); this.el.className = arr.join(' '); return this; }; /** * Remove all classes matching `re`. * * @param {RegExp} re * @return {ClassList} * @api private */ ClassList.prototype.removeMatching = function(re){ var arr = this.array(); for (var i = 0; i < arr.length; i++) { if (re.test(arr[i])) { this.remove(arr[i]); } } return this; }; /** * Toggle class `name`, can force state via `force`. * * For browsers that support classList, but do not support `force` yet, * the mistake will be detected and corrected. * * @param {String} name * @param {Boolean} force * @return {ClassList} * @api public */ ClassList.prototype.toggle = function(name, force){ // classList if (this.list) { if ("undefined" !== typeof force) { if (force !== this.list.toggle(name, force)) { this.list.toggle(name); // toggle again to correct } } else { this.list.toggle(name); } return this; } // fallback if ("undefined" !== typeof force) { if (!force) { this.remove(name); } else { this.add(name); } } else { if (this.has(name)) { this.remove(name); } else { this.add(name); } } return this; }; /** * Return an array of classes. * * @return {Array} * @api public */ ClassList.prototype.array = function(){ var className = this.el.getAttribute('class') || ''; var str = className.replace(/^\s+|\s+$/g, ''); var arr = str.split(re); if ('' === arr[0]) arr.shift(); return arr; }; /** * Check if class `name` is present. * * @param {String} name * @return {ClassList} * @api public */ ClassList.prototype.has = ClassList.prototype.contains = function(name){ return this.list ? this.list.contains(name) : !! ~index(this.array(), name); }; /***/ }), /* 599 */ /*!***************************************!*\ !*** ../~/component-indexof/index.js ***! \***************************************/ /***/ (function(module, exports) { module.exports = function(arr, obj){ if (arr.indexOf) return arr.indexOf(obj); for (var i = 0; i < arr.length; ++i) { if (arr[i] === obj) return i; } return -1; }; /***/ }), /* 600 */ /*!*******************************************!*\ !*** ../~/rc-animate/lib/util/animate.js ***! \*******************************************/ /***/ (function(module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util = { isAppearSupported: function isAppearSupported(props) { return props.transitionName && props.transitionAppear || props.animation.appear; }, isEnterSupported: function isEnterSupported(props) { return props.transitionName && props.transitionEnter || props.animation.enter; }, isLeaveSupported: function isLeaveSupported(props) { return props.transitionName && props.transitionLeave || props.animation.leave; }, allowAppearCallback: function allowAppearCallback(props) { return props.transitionAppear || props.animation.appear; }, allowEnterCallback: function allowEnterCallback(props) { return props.transitionEnter || props.animation.enter; }, allowLeaveCallback: function allowLeaveCallback(props) { return props.transitionLeave || props.animation.leave; } }; exports["default"] = util; module.exports = exports['default']; /***/ }), /* 601 */ /*!*****************************************!*\ !*** ../~/rc-trigger/lib/PopupInner.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); var _LazyRenderBox = __webpack_require__(/*! ./LazyRenderBox */ 602); var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var PopupInner = function (_Component) { (0, _inherits3['default'])(PopupInner, _Component); function PopupInner() { (0, _classCallCheck3['default'])(this, PopupInner); return (0, _possibleConstructorReturn3['default'])(this, _Component.apply(this, arguments)); } PopupInner.prototype.render = function render() { var props = this.props; var className = props.className; if (!props.visible) { className += ' ' + props.hiddenClassName; } return _react2['default'].createElement( 'div', { className: className, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, onMouseDown: props.onMouseDown, onTouchStart: props.onTouchStart, style: props.style }, _react2['default'].createElement( _LazyRenderBox2['default'], { className: props.prefixCls + '-content', visible: props.visible }, props.children ) ); }; return PopupInner; }(_react.Component); PopupInner.propTypes = { hiddenClassName: _propTypes2['default'].string, className: _propTypes2['default'].string, prefixCls: _propTypes2['default'].string, onMouseEnter: _propTypes2['default'].func, onMouseLeave: _propTypes2['default'].func, onMouseDown: _propTypes2['default'].func, onTouchStart: _propTypes2['default'].func, children: _propTypes2['default'].any }; exports['default'] = PopupInner; module.exports = exports['default']; /***/ }), /* 602 */ /*!********************************************!*\ !*** ../~/rc-trigger/lib/LazyRenderBox.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _objectWithoutProperties2 = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 535); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var LazyRenderBox = function (_Component) { (0, _inherits3['default'])(LazyRenderBox, _Component); function LazyRenderBox() { (0, _classCallCheck3['default'])(this, LazyRenderBox); return (0, _possibleConstructorReturn3['default'])(this, _Component.apply(this, arguments)); } LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { return nextProps.hiddenClassName || nextProps.visible; }; LazyRenderBox.prototype.render = function render() { var _props = this.props, hiddenClassName = _props.hiddenClassName, visible = _props.visible, props = (0, _objectWithoutProperties3['default'])(_props, ['hiddenClassName', 'visible']); if (hiddenClassName || _react2['default'].Children.count(props.children) > 1) { if (!visible && hiddenClassName) { props.className += ' ' + hiddenClassName; } return _react2['default'].createElement('div', props); } return _react2['default'].Children.only(props.children); }; return LazyRenderBox; }(_react.Component); LazyRenderBox.propTypes = { children: _propTypes2['default'].any, className: _propTypes2['default'].string, visible: _propTypes2['default'].bool, hiddenClassName: _propTypes2['default'].string }; exports['default'] = LazyRenderBox; module.exports = exports['default']; /***/ }), /* 603 */ /*!*****************************************!*\ !*** ../~/rc-tooltip/lib/placements.js ***! \*****************************************/ /***/ (function(module, exports) { 'use strict'; exports.__esModule = true; var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var targetOffset = [0, 0]; var placements = exports.placements = { left: { points: ['cr', 'cl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset }, right: { points: ['cl', 'cr'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, top: { points: ['bc', 'tc'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, bottom: { points: ['tc', 'bc'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, leftTop: { points: ['tr', 'tl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset }, topRight: { points: ['br', 'tr'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, rightTop: { points: ['tl', 'tr'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, bottomRight: { points: ['tr', 'br'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, rightBottom: { points: ['bl', 'br'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, leftBottom: { points: ['br', 'bl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset } }; exports['default'] = placements; /***/ }), /* 604 */ /*!**************************************!*\ !*** ../~/rc-tooltip/lib/Content.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 485); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 490); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 524); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(/*! react */ 2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ 3); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var Content = function (_React$Component) { (0, _inherits3['default'])(Content, _React$Component); function Content() { (0, _classCallCheck3['default'])(this, Content); return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); } Content.prototype.componentDidUpdate = function componentDidUpdate() { var trigger = this.props.trigger; if (trigger) { trigger.forcePopupAlign(); } }; Content.prototype.render = function render() { var _props = this.props, overlay = _props.overlay, prefixCls = _props.prefixCls, id = _props.id; return _react2['default'].createElement( 'div', { className: prefixCls + '-inner', id: id, role: 'tooltip' }, typeof overlay === 'function' ? overlay() : overlay ); }; return Content; }(_react2['default'].Component); Content.propTypes = { prefixCls: _propTypes2['default'].string, overlay: _propTypes2['default'].oneOfType([_propTypes2['default'].node, _propTypes2['default'].func]).isRequired, id: _propTypes2['default'].string, trigger: _propTypes2['default'].any }; exports['default'] = Content; module.exports = exports['default']; /***/ }), /* 605 */ /*!*******************************!*\ !*** ../~/ramda/src/index.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { module.exports = {}; module.exports.F = /*#__PURE__*/__webpack_require__(/*! ./F */ 606); module.exports.T = /*#__PURE__*/__webpack_require__(/*! ./T */ 610); module.exports.__ = /*#__PURE__*/__webpack_require__(/*! ./__ */ 611); module.exports.add = /*#__PURE__*/__webpack_require__(/*! ./add */ 612); module.exports.addIndex = /*#__PURE__*/__webpack_require__(/*! ./addIndex */ 614); module.exports.adjust = /*#__PURE__*/__webpack_require__(/*! ./adjust */ 619); module.exports.all = /*#__PURE__*/__webpack_require__(/*! ./all */ 621); module.exports.allPass = /*#__PURE__*/__webpack_require__(/*! ./allPass */ 628); module.exports.always = /*#__PURE__*/__webpack_require__(/*! ./always */ 607); module.exports.and = /*#__PURE__*/__webpack_require__(/*! ./and */ 645); module.exports.any = /*#__PURE__*/__webpack_require__(/*! ./any */ 646); module.exports.anyPass = /*#__PURE__*/__webpack_require__(/*! ./anyPass */ 648); module.exports.ap = /*#__PURE__*/__webpack_require__(/*! ./ap */ 649); module.exports.aperture = /*#__PURE__*/__webpack_require__(/*! ./aperture */ 650); module.exports.append = /*#__PURE__*/__webpack_require__(/*! ./append */ 653); module.exports.apply = /*#__PURE__*/__webpack_require__(/*! ./apply */ 654); module.exports.applySpec = /*#__PURE__*/__webpack_require__(/*! ./applySpec */ 655); module.exports.applyTo = /*#__PURE__*/__webpack_require__(/*! ./applyTo */ 657); module.exports.ascend = /*#__PURE__*/__webpack_require__(/*! ./ascend */ 658); module.exports.assoc = /*#__PURE__*/__webpack_require__(/*! ./assoc */ 659); module.exports.assocPath = /*#__PURE__*/__webpack_require__(/*! ./assocPath */ 660); module.exports.binary = /*#__PURE__*/__webpack_require__(/*! ./binary */ 663); module.exports.bind = /*#__PURE__*/__webpack_require__(/*! ./bind */ 637); module.exports.both = /*#__PURE__*/__webpack_require__(/*! ./both */ 665); module.exports.call = /*#__PURE__*/__webpack_require__(/*! ./call */ 669); module.exports.chain = /*#__PURE__*/__webpack_require__(/*! ./chain */ 671); module.exports.clamp = /*#__PURE__*/__webpack_require__(/*! ./clamp */ 676); module.exports.clone = /*#__PURE__*/__webpack_require__(/*! ./clone */ 677); module.exports.comparator = /*#__PURE__*/__webpack_require__(/*! ./comparator */ 681); module.exports.complement = /*#__PURE__*/__webpack_require__(/*! ./complement */ 682); module.exports.compose = /*#__PURE__*/__webpack_require__(/*! ./compose */ 684); module.exports.composeK = /*#__PURE__*/__webpack_require__(/*! ./composeK */ 691); module.exports.composeP = /*#__PURE__*/__webpack_require__(/*! ./composeP */ 692); module.exports.concat = /*#__PURE__*/__webpack_require__(/*! ./concat */ 695); module.exports.cond = /*#__PURE__*/__webpack_require__(/*! ./cond */ 714); module.exports.construct = /*#__PURE__*/__webpack_require__(/*! ./construct */ 715); module.exports.constructN = /*#__PURE__*/__webpack_require__(/*! ./constructN */ 716); module.exports.contains = /*#__PURE__*/__webpack_require__(/*! ./contains */ 717); module.exports.converge = /*#__PURE__*/__webpack_require__(/*! ./converge */ 718); module.exports.countBy = /*#__PURE__*/__webpack_require__(/*! ./countBy */ 719); module.exports.curry = /*#__PURE__*/__webpack_require__(/*! ./curry */ 670); module.exports.curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); module.exports.dec = /*#__PURE__*/__webpack_require__(/*! ./dec */ 722); module.exports.defaultTo = /*#__PURE__*/__webpack_require__(/*! ./defaultTo */ 723); module.exports.descend = /*#__PURE__*/__webpack_require__(/*! ./descend */ 724); module.exports.difference = /*#__PURE__*/__webpack_require__(/*! ./difference */ 725); module.exports.differenceWith = /*#__PURE__*/__webpack_require__(/*! ./differenceWith */ 726); module.exports.dissoc = /*#__PURE__*/__webpack_require__(/*! ./dissoc */ 727); module.exports.dissocPath = /*#__PURE__*/__webpack_require__(/*! ./dissocPath */ 728); module.exports.divide = /*#__PURE__*/__webpack_require__(/*! ./divide */ 731); module.exports.drop = /*#__PURE__*/__webpack_require__(/*! ./drop */ 732); module.exports.dropLast = /*#__PURE__*/__webpack_require__(/*! ./dropLast */ 734); module.exports.dropLastWhile = /*#__PURE__*/__webpack_require__(/*! ./dropLastWhile */ 739); module.exports.dropRepeats = /*#__PURE__*/__webpack_require__(/*! ./dropRepeats */ 742); module.exports.dropRepeatsWith = /*#__PURE__*/__webpack_require__(/*! ./dropRepeatsWith */ 744); module.exports.dropWhile = /*#__PURE__*/__webpack_require__(/*! ./dropWhile */ 747); module.exports.either = /*#__PURE__*/__webpack_require__(/*! ./either */ 749); module.exports.empty = /*#__PURE__*/__webpack_require__(/*! ./empty */ 751); module.exports.endsWith = /*#__PURE__*/__webpack_require__(/*! ./endsWith */ 752); module.exports.eqBy = /*#__PURE__*/__webpack_require__(/*! ./eqBy */ 754); module.exports.eqProps = /*#__PURE__*/__webpack_require__(/*! ./eqProps */ 755); module.exports.equals = /*#__PURE__*/__webpack_require__(/*! ./equals */ 700); module.exports.evolve = /*#__PURE__*/__webpack_require__(/*! ./evolve */ 756); module.exports.filter = /*#__PURE__*/__webpack_require__(/*! ./filter */ 710); module.exports.find = /*#__PURE__*/__webpack_require__(/*! ./find */ 757); module.exports.findIndex = /*#__PURE__*/__webpack_require__(/*! ./findIndex */ 759); module.exports.findLast = /*#__PURE__*/__webpack_require__(/*! ./findLast */ 761); module.exports.findLastIndex = /*#__PURE__*/__webpack_require__(/*! ./findLastIndex */ 763); module.exports.flatten = /*#__PURE__*/__webpack_require__(/*! ./flatten */ 765); module.exports.flip = /*#__PURE__*/__webpack_require__(/*! ./flip */ 766); module.exports.forEach = /*#__PURE__*/__webpack_require__(/*! ./forEach */ 767); module.exports.forEachObjIndexed = /*#__PURE__*/__webpack_require__(/*! ./forEachObjIndexed */ 768); module.exports.fromPairs = /*#__PURE__*/__webpack_require__(/*! ./fromPairs */ 769); module.exports.groupBy = /*#__PURE__*/__webpack_require__(/*! ./groupBy */ 770); module.exports.groupWith = /*#__PURE__*/__webpack_require__(/*! ./groupWith */ 771); module.exports.gt = /*#__PURE__*/__webpack_require__(/*! ./gt */ 772); module.exports.gte = /*#__PURE__*/__webpack_require__(/*! ./gte */ 773); module.exports.has = /*#__PURE__*/__webpack_require__(/*! ./has */ 774); module.exports.hasIn = /*#__PURE__*/__webpack_require__(/*! ./hasIn */ 775); module.exports.head = /*#__PURE__*/__webpack_require__(/*! ./head */ 776); module.exports.identical = /*#__PURE__*/__webpack_require__(/*! ./identical */ 705); module.exports.identity = /*#__PURE__*/__webpack_require__(/*! ./identity */ 777); module.exports.ifElse = /*#__PURE__*/__webpack_require__(/*! ./ifElse */ 779); module.exports.inc = /*#__PURE__*/__webpack_require__(/*! ./inc */ 780); module.exports.indexBy = /*#__PURE__*/__webpack_require__(/*! ./indexBy */ 781); module.exports.indexOf = /*#__PURE__*/__webpack_require__(/*! ./indexOf */ 782); module.exports.init = /*#__PURE__*/__webpack_require__(/*! ./init */ 783); module.exports.innerJoin = /*#__PURE__*/__webpack_require__(/*! ./innerJoin */ 784); module.exports.insert = /*#__PURE__*/__webpack_require__(/*! ./insert */ 785); module.exports.insertAll = /*#__PURE__*/__webpack_require__(/*! ./insertAll */ 786); module.exports.intersection = /*#__PURE__*/__webpack_require__(/*! ./intersection */ 787); module.exports.intersperse = /*#__PURE__*/__webpack_require__(/*! ./intersperse */ 791); module.exports.into = /*#__PURE__*/__webpack_require__(/*! ./into */ 792); module.exports.invert = /*#__PURE__*/__webpack_require__(/*! ./invert */ 797); module.exports.invertObj = /*#__PURE__*/__webpack_require__(/*! ./invertObj */ 798); module.exports.invoker = /*#__PURE__*/__webpack_require__(/*! ./invoker */ 799); module.exports.is = /*#__PURE__*/__webpack_require__(/*! ./is */ 800); module.exports.isEmpty = /*#__PURE__*/__webpack_require__(/*! ./isEmpty */ 801); module.exports.isNil = /*#__PURE__*/__webpack_require__(/*! ./isNil */ 662); module.exports.join = /*#__PURE__*/__webpack_require__(/*! ./join */ 802); module.exports.juxt = /*#__PURE__*/__webpack_require__(/*! ./juxt */ 803); module.exports.keys = /*#__PURE__*/__webpack_require__(/*! ./keys */ 639); module.exports.keysIn = /*#__PURE__*/__webpack_require__(/*! ./keysIn */ 804); module.exports.last = /*#__PURE__*/__webpack_require__(/*! ./last */ 745); module.exports.lastIndexOf = /*#__PURE__*/__webpack_require__(/*! ./lastIndexOf */ 805); module.exports.length = /*#__PURE__*/__webpack_require__(/*! ./length */ 806); module.exports.lens = /*#__PURE__*/__webpack_require__(/*! ./lens */ 808); module.exports.lensIndex = /*#__PURE__*/__webpack_require__(/*! ./lensIndex */ 809); module.exports.lensPath = /*#__PURE__*/__webpack_require__(/*! ./lensPath */ 810); module.exports.lensProp = /*#__PURE__*/__webpack_require__(/*! ./lensProp */ 811); module.exports.lift = /*#__PURE__*/__webpack_require__(/*! ./lift */ 667); module.exports.liftN = /*#__PURE__*/__webpack_require__(/*! ./liftN */ 668); module.exports.lt = /*#__PURE__*/__webpack_require__(/*! ./lt */ 812); module.exports.lte = /*#__PURE__*/__webpack_require__(/*! ./lte */ 813); module.exports.map = /*#__PURE__*/__webpack_require__(/*! ./map */ 631); module.exports.mapAccum = /*#__PURE__*/__webpack_require__(/*! ./mapAccum */ 814); module.exports.mapAccumRight = /*#__PURE__*/__webpack_require__(/*! ./mapAccumRight */ 815); module.exports.mapObjIndexed = /*#__PURE__*/__webpack_require__(/*! ./mapObjIndexed */ 816); module.exports.match = /*#__PURE__*/__webpack_require__(/*! ./match */ 817); module.exports.mathMod = /*#__PURE__*/__webpack_require__(/*! ./mathMod */ 818); module.exports.max = /*#__PURE__*/__webpack_require__(/*! ./max */ 629); module.exports.maxBy = /*#__PURE__*/__webpack_require__(/*! ./maxBy */ 819); module.exports.mean = /*#__PURE__*/__webpack_require__(/*! ./mean */ 820); module.exports.median = /*#__PURE__*/__webpack_require__(/*! ./median */ 822); module.exports.memoize = /*#__PURE__*/__webpack_require__(/*! ./memoize */ 823); module.exports.memoizeWith = /*#__PURE__*/__webpack_require__(/*! ./memoizeWith */ 824); module.exports.merge = /*#__PURE__*/__webpack_require__(/*! ./merge */ 825); module.exports.mergeAll = /*#__PURE__*/__webpack_require__(/*! ./mergeAll */ 826); module.exports.mergeDeepLeft = /*#__PURE__*/__webpack_require__(/*! ./mergeDeepLeft */ 827); module.exports.mergeDeepRight = /*#__PURE__*/__webpack_require__(/*! ./mergeDeepRight */ 830); module.exports.mergeDeepWith = /*#__PURE__*/__webpack_require__(/*! ./mergeDeepWith */ 831); module.exports.mergeDeepWithKey = /*#__PURE__*/__webpack_require__(/*! ./mergeDeepWithKey */ 828); module.exports.mergeWith = /*#__PURE__*/__webpack_require__(/*! ./mergeWith */ 832); module.exports.mergeWithKey = /*#__PURE__*/__webpack_require__(/*! ./mergeWithKey */ 829); module.exports.min = /*#__PURE__*/__webpack_require__(/*! ./min */ 833); module.exports.minBy = /*#__PURE__*/__webpack_require__(/*! ./minBy */ 834); module.exports.modulo = /*#__PURE__*/__webpack_require__(/*! ./modulo */ 835); module.exports.multiply = /*#__PURE__*/__webpack_require__(/*! ./multiply */ 836); module.exports.nAry = /*#__PURE__*/__webpack_require__(/*! ./nAry */ 664); module.exports.negate = /*#__PURE__*/__webpack_require__(/*! ./negate */ 837); module.exports.none = /*#__PURE__*/__webpack_require__(/*! ./none */ 838); module.exports.not = /*#__PURE__*/__webpack_require__(/*! ./not */ 683); module.exports.nth = /*#__PURE__*/__webpack_require__(/*! ./nth */ 746); module.exports.nthArg = /*#__PURE__*/__webpack_require__(/*! ./nthArg */ 839); module.exports.o = /*#__PURE__*/__webpack_require__(/*! ./o */ 840); module.exports.objOf = /*#__PURE__*/__webpack_require__(/*! ./objOf */ 796); module.exports.of = /*#__PURE__*/__webpack_require__(/*! ./of */ 841); module.exports.omit = /*#__PURE__*/__webpack_require__(/*! ./omit */ 843); module.exports.once = /*#__PURE__*/__webpack_require__(/*! ./once */ 844); module.exports.or = /*#__PURE__*/__webpack_require__(/*! ./or */ 750); module.exports.over = /*#__PURE__*/__webpack_require__(/*! ./over */ 845); module.exports.pair = /*#__PURE__*/__webpack_require__(/*! ./pair */ 846); module.exports.partial = /*#__PURE__*/__webpack_require__(/*! ./partial */ 847); module.exports.partialRight = /*#__PURE__*/__webpack_require__(/*! ./partialRight */ 849); module.exports.partition = /*#__PURE__*/__webpack_require__(/*! ./partition */ 850); module.exports.path = /*#__PURE__*/__webpack_require__(/*! ./path */ 643); module.exports.pathEq = /*#__PURE__*/__webpack_require__(/*! ./pathEq */ 851); module.exports.pathOr = /*#__PURE__*/__webpack_require__(/*! ./pathOr */ 852); module.exports.pathSatisfies = /*#__PURE__*/__webpack_require__(/*! ./pathSatisfies */ 853); module.exports.pick = /*#__PURE__*/__webpack_require__(/*! ./pick */ 854); module.exports.pickAll = /*#__PURE__*/__webpack_require__(/*! ./pickAll */ 855); module.exports.pickBy = /*#__PURE__*/__webpack_require__(/*! ./pickBy */ 856); module.exports.pipe = /*#__PURE__*/__webpack_require__(/*! ./pipe */ 685); module.exports.pipeK = /*#__PURE__*/__webpack_require__(/*! ./pipeK */ 857); module.exports.pipeP = /*#__PURE__*/__webpack_require__(/*! ./pipeP */ 693); module.exports.pluck = /*#__PURE__*/__webpack_require__(/*! ./pluck */ 630); module.exports.prepend = /*#__PURE__*/__webpack_require__(/*! ./prepend */ 858); module.exports.product = /*#__PURE__*/__webpack_require__(/*! ./product */ 859); module.exports.project = /*#__PURE__*/__webpack_require__(/*! ./project */ 860); module.exports.prop = /*#__PURE__*/__webpack_require__(/*! ./prop */ 642); module.exports.propEq = /*#__PURE__*/__webpack_require__(/*! ./propEq */ 862); module.exports.propIs = /*#__PURE__*/__webpack_require__(/*! ./propIs */ 863); module.exports.propOr = /*#__PURE__*/__webpack_require__(/*! ./propOr */ 864); module.exports.propSatisfies = /*#__PURE__*/__webpack_require__(/*! ./propSatisfies */ 865); module.exports.props = /*#__PURE__*/__webpack_require__(/*! ./props */ 866); module.exports.range = /*#__PURE__*/__webpack_require__(/*! ./range */ 867); module.exports.reduce = /*#__PURE__*/__webpack_require__(/*! ./reduce */ 644); module.exports.reduceBy = /*#__PURE__*/__webpack_require__(/*! ./reduceBy */ 720); module.exports.reduceRight = /*#__PURE__*/__webpack_require__(/*! ./reduceRight */ 868); module.exports.reduceWhile = /*#__PURE__*/__webpack_require__(/*! ./reduceWhile */ 869); module.exports.reduced = /*#__PURE__*/__webpack_require__(/*! ./reduced */ 870); module.exports.reject = /*#__PURE__*/__webpack_require__(/*! ./reject */ 708); module.exports.remove = /*#__PURE__*/__webpack_require__(/*! ./remove */ 729); module.exports.repeat = /*#__PURE__*/__webpack_require__(/*! ./repeat */ 871); module.exports.replace = /*#__PURE__*/__webpack_require__(/*! ./replace */ 873); module.exports.reverse = /*#__PURE__*/__webpack_require__(/*! ./reverse */ 690); module.exports.scan = /*#__PURE__*/__webpack_require__(/*! ./scan */ 874); module.exports.sequence = /*#__PURE__*/__webpack_require__(/*! ./sequence */ 875); module.exports.set = /*#__PURE__*/__webpack_require__(/*! ./set */ 876); module.exports.slice = /*#__PURE__*/__webpack_require__(/*! ./slice */ 689); module.exports.sort = /*#__PURE__*/__webpack_require__(/*! ./sort */ 877); module.exports.sortBy = /*#__PURE__*/__webpack_require__(/*! ./sortBy */ 878); module.exports.sortWith = /*#__PURE__*/__webpack_require__(/*! ./sortWith */ 879); module.exports.split = /*#__PURE__*/__webpack_require__(/*! ./split */ 880); module.exports.splitAt = /*#__PURE__*/__webpack_require__(/*! ./splitAt */ 881); module.exports.splitEvery = /*#__PURE__*/__webpack_require__(/*! ./splitEvery */ 882); module.exports.splitWhen = /*#__PURE__*/__webpack_require__(/*! ./splitWhen */ 883); module.exports.startsWith = /*#__PURE__*/__webpack_require__(/*! ./startsWith */ 884); module.exports.subtract = /*#__PURE__*/__webpack_require__(/*! ./subtract */ 885); module.exports.sum = /*#__PURE__*/__webpack_require__(/*! ./sum */ 821); module.exports.symmetricDifference = /*#__PURE__*/__webpack_require__(/*! ./symmetricDifference */ 886); module.exports.symmetricDifferenceWith = /*#__PURE__*/__webpack_require__(/*! ./symmetricDifferenceWith */ 887); module.exports.tail = /*#__PURE__*/__webpack_require__(/*! ./tail */ 687); module.exports.take = /*#__PURE__*/__webpack_require__(/*! ./take */ 736); module.exports.takeLast = /*#__PURE__*/__webpack_require__(/*! ./takeLast */ 753); module.exports.takeLastWhile = /*#__PURE__*/__webpack_require__(/*! ./takeLastWhile */ 888); module.exports.takeWhile = /*#__PURE__*/__webpack_require__(/*! ./takeWhile */ 889); module.exports.tap = /*#__PURE__*/__webpack_require__(/*! ./tap */ 891); module.exports.test = /*#__PURE__*/__webpack_require__(/*! ./test */ 893); module.exports.times = /*#__PURE__*/__webpack_require__(/*! ./times */ 872); module.exports.toLower = /*#__PURE__*/__webpack_require__(/*! ./toLower */ 895); module.exports.toPairs = /*#__PURE__*/__webpack_require__(/*! ./toPairs */ 896); module.exports.toPairsIn = /*#__PURE__*/__webpack_require__(/*! ./toPairsIn */ 897); module.exports.toString = /*#__PURE__*/__webpack_require__(/*! ./toString */ 696); module.exports.toUpper = /*#__PURE__*/__webpack_require__(/*! ./toUpper */ 898); module.exports.transduce = /*#__PURE__*/__webpack_require__(/*! ./transduce */ 899); module.exports.transpose = /*#__PURE__*/__webpack_require__(/*! ./transpose */ 900); module.exports.traverse = /*#__PURE__*/__webpack_require__(/*! ./traverse */ 901); module.exports.trim = /*#__PURE__*/__webpack_require__(/*! ./trim */ 902); module.exports.tryCatch = /*#__PURE__*/__webpack_require__(/*! ./tryCatch */ 903); module.exports.type = /*#__PURE__*/__webpack_require__(/*! ./type */ 680); module.exports.unapply = /*#__PURE__*/__webpack_require__(/*! ./unapply */ 904); module.exports.unary = /*#__PURE__*/__webpack_require__(/*! ./unary */ 905); module.exports.uncurryN = /*#__PURE__*/__webpack_require__(/*! ./uncurryN */ 906); module.exports.unfold = /*#__PURE__*/__webpack_require__(/*! ./unfold */ 907); module.exports.union = /*#__PURE__*/__webpack_require__(/*! ./union */ 908); module.exports.unionWith = /*#__PURE__*/__webpack_require__(/*! ./unionWith */ 909); module.exports.uniq = /*#__PURE__*/__webpack_require__(/*! ./uniq */ 788); module.exports.uniqBy = /*#__PURE__*/__webpack_require__(/*! ./uniqBy */ 789); module.exports.uniqWith = /*#__PURE__*/__webpack_require__(/*! ./uniqWith */ 910); module.exports.unless = /*#__PURE__*/__webpack_require__(/*! ./unless */ 911); module.exports.unnest = /*#__PURE__*/__webpack_require__(/*! ./unnest */ 912); module.exports.until = /*#__PURE__*/__webpack_require__(/*! ./until */ 913); module.exports.update = /*#__PURE__*/__webpack_require__(/*! ./update */ 730); module.exports.useWith = /*#__PURE__*/__webpack_require__(/*! ./useWith */ 861); module.exports.values = /*#__PURE__*/__webpack_require__(/*! ./values */ 656); module.exports.valuesIn = /*#__PURE__*/__webpack_require__(/*! ./valuesIn */ 914); module.exports.view = /*#__PURE__*/__webpack_require__(/*! ./view */ 915); module.exports.when = /*#__PURE__*/__webpack_require__(/*! ./when */ 916); module.exports.where = /*#__PURE__*/__webpack_require__(/*! ./where */ 917); module.exports.whereEq = /*#__PURE__*/__webpack_require__(/*! ./whereEq */ 918); module.exports.without = /*#__PURE__*/__webpack_require__(/*! ./without */ 919); module.exports.xprod = /*#__PURE__*/__webpack_require__(/*! ./xprod */ 920); module.exports.zip = /*#__PURE__*/__webpack_require__(/*! ./zip */ 921); module.exports.zipObj = /*#__PURE__*/__webpack_require__(/*! ./zipObj */ 922); module.exports.zipWith = /*#__PURE__*/__webpack_require__(/*! ./zipWith */ 923); /***/ }), /* 606 */ /*!***************************!*\ !*** ../~/ramda/src/F.js ***! \***************************/ /***/ (function(module, exports, __webpack_require__) { var always = /*#__PURE__*/__webpack_require__(/*! ./always */ 607); /** * A function that always returns `false`. Any passed in parameters are ignored. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig * -> Boolean * @param {*} * @return {Boolean} * @see R.always, R.T * @example * * R.F(); //=> false */ var F = /*#__PURE__*/always(false); module.exports = F; /***/ }), /* 607 */ /*!********************************!*\ !*** ../~/ramda/src/always.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Returns a function that always returns the given value. Note that for * non-primitives the value returned is a reference to the original value. * * This function is known as `const`, `constant`, or `K` (for K combinator) in * other languages and libraries. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig a -> (* -> a) * @param {*} val The value to wrap in a function * @return {Function} A Function :: * -> val. * @example * * var t = R.always('Tee'); * t(); //=> 'Tee' */ var always = /*#__PURE__*/_curry1(function always(val) { return function () { return val; }; }); module.exports = always; /***/ }), /* 608 */ /*!******************************************!*\ !*** ../~/ramda/src/internal/_curry1.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var _isPlaceholder = /*#__PURE__*/__webpack_require__(/*! ./_isPlaceholder */ 609); /** * Optimized internal one-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry1(fn) { return function f1(a) { if (arguments.length === 0 || _isPlaceholder(a)) { return f1; } else { return fn.apply(this, arguments); } }; } module.exports = _curry1; /***/ }), /* 609 */ /*!*************************************************!*\ !*** ../~/ramda/src/internal/_isPlaceholder.js ***! \*************************************************/ /***/ (function(module, exports) { function _isPlaceholder(a) { return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true; } module.exports = _isPlaceholder; /***/ }), /* 610 */ /*!***************************!*\ !*** ../~/ramda/src/T.js ***! \***************************/ /***/ (function(module, exports, __webpack_require__) { var always = /*#__PURE__*/__webpack_require__(/*! ./always */ 607); /** * A function that always returns `true`. Any passed in parameters are ignored. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig * -> Boolean * @param {*} * @return {Boolean} * @see R.always, R.F * @example * * R.T(); //=> true */ var T = /*#__PURE__*/always(true); module.exports = T; /***/ }), /* 611 */ /*!****************************!*\ !*** ../~/ramda/src/__.js ***! \****************************/ /***/ (function(module, exports) { /** * A special placeholder value used to specify "gaps" within curried functions, * allowing partial application of any combination of arguments, regardless of * their positions. * * If `g` is a curried ternary function and `_` is `R.__`, the following are * equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2, _)(1, 3)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * @constant * @memberOf R * @since v0.6.0 * @category Function * @example * * var greet = R.replace('{name}', R.__, 'Hello, {name}!'); * greet('Alice'); //=> 'Hello, Alice!' */ module.exports = { '@@functional/placeholder': true }; /***/ }), /* 612 */ /*!*****************************!*\ !*** ../~/ramda/src/add.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Adds two values. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a * @param {Number} b * @return {Number} * @see R.subtract * @example * * R.add(2, 3); //=> 5 * R.add(7)(10); //=> 17 */ var add = /*#__PURE__*/_curry2(function add(a, b) { return Number(a) + Number(b); }); module.exports = add; /***/ }), /* 613 */ /*!******************************************!*\ !*** ../~/ramda/src/internal/_curry2.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./_curry1 */ 608); var _isPlaceholder = /*#__PURE__*/__webpack_require__(/*! ./_isPlaceholder */ 609); /** * Optimized internal two-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry2(fn) { return function f2(a, b) { switch (arguments.length) { case 0: return f2; case 1: return _isPlaceholder(a) ? f2 : _curry1(function (_b) { return fn(a, _b); }); default: return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) { return fn(_a, b); }) : _isPlaceholder(b) ? _curry1(function (_b) { return fn(a, _b); }) : fn(a, b); } }; } module.exports = _curry2; /***/ }), /* 614 */ /*!**********************************!*\ !*** ../~/ramda/src/addIndex.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _concat = /*#__PURE__*/__webpack_require__(/*! ./internal/_concat */ 615); var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); /** * Creates a new list iteration function from an existing one by adding two new * parameters to its callback function: the current index, and the entire list. * * This would turn, for instance, [`R.map`](#map) function into one that * more closely resembles `Array.prototype.map`. Note that this will only work * for functions in which the iteration callback function is the first * parameter, and where the list is the last parameter. (This latter might be * unimportant if the list parameter is not used.) * * @func * @memberOf R * @since v0.15.0 * @category Function * @category List * @sig ((a ... -> b) ... -> [a] -> *) -> (a ..., Int, [a] -> b) ... -> [a] -> *) * @param {Function} fn A list iteration function that does not pass index or list to its callback * @return {Function} An altered list iteration function that passes (item, index, list) to its callback * @example * * var mapIndexed = R.addIndex(R.map); * mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']); * //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r'] */ var addIndex = /*#__PURE__*/_curry1(function addIndex(fn) { return curryN(fn.length, function () { var idx = 0; var origFn = arguments[0]; var list = arguments[arguments.length - 1]; var args = Array.prototype.slice.call(arguments, 0); args[0] = function () { var result = origFn.apply(this, _concat(arguments, [idx, list])); idx += 1; return result; }; return fn.apply(this, args); }); }); module.exports = addIndex; /***/ }), /* 615 */ /*!******************************************!*\ !*** ../~/ramda/src/internal/_concat.js ***! \******************************************/ /***/ (function(module, exports) { /** * Private `concat` function to merge two array-like objects. * * @private * @param {Array|Arguments} [set1=[]] An array-like object. * @param {Array|Arguments} [set2=[]] An array-like object. * @return {Array} A new, merged array. * @example * * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] */ function _concat(set1, set2) { set1 = set1 || []; set2 = set2 || []; var idx; var len1 = set1.length; var len2 = set2.length; var result = []; idx = 0; while (idx < len1) { result[result.length] = set1[idx]; idx += 1; } idx = 0; while (idx < len2) { result[result.length] = set2[idx]; idx += 1; } return result; } module.exports = _concat; /***/ }), /* 616 */ /*!********************************!*\ !*** ../~/ramda/src/curryN.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _arity = /*#__PURE__*/__webpack_require__(/*! ./internal/_arity */ 617); var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _curryN = /*#__PURE__*/__webpack_require__(/*! ./internal/_curryN */ 618); /** * Returns a curried equivalent of the provided function, with the specified * arity. The curried function has two unusual capabilities. First, its * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the * following are equivalent: * * - `g(1)(2)(3)` * - `g(1)(2, 3)` * - `g(1, 2)(3)` * - `g(1, 2, 3)` * * Secondly, the special placeholder value [`R.__`](#__) may be used to specify * "gaps", allowing partial application of any combination of arguments, * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), * the following are equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * @func * @memberOf R * @since v0.5.0 * @category Function * @sig Number -> (* -> a) -> (* -> a) * @param {Number} length The arity for the returned function. * @param {Function} fn The function to curry. * @return {Function} A new, curried function. * @see R.curry * @example * * var sumArgs = (...args) => R.sum(args); * * var curriedAddFourNumbers = R.curryN(4, sumArgs); * var f = curriedAddFourNumbers(1, 2); * var g = f(3); * g(4); //=> 10 */ var curryN = /*#__PURE__*/_curry2(function curryN(length, fn) { if (length === 1) { return _curry1(fn); } return _arity(length, _curryN(length, [], fn)); }); module.exports = curryN; /***/ }), /* 617 */ /*!*****************************************!*\ !*** ../~/ramda/src/internal/_arity.js ***! \*****************************************/ /***/ (function(module, exports) { function _arity(n, fn) { /* eslint-disable no-unused-vars */ switch (n) { case 0: return function () { return fn.apply(this, arguments); }; case 1: return function (a0) { return fn.apply(this, arguments); }; case 2: return function (a0, a1) { return fn.apply(this, arguments); }; case 3: return function (a0, a1, a2) { return fn.apply(this, arguments); }; case 4: return function (a0, a1, a2, a3) { return fn.apply(this, arguments); }; case 5: return function (a0, a1, a2, a3, a4) { return fn.apply(this, arguments); }; case 6: return function (a0, a1, a2, a3, a4, a5) { return fn.apply(this, arguments); }; case 7: return function (a0, a1, a2, a3, a4, a5, a6) { return fn.apply(this, arguments); }; case 8: return function (a0, a1, a2, a3, a4, a5, a6, a7) { return fn.apply(this, arguments); }; case 9: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.apply(this, arguments); }; case 10: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.apply(this, arguments); }; default: throw new Error('First argument to _arity must be a non-negative integer no greater than ten'); } } module.exports = _arity; /***/ }), /* 618 */ /*!******************************************!*\ !*** ../~/ramda/src/internal/_curryN.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var _arity = /*#__PURE__*/__webpack_require__(/*! ./_arity */ 617); var _isPlaceholder = /*#__PURE__*/__webpack_require__(/*! ./_isPlaceholder */ 609); /** * Internal curryN function. * * @private * @category Function * @param {Number} length The arity of the curried function. * @param {Array} received An array of arguments received thus far. * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curryN(length, received, fn) { return function () { var combined = []; var argsIdx = 0; var left = length; var combinedIdx = 0; while (combinedIdx < received.length || argsIdx < arguments.length) { var result; if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) { result = received[combinedIdx]; } else { result = arguments[argsIdx]; argsIdx += 1; } combined[combinedIdx] = result; if (!_isPlaceholder(result)) { left -= 1; } combinedIdx += 1; } return left <= 0 ? fn.apply(this, combined) : _arity(left, _curryN(length, combined, fn)); }; } module.exports = _curryN; /***/ }), /* 619 */ /*!********************************!*\ !*** ../~/ramda/src/adjust.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _concat = /*#__PURE__*/__webpack_require__(/*! ./internal/_concat */ 615); var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Applies a function to the value at the given index of an array, returning a * new copy of the array with the element at the given index replaced with the * result of the function application. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig (a -> a) -> Number -> [a] -> [a] * @param {Function} fn The function to apply. * @param {Number} idx The index. * @param {Array|Arguments} list An array-like object whose value * at the supplied index will be replaced. * @return {Array} A copy of the supplied array-like object with * the element at index `idx` replaced with the value * returned by applying `fn` to the existing element. * @see R.update * @example * * R.adjust(R.add(10), 1, [1, 2, 3]); //=> [1, 12, 3] * R.adjust(R.add(10))(1)([1, 2, 3]); //=> [1, 12, 3] * @symb R.adjust(f, -1, [a, b]) = [a, f(b)] * @symb R.adjust(f, 0, [a, b]) = [f(a), b] */ var adjust = /*#__PURE__*/_curry3(function adjust(fn, idx, list) { if (idx >= list.length || idx < -list.length) { return list; } var start = idx < 0 ? list.length : 0; var _idx = start + idx; var _list = _concat(list); _list[_idx] = fn(list[_idx]); return _list; }); module.exports = adjust; /***/ }), /* 620 */ /*!******************************************!*\ !*** ../~/ramda/src/internal/_curry3.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./_curry1 */ 608); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _isPlaceholder = /*#__PURE__*/__webpack_require__(/*! ./_isPlaceholder */ 609); /** * Optimized internal three-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry3(fn) { return function f3(a, b, c) { switch (arguments.length) { case 0: return f3; case 1: return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) { return fn(a, _b, _c); }); case 2: return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) { return fn(_a, b, _c); }) : _isPlaceholder(b) ? _curry2(function (_b, _c) { return fn(a, _b, _c); }) : _curry1(function (_c) { return fn(a, b, _c); }); default: return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) { return fn(_a, _b, c); }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) { return fn(_a, b, _c); }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) { return fn(a, _b, _c); }) : _isPlaceholder(a) ? _curry1(function (_a) { return fn(_a, b, c); }) : _isPlaceholder(b) ? _curry1(function (_b) { return fn(a, _b, c); }) : _isPlaceholder(c) ? _curry1(function (_c) { return fn(a, b, _c); }) : fn(a, b, c); } }; } module.exports = _curry3; /***/ }), /* 621 */ /*!*****************************!*\ !*** ../~/ramda/src/all.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xall = /*#__PURE__*/__webpack_require__(/*! ./internal/_xall */ 625); /** * Returns `true` if all elements of the list match the predicate, `false` if * there are any that don't. * * Dispatches to the `all` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> Boolean * @param {Function} fn The predicate function. * @param {Array} list The array to consider. * @return {Boolean} `true` if the predicate is satisfied by every element, `false` * otherwise. * @see R.any, R.none, R.transduce * @example * * var equals3 = R.equals(3); * R.all(equals3)([3, 3, 3, 3]); //=> true * R.all(equals3)([3, 3, 1, 3]); //=> false */ var all = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['all'], _xall, function all(fn, list) { var idx = 0; while (idx < list.length) { if (!fn(list[idx])) { return false; } idx += 1; } return true; })); module.exports = all; /***/ }), /* 622 */ /*!************************************************!*\ !*** ../~/ramda/src/internal/_dispatchable.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var _isArray = /*#__PURE__*/__webpack_require__(/*! ./_isArray */ 623); var _isTransformer = /*#__PURE__*/__webpack_require__(/*! ./_isTransformer */ 624); /** * Returns a function that dispatches with different strategies based on the * object in list position (last argument). If it is an array, executes [fn]. * Otherwise, if it has a function with one of the given method names, it will * execute that function (functor case). Otherwise, if it is a transformer, * uses transducer [xf] to return a new transformer (transducer case). * Otherwise, it will default to executing [fn]. * * @private * @param {Array} methodNames properties to check for a custom implementation * @param {Function} xf transducer to initialize if object is transformer * @param {Function} fn default ramda implementation * @return {Function} A function that dispatches on object in list position */ function _dispatchable(methodNames, xf, fn) { return function () { if (arguments.length === 0) { return fn(); } var args = Array.prototype.slice.call(arguments, 0); var obj = args.pop(); if (!_isArray(obj)) { var idx = 0; while (idx < methodNames.length) { if (typeof obj[methodNames[idx]] === 'function') { return obj[methodNames[idx]].apply(obj, args); } idx += 1; } if (_isTransformer(obj)) { var transducer = xf.apply(null, args); return transducer(obj); } } return fn.apply(this, arguments); }; } module.exports = _dispatchable; /***/ }), /* 623 */ /*!*******************************************!*\ !*** ../~/ramda/src/internal/_isArray.js ***! \*******************************************/ /***/ (function(module, exports) { /** * Tests whether or not an object is an array. * * @private * @param {*} val The object to test. * @return {Boolean} `true` if `val` is an array, `false` otherwise. * @example * * _isArray([]); //=> true * _isArray(null); //=> false * _isArray({}); //=> false */ module.exports = Array.isArray || function _isArray(val) { return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]'; }; /***/ }), /* 624 */ /*!*************************************************!*\ !*** ../~/ramda/src/internal/_isTransformer.js ***! \*************************************************/ /***/ (function(module, exports) { function _isTransformer(obj) { return typeof obj['@@transducer/step'] === 'function'; } module.exports = _isTransformer; /***/ }), /* 625 */ /*!****************************************!*\ !*** ../~/ramda/src/internal/_xall.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _reduced = /*#__PURE__*/__webpack_require__(/*! ./_reduced */ 626); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XAll = /*#__PURE__*/function () { function XAll(f, xf) { this.xf = xf; this.f = f; this.all = true; } XAll.prototype['@@transducer/init'] = _xfBase.init; XAll.prototype['@@transducer/result'] = function (result) { if (this.all) { result = this.xf['@@transducer/step'](result, true); } return this.xf['@@transducer/result'](result); }; XAll.prototype['@@transducer/step'] = function (result, input) { if (!this.f(input)) { this.all = false; result = _reduced(this.xf['@@transducer/step'](result, false)); } return result; }; return XAll; }(); var _xall = /*#__PURE__*/_curry2(function _xall(f, xf) { return new XAll(f, xf); }); module.exports = _xall; /***/ }), /* 626 */ /*!*******************************************!*\ !*** ../~/ramda/src/internal/_reduced.js ***! \*******************************************/ /***/ (function(module, exports) { function _reduced(x) { return x && x['@@transducer/reduced'] ? x : { '@@transducer/value': x, '@@transducer/reduced': true }; } module.exports = _reduced; /***/ }), /* 627 */ /*!******************************************!*\ !*** ../~/ramda/src/internal/_xfBase.js ***! \******************************************/ /***/ (function(module, exports) { module.exports = { init: function () { return this.xf['@@transducer/init'](); }, result: function (result) { return this.xf['@@transducer/result'](result); } }; /***/ }), /* 628 */ /*!*********************************!*\ !*** ../~/ramda/src/allPass.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); var max = /*#__PURE__*/__webpack_require__(/*! ./max */ 629); var pluck = /*#__PURE__*/__webpack_require__(/*! ./pluck */ 630); var reduce = /*#__PURE__*/__webpack_require__(/*! ./reduce */ 644); /** * Takes a list of predicates and returns a predicate that returns true for a * given list of arguments if every one of the provided predicates is satisfied * by those arguments. * * The function returned is a curried function whose arity matches that of the * highest-arity predicate. * * @func * @memberOf R * @since v0.9.0 * @category Logic * @sig [(*... -> Boolean)] -> (*... -> Boolean) * @param {Array} predicates An array of predicates to check * @return {Function} The combined predicate * @see R.anyPass * @example * * var isQueen = R.propEq('rank', 'Q'); * var isSpade = R.propEq('suit', '♠︎'); * var isQueenOfSpades = R.allPass([isQueen, isSpade]); * * isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false * isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true */ var allPass = /*#__PURE__*/_curry1(function allPass(preds) { return curryN(reduce(max, 0, pluck('length', preds)), function () { var idx = 0; var len = preds.length; while (idx < len) { if (!preds[idx].apply(this, arguments)) { return false; } idx += 1; } return true; }); }); module.exports = allPass; /***/ }), /* 629 */ /*!*****************************!*\ !*** ../~/ramda/src/max.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns the larger of its two arguments. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> a * @param {*} a * @param {*} b * @return {*} * @see R.maxBy, R.min * @example * * R.max(789, 123); //=> 789 * R.max('a', 'b'); //=> 'b' */ var max = /*#__PURE__*/_curry2(function max(a, b) { return b > a ? b : a; }); module.exports = max; /***/ }), /* 630 */ /*!*******************************!*\ !*** ../~/ramda/src/pluck.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var map = /*#__PURE__*/__webpack_require__(/*! ./map */ 631); var prop = /*#__PURE__*/__webpack_require__(/*! ./prop */ 642); /** * Returns a new list by plucking the same named property off all objects in * the list supplied. * * `pluck` will work on * any [functor](https://github.com/fantasyland/fantasy-land#functor) in * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Functor f => k -> f {k: v} -> f v * @param {Number|String} key The key name to pluck off of each object. * @param {Array} f The array or functor to consider. * @return {Array} The list of values for the given key. * @see R.props * @example * * R.pluck('a')([{a: 1}, {a: 2}]); //=> [1, 2] * R.pluck(0)([[1, 2], [3, 4]]); //=> [1, 3] * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5} * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5] * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5] */ var pluck = /*#__PURE__*/_curry2(function pluck(p, list) { return map(prop(p), list); }); module.exports = pluck; /***/ }), /* 631 */ /*!*****************************!*\ !*** ../~/ramda/src/map.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _map = /*#__PURE__*/__webpack_require__(/*! ./internal/_map */ 632); var _reduce = /*#__PURE__*/__webpack_require__(/*! ./internal/_reduce */ 633); var _xmap = /*#__PURE__*/__webpack_require__(/*! ./internal/_xmap */ 638); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); var keys = /*#__PURE__*/__webpack_require__(/*! ./keys */ 639); /** * Takes a function and * a [functor](https://github.com/fantasyland/fantasy-land#functor), * applies the function to each of the functor's values, and returns * a functor of the same shape. * * Ramda provides suitable `map` implementations for `Array` and `Object`, * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`. * * Dispatches to the `map` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * Also treats functions as functors and will compose them together. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Functor f => (a -> b) -> f a -> f b * @param {Function} fn The function to be called on every element of the input `list`. * @param {Array} list The list to be iterated over. * @return {Array} The new list. * @see R.transduce, R.addIndex * @example * * var double = x => x * 2; * * R.map(double, [1, 2, 3]); //=> [2, 4, 6] * * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6} * @symb R.map(f, [a, b]) = [f(a), f(b)] * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) } * @symb R.map(f, functor_o) = functor_o.map(f) */ var map = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) { switch (Object.prototype.toString.call(functor)) { case '[object Function]': return curryN(functor.length, function () { return fn.call(this, functor.apply(this, arguments)); }); case '[object Object]': return _reduce(function (acc, key) { acc[key] = fn(functor[key]); return acc; }, {}, keys(functor)); default: return _map(fn, functor); } })); module.exports = map; /***/ }), /* 632 */ /*!***************************************!*\ !*** ../~/ramda/src/internal/_map.js ***! \***************************************/ /***/ (function(module, exports) { function _map(fn, functor) { var idx = 0; var len = functor.length; var result = Array(len); while (idx < len) { result[idx] = fn(functor[idx]); idx += 1; } return result; } module.exports = _map; /***/ }), /* 633 */ /*!******************************************!*\ !*** ../~/ramda/src/internal/_reduce.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var _isArrayLike = /*#__PURE__*/__webpack_require__(/*! ./_isArrayLike */ 634); var _xwrap = /*#__PURE__*/__webpack_require__(/*! ./_xwrap */ 636); var bind = /*#__PURE__*/__webpack_require__(/*! ../bind */ 637); function _arrayReduce(xf, acc, list) { var idx = 0; var len = list.length; while (idx < len) { acc = xf['@@transducer/step'](acc, list[idx]); if (acc && acc['@@transducer/reduced']) { acc = acc['@@transducer/value']; break; } idx += 1; } return xf['@@transducer/result'](acc); } function _iterableReduce(xf, acc, iter) { var step = iter.next(); while (!step.done) { acc = xf['@@transducer/step'](acc, step.value); if (acc && acc['@@transducer/reduced']) { acc = acc['@@transducer/value']; break; } step = iter.next(); } return xf['@@transducer/result'](acc); } function _methodReduce(xf, acc, obj, methodName) { return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc)); } var symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator'; function _reduce(fn, acc, list) { if (typeof fn === 'function') { fn = _xwrap(fn); } if (_isArrayLike(list)) { return _arrayReduce(fn, acc, list); } if (typeof list['fantasy-land/reduce'] === 'function') { return _methodReduce(fn, acc, list, 'fantasy-land/reduce'); } if (list[symIterator] != null) { return _iterableReduce(fn, acc, list[symIterator]()); } if (typeof list.next === 'function') { return _iterableReduce(fn, acc, list); } if (typeof list.reduce === 'function') { return _methodReduce(fn, acc, list, 'reduce'); } throw new TypeError('reduce: list must be array or iterable'); } module.exports = _reduce; /***/ }), /* 634 */ /*!***********************************************!*\ !*** ../~/ramda/src/internal/_isArrayLike.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./_curry1 */ 608); var _isArray = /*#__PURE__*/__webpack_require__(/*! ./_isArray */ 623); var _isString = /*#__PURE__*/__webpack_require__(/*! ./_isString */ 635); /** * Tests whether or not an object is similar to an array. * * @private * @category Type * @category List * @sig * -> Boolean * @param {*} x The object to test. * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise. * @example * * _isArrayLike([]); //=> true * _isArrayLike(true); //=> false * _isArrayLike({}); //=> false * _isArrayLike({length: 10}); //=> false * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true */ var _isArrayLike = /*#__PURE__*/_curry1(function isArrayLike(x) { if (_isArray(x)) { return true; } if (!x) { return false; } if (typeof x !== 'object') { return false; } if (_isString(x)) { return false; } if (x.nodeType === 1) { return !!x.length; } if (x.length === 0) { return true; } if (x.length > 0) { return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1); } return false; }); module.exports = _isArrayLike; /***/ }), /* 635 */ /*!********************************************!*\ !*** ../~/ramda/src/internal/_isString.js ***! \********************************************/ /***/ (function(module, exports) { function _isString(x) { return Object.prototype.toString.call(x) === '[object String]'; } module.exports = _isString; /***/ }), /* 636 */ /*!*****************************************!*\ !*** ../~/ramda/src/internal/_xwrap.js ***! \*****************************************/ /***/ (function(module, exports) { var XWrap = /*#__PURE__*/function () { function XWrap(fn) { this.f = fn; } XWrap.prototype['@@transducer/init'] = function () { throw new Error('init not implemented on XWrap'); }; XWrap.prototype['@@transducer/result'] = function (acc) { return acc; }; XWrap.prototype['@@transducer/step'] = function (acc, x) { return this.f(acc, x); }; return XWrap; }(); function _xwrap(fn) { return new XWrap(fn); } module.exports = _xwrap; /***/ }), /* 637 */ /*!******************************!*\ !*** ../~/ramda/src/bind.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _arity = /*#__PURE__*/__webpack_require__(/*! ./internal/_arity */ 617); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Creates a function that is bound to a context. * Note: `R.bind` does not provide the additional argument-binding capabilities of * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). * * @func * @memberOf R * @since v0.6.0 * @category Function * @category Object * @sig (* -> *) -> {*} -> (* -> *) * @param {Function} fn The function to bind to context * @param {Object} thisObj The context to bind `fn` to * @return {Function} A function that will execute in the context of `thisObj`. * @see R.partial * @example * * var log = R.bind(console.log, console); * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3} * // logs {a: 2} * @symb R.bind(f, o)(a, b) = f.call(o, a, b) */ var bind = /*#__PURE__*/_curry2(function bind(fn, thisObj) { return _arity(fn.length, function () { return fn.apply(thisObj, arguments); }); }); module.exports = bind; /***/ }), /* 638 */ /*!****************************************!*\ !*** ../~/ramda/src/internal/_xmap.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XMap = /*#__PURE__*/function () { function XMap(f, xf) { this.xf = xf; this.f = f; } XMap.prototype['@@transducer/init'] = _xfBase.init; XMap.prototype['@@transducer/result'] = _xfBase.result; XMap.prototype['@@transducer/step'] = function (result, input) { return this.xf['@@transducer/step'](result, this.f(input)); }; return XMap; }(); var _xmap = /*#__PURE__*/_curry2(function _xmap(f, xf) { return new XMap(f, xf); }); module.exports = _xmap; /***/ }), /* 639 */ /*!******************************!*\ !*** ../~/ramda/src/keys.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var _has = /*#__PURE__*/__webpack_require__(/*! ./internal/_has */ 640); var _isArguments = /*#__PURE__*/__webpack_require__(/*! ./internal/_isArguments */ 641); // cover IE < 9 keys issues var hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString'); var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug var hasArgsEnumBug = /*#__PURE__*/function () { 'use strict'; return arguments.propertyIsEnumerable('length'); }(); var contains = function contains(list, item) { var idx = 0; while (idx < list.length) { if (list[idx] === item) { return true; } idx += 1; } return false; }; /** * Returns a list containing the names of all the enumerable own properties of * the supplied object. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {k: v} -> [k] * @param {Object} obj The object to extract properties from * @return {Array} An array of the object's own properties. * @see R.keysIn, R.values * @example * * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c'] */ var _keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? function keys(obj) { return Object(obj) !== obj ? [] : Object.keys(obj); } : function keys(obj) { if (Object(obj) !== obj) { return []; } var prop, nIdx; var ks = []; var checkArgsLength = hasArgsEnumBug && _isArguments(obj); for (prop in obj) { if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) { ks[ks.length] = prop; } } if (hasEnumBug) { nIdx = nonEnumerableProps.length - 1; while (nIdx >= 0) { prop = nonEnumerableProps[nIdx]; if (_has(prop, obj) && !contains(ks, prop)) { ks[ks.length] = prop; } nIdx -= 1; } } return ks; }; var keys = /*#__PURE__*/_curry1(_keys); module.exports = keys; /***/ }), /* 640 */ /*!***************************************!*\ !*** ../~/ramda/src/internal/_has.js ***! \***************************************/ /***/ (function(module, exports) { function _has(prop, obj) { return Object.prototype.hasOwnProperty.call(obj, prop); } module.exports = _has; /***/ }), /* 641 */ /*!***********************************************!*\ !*** ../~/ramda/src/internal/_isArguments.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { var _has = /*#__PURE__*/__webpack_require__(/*! ./_has */ 640); var toString = Object.prototype.toString; var _isArguments = function () { return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) { return toString.call(x) === '[object Arguments]'; } : function _isArguments(x) { return _has('callee', x); }; }; module.exports = _isArguments; /***/ }), /* 642 */ /*!******************************!*\ !*** ../~/ramda/src/prop.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var path = /*#__PURE__*/__webpack_require__(/*! ./path */ 643); /** * Returns a function that when supplied an object returns the indicated * property of that object, if it exists. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig s -> {s: a} -> a | Undefined * @param {String} p The property name * @param {Object} obj The object to query * @return {*} The value at `obj.p`. * @see R.path * @example * * R.prop('x', {x: 100}); //=> 100 * R.prop('x', {}); //=> undefined */ var prop = /*#__PURE__*/_curry2(function prop(p, obj) { return path([p], obj); }); module.exports = prop; /***/ }), /* 643 */ /*!******************************!*\ !*** ../~/ramda/src/path.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Retrieve the value at a given path. * * @func * @memberOf R * @since v0.2.0 * @category Object * @typedefn Idx = String | Int * @sig [Idx] -> {a} -> a | Undefined * @param {Array} path The path to use. * @param {Object} obj The object to retrieve the nested property from. * @return {*} The data at `path`. * @see R.prop * @example * * R.path(['a', 'b'], {a: {b: 2}}); //=> 2 * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined */ var path = /*#__PURE__*/_curry2(function path(paths, obj) { var val = obj; var idx = 0; while (idx < paths.length) { if (val == null) { return; } val = val[paths[idx]]; idx += 1; } return val; }); module.exports = path; /***/ }), /* 644 */ /*!********************************!*\ !*** ../~/ramda/src/reduce.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var _reduce = /*#__PURE__*/__webpack_require__(/*! ./internal/_reduce */ 633); /** * Returns a single item by iterating through the list, successively calling * the iterator function and passing it an accumulator value and the current * value from the array, and then passing the result to the next call. * * The iterator function receives two values: *(acc, value)*. It may use * [`R.reduced`](#reduced) to shortcut the iteration. * * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function * is *(value, acc)*. * * Note: `R.reduce` does not skip deleted or unassigned indices (sparse * arrays), unlike the native `Array.prototype.reduce` method. For more details * on this behavior, see: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description * * Dispatches to the `reduce` method of the third argument, if present. When * doing so, it is up to the user to handle the [`R.reduced`](#reduced) * shortcuting, as this is not implemented by `reduce`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig ((a, b) -> a) -> a -> [b] -> a * @param {Function} fn The iterator function. Receives two values, the accumulator and the * current element from the array. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduced, R.addIndex, R.reduceRight * @example * * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10 * // - -10 * // / \ / \ * // - 4 -6 4 * // / \ / \ * // - 3 ==> -3 3 * // / \ / \ * // - 2 -1 2 * // / \ / \ * // 0 1 0 1 * * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d) */ var reduce = /*#__PURE__*/_curry3(_reduce); module.exports = reduce; /***/ }), /* 645 */ /*!*****************************!*\ !*** ../~/ramda/src/and.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns `true` if both arguments are `true`; `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig a -> b -> a | b * @param {Any} a * @param {Any} b * @return {Any} the first argument if it is falsy, otherwise the second argument. * @see R.both * @example * * R.and(true, true); //=> true * R.and(true, false); //=> false * R.and(false, true); //=> false * R.and(false, false); //=> false */ var and = /*#__PURE__*/_curry2(function and(a, b) { return a && b; }); module.exports = and; /***/ }), /* 646 */ /*!*****************************!*\ !*** ../~/ramda/src/any.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xany = /*#__PURE__*/__webpack_require__(/*! ./internal/_xany */ 647); /** * Returns `true` if at least one of elements of the list match the predicate, * `false` otherwise. * * Dispatches to the `any` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> Boolean * @param {Function} fn The predicate function. * @param {Array} list The array to consider. * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false` * otherwise. * @see R.all, R.none, R.transduce * @example * * var lessThan0 = R.flip(R.lt)(0); * var lessThan2 = R.flip(R.lt)(2); * R.any(lessThan0)([1, 2]); //=> false * R.any(lessThan2)([1, 2]); //=> true */ var any = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['any'], _xany, function any(fn, list) { var idx = 0; while (idx < list.length) { if (fn(list[idx])) { return true; } idx += 1; } return false; })); module.exports = any; /***/ }), /* 647 */ /*!****************************************!*\ !*** ../~/ramda/src/internal/_xany.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _reduced = /*#__PURE__*/__webpack_require__(/*! ./_reduced */ 626); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XAny = /*#__PURE__*/function () { function XAny(f, xf) { this.xf = xf; this.f = f; this.any = false; } XAny.prototype['@@transducer/init'] = _xfBase.init; XAny.prototype['@@transducer/result'] = function (result) { if (!this.any) { result = this.xf['@@transducer/step'](result, false); } return this.xf['@@transducer/result'](result); }; XAny.prototype['@@transducer/step'] = function (result, input) { if (this.f(input)) { this.any = true; result = _reduced(this.xf['@@transducer/step'](result, true)); } return result; }; return XAny; }(); var _xany = /*#__PURE__*/_curry2(function _xany(f, xf) { return new XAny(f, xf); }); module.exports = _xany; /***/ }), /* 648 */ /*!*********************************!*\ !*** ../~/ramda/src/anyPass.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); var max = /*#__PURE__*/__webpack_require__(/*! ./max */ 629); var pluck = /*#__PURE__*/__webpack_require__(/*! ./pluck */ 630); var reduce = /*#__PURE__*/__webpack_require__(/*! ./reduce */ 644); /** * Takes a list of predicates and returns a predicate that returns true for a * given list of arguments if at least one of the provided predicates is * satisfied by those arguments. * * The function returned is a curried function whose arity matches that of the * highest-arity predicate. * * @func * @memberOf R * @since v0.9.0 * @category Logic * @sig [(*... -> Boolean)] -> (*... -> Boolean) * @param {Array} predicates An array of predicates to check * @return {Function} The combined predicate * @see R.allPass * @example * * var isClub = R.propEq('suit', '♣'); * var isSpade = R.propEq('suit', '♠'); * var isBlackCard = R.anyPass([isClub, isSpade]); * * isBlackCard({rank: '10', suit: '♣'}); //=> true * isBlackCard({rank: 'Q', suit: '♠'}); //=> true * isBlackCard({rank: 'Q', suit: '♦'}); //=> false */ var anyPass = /*#__PURE__*/_curry1(function anyPass(preds) { return curryN(reduce(max, 0, pluck('length', preds)), function () { var idx = 0; var len = preds.length; while (idx < len) { if (preds[idx].apply(this, arguments)) { return true; } idx += 1; } return false; }); }); module.exports = anyPass; /***/ }), /* 649 */ /*!****************************!*\ !*** ../~/ramda/src/ap.js ***! \****************************/ /***/ (function(module, exports, __webpack_require__) { var _concat = /*#__PURE__*/__webpack_require__(/*! ./internal/_concat */ 615); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _reduce = /*#__PURE__*/__webpack_require__(/*! ./internal/_reduce */ 633); var map = /*#__PURE__*/__webpack_require__(/*! ./map */ 631); /** * ap applies a list of functions to a list of values. * * Dispatches to the `ap` method of the second argument, if present. Also * treats curried functions as applicatives. * * @func * @memberOf R * @since v0.3.0 * @category Function * @sig [a -> b] -> [a] -> [b] * @sig Apply f => f (a -> b) -> f a -> f b * @sig (a -> b -> c) -> (a -> b) -> (a -> c) * @param {*} applyF * @param {*} applyX * @return {*} * @example * * R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6] * R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> ["tasty pizza", "tasty salad", "PIZZA", "SALAD"] * * // R.ap can also be used as S combinator * // when only two functions are passed * R.ap(R.concat, R.toUpper)('Ramda') //=> 'RamdaRAMDA' * @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)] */ var ap = /*#__PURE__*/_curry2(function ap(applyF, applyX) { return typeof applyX['fantasy-land/ap'] === 'function' ? applyX['fantasy-land/ap'](applyF) : typeof applyF.ap === 'function' ? applyF.ap(applyX) : typeof applyF === 'function' ? function (x) { return applyF(x)(applyX(x)); } : // else _reduce(function (acc, f) { return _concat(acc, map(f, applyX)); }, [], applyF); }); module.exports = ap; /***/ }), /* 650 */ /*!**********************************!*\ !*** ../~/ramda/src/aperture.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _aperture = /*#__PURE__*/__webpack_require__(/*! ./internal/_aperture */ 651); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xaperture = /*#__PURE__*/__webpack_require__(/*! ./internal/_xaperture */ 652); /** * Returns a new list, composed of n-tuples of consecutive elements. If `n` is * greater than the length of the list, an empty list is returned. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig Number -> [a] -> [[a]] * @param {Number} n The size of the tuples to create * @param {Array} list The list to split into `n`-length tuples * @return {Array} The resulting list of `n`-length tuples * @see R.transduce * @example * * R.aperture(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [2, 3], [3, 4], [4, 5]] * R.aperture(3, [1, 2, 3, 4, 5]); //=> [[1, 2, 3], [2, 3, 4], [3, 4, 5]] * R.aperture(7, [1, 2, 3, 4, 5]); //=> [] */ var aperture = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable([], _xaperture, _aperture)); module.exports = aperture; /***/ }), /* 651 */ /*!********************************************!*\ !*** ../~/ramda/src/internal/_aperture.js ***! \********************************************/ /***/ (function(module, exports) { function _aperture(n, list) { var idx = 0; var limit = list.length - (n - 1); var acc = new Array(limit >= 0 ? limit : 0); while (idx < limit) { acc[idx] = Array.prototype.slice.call(list, idx, idx + n); idx += 1; } return acc; } module.exports = _aperture; /***/ }), /* 652 */ /*!*********************************************!*\ !*** ../~/ramda/src/internal/_xaperture.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var _concat = /*#__PURE__*/__webpack_require__(/*! ./_concat */ 615); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XAperture = /*#__PURE__*/function () { function XAperture(n, xf) { this.xf = xf; this.pos = 0; this.full = false; this.acc = new Array(n); } XAperture.prototype['@@transducer/init'] = _xfBase.init; XAperture.prototype['@@transducer/result'] = function (result) { this.acc = null; return this.xf['@@transducer/result'](result); }; XAperture.prototype['@@transducer/step'] = function (result, input) { this.store(input); return this.full ? this.xf['@@transducer/step'](result, this.getCopy()) : result; }; XAperture.prototype.store = function (input) { this.acc[this.pos] = input; this.pos += 1; if (this.pos === this.acc.length) { this.pos = 0; this.full = true; } }; XAperture.prototype.getCopy = function () { return _concat(Array.prototype.slice.call(this.acc, this.pos), Array.prototype.slice.call(this.acc, 0, this.pos)); }; return XAperture; }(); var _xaperture = /*#__PURE__*/_curry2(function _xaperture(n, xf) { return new XAperture(n, xf); }); module.exports = _xaperture; /***/ }), /* 653 */ /*!********************************!*\ !*** ../~/ramda/src/append.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _concat = /*#__PURE__*/__webpack_require__(/*! ./internal/_concat */ 615); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns a new list containing the contents of the given list, followed by * the given element. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> [a] * @param {*} el The element to add to the end of the new list. * @param {Array} list The list of elements to add a new item to. * list. * @return {Array} A new list containing the elements of the old list followed by `el`. * @see R.prepend * @example * * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests'] * R.append('tests', []); //=> ['tests'] * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']] */ var append = /*#__PURE__*/_curry2(function append(el, list) { return _concat(list, [el]); }); module.exports = append; /***/ }), /* 654 */ /*!*******************************!*\ !*** ../~/ramda/src/apply.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Applies function `fn` to the argument list `args`. This is useful for * creating a fixed-arity function from a variadic function. `fn` should be a * bound function if context is significant. * * @func * @memberOf R * @since v0.7.0 * @category Function * @sig (*... -> a) -> [*] -> a * @param {Function} fn The function which will be called with `args` * @param {Array} args The arguments to call `fn` with * @return {*} result The result, equivalent to `fn(...args)` * @see R.call, R.unapply * @example * * var nums = [1, 2, 3, -99, 42, 6, 7]; * R.apply(Math.max, nums); //=> 42 * @symb R.apply(f, [a, b, c]) = f(a, b, c) */ var apply = /*#__PURE__*/_curry2(function apply(fn, args) { return fn.apply(this, args); }); module.exports = apply; /***/ }), /* 655 */ /*!***********************************!*\ !*** ../~/ramda/src/applySpec.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var apply = /*#__PURE__*/__webpack_require__(/*! ./apply */ 654); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); var map = /*#__PURE__*/__webpack_require__(/*! ./map */ 631); var max = /*#__PURE__*/__webpack_require__(/*! ./max */ 629); var pluck = /*#__PURE__*/__webpack_require__(/*! ./pluck */ 630); var reduce = /*#__PURE__*/__webpack_require__(/*! ./reduce */ 644); var values = /*#__PURE__*/__webpack_require__(/*! ./values */ 656); /** * Given a spec object recursively mapping properties to functions, creates a * function producing an object of the same structure, by mapping each property * to the result of calling its associated function with the supplied arguments. * * @func * @memberOf R * @since v0.20.0 * @category Function * @sig {k: ((a, b, ..., m) -> v)} -> ((a, b, ..., m) -> {k: v}) * @param {Object} spec an object recursively mapping properties to functions for * producing the values for these properties. * @return {Function} A function that returns an object of the same structure * as `spec', with each property set to the value returned by calling its * associated function with the supplied arguments. * @see R.converge, R.juxt * @example * * var getMetrics = R.applySpec({ * sum: R.add, * nested: { mul: R.multiply } * }); * getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } } * @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } } */ var applySpec = /*#__PURE__*/_curry1(function applySpec(spec) { spec = map(function (v) { return typeof v == 'function' ? v : applySpec(v); }, spec); return curryN(reduce(max, 0, pluck('length', values(spec))), function () { var args = arguments; return map(function (f) { return apply(f, args); }, spec); }); }); module.exports = applySpec; /***/ }), /* 656 */ /*!********************************!*\ !*** ../~/ramda/src/values.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var keys = /*#__PURE__*/__webpack_require__(/*! ./keys */ 639); /** * Returns a list of all the enumerable own properties of the supplied object. * Note that the order of the output array is not guaranteed across different * JS platforms. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {k: v} -> [v] * @param {Object} obj The object to extract values from * @return {Array} An array of the values of the object's own properties. * @see R.valuesIn, R.keys * @example * * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3] */ var values = /*#__PURE__*/_curry1(function values(obj) { var props = keys(obj); var len = props.length; var vals = []; var idx = 0; while (idx < len) { vals[idx] = obj[props[idx]]; idx += 1; } return vals; }); module.exports = values; /***/ }), /* 657 */ /*!*********************************!*\ !*** ../~/ramda/src/applyTo.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Takes a value and applies a function to it. * * This function is also known as the `thrush` combinator. * * @func * @memberOf R * @since v0.25.0 * @category Function * @sig a -> (a -> b) -> b * @param {*} x The value * @param {Function} f The function to apply * @return {*} The result of applying `f` to `x` * @example * * var t42 = R.applyTo(42); * t42(R.identity); //=> 42 * t42(R.add(1)); //=> 43 */ var applyTo = /*#__PURE__*/_curry2(function applyTo(x, f) { return f(x); }); module.exports = applyTo; /***/ }), /* 658 */ /*!********************************!*\ !*** ../~/ramda/src/ascend.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Makes an ascending comparator function out of a function that returns a value * that can be compared with `<` and `>`. * * @func * @memberOf R * @since v0.23.0 * @category Function * @sig Ord b => (a -> b) -> a -> a -> Number * @param {Function} fn A function of arity one that returns a value that can be compared * @param {*} a The first item to be compared. * @param {*} b The second item to be compared. * @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0` * @see R.descend * @example * * var byAge = R.ascend(R.prop('age')); * var people = [ * // ... * ]; * var peopleByYoungestFirst = R.sort(byAge, people); */ var ascend = /*#__PURE__*/_curry3(function ascend(fn, a, b) { var aa = fn(a); var bb = fn(b); return aa < bb ? -1 : aa > bb ? 1 : 0; }); module.exports = ascend; /***/ }), /* 659 */ /*!*******************************!*\ !*** ../~/ramda/src/assoc.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Makes a shallow clone of an object, setting or overriding the specified * property with the given value. Note that this copies and flattens prototype * properties onto the new object as well. All non-primitive properties are * copied by reference. * * @func * @memberOf R * @since v0.8.0 * @category Object * @sig String -> a -> {k: v} -> {k: v} * @param {String} prop The property name to set * @param {*} val The new value * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original except for the changed property. * @see R.dissoc * @example * * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3} */ var assoc = /*#__PURE__*/_curry3(function assoc(prop, val, obj) { var result = {}; for (var p in obj) { result[p] = obj[p]; } result[prop] = val; return result; }); module.exports = assoc; /***/ }), /* 660 */ /*!***********************************!*\ !*** ../~/ramda/src/assocPath.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var _has = /*#__PURE__*/__webpack_require__(/*! ./internal/_has */ 640); var _isArray = /*#__PURE__*/__webpack_require__(/*! ./internal/_isArray */ 623); var _isInteger = /*#__PURE__*/__webpack_require__(/*! ./internal/_isInteger */ 661); var assoc = /*#__PURE__*/__webpack_require__(/*! ./assoc */ 659); var isNil = /*#__PURE__*/__webpack_require__(/*! ./isNil */ 662); /** * Makes a shallow clone of an object, setting or overriding the nodes required * to create the given path, and placing the specific value at the tail end of * that path. Note that this copies and flattens prototype properties onto the * new object as well. All non-primitive properties are copied by reference. * * @func * @memberOf R * @since v0.8.0 * @category Object * @typedefn Idx = String | Int * @sig [Idx] -> a -> {a} -> {a} * @param {Array} path the path to set * @param {*} val The new value * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original except along the specified path. * @see R.dissocPath * @example * * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} * * // Any missing or non-object keys in path will be overridden * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}} */ var assocPath = /*#__PURE__*/_curry3(function assocPath(path, val, obj) { if (path.length === 0) { return val; } var idx = path[0]; if (path.length > 1) { var nextObj = !isNil(obj) && _has(idx, obj) ? obj[idx] : _isInteger(path[1]) ? [] : {}; val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); } if (_isInteger(idx) && _isArray(obj)) { var arr = [].concat(obj); arr[idx] = val; return arr; } else { return assoc(idx, val, obj); } }); module.exports = assocPath; /***/ }), /* 661 */ /*!*********************************************!*\ !*** ../~/ramda/src/internal/_isInteger.js ***! \*********************************************/ /***/ (function(module, exports) { /** * Determine if the passed argument is an integer. * * @private * @param {*} n * @category Type * @return {Boolean} */ module.exports = Number.isInteger || function _isInteger(n) { return n << 0 === n; }; /***/ }), /* 662 */ /*!*******************************!*\ !*** ../~/ramda/src/isNil.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Checks if the input value is `null` or `undefined`. * * @func * @memberOf R * @since v0.9.0 * @category Type * @sig * -> Boolean * @param {*} x The value to test. * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`. * @example * * R.isNil(null); //=> true * R.isNil(undefined); //=> true * R.isNil(0); //=> false * R.isNil([]); //=> false */ var isNil = /*#__PURE__*/_curry1(function isNil(x) { return x == null; }); module.exports = isNil; /***/ }), /* 663 */ /*!********************************!*\ !*** ../~/ramda/src/binary.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var nAry = /*#__PURE__*/__webpack_require__(/*! ./nAry */ 664); /** * Wraps a function of any arity (including nullary) in a function that accepts * exactly 2 parameters. Any extraneous parameters will not be passed to the * supplied function. * * @func * @memberOf R * @since v0.2.0 * @category Function * @sig (* -> c) -> (a, b -> c) * @param {Function} fn The function to wrap. * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of * arity 2. * @see R.nAry, R.unary * @example * * var takesThreeArgs = function(a, b, c) { * return [a, b, c]; * }; * takesThreeArgs.length; //=> 3 * takesThreeArgs(1, 2, 3); //=> [1, 2, 3] * * var takesTwoArgs = R.binary(takesThreeArgs); * takesTwoArgs.length; //=> 2 * // Only 2 arguments are passed to the wrapped function * takesTwoArgs(1, 2, 3); //=> [1, 2, undefined] * @symb R.binary(f)(a, b, c) = f(a, b) */ var binary = /*#__PURE__*/_curry1(function binary(fn) { return nAry(2, fn); }); module.exports = binary; /***/ }), /* 664 */ /*!******************************!*\ !*** ../~/ramda/src/nAry.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Wraps a function of any arity (including nullary) in a function that accepts * exactly `n` parameters. Any extraneous parameters will not be passed to the * supplied function. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig Number -> (* -> a) -> (* -> a) * @param {Number} n The desired arity of the new function. * @param {Function} fn The function to wrap. * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of * arity `n`. * @see R.binary, R.unary * @example * * var takesTwoArgs = (a, b) => [a, b]; * * takesTwoArgs.length; //=> 2 * takesTwoArgs(1, 2); //=> [1, 2] * * var takesOneArg = R.nAry(1, takesTwoArgs); * takesOneArg.length; //=> 1 * // Only `n` arguments are passed to the wrapped function * takesOneArg(1, 2); //=> [1, undefined] * @symb R.nAry(0, f)(a, b) = f() * @symb R.nAry(1, f)(a, b) = f(a) * @symb R.nAry(2, f)(a, b) = f(a, b) */ var nAry = /*#__PURE__*/_curry2(function nAry(n, fn) { switch (n) { case 0: return function () { return fn.call(this); }; case 1: return function (a0) { return fn.call(this, a0); }; case 2: return function (a0, a1) { return fn.call(this, a0, a1); }; case 3: return function (a0, a1, a2) { return fn.call(this, a0, a1, a2); }; case 4: return function (a0, a1, a2, a3) { return fn.call(this, a0, a1, a2, a3); }; case 5: return function (a0, a1, a2, a3, a4) { return fn.call(this, a0, a1, a2, a3, a4); }; case 6: return function (a0, a1, a2, a3, a4, a5) { return fn.call(this, a0, a1, a2, a3, a4, a5); }; case 7: return function (a0, a1, a2, a3, a4, a5, a6) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6); }; case 8: return function (a0, a1, a2, a3, a4, a5, a6, a7) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7); }; case 9: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8); }; case 10: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }; default: throw new Error('First argument to nAry must be a non-negative integer no greater than ten'); } }); module.exports = nAry; /***/ }), /* 665 */ /*!******************************!*\ !*** ../~/ramda/src/both.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _isFunction = /*#__PURE__*/__webpack_require__(/*! ./internal/_isFunction */ 666); var and = /*#__PURE__*/__webpack_require__(/*! ./and */ 645); var lift = /*#__PURE__*/__webpack_require__(/*! ./lift */ 667); /** * A function which calls the two provided functions and returns the `&&` * of the results. * It returns the result of the first function if it is false-y and the result * of the second function otherwise. Note that this is short-circuited, * meaning that the second function will not be invoked if the first returns a * false-y value. * * In addition to functions, `R.both` also accepts any fantasy-land compatible * applicative functor. * * @func * @memberOf R * @since v0.12.0 * @category Logic * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) * @param {Function} f A predicate * @param {Function} g Another predicate * @return {Function} a function that applies its arguments to `f` and `g` and `&&`s their outputs together. * @see R.and * @example * * var gt10 = R.gt(R.__, 10) * var lt20 = R.lt(R.__, 20) * var f = R.both(gt10, lt20); * f(15); //=> true * f(30); //=> false */ var both = /*#__PURE__*/_curry2(function both(f, g) { return _isFunction(f) ? function _both() { return f.apply(this, arguments) && g.apply(this, arguments); } : lift(and)(f, g); }); module.exports = both; /***/ }), /* 666 */ /*!**********************************************!*\ !*** ../~/ramda/src/internal/_isFunction.js ***! \**********************************************/ /***/ (function(module, exports) { function _isFunction(x) { return Object.prototype.toString.call(x) === '[object Function]'; } module.exports = _isFunction; /***/ }), /* 667 */ /*!******************************!*\ !*** ../~/ramda/src/lift.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var liftN = /*#__PURE__*/__webpack_require__(/*! ./liftN */ 668); /** * "lifts" a function of arity > 1 so that it may "map over" a list, Function or other * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). * * @func * @memberOf R * @since v0.7.0 * @category Function * @sig (*... -> *) -> ([*]... -> [*]) * @param {Function} fn The function to lift into higher context * @return {Function} The lifted function. * @see R.liftN * @example * * var madd3 = R.lift((a, b, c) => a + b + c); * * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] * * var madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e); * * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24] */ var lift = /*#__PURE__*/_curry1(function lift(fn) { return liftN(fn.length, fn); }); module.exports = lift; /***/ }), /* 668 */ /*!*******************************!*\ !*** ../~/ramda/src/liftN.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _reduce = /*#__PURE__*/__webpack_require__(/*! ./internal/_reduce */ 633); var ap = /*#__PURE__*/__webpack_require__(/*! ./ap */ 649); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); var map = /*#__PURE__*/__webpack_require__(/*! ./map */ 631); /** * "lifts" a function to be the specified arity, so that it may "map over" that * many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). * * @func * @memberOf R * @since v0.7.0 * @category Function * @sig Number -> (*... -> *) -> ([*]... -> [*]) * @param {Function} fn The function to lift into higher context * @return {Function} The lifted function. * @see R.lift, R.ap * @example * * var madd3 = R.liftN(3, (...args) => R.sum(args)); * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] */ var liftN = /*#__PURE__*/_curry2(function liftN(arity, fn) { var lifted = curryN(arity, fn); return curryN(arity, function () { return _reduce(ap, map(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1)); }); }); module.exports = liftN; /***/ }), /* 669 */ /*!******************************!*\ !*** ../~/ramda/src/call.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var curry = /*#__PURE__*/__webpack_require__(/*! ./curry */ 670); /** * Returns the result of calling its first argument with the remaining * arguments. This is occasionally useful as a converging function for * [`R.converge`](#converge): the first branch can produce a function while the * remaining branches produce values to be passed to that function as its * arguments. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig (*... -> a),*... -> a * @param {Function} fn The function to apply to the remaining arguments. * @param {...*} args Any number of positional arguments. * @return {*} * @see R.apply * @example * * R.call(R.add, 1, 2); //=> 3 * * var indentN = R.pipe(R.repeat(' '), * R.join(''), * R.replace(/^(?!$)/gm)); * * var format = R.converge(R.call, [ * R.pipe(R.prop('indent'), indentN), * R.prop('value') * ]); * * format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n' * @symb R.call(f, a, b) = f(a, b) */ var call = /*#__PURE__*/curry(function call(fn) { return fn.apply(this, Array.prototype.slice.call(arguments, 1)); }); module.exports = call; /***/ }), /* 670 */ /*!*******************************!*\ !*** ../~/ramda/src/curry.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); /** * Returns a curried equivalent of the provided function. The curried function * has two unusual capabilities. First, its arguments needn't be provided one * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the * following are equivalent: * * - `g(1)(2)(3)` * - `g(1)(2, 3)` * - `g(1, 2)(3)` * - `g(1, 2, 3)` * * Secondly, the special placeholder value [`R.__`](#__) may be used to specify * "gaps", allowing partial application of any combination of arguments, * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), * the following are equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (* -> a) -> (* -> a) * @param {Function} fn The function to curry. * @return {Function} A new, curried function. * @see R.curryN * @example * * var addFourNumbers = (a, b, c, d) => a + b + c + d; * * var curriedAddFourNumbers = R.curry(addFourNumbers); * var f = curriedAddFourNumbers(1, 2); * var g = f(3); * g(4); //=> 10 */ var curry = /*#__PURE__*/_curry1(function curry(fn) { return curryN(fn.length, fn); }); module.exports = curry; /***/ }), /* 671 */ /*!*******************************!*\ !*** ../~/ramda/src/chain.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _makeFlat = /*#__PURE__*/__webpack_require__(/*! ./internal/_makeFlat */ 672); var _xchain = /*#__PURE__*/__webpack_require__(/*! ./internal/_xchain */ 673); var map = /*#__PURE__*/__webpack_require__(/*! ./map */ 631); /** * `chain` maps a function over a list and concatenates the results. `chain` * is also known as `flatMap` in some libraries * * Dispatches to the `chain` method of the second argument, if present, * according to the [FantasyLand Chain spec](https://github.com/fantasyland/fantasy-land#chain). * * @func * @memberOf R * @since v0.3.0 * @category List * @sig Chain m => (a -> m b) -> m a -> m b * @param {Function} fn The function to map with * @param {Array} list The list to map over * @return {Array} The result of flat-mapping `list` with `fn` * @example * * var duplicate = n => [n, n]; * R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3] * * R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1] */ var chain = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['fantasy-land/chain', 'chain'], _xchain, function chain(fn, monad) { if (typeof monad === 'function') { return function (x) { return fn(monad(x))(x); }; } return _makeFlat(false)(map(fn, monad)); })); module.exports = chain; /***/ }), /* 672 */ /*!********************************************!*\ !*** ../~/ramda/src/internal/_makeFlat.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var _isArrayLike = /*#__PURE__*/__webpack_require__(/*! ./_isArrayLike */ 634); /** * `_makeFlat` is a helper function that returns a one-level or fully recursive * function based on the flag passed in. * * @private */ function _makeFlat(recursive) { return function flatt(list) { var value, jlen, j; var result = []; var idx = 0; var ilen = list.length; while (idx < ilen) { if (_isArrayLike(list[idx])) { value = recursive ? flatt(list[idx]) : list[idx]; j = 0; jlen = value.length; while (j < jlen) { result[result.length] = value[j]; j += 1; } } else { result[result.length] = list[idx]; } idx += 1; } return result; }; } module.exports = _makeFlat; /***/ }), /* 673 */ /*!******************************************!*\ !*** ../~/ramda/src/internal/_xchain.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _flatCat = /*#__PURE__*/__webpack_require__(/*! ./_flatCat */ 674); var map = /*#__PURE__*/__webpack_require__(/*! ../map */ 631); var _xchain = /*#__PURE__*/_curry2(function _xchain(f, xf) { return map(f, _flatCat(xf)); }); module.exports = _xchain; /***/ }), /* 674 */ /*!*******************************************!*\ !*** ../~/ramda/src/internal/_flatCat.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var _forceReduced = /*#__PURE__*/__webpack_require__(/*! ./_forceReduced */ 675); var _isArrayLike = /*#__PURE__*/__webpack_require__(/*! ./_isArrayLike */ 634); var _reduce = /*#__PURE__*/__webpack_require__(/*! ./_reduce */ 633); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var preservingReduced = function (xf) { return { '@@transducer/init': _xfBase.init, '@@transducer/result': function (result) { return xf['@@transducer/result'](result); }, '@@transducer/step': function (result, input) { var ret = xf['@@transducer/step'](result, input); return ret['@@transducer/reduced'] ? _forceReduced(ret) : ret; } }; }; var _flatCat = function _xcat(xf) { var rxf = preservingReduced(xf); return { '@@transducer/init': _xfBase.init, '@@transducer/result': function (result) { return rxf['@@transducer/result'](result); }, '@@transducer/step': function (result, input) { return !_isArrayLike(input) ? _reduce(rxf, result, [input]) : _reduce(rxf, result, input); } }; }; module.exports = _flatCat; /***/ }), /* 675 */ /*!************************************************!*\ !*** ../~/ramda/src/internal/_forceReduced.js ***! \************************************************/ /***/ (function(module, exports) { function _forceReduced(x) { return { '@@transducer/value': x, '@@transducer/reduced': true }; } module.exports = _forceReduced; /***/ }), /* 676 */ /*!*******************************!*\ !*** ../~/ramda/src/clamp.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Restricts a number to be within a range. * * Also works for other ordered types such as Strings and Dates. * * @func * @memberOf R * @since v0.20.0 * @category Relation * @sig Ord a => a -> a -> a -> a * @param {Number} minimum The lower limit of the clamp (inclusive) * @param {Number} maximum The upper limit of the clamp (inclusive) * @param {Number} value Value to be clamped * @return {Number} Returns `minimum` when `val < minimum`, `maximum` when `val > maximum`, returns `val` otherwise * @example * * R.clamp(1, 10, -5) // => 1 * R.clamp(1, 10, 15) // => 10 * R.clamp(1, 10, 4) // => 4 */ var clamp = /*#__PURE__*/_curry3(function clamp(min, max, value) { if (min > max) { throw new Error('min must not be greater than max in clamp(min, max, value)'); } return value < min ? min : value > max ? max : value; }); module.exports = clamp; /***/ }), /* 677 */ /*!*******************************!*\ !*** ../~/ramda/src/clone.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _clone = /*#__PURE__*/__webpack_require__(/*! ./internal/_clone */ 678); var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Creates a deep copy of the value which may contain (nested) `Array`s and * `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are * assigned by reference rather than copied * * Dispatches to a `clone` method if present. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {*} -> {*} * @param {*} value The object or array to clone * @return {*} A deeply cloned copy of `val` * @example * * var objects = [{}, {}, {}]; * var objectsClone = R.clone(objects); * objects === objectsClone; //=> false * objects[0] === objectsClone[0]; //=> false */ var clone = /*#__PURE__*/_curry1(function clone(value) { return value != null && typeof value.clone === 'function' ? value.clone() : _clone(value, [], [], true); }); module.exports = clone; /***/ }), /* 678 */ /*!*****************************************!*\ !*** ../~/ramda/src/internal/_clone.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { var _cloneRegExp = /*#__PURE__*/__webpack_require__(/*! ./_cloneRegExp */ 679); var type = /*#__PURE__*/__webpack_require__(/*! ../type */ 680); /** * Copies an object. * * @private * @param {*} value The value to be copied * @param {Array} refFrom Array containing the source references * @param {Array} refTo Array containing the copied source references * @param {Boolean} deep Whether or not to perform deep cloning. * @return {*} The copied value. */ function _clone(value, refFrom, refTo, deep) { var copy = function copy(copiedValue) { var len = refFrom.length; var idx = 0; while (idx < len) { if (value === refFrom[idx]) { return refTo[idx]; } idx += 1; } refFrom[idx + 1] = value; refTo[idx + 1] = copiedValue; for (var key in value) { copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key]; } return copiedValue; }; switch (type(value)) { case 'Object': return copy({}); case 'Array': return copy([]); case 'Date': return new Date(value.valueOf()); case 'RegExp': return _cloneRegExp(value); default: return value; } } module.exports = _clone; /***/ }), /* 679 */ /*!***********************************************!*\ !*** ../~/ramda/src/internal/_cloneRegExp.js ***! \***********************************************/ /***/ (function(module, exports) { function _cloneRegExp(pattern) { return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : '')); } module.exports = _cloneRegExp; /***/ }), /* 680 */ /*!******************************!*\ !*** ../~/ramda/src/type.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Gives a single-word string description of the (native) type of a value, * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not * attempt to distinguish user Object types any further, reporting them all as * 'Object'. * * @func * @memberOf R * @since v0.8.0 * @category Type * @sig (* -> {*}) -> String * @param {*} val The value to test * @return {String} * @example * * R.type({}); //=> "Object" * R.type(1); //=> "Number" * R.type(false); //=> "Boolean" * R.type('s'); //=> "String" * R.type(null); //=> "Null" * R.type([]); //=> "Array" * R.type(/[A-z]/); //=> "RegExp" * R.type(() => {}); //=> "Function" * R.type(undefined); //=> "Undefined" */ var type = /*#__PURE__*/_curry1(function type(val) { return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1); }); module.exports = type; /***/ }), /* 681 */ /*!************************************!*\ !*** ../~/ramda/src/comparator.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Makes a comparator function out of a function that reports whether the first * element is less than the second. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((a, b) -> Boolean) -> ((a, b) -> Number) * @param {Function} pred A predicate function of arity two which will return `true` if the first argument * is less than the second, `false` otherwise * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0` * @example * * var byAge = R.comparator((a, b) => a.age < b.age); * var people = [ * // ... * ]; * var peopleByIncreasingAge = R.sort(byAge, people); */ var comparator = /*#__PURE__*/_curry1(function comparator(pred) { return function (a, b) { return pred(a, b) ? -1 : pred(b, a) ? 1 : 0; }; }); module.exports = comparator; /***/ }), /* 682 */ /*!************************************!*\ !*** ../~/ramda/src/complement.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { var lift = /*#__PURE__*/__webpack_require__(/*! ./lift */ 667); var not = /*#__PURE__*/__webpack_require__(/*! ./not */ 683); /** * Takes a function `f` and returns a function `g` such that if called with the same arguments * when `f` returns a "truthy" value, `g` returns `false` and when `f` returns a "falsy" value `g` returns `true`. * * `R.complement` may be applied to any functor * * @func * @memberOf R * @since v0.12.0 * @category Logic * @sig (*... -> *) -> (*... -> Boolean) * @param {Function} f * @return {Function} * @see R.not * @example * * var isNotNil = R.complement(R.isNil); * isNil(null); //=> true * isNotNil(null); //=> false * isNil(7); //=> false * isNotNil(7); //=> true */ var complement = /*#__PURE__*/lift(not); module.exports = complement; /***/ }), /* 683 */ /*!*****************************!*\ !*** ../~/ramda/src/not.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * A function that returns the `!` of its argument. It will return `true` when * passed false-y value, and `false` when passed a truth-y one. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig * -> Boolean * @param {*} a any value * @return {Boolean} the logical inverse of passed argument. * @see R.complement * @example * * R.not(true); //=> false * R.not(false); //=> true * R.not(0); //=> true * R.not(1); //=> false */ var not = /*#__PURE__*/_curry1(function not(a) { return !a; }); module.exports = not; /***/ }), /* 684 */ /*!*********************************!*\ !*** ../~/ramda/src/compose.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var pipe = /*#__PURE__*/__webpack_require__(/*! ./pipe */ 685); var reverse = /*#__PURE__*/__webpack_require__(/*! ./reverse */ 690); /** * Performs right-to-left function composition. The rightmost function may have * any arity; the remaining functions must be unary. * * **Note:** The result of compose is not automatically curried. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z) * @param {...Function} ...functions The functions to compose * @return {Function} * @see R.pipe * @example * * var classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName * var yellGreeting = R.compose(R.toUpper, classyGreeting); * yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND" * * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7 * * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b))) */ function compose() { if (arguments.length === 0) { throw new Error('compose requires at least one argument'); } return pipe.apply(this, reverse(arguments)); } module.exports = compose; /***/ }), /* 685 */ /*!******************************!*\ !*** ../~/ramda/src/pipe.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _arity = /*#__PURE__*/__webpack_require__(/*! ./internal/_arity */ 617); var _pipe = /*#__PURE__*/__webpack_require__(/*! ./internal/_pipe */ 686); var reduce = /*#__PURE__*/__webpack_require__(/*! ./reduce */ 644); var tail = /*#__PURE__*/__webpack_require__(/*! ./tail */ 687); /** * Performs left-to-right function composition. The leftmost function may have * any arity; the remaining functions must be unary. * * In some libraries this function is named `sequence`. * * **Note:** The result of pipe is not automatically curried. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z) * @param {...Function} functions * @return {Function} * @see R.compose * @example * * var f = R.pipe(Math.pow, R.negate, R.inc); * * f(3, 4); // -(3^4) + 1 * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b))) */ function pipe() { if (arguments.length === 0) { throw new Error('pipe requires at least one argument'); } return _arity(arguments[0].length, reduce(_pipe, arguments[0], tail(arguments))); } module.exports = pipe; /***/ }), /* 686 */ /*!****************************************!*\ !*** ../~/ramda/src/internal/_pipe.js ***! \****************************************/ /***/ (function(module, exports) { function _pipe(f, g) { return function () { return g.call(this, f.apply(this, arguments)); }; } module.exports = _pipe; /***/ }), /* 687 */ /*!******************************!*\ !*** ../~/ramda/src/tail.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _checkForMethod = /*#__PURE__*/__webpack_require__(/*! ./internal/_checkForMethod */ 688); var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var slice = /*#__PURE__*/__webpack_require__(/*! ./slice */ 689); /** * Returns all but the first element of the given list or string (or object * with a `tail` method). * * Dispatches to the `slice` method of the first argument, if present. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] * @sig String -> String * @param {*} list * @return {*} * @see R.head, R.init, R.last * @example * * R.tail([1, 2, 3]); //=> [2, 3] * R.tail([1, 2]); //=> [2] * R.tail([1]); //=> [] * R.tail([]); //=> [] * * R.tail('abc'); //=> 'bc' * R.tail('ab'); //=> 'b' * R.tail('a'); //=> '' * R.tail(''); //=> '' */ var tail = /*#__PURE__*/_curry1( /*#__PURE__*/_checkForMethod('tail', /*#__PURE__*/slice(1, Infinity))); module.exports = tail; /***/ }), /* 688 */ /*!**************************************************!*\ !*** ../~/ramda/src/internal/_checkForMethod.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var _isArray = /*#__PURE__*/__webpack_require__(/*! ./_isArray */ 623); /** * This checks whether a function has a [methodname] function. If it isn't an * array it will execute that function otherwise it will default to the ramda * implementation. * * @private * @param {Function} fn ramda implemtation * @param {String} methodname property to check for a custom implementation * @return {Object} Whatever the return value of the method is. */ function _checkForMethod(methodname, fn) { return function () { var length = arguments.length; if (length === 0) { return fn(); } var obj = arguments[length - 1]; return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); }; } module.exports = _checkForMethod; /***/ }), /* 689 */ /*!*******************************!*\ !*** ../~/ramda/src/slice.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _checkForMethod = /*#__PURE__*/__webpack_require__(/*! ./internal/_checkForMethod */ 688); var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Returns the elements of the given list or string (or object with a `slice` * method) from `fromIndex` (inclusive) to `toIndex` (exclusive). * * Dispatches to the `slice` method of the third argument, if present. * * @func * @memberOf R * @since v0.1.4 * @category List * @sig Number -> Number -> [a] -> [a] * @sig Number -> Number -> String -> String * @param {Number} fromIndex The start index (inclusive). * @param {Number} toIndex The end index (exclusive). * @param {*} list * @return {*} * @example * * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd'] * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c'] * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] * R.slice(0, 3, 'ramda'); //=> 'ram' */ var slice = /*#__PURE__*/_curry3( /*#__PURE__*/_checkForMethod('slice', function slice(fromIndex, toIndex, list) { return Array.prototype.slice.call(list, fromIndex, toIndex); })); module.exports = slice; /***/ }), /* 690 */ /*!*********************************!*\ !*** ../~/ramda/src/reverse.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var _isString = /*#__PURE__*/__webpack_require__(/*! ./internal/_isString */ 635); /** * Returns a new list or string with the elements or characters in reverse * order. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] * @sig String -> String * @param {Array|String} list * @return {Array|String} * @example * * R.reverse([1, 2, 3]); //=> [3, 2, 1] * R.reverse([1, 2]); //=> [2, 1] * R.reverse([1]); //=> [1] * R.reverse([]); //=> [] * * R.reverse('abc'); //=> 'cba' * R.reverse('ab'); //=> 'ba' * R.reverse('a'); //=> 'a' * R.reverse(''); //=> '' */ var reverse = /*#__PURE__*/_curry1(function reverse(list) { return _isString(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse(); }); module.exports = reverse; /***/ }), /* 691 */ /*!**********************************!*\ !*** ../~/ramda/src/composeK.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var chain = /*#__PURE__*/__webpack_require__(/*! ./chain */ 671); var compose = /*#__PURE__*/__webpack_require__(/*! ./compose */ 684); var map = /*#__PURE__*/__webpack_require__(/*! ./map */ 631); /** * Returns the right-to-left Kleisli composition of the provided functions, * each of which must return a value of a type supported by [`chain`](#chain). * * `R.composeK(h, g, f)` is equivalent to `R.compose(R.chain(h), R.chain(g), f)`. * * @func * @memberOf R * @since v0.16.0 * @category Function * @sig Chain m => ((y -> m z), (x -> m y), ..., (a -> m b)) -> (a -> m z) * @param {...Function} ...functions The functions to compose * @return {Function} * @see R.pipeK * @example * * // get :: String -> Object -> Maybe * * var get = R.curry((propName, obj) => Maybe(obj[propName])) * * // getStateCode :: Maybe String -> Maybe String * var getStateCode = R.composeK( * R.compose(Maybe.of, R.toUpper), * get('state'), * get('address'), * get('user'), * ); * getStateCode({"user":{"address":{"state":"ny"}}}); //=> Maybe.Just("NY") * getStateCode({}); //=> Maybe.Nothing() * @symb R.composeK(f, g, h)(a) = R.chain(f, R.chain(g, h(a))) */ function composeK() { if (arguments.length === 0) { throw new Error('composeK requires at least one argument'); } var init = Array.prototype.slice.call(arguments); var last = init.pop(); return compose(compose.apply(this, map(chain, init)), last); } module.exports = composeK; /***/ }), /* 692 */ /*!**********************************!*\ !*** ../~/ramda/src/composeP.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var pipeP = /*#__PURE__*/__webpack_require__(/*! ./pipeP */ 693); var reverse = /*#__PURE__*/__webpack_require__(/*! ./reverse */ 690); /** * Performs right-to-left composition of one or more Promise-returning * functions. The rightmost function may have any arity; the remaining * functions must be unary. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((y -> Promise z), (x -> Promise y), ..., (a -> Promise b)) -> (a -> Promise z) * @param {...Function} functions The functions to compose * @return {Function} * @see R.pipeP * @example * * var db = { * users: { * JOE: { * name: 'Joe', * followers: ['STEVE', 'SUZY'] * } * } * } * * // We'll pretend to do a db lookup which returns a promise * var lookupUser = (userId) => Promise.resolve(db.users[userId]) * var lookupFollowers = (user) => Promise.resolve(user.followers) * lookupUser('JOE').then(lookupFollowers) * * // followersForUser :: String -> Promise [UserId] * var followersForUser = R.composeP(lookupFollowers, lookupUser); * followersForUser('JOE').then(followers => console.log('Followers:', followers)) * // Followers: ["STEVE","SUZY"] */ function composeP() { if (arguments.length === 0) { throw new Error('composeP requires at least one argument'); } return pipeP.apply(this, reverse(arguments)); } module.exports = composeP; /***/ }), /* 693 */ /*!*******************************!*\ !*** ../~/ramda/src/pipeP.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _arity = /*#__PURE__*/__webpack_require__(/*! ./internal/_arity */ 617); var _pipeP = /*#__PURE__*/__webpack_require__(/*! ./internal/_pipeP */ 694); var reduce = /*#__PURE__*/__webpack_require__(/*! ./reduce */ 644); var tail = /*#__PURE__*/__webpack_require__(/*! ./tail */ 687); /** * Performs left-to-right composition of one or more Promise-returning * functions. The leftmost function may have any arity; the remaining functions * must be unary. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((a -> Promise b), (b -> Promise c), ..., (y -> Promise z)) -> (a -> Promise z) * @param {...Function} functions * @return {Function} * @see R.composeP * @example * * // followersForUser :: String -> Promise [User] * var followersForUser = R.pipeP(db.getUserById, db.getFollowers); */ function pipeP() { if (arguments.length === 0) { throw new Error('pipeP requires at least one argument'); } return _arity(arguments[0].length, reduce(_pipeP, arguments[0], tail(arguments))); } module.exports = pipeP; /***/ }), /* 694 */ /*!*****************************************!*\ !*** ../~/ramda/src/internal/_pipeP.js ***! \*****************************************/ /***/ (function(module, exports) { function _pipeP(f, g) { return function () { var ctx = this; return f.apply(ctx, arguments).then(function (x) { return g.call(ctx, x); }); }; } module.exports = _pipeP; /***/ }), /* 695 */ /*!********************************!*\ !*** ../~/ramda/src/concat.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _isArray = /*#__PURE__*/__webpack_require__(/*! ./internal/_isArray */ 623); var _isFunction = /*#__PURE__*/__webpack_require__(/*! ./internal/_isFunction */ 666); var _isString = /*#__PURE__*/__webpack_require__(/*! ./internal/_isString */ 635); var toString = /*#__PURE__*/__webpack_require__(/*! ./toString */ 696); /** * Returns the result of concatenating the given lists or strings. * * Note: `R.concat` expects both arguments to be of the same type, * unlike the native `Array.prototype.concat` method. It will throw * an error if you `concat` an Array with a non-Array value. * * Dispatches to the `concat` method of the first argument, if present. * Can also concatenate two members of a [fantasy-land * compatible semigroup](https://github.com/fantasyland/fantasy-land#semigroup). * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] -> [a] * @sig String -> String -> String * @param {Array|String} firstList The first list * @param {Array|String} secondList The second list * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of * `secondList`. * * @example * * R.concat('ABC', 'DEF'); // 'ABCDEF' * R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] * R.concat([], []); //=> [] */ var concat = /*#__PURE__*/_curry2(function concat(a, b) { if (_isArray(a)) { if (_isArray(b)) { return a.concat(b); } throw new TypeError(toString(b) + ' is not an array'); } if (_isString(a)) { if (_isString(b)) { return a + b; } throw new TypeError(toString(b) + ' is not a string'); } if (a != null && _isFunction(a['fantasy-land/concat'])) { return a['fantasy-land/concat'](b); } if (a != null && _isFunction(a.concat)) { return a.concat(b); } throw new TypeError(toString(a) + ' does not have a method named "concat" or "fantasy-land/concat"'); }); module.exports = concat; /***/ }), /* 696 */ /*!**********************************!*\ !*** ../~/ramda/src/toString.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var _toString = /*#__PURE__*/__webpack_require__(/*! ./internal/_toString */ 697); /** * Returns the string representation of the given value. `eval`'ing the output * should result in a value equivalent to the input value. Many of the built-in * `toString` methods do not satisfy this requirement. * * If the given value is an `[object Object]` with a `toString` method other * than `Object.prototype.toString`, this method is invoked with no arguments * to produce the return value. This means user-defined constructor functions * can provide a suitable `toString` method. For example: * * function Point(x, y) { * this.x = x; * this.y = y; * } * * Point.prototype.toString = function() { * return 'new Point(' + this.x + ', ' + this.y + ')'; * }; * * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)' * * @func * @memberOf R * @since v0.14.0 * @category String * @sig * -> String * @param {*} val * @return {String} * @example * * R.toString(42); //=> '42' * R.toString('abc'); //=> '"abc"' * R.toString([1, 2, 3]); //=> '[1, 2, 3]' * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{"bar": 2, "baz": 3, "foo": 1}' * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date("2001-02-03T04:05:06.000Z")' */ var toString = /*#__PURE__*/_curry1(function toString(val) { return _toString(val, []); }); module.exports = toString; /***/ }), /* 697 */ /*!********************************************!*\ !*** ../~/ramda/src/internal/_toString.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var _contains = /*#__PURE__*/__webpack_require__(/*! ./_contains */ 698); var _map = /*#__PURE__*/__webpack_require__(/*! ./_map */ 632); var _quote = /*#__PURE__*/__webpack_require__(/*! ./_quote */ 706); var _toISOString = /*#__PURE__*/__webpack_require__(/*! ./_toISOString */ 707); var keys = /*#__PURE__*/__webpack_require__(/*! ../keys */ 639); var reject = /*#__PURE__*/__webpack_require__(/*! ../reject */ 708); function _toString(x, seen) { var recur = function recur(y) { var xs = seen.concat([x]); return _contains(y, xs) ? '' : _toString(y, xs); }; // mapPairs :: (Object, [String]) -> [String] var mapPairs = function (obj, keys) { return _map(function (k) { return _quote(k) + ': ' + recur(obj[k]); }, keys.slice().sort()); }; switch (Object.prototype.toString.call(x)) { case '[object Arguments]': return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))'; case '[object Array]': return '[' + _map(recur, x).concat(mapPairs(x, reject(function (k) { return (/^\d+$/.test(k) ); }, keys(x)))).join(', ') + ']'; case '[object Boolean]': return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString(); case '[object Date]': return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')'; case '[object Null]': return 'null'; case '[object Number]': return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10); case '[object String]': return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x); case '[object Undefined]': return 'undefined'; default: if (typeof x.toString === 'function') { var repr = x.toString(); if (repr !== '[object Object]') { return repr; } } return '{' + mapPairs(x, keys(x)).join(', ') + '}'; } } module.exports = _toString; /***/ }), /* 698 */ /*!********************************************!*\ !*** ../~/ramda/src/internal/_contains.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var _indexOf = /*#__PURE__*/__webpack_require__(/*! ./_indexOf */ 699); function _contains(a, list) { return _indexOf(list, a, 0) >= 0; } module.exports = _contains; /***/ }), /* 699 */ /*!*******************************************!*\ !*** ../~/ramda/src/internal/_indexOf.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var equals = /*#__PURE__*/__webpack_require__(/*! ../equals */ 700); function _indexOf(list, a, idx) { var inf, item; // Array.prototype.indexOf doesn't exist below IE9 if (typeof list.indexOf === 'function') { switch (typeof a) { case 'number': if (a === 0) { // manually crawl the list to distinguish between +0 and -0 inf = 1 / a; while (idx < list.length) { item = list[idx]; if (item === 0 && 1 / item === inf) { return idx; } idx += 1; } return -1; } else if (a !== a) { // NaN while (idx < list.length) { item = list[idx]; if (typeof item === 'number' && item !== item) { return idx; } idx += 1; } return -1; } // non-zero numbers can utilise Set return list.indexOf(a, idx); // all these types can utilise Set case 'string': case 'boolean': case 'function': case 'undefined': return list.indexOf(a, idx); case 'object': if (a === null) { // null can utilise Set return list.indexOf(a, idx); } } } // anything else not covered above, defer to R.equals while (idx < list.length) { if (equals(list[idx], a)) { return idx; } idx += 1; } return -1; } module.exports = _indexOf; /***/ }), /* 700 */ /*!********************************!*\ !*** ../~/ramda/src/equals.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _equals = /*#__PURE__*/__webpack_require__(/*! ./internal/_equals */ 701); /** * Returns `true` if its arguments are equivalent, `false` otherwise. Handles * cyclical data structures. * * Dispatches symmetrically to the `equals` methods of both arguments, if * present. * * @func * @memberOf R * @since v0.15.0 * @category Relation * @sig a -> b -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @example * * R.equals(1, 1); //=> true * R.equals(1, '1'); //=> false * R.equals([1, 2, 3], [1, 2, 3]); //=> true * * var a = {}; a.v = a; * var b = {}; b.v = b; * R.equals(a, b); //=> true */ var equals = /*#__PURE__*/_curry2(function equals(a, b) { return _equals(a, b, [], []); }); module.exports = equals; /***/ }), /* 701 */ /*!******************************************!*\ !*** ../~/ramda/src/internal/_equals.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var _arrayFromIterator = /*#__PURE__*/__webpack_require__(/*! ./_arrayFromIterator */ 702); var _containsWith = /*#__PURE__*/__webpack_require__(/*! ./_containsWith */ 703); var _functionName = /*#__PURE__*/__webpack_require__(/*! ./_functionName */ 704); var _has = /*#__PURE__*/__webpack_require__(/*! ./_has */ 640); var identical = /*#__PURE__*/__webpack_require__(/*! ../identical */ 705); var keys = /*#__PURE__*/__webpack_require__(/*! ../keys */ 639); var type = /*#__PURE__*/__webpack_require__(/*! ../type */ 680); /** * private _uniqContentEquals function. * That function is checking equality of 2 iterator contents with 2 assumptions * - iterators lengths are the same * - iterators values are unique * * false-positive result will be returned for comparision of, e.g. * - [1,2,3] and [1,2,3,4] * - [1,1,1] and [1,2,3] * */ function _uniqContentEquals(aIterator, bIterator, stackA, stackB) { var a = _arrayFromIterator(aIterator); var b = _arrayFromIterator(bIterator); function eq(_a, _b) { return _equals(_a, _b, stackA.slice(), stackB.slice()); } // if *a* array contains any element that is not included in *b* return !_containsWith(function (b, aItem) { return !_containsWith(eq, aItem, b); }, b, a); } function _equals(a, b, stackA, stackB) { if (identical(a, b)) { return true; } var typeA = type(a); if (typeA !== type(b)) { return false; } if (a == null || b == null) { return false; } if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') { return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a); } if (typeof a.equals === 'function' || typeof b.equals === 'function') { return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a); } switch (typeA) { case 'Arguments': case 'Array': case 'Object': if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') { return a === b; } break; case 'Boolean': case 'Number': case 'String': if (!(typeof a === typeof b && identical(a.valueOf(), b.valueOf()))) { return false; } break; case 'Date': if (!identical(a.valueOf(), b.valueOf())) { return false; } break; case 'Error': return a.name === b.name && a.message === b.message; case 'RegExp': if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) { return false; } break; } var idx = stackA.length - 1; while (idx >= 0) { if (stackA[idx] === a) { return stackB[idx] === b; } idx -= 1; } switch (typeA) { case 'Map': if (a.size !== b.size) { return false; } return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b])); case 'Set': if (a.size !== b.size) { return false; } return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b])); case 'Arguments': case 'Array': case 'Object': case 'Boolean': case 'Number': case 'String': case 'Date': case 'Error': case 'RegExp': case 'Int8Array': case 'Uint8Array': case 'Uint8ClampedArray': case 'Int16Array': case 'Uint16Array': case 'Int32Array': case 'Uint32Array': case 'Float32Array': case 'Float64Array': case 'ArrayBuffer': break; default: // Values of other types are only equal if identical. return false; } var keysA = keys(a); if (keysA.length !== keys(b).length) { return false; } var extendedStackA = stackA.concat([a]); var extendedStackB = stackB.concat([b]); idx = keysA.length - 1; while (idx >= 0) { var key = keysA[idx]; if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) { return false; } idx -= 1; } return true; } module.exports = _equals; /***/ }), /* 702 */ /*!*****************************************************!*\ !*** ../~/ramda/src/internal/_arrayFromIterator.js ***! \*****************************************************/ /***/ (function(module, exports) { function _arrayFromIterator(iter) { var list = []; var next; while (!(next = iter.next()).done) { list.push(next.value); } return list; } module.exports = _arrayFromIterator; /***/ }), /* 703 */ /*!************************************************!*\ !*** ../~/ramda/src/internal/_containsWith.js ***! \************************************************/ /***/ (function(module, exports) { function _containsWith(pred, x, list) { var idx = 0; var len = list.length; while (idx < len) { if (pred(x, list[idx])) { return true; } idx += 1; } return false; } module.exports = _containsWith; /***/ }), /* 704 */ /*!************************************************!*\ !*** ../~/ramda/src/internal/_functionName.js ***! \************************************************/ /***/ (function(module, exports) { function _functionName(f) { // String(x => x) evaluates to "x => x", so the pattern may not match. var match = String(f).match(/^function (\w*)/); return match == null ? '' : match[1]; } module.exports = _functionName; /***/ }), /* 705 */ /*!***********************************!*\ !*** ../~/ramda/src/identical.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns true if its arguments are identical, false otherwise. Values are * identical if they reference the same memory. `NaN` is identical to `NaN`; * `0` and `-0` are not identical. * * @func * @memberOf R * @since v0.15.0 * @category Relation * @sig a -> a -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @example * * var o = {}; * R.identical(o, o); //=> true * R.identical(1, 1); //=> true * R.identical(1, '1'); //=> false * R.identical([], []); //=> false * R.identical(0, -0); //=> false * R.identical(NaN, NaN); //=> true */ var identical = /*#__PURE__*/_curry2(function identical(a, b) { // SameValue algorithm if (a === b) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return a !== 0 || 1 / a === 1 / b; } else { // Step 6.a: NaN == NaN return a !== a && b !== b; } }); module.exports = identical; /***/ }), /* 706 */ /*!*****************************************!*\ !*** ../~/ramda/src/internal/_quote.js ***! \*****************************************/ /***/ (function(module, exports) { function _quote(s) { var escaped = s.replace(/\\/g, '\\\\').replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace .replace(/\f/g, '\\f').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t').replace(/\v/g, '\\v').replace(/\0/g, '\\0'); return '"' + escaped.replace(/"/g, '\\"') + '"'; } module.exports = _quote; /***/ }), /* 707 */ /*!***********************************************!*\ !*** ../~/ramda/src/internal/_toISOString.js ***! \***********************************************/ /***/ (function(module, exports) { /** * Polyfill from . */ var pad = function pad(n) { return (n < 10 ? '0' : '') + n; }; var _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) { return d.toISOString(); } : function _toISOString(d) { return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z'; }; module.exports = _toISOString; /***/ }), /* 708 */ /*!********************************!*\ !*** ../~/ramda/src/reject.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _complement = /*#__PURE__*/__webpack_require__(/*! ./internal/_complement */ 709); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var filter = /*#__PURE__*/__webpack_require__(/*! ./filter */ 710); /** * The complement of [`filter`](#filter). * * Acts as a transducer if a transformer is given in list position. Filterable * objects include plain objects or any object that has a filter method such * as `Array`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Filterable f => (a -> Boolean) -> f a -> f a * @param {Function} pred * @param {Array} filterable * @return {Array} * @see R.filter, R.transduce, R.addIndex * @example * * var isOdd = (n) => n % 2 === 1; * * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4] * * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} */ var reject = /*#__PURE__*/_curry2(function reject(pred, filterable) { return filter(_complement(pred), filterable); }); module.exports = reject; /***/ }), /* 709 */ /*!**********************************************!*\ !*** ../~/ramda/src/internal/_complement.js ***! \**********************************************/ /***/ (function(module, exports) { function _complement(f) { return function () { return !f.apply(this, arguments); }; } module.exports = _complement; /***/ }), /* 710 */ /*!********************************!*\ !*** ../~/ramda/src/filter.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _filter = /*#__PURE__*/__webpack_require__(/*! ./internal/_filter */ 711); var _isObject = /*#__PURE__*/__webpack_require__(/*! ./internal/_isObject */ 712); var _reduce = /*#__PURE__*/__webpack_require__(/*! ./internal/_reduce */ 633); var _xfilter = /*#__PURE__*/__webpack_require__(/*! ./internal/_xfilter */ 713); var keys = /*#__PURE__*/__webpack_require__(/*! ./keys */ 639); /** * Takes a predicate and a `Filterable`, and returns a new filterable of the * same type containing the members of the given filterable which satisfy the * given predicate. Filterable objects include plain objects or any object * that has a filter method such as `Array`. * * Dispatches to the `filter` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Filterable f => (a -> Boolean) -> f a -> f a * @param {Function} pred * @param {Array} filterable * @return {Array} Filterable * @see R.reject, R.transduce, R.addIndex * @example * * var isEven = n => n % 2 === 0; * * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4] * * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} */ var filter = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['filter'], _xfilter, function (pred, filterable) { return _isObject(filterable) ? _reduce(function (acc, key) { if (pred(filterable[key])) { acc[key] = filterable[key]; } return acc; }, {}, keys(filterable)) : // else _filter(pred, filterable); })); module.exports = filter; /***/ }), /* 711 */ /*!******************************************!*\ !*** ../~/ramda/src/internal/_filter.js ***! \******************************************/ /***/ (function(module, exports) { function _filter(fn, list) { var idx = 0; var len = list.length; var result = []; while (idx < len) { if (fn(list[idx])) { result[result.length] = list[idx]; } idx += 1; } return result; } module.exports = _filter; /***/ }), /* 712 */ /*!********************************************!*\ !*** ../~/ramda/src/internal/_isObject.js ***! \********************************************/ /***/ (function(module, exports) { function _isObject(x) { return Object.prototype.toString.call(x) === '[object Object]'; } module.exports = _isObject; /***/ }), /* 713 */ /*!*******************************************!*\ !*** ../~/ramda/src/internal/_xfilter.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XFilter = /*#__PURE__*/function () { function XFilter(f, xf) { this.xf = xf; this.f = f; } XFilter.prototype['@@transducer/init'] = _xfBase.init; XFilter.prototype['@@transducer/result'] = _xfBase.result; XFilter.prototype['@@transducer/step'] = function (result, input) { return this.f(input) ? this.xf['@@transducer/step'](result, input) : result; }; return XFilter; }(); var _xfilter = /*#__PURE__*/_curry2(function _xfilter(f, xf) { return new XFilter(f, xf); }); module.exports = _xfilter; /***/ }), /* 714 */ /*!******************************!*\ !*** ../~/ramda/src/cond.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _arity = /*#__PURE__*/__webpack_require__(/*! ./internal/_arity */ 617); var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var map = /*#__PURE__*/__webpack_require__(/*! ./map */ 631); var max = /*#__PURE__*/__webpack_require__(/*! ./max */ 629); var reduce = /*#__PURE__*/__webpack_require__(/*! ./reduce */ 644); /** * Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic. * `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments * to `fn` are applied to each of the predicates in turn until one returns a * "truthy" value, at which point `fn` returns the result of applying its * arguments to the corresponding transformer. If none of the predicates * matches, `fn` returns undefined. * * @func * @memberOf R * @since v0.6.0 * @category Logic * @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *) * @param {Array} pairs A list of [predicate, transformer] * @return {Function} * @example * * var fn = R.cond([ * [R.equals(0), R.always('water freezes at 0°C')], * [R.equals(100), R.always('water boils at 100°C')], * [R.T, temp => 'nothing special happens at ' + temp + '°C'] * ]); * fn(0); //=> 'water freezes at 0°C' * fn(50); //=> 'nothing special happens at 50°C' * fn(100); //=> 'water boils at 100°C' */ var cond = /*#__PURE__*/_curry1(function cond(pairs) { var arity = reduce(max, 0, map(function (pair) { return pair[0].length; }, pairs)); return _arity(arity, function () { var idx = 0; while (idx < pairs.length) { if (pairs[idx][0].apply(this, arguments)) { return pairs[idx][1].apply(this, arguments); } idx += 1; } }); }); module.exports = cond; /***/ }), /* 715 */ /*!***********************************!*\ !*** ../~/ramda/src/construct.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var constructN = /*#__PURE__*/__webpack_require__(/*! ./constructN */ 716); /** * Wraps a constructor function inside a curried function that can be called * with the same arguments and returns the same type. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (* -> {*}) -> (* -> {*}) * @param {Function} fn The constructor function to wrap. * @return {Function} A wrapped, curried constructor function. * @see R.invoker * @example * * // Constructor function * function Animal(kind) { * this.kind = kind; * }; * Animal.prototype.sighting = function() { * return "It's a " + this.kind + "!"; * } * * var AnimalConstructor = R.construct(Animal) * * // Notice we no longer need the 'new' keyword: * AnimalConstructor('Pig'); //=> {"kind": "Pig", "sighting": function (){...}}; * * var animalTypes = ["Lion", "Tiger", "Bear"]; * var animalSighting = R.invoker(0, 'sighting'); * var sightNewAnimal = R.compose(animalSighting, AnimalConstructor); * R.map(sightNewAnimal, animalTypes); //=> ["It's a Lion!", "It's a Tiger!", "It's a Bear!"] */ var construct = /*#__PURE__*/_curry1(function construct(Fn) { return constructN(Fn.length, Fn); }); module.exports = construct; /***/ }), /* 716 */ /*!************************************!*\ !*** ../~/ramda/src/constructN.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var curry = /*#__PURE__*/__webpack_require__(/*! ./curry */ 670); var nAry = /*#__PURE__*/__webpack_require__(/*! ./nAry */ 664); /** * Wraps a constructor function inside a curried function that can be called * with the same arguments and returns the same type. The arity of the function * returned is specified to allow using variadic constructor functions. * * @func * @memberOf R * @since v0.4.0 * @category Function * @sig Number -> (* -> {*}) -> (* -> {*}) * @param {Number} n The arity of the constructor function. * @param {Function} Fn The constructor function to wrap. * @return {Function} A wrapped, curried constructor function. * @example * * // Variadic Constructor function * function Salad() { * this.ingredients = arguments; * } * * Salad.prototype.recipe = function() { * var instructions = R.map(ingredient => 'Add a dollop of ' + ingredient, this.ingredients); * return R.join('\n', instructions); * }; * * var ThreeLayerSalad = R.constructN(3, Salad); * * // Notice we no longer need the 'new' keyword, and the constructor is curried for 3 arguments. * var salad = ThreeLayerSalad('Mayonnaise')('Potato Chips')('Ketchup'); * * console.log(salad.recipe()); * // Add a dollop of Mayonnaise * // Add a dollop of Potato Chips * // Add a dollop of Ketchup */ var constructN = /*#__PURE__*/_curry2(function constructN(n, Fn) { if (n > 10) { throw new Error('Constructor with greater than ten arguments'); } if (n === 0) { return function () { return new Fn(); }; } return curry(nAry(n, function ($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) { switch (arguments.length) { case 1: return new Fn($0); case 2: return new Fn($0, $1); case 3: return new Fn($0, $1, $2); case 4: return new Fn($0, $1, $2, $3); case 5: return new Fn($0, $1, $2, $3, $4); case 6: return new Fn($0, $1, $2, $3, $4, $5); case 7: return new Fn($0, $1, $2, $3, $4, $5, $6); case 8: return new Fn($0, $1, $2, $3, $4, $5, $6, $7); case 9: return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8); case 10: return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8, $9); } })); }); module.exports = constructN; /***/ }), /* 717 */ /*!**********************************!*\ !*** ../~/ramda/src/contains.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _contains = /*#__PURE__*/__webpack_require__(/*! ./internal/_contains */ 698); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns `true` if the specified value is equal, in [`R.equals`](#equals) * terms, to at least one element of the given list; `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> Boolean * @param {Object} a The item to compare against. * @param {Array} list The array to consider. * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise. * @see R.any * @example * * R.contains(3, [1, 2, 3]); //=> true * R.contains(4, [1, 2, 3]); //=> false * R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true * R.contains([42], [[42]]); //=> true */ var contains = /*#__PURE__*/_curry2(_contains); module.exports = contains; /***/ }), /* 718 */ /*!**********************************!*\ !*** ../~/ramda/src/converge.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _map = /*#__PURE__*/__webpack_require__(/*! ./internal/_map */ 632); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); var max = /*#__PURE__*/__webpack_require__(/*! ./max */ 629); var pluck = /*#__PURE__*/__webpack_require__(/*! ./pluck */ 630); var reduce = /*#__PURE__*/__webpack_require__(/*! ./reduce */ 644); /** * Accepts a converging function and a list of branching functions and returns * a new function. When invoked, this new function is applied to some * arguments, each branching function is applied to those same arguments. The * results of each branching function are passed as arguments to the converging * function to produce the return value. * * @func * @memberOf R * @since v0.4.2 * @category Function * @sig ((x1, x2, ...) -> z) -> [((a, b, ...) -> x1), ((a, b, ...) -> x2), ...] -> (a -> b -> ... -> z) * @param {Function} after A function. `after` will be invoked with the return values of * `fn1` and `fn2` as its arguments. * @param {Array} functions A list of functions. * @return {Function} A new function. * @see R.useWith * @example * * var average = R.converge(R.divide, [R.sum, R.length]) * average([1, 2, 3, 4, 5, 6, 7]) //=> 4 * * var strangeConcat = R.converge(R.concat, [R.toUpper, R.toLower]) * strangeConcat("Yodel") //=> "YODELyodel" * * @symb R.converge(f, [g, h])(a, b) = f(g(a, b), h(a, b)) */ var converge = /*#__PURE__*/_curry2(function converge(after, fns) { return curryN(reduce(max, 0, pluck('length', fns)), function () { var args = arguments; var context = this; return after.apply(context, _map(function (fn) { return fn.apply(context, args); }, fns)); }); }); module.exports = converge; /***/ }), /* 719 */ /*!*********************************!*\ !*** ../~/ramda/src/countBy.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var reduceBy = /*#__PURE__*/__webpack_require__(/*! ./reduceBy */ 720); /** * Counts the elements of a list according to how many match each value of a * key generated by the supplied function. Returns an object mapping the keys * produced by `fn` to the number of occurrences in the list. Note that all * keys are coerced to strings because of how JavaScript objects work. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig (a -> String) -> [a] -> {*} * @param {Function} fn The function used to map values to keys. * @param {Array} list The list to count elements from. * @return {Object} An object mapping keys to number of occurrences in the list. * @example * * var numbers = [1.0, 1.1, 1.2, 2.0, 3.0, 2.2]; * R.countBy(Math.floor)(numbers); //=> {'1': 3, '2': 2, '3': 1} * * var letters = ['a', 'b', 'A', 'a', 'B', 'c']; * R.countBy(R.toLower)(letters); //=> {'a': 3, 'b': 2, 'c': 1} */ var countBy = /*#__PURE__*/reduceBy(function (acc, elem) { return acc + 1; }, 0); module.exports = countBy; /***/ }), /* 720 */ /*!**********************************!*\ !*** ../~/ramda/src/reduceBy.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curryN = /*#__PURE__*/__webpack_require__(/*! ./internal/_curryN */ 618); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _has = /*#__PURE__*/__webpack_require__(/*! ./internal/_has */ 640); var _reduce = /*#__PURE__*/__webpack_require__(/*! ./internal/_reduce */ 633); var _xreduceBy = /*#__PURE__*/__webpack_require__(/*! ./internal/_xreduceBy */ 721); /** * Groups the elements of the list according to the result of calling * the String-returning function `keyFn` on each element and reduces the elements * of each group to a single value via the reducer function `valueFn`. * * This function is basically a more general [`groupBy`](#groupBy) function. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.20.0 * @category List * @sig ((a, b) -> a) -> a -> (b -> String) -> [b] -> {String: a} * @param {Function} valueFn The function that reduces the elements of each group to a single * value. Receives two values, accumulator for a particular group and the current element. * @param {*} acc The (initial) accumulator value for each group. * @param {Function} keyFn The function that maps the list's element into a key. * @param {Array} list The array to group. * @return {Object} An object with the output of `keyFn` for keys, mapped to the output of * `valueFn` for elements which produced that key when passed to `keyFn`. * @see R.groupBy, R.reduce * @example * * var reduceToNamesBy = R.reduceBy((acc, student) => acc.concat(student.name), []); * var namesByGrade = reduceToNamesBy(function(student) { * var score = student.score; * return score < 65 ? 'F' : * score < 70 ? 'D' : * score < 80 ? 'C' : * score < 90 ? 'B' : 'A'; * }); * var students = [{name: 'Lucy', score: 92}, * {name: 'Drew', score: 85}, * // ... * {name: 'Bart', score: 62}]; * namesByGrade(students); * // { * // 'A': ['Lucy'], * // 'B': ['Drew'] * // // ..., * // 'F': ['Bart'] * // } */ var reduceBy = /*#__PURE__*/_curryN(4, [], /*#__PURE__*/_dispatchable([], _xreduceBy, function reduceBy(valueFn, valueAcc, keyFn, list) { return _reduce(function (acc, elt) { var key = keyFn(elt); acc[key] = valueFn(_has(key, acc) ? acc[key] : valueAcc, elt); return acc; }, {}, list); })); module.exports = reduceBy; /***/ }), /* 721 */ /*!*********************************************!*\ !*** ../~/ramda/src/internal/_xreduceBy.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var _curryN = /*#__PURE__*/__webpack_require__(/*! ./_curryN */ 618); var _has = /*#__PURE__*/__webpack_require__(/*! ./_has */ 640); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XReduceBy = /*#__PURE__*/function () { function XReduceBy(valueFn, valueAcc, keyFn, xf) { this.valueFn = valueFn; this.valueAcc = valueAcc; this.keyFn = keyFn; this.xf = xf; this.inputs = {}; } XReduceBy.prototype['@@transducer/init'] = _xfBase.init; XReduceBy.prototype['@@transducer/result'] = function (result) { var key; for (key in this.inputs) { if (_has(key, this.inputs)) { result = this.xf['@@transducer/step'](result, this.inputs[key]); if (result['@@transducer/reduced']) { result = result['@@transducer/value']; break; } } } this.inputs = null; return this.xf['@@transducer/result'](result); }; XReduceBy.prototype['@@transducer/step'] = function (result, input) { var key = this.keyFn(input); this.inputs[key] = this.inputs[key] || [key, this.valueAcc]; this.inputs[key][1] = this.valueFn(this.inputs[key][1], input); return result; }; return XReduceBy; }(); var _xreduceBy = /*#__PURE__*/_curryN(4, [], function _xreduceBy(valueFn, valueAcc, keyFn, xf) { return new XReduceBy(valueFn, valueAcc, keyFn, xf); }); module.exports = _xreduceBy; /***/ }), /* 722 */ /*!*****************************!*\ !*** ../~/ramda/src/dec.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var add = /*#__PURE__*/__webpack_require__(/*! ./add */ 612); /** * Decrements its argument. * * @func * @memberOf R * @since v0.9.0 * @category Math * @sig Number -> Number * @param {Number} n * @return {Number} n - 1 * @see R.inc * @example * * R.dec(42); //=> 41 */ var dec = /*#__PURE__*/add(-1); module.exports = dec; /***/ }), /* 723 */ /*!***********************************!*\ !*** ../~/ramda/src/defaultTo.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns the second argument if it is not `null`, `undefined` or `NaN`; * otherwise the first argument is returned. * * @func * @memberOf R * @since v0.10.0 * @category Logic * @sig a -> b -> a | b * @param {a} default The default value. * @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`. * @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value * @example * * var defaultTo42 = R.defaultTo(42); * * defaultTo42(null); //=> 42 * defaultTo42(undefined); //=> 42 * defaultTo42('Ramda'); //=> 'Ramda' * // parseInt('string') results in NaN * defaultTo42(parseInt('string')); //=> 42 */ var defaultTo = /*#__PURE__*/_curry2(function defaultTo(d, v) { return v == null || v !== v ? d : v; }); module.exports = defaultTo; /***/ }), /* 724 */ /*!*********************************!*\ !*** ../~/ramda/src/descend.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Makes a descending comparator function out of a function that returns a value * that can be compared with `<` and `>`. * * @func * @memberOf R * @since v0.23.0 * @category Function * @sig Ord b => (a -> b) -> a -> a -> Number * @param {Function} fn A function of arity one that returns a value that can be compared * @param {*} a The first item to be compared. * @param {*} b The second item to be compared. * @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0` * @see R.ascend * @example * * var byAge = R.descend(R.prop('age')); * var people = [ * // ... * ]; * var peopleByOldestFirst = R.sort(byAge, people); */ var descend = /*#__PURE__*/_curry3(function descend(fn, a, b) { var aa = fn(a); var bb = fn(b); return aa > bb ? -1 : aa < bb ? 1 : 0; }); module.exports = descend; /***/ }), /* 725 */ /*!************************************!*\ !*** ../~/ramda/src/difference.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { var _contains = /*#__PURE__*/__webpack_require__(/*! ./internal/_contains */ 698); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Finds the set (i.e. no duplicates) of all elements in the first list not * contained in the second list. Objects and Arrays are compared in terms of * value equality, not reference equality. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` that are not in `list2`. * @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without * @example * * R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2] * R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5] * R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}] */ var difference = /*#__PURE__*/_curry2(function difference(first, second) { var out = []; var idx = 0; var firstLen = first.length; while (idx < firstLen) { if (!_contains(first[idx], second) && !_contains(first[idx], out)) { out[out.length] = first[idx]; } idx += 1; } return out; }); module.exports = difference; /***/ }), /* 726 */ /*!****************************************!*\ !*** ../~/ramda/src/differenceWith.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var _containsWith = /*#__PURE__*/__webpack_require__(/*! ./internal/_containsWith */ 703); var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Finds the set (i.e. no duplicates) of all elements in the first list not * contained in the second list. Duplication is determined according to the * value returned by applying the supplied predicate to two list elements. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` that are not in `list2`. * @see R.difference, R.symmetricDifference, R.symmetricDifferenceWith * @example * * var cmp = (x, y) => x.a === y.a; * var l1 = [{a: 1}, {a: 2}, {a: 3}]; * var l2 = [{a: 3}, {a: 4}]; * R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}] */ var differenceWith = /*#__PURE__*/_curry3(function differenceWith(pred, first, second) { var out = []; var idx = 0; var firstLen = first.length; while (idx < firstLen) { if (!_containsWith(pred, first[idx], second) && !_containsWith(pred, first[idx], out)) { out.push(first[idx]); } idx += 1; } return out; }); module.exports = differenceWith; /***/ }), /* 727 */ /*!********************************!*\ !*** ../~/ramda/src/dissoc.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns a new object that does not contain a `prop` property. * * @func * @memberOf R * @since v0.10.0 * @category Object * @sig String -> {k: v} -> {k: v} * @param {String} prop The name of the property to dissociate * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original but without the specified property * @see R.assoc * @example * * R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3} */ var dissoc = /*#__PURE__*/_curry2(function dissoc(prop, obj) { var result = {}; for (var p in obj) { result[p] = obj[p]; } delete result[prop]; return result; }); module.exports = dissoc; /***/ }), /* 728 */ /*!************************************!*\ !*** ../~/ramda/src/dissocPath.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _isInteger = /*#__PURE__*/__webpack_require__(/*! ./internal/_isInteger */ 661); var assoc = /*#__PURE__*/__webpack_require__(/*! ./assoc */ 659); var dissoc = /*#__PURE__*/__webpack_require__(/*! ./dissoc */ 727); var remove = /*#__PURE__*/__webpack_require__(/*! ./remove */ 729); var update = /*#__PURE__*/__webpack_require__(/*! ./update */ 730); /** * Makes a shallow clone of an object, omitting the property at the given path. * Note that this copies and flattens prototype properties onto the new object * as well. All non-primitive properties are copied by reference. * * @func * @memberOf R * @since v0.11.0 * @category Object * @typedefn Idx = String | Int * @sig [Idx] -> {k: v} -> {k: v} * @param {Array} path The path to the value to omit * @param {Object} obj The object to clone * @return {Object} A new object without the property at path * @see R.assocPath * @example * * R.dissocPath(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}} */ var dissocPath = /*#__PURE__*/_curry2(function dissocPath(path, obj) { switch (path.length) { case 0: return obj; case 1: return _isInteger(path[0]) ? remove(path[0], 1, obj) : dissoc(path[0], obj); default: var head = path[0]; var tail = Array.prototype.slice.call(path, 1); if (obj[head] == null) { return obj; } else if (_isInteger(path[0])) { return update(head, dissocPath(tail, obj[head]), obj); } else { return assoc(head, dissocPath(tail, obj[head]), obj); } } }); module.exports = dissocPath; /***/ }), /* 729 */ /*!********************************!*\ !*** ../~/ramda/src/remove.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Removes the sub-list of `list` starting at index `start` and containing * `count` elements. _Note that this is not destructive_: it returns a copy of * the list with the changes. * No lists have been harmed in the application of this function. * * @func * @memberOf R * @since v0.2.2 * @category List * @sig Number -> Number -> [a] -> [a] * @param {Number} start The position to start removing elements * @param {Number} count The number of elements to remove * @param {Array} list The list to remove from * @return {Array} A new Array with `count` elements from `start` removed. * @example * * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8] */ var remove = /*#__PURE__*/_curry3(function remove(start, count, list) { var result = Array.prototype.slice.call(list, 0); result.splice(start, count); return result; }); module.exports = remove; /***/ }), /* 730 */ /*!********************************!*\ !*** ../~/ramda/src/update.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var adjust = /*#__PURE__*/__webpack_require__(/*! ./adjust */ 619); var always = /*#__PURE__*/__webpack_require__(/*! ./always */ 607); /** * Returns a new copy of the array with the element at the provided index * replaced with the given value. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig Number -> a -> [a] -> [a] * @param {Number} idx The index to update. * @param {*} x The value to exist at the given index of the returned array. * @param {Array|Arguments} list The source array-like object to be updated. * @return {Array} A copy of `list` with the value at index `idx` replaced with `x`. * @see R.adjust * @example * * R.update(1, 11, [0, 1, 2]); //=> [0, 11, 2] * R.update(1)(11)([0, 1, 2]); //=> [0, 11, 2] * @symb R.update(-1, a, [b, c]) = [b, a] * @symb R.update(0, a, [b, c]) = [a, c] * @symb R.update(1, a, [b, c]) = [b, a] */ var update = /*#__PURE__*/_curry3(function update(idx, x, list) { return adjust(always(x), idx, list); }); module.exports = update; /***/ }), /* 731 */ /*!********************************!*\ !*** ../~/ramda/src/divide.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Divides two numbers. Equivalent to `a / b`. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a The first value. * @param {Number} b The second value. * @return {Number} The result of `a / b`. * @see R.multiply * @example * * R.divide(71, 100); //=> 0.71 * * var half = R.divide(R.__, 2); * half(42); //=> 21 * * var reciprocal = R.divide(1); * reciprocal(4); //=> 0.25 */ var divide = /*#__PURE__*/_curry2(function divide(a, b) { return a / b; }); module.exports = divide; /***/ }), /* 732 */ /*!******************************!*\ !*** ../~/ramda/src/drop.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xdrop = /*#__PURE__*/__webpack_require__(/*! ./internal/_xdrop */ 733); var slice = /*#__PURE__*/__webpack_require__(/*! ./slice */ 689); /** * Returns all but the first `n` elements of the given list, string, or * transducer/transformer (or object with a `drop` method). * * Dispatches to the `drop` method of the second argument, if present. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n * @param {*} list * @return {*} A copy of list without the first `n` elements * @see R.take, R.transduce, R.dropLast, R.dropWhile * @example * * R.drop(1, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] * R.drop(2, ['foo', 'bar', 'baz']); //=> ['baz'] * R.drop(3, ['foo', 'bar', 'baz']); //=> [] * R.drop(4, ['foo', 'bar', 'baz']); //=> [] * R.drop(3, 'ramda'); //=> 'da' */ var drop = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['drop'], _xdrop, function drop(n, xs) { return slice(Math.max(0, n), Infinity, xs); })); module.exports = drop; /***/ }), /* 733 */ /*!*****************************************!*\ !*** ../~/ramda/src/internal/_xdrop.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XDrop = /*#__PURE__*/function () { function XDrop(n, xf) { this.xf = xf; this.n = n; } XDrop.prototype['@@transducer/init'] = _xfBase.init; XDrop.prototype['@@transducer/result'] = _xfBase.result; XDrop.prototype['@@transducer/step'] = function (result, input) { if (this.n > 0) { this.n -= 1; return result; } return this.xf['@@transducer/step'](result, input); }; return XDrop; }(); var _xdrop = /*#__PURE__*/_curry2(function _xdrop(n, xf) { return new XDrop(n, xf); }); module.exports = _xdrop; /***/ }), /* 734 */ /*!**********************************!*\ !*** ../~/ramda/src/dropLast.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _dropLast = /*#__PURE__*/__webpack_require__(/*! ./internal/_dropLast */ 735); var _xdropLast = /*#__PURE__*/__webpack_require__(/*! ./internal/_xdropLast */ 738); /** * Returns a list containing all but the last `n` elements of the given `list`. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n The number of elements of `list` to skip. * @param {Array} list The list of elements to consider. * @return {Array} A copy of the list with only the first `list.length - n` elements * @see R.takeLast, R.drop, R.dropWhile, R.dropLastWhile * @example * * R.dropLast(1, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] * R.dropLast(2, ['foo', 'bar', 'baz']); //=> ['foo'] * R.dropLast(3, ['foo', 'bar', 'baz']); //=> [] * R.dropLast(4, ['foo', 'bar', 'baz']); //=> [] * R.dropLast(3, 'ramda'); //=> 'ra' */ var dropLast = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable([], _xdropLast, _dropLast)); module.exports = dropLast; /***/ }), /* 735 */ /*!********************************************!*\ !*** ../~/ramda/src/internal/_dropLast.js ***! \********************************************/ /***/ (function(module, exports, __webpack_require__) { var take = /*#__PURE__*/__webpack_require__(/*! ../take */ 736); function dropLast(n, xs) { return take(n < xs.length ? xs.length - n : 0, xs); } module.exports = dropLast; /***/ }), /* 736 */ /*!******************************!*\ !*** ../~/ramda/src/take.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xtake = /*#__PURE__*/__webpack_require__(/*! ./internal/_xtake */ 737); var slice = /*#__PURE__*/__webpack_require__(/*! ./slice */ 689); /** * Returns the first `n` elements of the given list, string, or * transducer/transformer (or object with a `take` method). * * Dispatches to the `take` method of the second argument, if present. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n * @param {*} list * @return {*} * @see R.drop * @example * * R.take(1, ['foo', 'bar', 'baz']); //=> ['foo'] * R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] * R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.take(3, 'ramda'); //=> 'ram' * * var personnel = [ * 'Dave Brubeck', * 'Paul Desmond', * 'Eugene Wright', * 'Joe Morello', * 'Gerry Mulligan', * 'Bob Bates', * 'Joe Dodge', * 'Ron Crotty' * ]; * * var takeFive = R.take(5); * takeFive(personnel); * //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan'] * @symb R.take(-1, [a, b]) = [a, b] * @symb R.take(0, [a, b]) = [] * @symb R.take(1, [a, b]) = [a] * @symb R.take(2, [a, b]) = [a, b] */ var take = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['take'], _xtake, function take(n, xs) { return slice(0, n < 0 ? Infinity : n, xs); })); module.exports = take; /***/ }), /* 737 */ /*!*****************************************!*\ !*** ../~/ramda/src/internal/_xtake.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _reduced = /*#__PURE__*/__webpack_require__(/*! ./_reduced */ 626); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XTake = /*#__PURE__*/function () { function XTake(n, xf) { this.xf = xf; this.n = n; this.i = 0; } XTake.prototype['@@transducer/init'] = _xfBase.init; XTake.prototype['@@transducer/result'] = _xfBase.result; XTake.prototype['@@transducer/step'] = function (result, input) { this.i += 1; var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input); return this.n >= 0 && this.i >= this.n ? _reduced(ret) : ret; }; return XTake; }(); var _xtake = /*#__PURE__*/_curry2(function _xtake(n, xf) { return new XTake(n, xf); }); module.exports = _xtake; /***/ }), /* 738 */ /*!*********************************************!*\ !*** ../~/ramda/src/internal/_xdropLast.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XDropLast = /*#__PURE__*/function () { function XDropLast(n, xf) { this.xf = xf; this.pos = 0; this.full = false; this.acc = new Array(n); } XDropLast.prototype['@@transducer/init'] = _xfBase.init; XDropLast.prototype['@@transducer/result'] = function (result) { this.acc = null; return this.xf['@@transducer/result'](result); }; XDropLast.prototype['@@transducer/step'] = function (result, input) { if (this.full) { result = this.xf['@@transducer/step'](result, this.acc[this.pos]); } this.store(input); return result; }; XDropLast.prototype.store = function (input) { this.acc[this.pos] = input; this.pos += 1; if (this.pos === this.acc.length) { this.pos = 0; this.full = true; } }; return XDropLast; }(); var _xdropLast = /*#__PURE__*/_curry2(function _xdropLast(n, xf) { return new XDropLast(n, xf); }); module.exports = _xdropLast; /***/ }), /* 739 */ /*!***************************************!*\ !*** ../~/ramda/src/dropLastWhile.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _dropLastWhile = /*#__PURE__*/__webpack_require__(/*! ./internal/_dropLastWhile */ 740); var _xdropLastWhile = /*#__PURE__*/__webpack_require__(/*! ./internal/_xdropLastWhile */ 741); /** * Returns a new list excluding all the tailing elements of a given list which * satisfy the supplied predicate function. It passes each value from the right * to the supplied predicate function, skipping elements until the predicate * function returns a `falsy` value. The predicate function is applied to one argument: * *(value)*. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} predicate The function to be called on each element * @param {Array} xs The collection to iterate over. * @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`. * @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile * @example * * var lteThree = x => x <= 3; * * R.dropLastWhile(lteThree, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3, 4] * * R.dropLastWhile(x => x !== 'd' , 'Ramda'); //=> 'Ramd' */ var dropLastWhile = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable([], _xdropLastWhile, _dropLastWhile)); module.exports = dropLastWhile; /***/ }), /* 740 */ /*!*************************************************!*\ !*** ../~/ramda/src/internal/_dropLastWhile.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var slice = /*#__PURE__*/__webpack_require__(/*! ../slice */ 689); function dropLastWhile(pred, xs) { var idx = xs.length - 1; while (idx >= 0 && pred(xs[idx])) { idx -= 1; } return slice(0, idx + 1, xs); } module.exports = dropLastWhile; /***/ }), /* 741 */ /*!**************************************************!*\ !*** ../~/ramda/src/internal/_xdropLastWhile.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _reduce = /*#__PURE__*/__webpack_require__(/*! ./_reduce */ 633); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XDropLastWhile = /*#__PURE__*/function () { function XDropLastWhile(fn, xf) { this.f = fn; this.retained = []; this.xf = xf; } XDropLastWhile.prototype['@@transducer/init'] = _xfBase.init; XDropLastWhile.prototype['@@transducer/result'] = function (result) { this.retained = null; return this.xf['@@transducer/result'](result); }; XDropLastWhile.prototype['@@transducer/step'] = function (result, input) { return this.f(input) ? this.retain(result, input) : this.flush(result, input); }; XDropLastWhile.prototype.flush = function (result, input) { result = _reduce(this.xf['@@transducer/step'], result, this.retained); this.retained = []; return this.xf['@@transducer/step'](result, input); }; XDropLastWhile.prototype.retain = function (result, input) { this.retained.push(input); return result; }; return XDropLastWhile; }(); var _xdropLastWhile = /*#__PURE__*/_curry2(function _xdropLastWhile(fn, xf) { return new XDropLastWhile(fn, xf); }); module.exports = _xdropLastWhile; /***/ }), /* 742 */ /*!*************************************!*\ !*** ../~/ramda/src/dropRepeats.js ***! \*************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xdropRepeatsWith = /*#__PURE__*/__webpack_require__(/*! ./internal/_xdropRepeatsWith */ 743); var dropRepeatsWith = /*#__PURE__*/__webpack_require__(/*! ./dropRepeatsWith */ 744); var equals = /*#__PURE__*/__webpack_require__(/*! ./equals */ 700); /** * Returns a new list without any consecutively repeating elements. * [`R.equals`](#equals) is used to determine equality. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig [a] -> [a] * @param {Array} list The array to consider. * @return {Array} `list` without repeating elements. * @see R.transduce * @example * * R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2] */ var dropRepeats = /*#__PURE__*/_curry1( /*#__PURE__*/_dispatchable([], /*#__PURE__*/_xdropRepeatsWith(equals), /*#__PURE__*/dropRepeatsWith(equals))); module.exports = dropRepeats; /***/ }), /* 743 */ /*!****************************************************!*\ !*** ../~/ramda/src/internal/_xdropRepeatsWith.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XDropRepeatsWith = /*#__PURE__*/function () { function XDropRepeatsWith(pred, xf) { this.xf = xf; this.pred = pred; this.lastValue = undefined; this.seenFirstValue = false; } XDropRepeatsWith.prototype['@@transducer/init'] = _xfBase.init; XDropRepeatsWith.prototype['@@transducer/result'] = _xfBase.result; XDropRepeatsWith.prototype['@@transducer/step'] = function (result, input) { var sameAsLast = false; if (!this.seenFirstValue) { this.seenFirstValue = true; } else if (this.pred(this.lastValue, input)) { sameAsLast = true; } this.lastValue = input; return sameAsLast ? result : this.xf['@@transducer/step'](result, input); }; return XDropRepeatsWith; }(); var _xdropRepeatsWith = /*#__PURE__*/_curry2(function _xdropRepeatsWith(pred, xf) { return new XDropRepeatsWith(pred, xf); }); module.exports = _xdropRepeatsWith; /***/ }), /* 744 */ /*!*****************************************!*\ !*** ../~/ramda/src/dropRepeatsWith.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xdropRepeatsWith = /*#__PURE__*/__webpack_require__(/*! ./internal/_xdropRepeatsWith */ 743); var last = /*#__PURE__*/__webpack_require__(/*! ./last */ 745); /** * Returns a new list without any consecutively repeating elements. Equality is * determined by applying the supplied predicate to each pair of consecutive elements. The * first element in a series of equal elements will be preserved. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig ((a, a) -> Boolean) -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list The array to consider. * @return {Array} `list` without repeating elements. * @see R.transduce * @example * * var l = [1, -1, 1, 3, 4, -4, -4, -5, 5, 3, 3]; * R.dropRepeatsWith(R.eqBy(Math.abs), l); //=> [1, 3, 4, -5, 3] */ var dropRepeatsWith = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable([], _xdropRepeatsWith, function dropRepeatsWith(pred, list) { var result = []; var idx = 1; var len = list.length; if (len !== 0) { result[0] = list[0]; while (idx < len) { if (!pred(last(result), list[idx])) { result[result.length] = list[idx]; } idx += 1; } } return result; })); module.exports = dropRepeatsWith; /***/ }), /* 745 */ /*!******************************!*\ !*** ../~/ramda/src/last.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var nth = /*#__PURE__*/__webpack_require__(/*! ./nth */ 746); /** * Returns the last element of the given list or string. * * @func * @memberOf R * @since v0.1.4 * @category List * @sig [a] -> a | Undefined * @sig String -> String * @param {*} list * @return {*} * @see R.init, R.head, R.tail * @example * * R.last(['fi', 'fo', 'fum']); //=> 'fum' * R.last([]); //=> undefined * * R.last('abc'); //=> 'c' * R.last(''); //=> '' */ var last = /*#__PURE__*/nth(-1); module.exports = last; /***/ }), /* 746 */ /*!*****************************!*\ !*** ../~/ramda/src/nth.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _isString = /*#__PURE__*/__webpack_require__(/*! ./internal/_isString */ 635); /** * Returns the nth element of the given list or string. If n is negative the * element at index length + n is returned. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> [a] -> a | Undefined * @sig Number -> String -> String * @param {Number} offset * @param {*} list * @return {*} * @example * * var list = ['foo', 'bar', 'baz', 'quux']; * R.nth(1, list); //=> 'bar' * R.nth(-1, list); //=> 'quux' * R.nth(-99, list); //=> undefined * * R.nth(2, 'abc'); //=> 'c' * R.nth(3, 'abc'); //=> '' * @symb R.nth(-1, [a, b, c]) = c * @symb R.nth(0, [a, b, c]) = a * @symb R.nth(1, [a, b, c]) = b */ var nth = /*#__PURE__*/_curry2(function nth(offset, list) { var idx = offset < 0 ? list.length + offset : offset; return _isString(list) ? list.charAt(idx) : list[idx]; }); module.exports = nth; /***/ }), /* 747 */ /*!***********************************!*\ !*** ../~/ramda/src/dropWhile.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xdropWhile = /*#__PURE__*/__webpack_require__(/*! ./internal/_xdropWhile */ 748); var slice = /*#__PURE__*/__webpack_require__(/*! ./slice */ 689); /** * Returns a new list excluding the leading elements of a given list which * satisfy the supplied predicate function. It passes each value to the supplied * predicate function, skipping elements while the predicate function returns * `true`. The predicate function is applied to one argument: *(value)*. * * Dispatches to the `dropWhile` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.9.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} fn The function called per iteration. * @param {Array} xs The collection to iterate over. * @return {Array} A new array. * @see R.takeWhile, R.transduce, R.addIndex * @example * * var lteTwo = x => x <= 2; * * R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1] * * R.dropWhile(x => x !== 'd' , 'Ramda'); //=> 'da' */ var dropWhile = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['dropWhile'], _xdropWhile, function dropWhile(pred, xs) { var idx = 0; var len = xs.length; while (idx < len && pred(xs[idx])) { idx += 1; } return slice(idx, Infinity, xs); })); module.exports = dropWhile; /***/ }), /* 748 */ /*!**********************************************!*\ !*** ../~/ramda/src/internal/_xdropWhile.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XDropWhile = /*#__PURE__*/function () { function XDropWhile(f, xf) { this.xf = xf; this.f = f; } XDropWhile.prototype['@@transducer/init'] = _xfBase.init; XDropWhile.prototype['@@transducer/result'] = _xfBase.result; XDropWhile.prototype['@@transducer/step'] = function (result, input) { if (this.f) { if (this.f(input)) { return result; } this.f = null; } return this.xf['@@transducer/step'](result, input); }; return XDropWhile; }(); var _xdropWhile = /*#__PURE__*/_curry2(function _xdropWhile(f, xf) { return new XDropWhile(f, xf); }); module.exports = _xdropWhile; /***/ }), /* 749 */ /*!********************************!*\ !*** ../~/ramda/src/either.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _isFunction = /*#__PURE__*/__webpack_require__(/*! ./internal/_isFunction */ 666); var lift = /*#__PURE__*/__webpack_require__(/*! ./lift */ 667); var or = /*#__PURE__*/__webpack_require__(/*! ./or */ 750); /** * A function wrapping calls to the two functions in an `||` operation, * returning the result of the first function if it is truth-y and the result * of the second function otherwise. Note that this is short-circuited, * meaning that the second function will not be invoked if the first returns a * truth-y value. * * In addition to functions, `R.either` also accepts any fantasy-land compatible * applicative functor. * * @func * @memberOf R * @since v0.12.0 * @category Logic * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) * @param {Function} f a predicate * @param {Function} g another predicate * @return {Function} a function that applies its arguments to `f` and `g` and `||`s their outputs together. * @see R.or * @example * * var gt10 = x => x > 10; * var even = x => x % 2 === 0; * var f = R.either(gt10, even); * f(101); //=> true * f(8); //=> true */ var either = /*#__PURE__*/_curry2(function either(f, g) { return _isFunction(f) ? function _either() { return f.apply(this, arguments) || g.apply(this, arguments); } : lift(or)(f, g); }); module.exports = either; /***/ }), /* 750 */ /*!****************************!*\ !*** ../~/ramda/src/or.js ***! \****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns `true` if one or both of its arguments are `true`. Returns `false` * if both arguments are `false`. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig a -> b -> a | b * @param {Any} a * @param {Any} b * @return {Any} the first argument if truthy, otherwise the second argument. * @see R.either * @example * * R.or(true, true); //=> true * R.or(true, false); //=> true * R.or(false, true); //=> true * R.or(false, false); //=> false */ var or = /*#__PURE__*/_curry2(function or(a, b) { return a || b; }); module.exports = or; /***/ }), /* 751 */ /*!*******************************!*\ !*** ../~/ramda/src/empty.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var _isArguments = /*#__PURE__*/__webpack_require__(/*! ./internal/_isArguments */ 641); var _isArray = /*#__PURE__*/__webpack_require__(/*! ./internal/_isArray */ 623); var _isObject = /*#__PURE__*/__webpack_require__(/*! ./internal/_isObject */ 712); var _isString = /*#__PURE__*/__webpack_require__(/*! ./internal/_isString */ 635); /** * Returns the empty value of its argument's type. Ramda defines the empty * value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other * types are supported if they define `.empty`, * `.prototype.empty` or implement the * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid). * * Dispatches to the `empty` method of the first argument, if present. * * @func * @memberOf R * @since v0.3.0 * @category Function * @sig a -> a * @param {*} x * @return {*} * @example * * R.empty(Just(42)); //=> Nothing() * R.empty([1, 2, 3]); //=> [] * R.empty('unicorns'); //=> '' * R.empty({x: 1, y: 2}); //=> {} */ var empty = /*#__PURE__*/_curry1(function empty(x) { return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? '' : _isObject(x) ? {} : _isArguments(x) ? function () { return arguments; }() : // else void 0; }); module.exports = empty; /***/ }), /* 752 */ /*!**********************************!*\ !*** ../~/ramda/src/endsWith.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var equals = /*#__PURE__*/__webpack_require__(/*! ./equals */ 700); var takeLast = /*#__PURE__*/__webpack_require__(/*! ./takeLast */ 753); /** * Checks if a list ends with the provided values * * @func * @memberOf R * @since v0.24.0 * @category List * @sig [a] -> Boolean * @sig String -> Boolean * @param {*} suffix * @param {*} list * @return {Boolean} * @example * * R.endsWith('c', 'abc') //=> true * R.endsWith('b', 'abc') //=> false * R.endsWith(['c'], ['a', 'b', 'c']) //=> true * R.endsWith(['b'], ['a', 'b', 'c']) //=> false */ var endsWith = /*#__PURE__*/_curry2(function (suffix, list) { return equals(takeLast(suffix.length, list), suffix); }); module.exports = endsWith; /***/ }), /* 753 */ /*!**********************************!*\ !*** ../~/ramda/src/takeLast.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var drop = /*#__PURE__*/__webpack_require__(/*! ./drop */ 732); /** * Returns a new list containing the last `n` elements of the given list. * If `n > list.length`, returns a list of `list.length` elements. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n The number of elements to return. * @param {Array} xs The collection to consider. * @return {Array} * @see R.dropLast * @example * * R.takeLast(1, ['foo', 'bar', 'baz']); //=> ['baz'] * R.takeLast(2, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] * R.takeLast(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.takeLast(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.takeLast(3, 'ramda'); //=> 'mda' */ var takeLast = /*#__PURE__*/_curry2(function takeLast(n, xs) { return drop(n >= 0 ? xs.length - n : 0, xs); }); module.exports = takeLast; /***/ }), /* 754 */ /*!******************************!*\ !*** ../~/ramda/src/eqBy.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var equals = /*#__PURE__*/__webpack_require__(/*! ./equals */ 700); /** * Takes a function and two values in its domain and returns `true` if the * values map to the same value in the codomain; `false` otherwise. * * @func * @memberOf R * @since v0.18.0 * @category Relation * @sig (a -> b) -> a -> a -> Boolean * @param {Function} f * @param {*} x * @param {*} y * @return {Boolean} * @example * * R.eqBy(Math.abs, 5, -5); //=> true */ var eqBy = /*#__PURE__*/_curry3(function eqBy(f, x, y) { return equals(f(x), f(y)); }); module.exports = eqBy; /***/ }), /* 755 */ /*!*********************************!*\ !*** ../~/ramda/src/eqProps.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var equals = /*#__PURE__*/__webpack_require__(/*! ./equals */ 700); /** * Reports whether two objects have the same value, in [`R.equals`](#equals) * terms, for the specified property. Useful as a curried predicate. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig k -> {k: v} -> {k: v} -> Boolean * @param {String} prop The name of the property to compare * @param {Object} obj1 * @param {Object} obj2 * @return {Boolean} * * @example * * var o1 = { a: 1, b: 2, c: 3, d: 4 }; * var o2 = { a: 10, b: 20, c: 3, d: 40 }; * R.eqProps('a', o1, o2); //=> false * R.eqProps('c', o1, o2); //=> true */ var eqProps = /*#__PURE__*/_curry3(function eqProps(prop, obj1, obj2) { return equals(obj1[prop], obj2[prop]); }); module.exports = eqProps; /***/ }), /* 756 */ /*!********************************!*\ !*** ../~/ramda/src/evolve.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Creates a new object by recursively evolving a shallow copy of `object`, * according to the `transformation` functions. All non-primitive properties * are copied by reference. * * A `transformation` function will not be invoked if its corresponding key * does not exist in the evolved object. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig {k: (v -> v)} -> {k: v} -> {k: v} * @param {Object} transformations The object specifying transformation functions to apply * to the object. * @param {Object} object The object to be transformed. * @return {Object} The transformed object. * @example * * var tomato = {firstName: ' Tomato ', data: {elapsed: 100, remaining: 1400}, id:123}; * var transformations = { * firstName: R.trim, * lastName: R.trim, // Will not get invoked. * data: {elapsed: R.add(1), remaining: R.add(-1)} * }; * R.evolve(transformations, tomato); //=> {firstName: 'Tomato', data: {elapsed: 101, remaining: 1399}, id:123} */ var evolve = /*#__PURE__*/_curry2(function evolve(transformations, object) { var result = {}; var transformation, key, type; for (key in object) { transformation = transformations[key]; type = typeof transformation; result[key] = type === 'function' ? transformation(object[key]) : transformation && type === 'object' ? evolve(transformation, object[key]) : object[key]; } return result; }); module.exports = evolve; /***/ }), /* 757 */ /*!******************************!*\ !*** ../~/ramda/src/find.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xfind = /*#__PURE__*/__webpack_require__(/*! ./internal/_xfind */ 758); /** * Returns the first element of the list which matches the predicate, or * `undefined` if no element matches. * * Dispatches to the `find` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> a | undefined * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Object} The element found, or `undefined`. * @see R.transduce * @example * * var xs = [{a: 1}, {a: 2}, {a: 3}]; * R.find(R.propEq('a', 2))(xs); //=> {a: 2} * R.find(R.propEq('a', 4))(xs); //=> undefined */ var find = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['find'], _xfind, function find(fn, list) { var idx = 0; var len = list.length; while (idx < len) { if (fn(list[idx])) { return list[idx]; } idx += 1; } })); module.exports = find; /***/ }), /* 758 */ /*!*****************************************!*\ !*** ../~/ramda/src/internal/_xfind.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _reduced = /*#__PURE__*/__webpack_require__(/*! ./_reduced */ 626); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XFind = /*#__PURE__*/function () { function XFind(f, xf) { this.xf = xf; this.f = f; this.found = false; } XFind.prototype['@@transducer/init'] = _xfBase.init; XFind.prototype['@@transducer/result'] = function (result) { if (!this.found) { result = this.xf['@@transducer/step'](result, void 0); } return this.xf['@@transducer/result'](result); }; XFind.prototype['@@transducer/step'] = function (result, input) { if (this.f(input)) { this.found = true; result = _reduced(this.xf['@@transducer/step'](result, input)); } return result; }; return XFind; }(); var _xfind = /*#__PURE__*/_curry2(function _xfind(f, xf) { return new XFind(f, xf); }); module.exports = _xfind; /***/ }), /* 759 */ /*!***********************************!*\ !*** ../~/ramda/src/findIndex.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xfindIndex = /*#__PURE__*/__webpack_require__(/*! ./internal/_xfindIndex */ 760); /** * Returns the index of the first element of the list which matches the * predicate, or `-1` if no element matches. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> Boolean) -> [a] -> Number * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Number} The index of the element found, or `-1`. * @see R.transduce * @example * * var xs = [{a: 1}, {a: 2}, {a: 3}]; * R.findIndex(R.propEq('a', 2))(xs); //=> 1 * R.findIndex(R.propEq('a', 4))(xs); //=> -1 */ var findIndex = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable([], _xfindIndex, function findIndex(fn, list) { var idx = 0; var len = list.length; while (idx < len) { if (fn(list[idx])) { return idx; } idx += 1; } return -1; })); module.exports = findIndex; /***/ }), /* 760 */ /*!**********************************************!*\ !*** ../~/ramda/src/internal/_xfindIndex.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _reduced = /*#__PURE__*/__webpack_require__(/*! ./_reduced */ 626); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XFindIndex = /*#__PURE__*/function () { function XFindIndex(f, xf) { this.xf = xf; this.f = f; this.idx = -1; this.found = false; } XFindIndex.prototype['@@transducer/init'] = _xfBase.init; XFindIndex.prototype['@@transducer/result'] = function (result) { if (!this.found) { result = this.xf['@@transducer/step'](result, -1); } return this.xf['@@transducer/result'](result); }; XFindIndex.prototype['@@transducer/step'] = function (result, input) { this.idx += 1; if (this.f(input)) { this.found = true; result = _reduced(this.xf['@@transducer/step'](result, this.idx)); } return result; }; return XFindIndex; }(); var _xfindIndex = /*#__PURE__*/_curry2(function _xfindIndex(f, xf) { return new XFindIndex(f, xf); }); module.exports = _xfindIndex; /***/ }), /* 761 */ /*!**********************************!*\ !*** ../~/ramda/src/findLast.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xfindLast = /*#__PURE__*/__webpack_require__(/*! ./internal/_xfindLast */ 762); /** * Returns the last element of the list which matches the predicate, or * `undefined` if no element matches. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> Boolean) -> [a] -> a | undefined * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Object} The element found, or `undefined`. * @see R.transduce * @example * * var xs = [{a: 1, b: 0}, {a:1, b: 1}]; * R.findLast(R.propEq('a', 1))(xs); //=> {a: 1, b: 1} * R.findLast(R.propEq('a', 4))(xs); //=> undefined */ var findLast = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable([], _xfindLast, function findLast(fn, list) { var idx = list.length - 1; while (idx >= 0) { if (fn(list[idx])) { return list[idx]; } idx -= 1; } })); module.exports = findLast; /***/ }), /* 762 */ /*!*********************************************!*\ !*** ../~/ramda/src/internal/_xfindLast.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XFindLast = /*#__PURE__*/function () { function XFindLast(f, xf) { this.xf = xf; this.f = f; } XFindLast.prototype['@@transducer/init'] = _xfBase.init; XFindLast.prototype['@@transducer/result'] = function (result) { return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.last)); }; XFindLast.prototype['@@transducer/step'] = function (result, input) { if (this.f(input)) { this.last = input; } return result; }; return XFindLast; }(); var _xfindLast = /*#__PURE__*/_curry2(function _xfindLast(f, xf) { return new XFindLast(f, xf); }); module.exports = _xfindLast; /***/ }), /* 763 */ /*!***************************************!*\ !*** ../~/ramda/src/findLastIndex.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xfindLastIndex = /*#__PURE__*/__webpack_require__(/*! ./internal/_xfindLastIndex */ 764); /** * Returns the index of the last element of the list which matches the * predicate, or `-1` if no element matches. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> Boolean) -> [a] -> Number * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Number} The index of the element found, or `-1`. * @see R.transduce * @example * * var xs = [{a: 1, b: 0}, {a:1, b: 1}]; * R.findLastIndex(R.propEq('a', 1))(xs); //=> 1 * R.findLastIndex(R.propEq('a', 4))(xs); //=> -1 */ var findLastIndex = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable([], _xfindLastIndex, function findLastIndex(fn, list) { var idx = list.length - 1; while (idx >= 0) { if (fn(list[idx])) { return idx; } idx -= 1; } return -1; })); module.exports = findLastIndex; /***/ }), /* 764 */ /*!**************************************************!*\ !*** ../~/ramda/src/internal/_xfindLastIndex.js ***! \**************************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XFindLastIndex = /*#__PURE__*/function () { function XFindLastIndex(f, xf) { this.xf = xf; this.f = f; this.idx = -1; this.lastIdx = -1; } XFindLastIndex.prototype['@@transducer/init'] = _xfBase.init; XFindLastIndex.prototype['@@transducer/result'] = function (result) { return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.lastIdx)); }; XFindLastIndex.prototype['@@transducer/step'] = function (result, input) { this.idx += 1; if (this.f(input)) { this.lastIdx = this.idx; } return result; }; return XFindLastIndex; }(); var _xfindLastIndex = /*#__PURE__*/_curry2(function _xfindLastIndex(f, xf) { return new XFindLastIndex(f, xf); }); module.exports = _xfindLastIndex; /***/ }), /* 765 */ /*!*********************************!*\ !*** ../~/ramda/src/flatten.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var _makeFlat = /*#__PURE__*/__webpack_require__(/*! ./internal/_makeFlat */ 672); /** * Returns a new list by pulling every item out of it (and all its sub-arrays) * and putting them in a new array, depth-first. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [b] * @param {Array} list The array to consider. * @return {Array} The flattened list. * @see R.unnest * @example * * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]); * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] */ var flatten = /*#__PURE__*/_curry1( /*#__PURE__*/_makeFlat(true)); module.exports = flatten; /***/ }), /* 766 */ /*!******************************!*\ !*** ../~/ramda/src/flip.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); /** * Returns a new function much like the supplied one, except that the first two * arguments' order is reversed. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z) * @param {Function} fn The function to invoke with its first two parameters reversed. * @return {*} The result of invoking `fn` with its first two parameters' order reversed. * @example * * var mergeThree = (a, b, c) => [].concat(a, b, c); * * mergeThree(1, 2, 3); //=> [1, 2, 3] * * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3] * @symb R.flip(f)(a, b, c) = f(b, a, c) */ var flip = /*#__PURE__*/_curry1(function flip(fn) { return curryN(fn.length, function (a, b) { var args = Array.prototype.slice.call(arguments, 0); args[0] = b; args[1] = a; return fn.apply(this, args); }); }); module.exports = flip; /***/ }), /* 767 */ /*!*********************************!*\ !*** ../~/ramda/src/forEach.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _checkForMethod = /*#__PURE__*/__webpack_require__(/*! ./internal/_checkForMethod */ 688); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Iterate over an input `list`, calling a provided function `fn` for each * element in the list. * * `fn` receives one argument: *(value)*. * * Note: `R.forEach` does not skip deleted or unassigned indices (sparse * arrays), unlike the native `Array.prototype.forEach` method. For more * details on this behavior, see: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description * * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns * the original array. In some libraries this function is named `each`. * * Dispatches to the `forEach` method of the second argument, if present. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> *) -> [a] -> [a] * @param {Function} fn The function to invoke. Receives one argument, `value`. * @param {Array} list The list to iterate over. * @return {Array} The original list. * @see R.addIndex * @example * * var printXPlusFive = x => console.log(x + 5); * R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3] * // logs 6 * // logs 7 * // logs 8 * @symb R.forEach(f, [a, b, c]) = [a, b, c] */ var forEach = /*#__PURE__*/_curry2( /*#__PURE__*/_checkForMethod('forEach', function forEach(fn, list) { var len = list.length; var idx = 0; while (idx < len) { fn(list[idx]); idx += 1; } return list; })); module.exports = forEach; /***/ }), /* 768 */ /*!*******************************************!*\ !*** ../~/ramda/src/forEachObjIndexed.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var keys = /*#__PURE__*/__webpack_require__(/*! ./keys */ 639); /** * Iterate over an input `object`, calling a provided function `fn` for each * key and value in the object. * * `fn` receives three argument: *(value, key, obj)*. * * @func * @memberOf R * @since v0.23.0 * @category Object * @sig ((a, String, StrMap a) -> Any) -> StrMap a -> StrMap a * @param {Function} fn The function to invoke. Receives three argument, `value`, `key`, `obj`. * @param {Object} obj The object to iterate over. * @return {Object} The original object. * @example * * var printKeyConcatValue = (value, key) => console.log(key + ':' + value); * R.forEachObjIndexed(printKeyConcatValue, {x: 1, y: 2}); //=> {x: 1, y: 2} * // logs x:1 * // logs y:2 * @symb R.forEachObjIndexed(f, {x: a, y: b}) = {x: a, y: b} */ var forEachObjIndexed = /*#__PURE__*/_curry2(function forEachObjIndexed(fn, obj) { var keyList = keys(obj); var idx = 0; while (idx < keyList.length) { var key = keyList[idx]; fn(obj[key], key, obj); idx += 1; } return obj; }); module.exports = forEachObjIndexed; /***/ }), /* 769 */ /*!***********************************!*\ !*** ../~/ramda/src/fromPairs.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Creates a new object from a list key-value pairs. If a key appears in * multiple pairs, the rightmost pair is included in the object. * * @func * @memberOf R * @since v0.3.0 * @category List * @sig [[k,v]] -> {k: v} * @param {Array} pairs An array of two-element arrays that will be the keys and values of the output object. * @return {Object} The object made by pairing up `keys` and `values`. * @see R.toPairs, R.pair * @example * * R.fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3} */ var fromPairs = /*#__PURE__*/_curry1(function fromPairs(pairs) { var result = {}; var idx = 0; while (idx < pairs.length) { result[pairs[idx][0]] = pairs[idx][1]; idx += 1; } return result; }); module.exports = fromPairs; /***/ }), /* 770 */ /*!*********************************!*\ !*** ../~/ramda/src/groupBy.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _checkForMethod = /*#__PURE__*/__webpack_require__(/*! ./internal/_checkForMethod */ 688); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var reduceBy = /*#__PURE__*/__webpack_require__(/*! ./reduceBy */ 720); /** * Splits a list into sub-lists stored in an object, based on the result of * calling a String-returning function on each element, and grouping the * results according to values returned. * * Dispatches to the `groupBy` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> String) -> [a] -> {String: [a]} * @param {Function} fn Function :: a -> String * @param {Array} list The array to group * @return {Object} An object with the output of `fn` for keys, mapped to arrays of elements * that produced that key when passed to `fn`. * @see R.transduce * @example * * var byGrade = R.groupBy(function(student) { * var score = student.score; * return score < 65 ? 'F' : * score < 70 ? 'D' : * score < 80 ? 'C' : * score < 90 ? 'B' : 'A'; * }); * var students = [{name: 'Abby', score: 84}, * {name: 'Eddy', score: 58}, * // ... * {name: 'Jack', score: 69}]; * byGrade(students); * // { * // 'A': [{name: 'Dianne', score: 99}], * // 'B': [{name: 'Abby', score: 84}] * // // ..., * // 'F': [{name: 'Eddy', score: 58}] * // } */ var groupBy = /*#__PURE__*/_curry2( /*#__PURE__*/_checkForMethod('groupBy', /*#__PURE__*/reduceBy(function (acc, item) { if (acc == null) { acc = []; } acc.push(item); return acc; }, null))); module.exports = groupBy; /***/ }), /* 771 */ /*!***********************************!*\ !*** ../~/ramda/src/groupWith.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Takes a list and returns a list of lists where each sublist's elements are * all satisfied pairwise comparison according to the provided function. * Only adjacent elements are passed to the comparison function. * * @func * @memberOf R * @since v0.21.0 * @category List * @sig ((a, a) → Boolean) → [a] → [[a]] * @param {Function} fn Function for determining whether two given (adjacent) * elements should be in the same group * @param {Array} list The array to group. Also accepts a string, which will be * treated as a list of characters. * @return {List} A list that contains sublists of elements, * whose concatenations are equal to the original list. * @example * * R.groupWith(R.equals, [0, 1, 1, 2, 3, 5, 8, 13, 21]) * //=> [[0], [1, 1], [2], [3], [5], [8], [13], [21]] * * R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21]) * //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]] * * R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21]) * //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]] * * R.groupWith(R.eqBy(isVowel), 'aestiou') * //=> ['ae', 'st', 'iou'] */ var groupWith = /*#__PURE__*/_curry2(function (fn, list) { var res = []; var idx = 0; var len = list.length; while (idx < len) { var nextidx = idx + 1; while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) { nextidx += 1; } res.push(list.slice(idx, nextidx)); idx = nextidx; } return res; }); module.exports = groupWith; /***/ }), /* 772 */ /*!****************************!*\ !*** ../~/ramda/src/gt.js ***! \****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns `true` if the first argument is greater than the second; `false` * otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @see R.lt * @example * * R.gt(2, 1); //=> true * R.gt(2, 2); //=> false * R.gt(2, 3); //=> false * R.gt('a', 'z'); //=> false * R.gt('z', 'a'); //=> true */ var gt = /*#__PURE__*/_curry2(function gt(a, b) { return a > b; }); module.exports = gt; /***/ }), /* 773 */ /*!*****************************!*\ !*** ../~/ramda/src/gte.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns `true` if the first argument is greater than or equal to the second; * `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {Number} a * @param {Number} b * @return {Boolean} * @see R.lte * @example * * R.gte(2, 1); //=> true * R.gte(2, 2); //=> true * R.gte(2, 3); //=> false * R.gte('a', 'z'); //=> false * R.gte('z', 'a'); //=> true */ var gte = /*#__PURE__*/_curry2(function gte(a, b) { return a >= b; }); module.exports = gte; /***/ }), /* 774 */ /*!*****************************!*\ !*** ../~/ramda/src/has.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _has = /*#__PURE__*/__webpack_require__(/*! ./internal/_has */ 640); /** * Returns whether or not an object has an own property with the specified name * * @func * @memberOf R * @since v0.7.0 * @category Object * @sig s -> {s: x} -> Boolean * @param {String} prop The name of the property to check for. * @param {Object} obj The object to query. * @return {Boolean} Whether the property exists. * @example * * var hasName = R.has('name'); * hasName({name: 'alice'}); //=> true * hasName({name: 'bob'}); //=> true * hasName({}); //=> false * * var point = {x: 0, y: 0}; * var pointHas = R.has(R.__, point); * pointHas('x'); //=> true * pointHas('y'); //=> true * pointHas('z'); //=> false */ var has = /*#__PURE__*/_curry2(_has); module.exports = has; /***/ }), /* 775 */ /*!*******************************!*\ !*** ../~/ramda/src/hasIn.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns whether or not an object or its prototype chain has a property with * the specified name * * @func * @memberOf R * @since v0.7.0 * @category Object * @sig s -> {s: x} -> Boolean * @param {String} prop The name of the property to check for. * @param {Object} obj The object to query. * @return {Boolean} Whether the property exists. * @example * * function Rectangle(width, height) { * this.width = width; * this.height = height; * } * Rectangle.prototype.area = function() { * return this.width * this.height; * }; * * var square = new Rectangle(2, 2); * R.hasIn('width', square); //=> true * R.hasIn('area', square); //=> true */ var hasIn = /*#__PURE__*/_curry2(function hasIn(prop, obj) { return prop in obj; }); module.exports = hasIn; /***/ }), /* 776 */ /*!******************************!*\ !*** ../~/ramda/src/head.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var nth = /*#__PURE__*/__webpack_require__(/*! ./nth */ 746); /** * Returns the first element of the given list or string. In some libraries * this function is named `first`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> a | Undefined * @sig String -> String * @param {Array|String} list * @return {*} * @see R.tail, R.init, R.last * @example * * R.head(['fi', 'fo', 'fum']); //=> 'fi' * R.head([]); //=> undefined * * R.head('abc'); //=> 'a' * R.head(''); //=> '' */ var head = /*#__PURE__*/nth(0); module.exports = head; /***/ }), /* 777 */ /*!**********************************!*\ !*** ../~/ramda/src/identity.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var _identity = /*#__PURE__*/__webpack_require__(/*! ./internal/_identity */ 778); /** * A function that does nothing but return the parameter supplied to it. Good * as a default or placeholder function. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig a -> a * @param {*} x The value to return. * @return {*} The input value, `x`. * @example * * R.identity(1); //=> 1 * * var obj = {}; * R.identity(obj) === obj; //=> true * @symb R.identity(a) = a */ var identity = /*#__PURE__*/_curry1(_identity); module.exports = identity; /***/ }), /* 778 */ /*!********************************************!*\ !*** ../~/ramda/src/internal/_identity.js ***! \********************************************/ /***/ (function(module, exports) { function _identity(x) { return x; } module.exports = _identity; /***/ }), /* 779 */ /*!********************************!*\ !*** ../~/ramda/src/ifElse.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); /** * Creates a function that will process either the `onTrue` or the `onFalse` * function depending upon the result of the `condition` predicate. * * @func * @memberOf R * @since v0.8.0 * @category Logic * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *) * @param {Function} condition A predicate function * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value. * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value. * @return {Function} A new unary function that will process either the `onTrue` or the `onFalse` * function depending upon the result of the `condition` predicate. * @see R.unless, R.when * @example * * var incCount = R.ifElse( * R.has('count'), * R.over(R.lensProp('count'), R.inc), * R.assoc('count', 1) * ); * incCount({}); //=> { count: 1 } * incCount({ count: 1 }); //=> { count: 2 } */ var ifElse = /*#__PURE__*/_curry3(function ifElse(condition, onTrue, onFalse) { return curryN(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() { return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments); }); }); module.exports = ifElse; /***/ }), /* 780 */ /*!*****************************!*\ !*** ../~/ramda/src/inc.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var add = /*#__PURE__*/__webpack_require__(/*! ./add */ 612); /** * Increments its argument. * * @func * @memberOf R * @since v0.9.0 * @category Math * @sig Number -> Number * @param {Number} n * @return {Number} n + 1 * @see R.dec * @example * * R.inc(42); //=> 43 */ var inc = /*#__PURE__*/add(1); module.exports = inc; /***/ }), /* 781 */ /*!*********************************!*\ !*** ../~/ramda/src/indexBy.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var reduceBy = /*#__PURE__*/__webpack_require__(/*! ./reduceBy */ 720); /** * Given a function that generates a key, turns a list of objects into an * object indexing the objects by the given key. Note that if multiple * objects generate the same value for the indexing key only the last value * will be included in the generated object. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig (a -> String) -> [{k: v}] -> {k: {k: v}} * @param {Function} fn Function :: a -> String * @param {Array} array The array of objects to index * @return {Object} An object indexing each array element by the given property. * @example * * var list = [{id: 'xyz', title: 'A'}, {id: 'abc', title: 'B'}]; * R.indexBy(R.prop('id'), list); * //=> {abc: {id: 'abc', title: 'B'}, xyz: {id: 'xyz', title: 'A'}} */ var indexBy = /*#__PURE__*/reduceBy(function (acc, elem) { return elem; }, null); module.exports = indexBy; /***/ }), /* 782 */ /*!*********************************!*\ !*** ../~/ramda/src/indexOf.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _indexOf = /*#__PURE__*/__webpack_require__(/*! ./internal/_indexOf */ 699); var _isArray = /*#__PURE__*/__webpack_require__(/*! ./internal/_isArray */ 623); /** * Returns the position of the first occurrence of an item in an array, or -1 * if the item is not included in the array. [`R.equals`](#equals) is used to * determine equality. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> Number * @param {*} target The item to find. * @param {Array} xs The array to search in. * @return {Number} the index of the target, or -1 if the target is not found. * @see R.lastIndexOf * @example * * R.indexOf(3, [1,2,3,4]); //=> 2 * R.indexOf(10, [1,2,3,4]); //=> -1 */ var indexOf = /*#__PURE__*/_curry2(function indexOf(target, xs) { return typeof xs.indexOf === 'function' && !_isArray(xs) ? xs.indexOf(target) : _indexOf(xs, target, 0); }); module.exports = indexOf; /***/ }), /* 783 */ /*!******************************!*\ !*** ../~/ramda/src/init.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var slice = /*#__PURE__*/__webpack_require__(/*! ./slice */ 689); /** * Returns all but the last element of the given list or string. * * @func * @memberOf R * @since v0.9.0 * @category List * @sig [a] -> [a] * @sig String -> String * @param {*} list * @return {*} * @see R.last, R.head, R.tail * @example * * R.init([1, 2, 3]); //=> [1, 2] * R.init([1, 2]); //=> [1] * R.init([1]); //=> [] * R.init([]); //=> [] * * R.init('abc'); //=> 'ab' * R.init('ab'); //=> 'a' * R.init('a'); //=> '' * R.init(''); //=> '' */ var init = /*#__PURE__*/slice(0, -1); module.exports = init; /***/ }), /* 784 */ /*!***********************************!*\ !*** ../~/ramda/src/innerJoin.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _containsWith = /*#__PURE__*/__webpack_require__(/*! ./internal/_containsWith */ 703); var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var _filter = /*#__PURE__*/__webpack_require__(/*! ./internal/_filter */ 711); /** * Takes a predicate `pred`, a list `xs`, and a list `ys`, and returns a list * `xs'` comprising each of the elements of `xs` which is equal to one or more * elements of `ys` according to `pred`. * * `pred` must be a binary function expecting an element from each list. * * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should * not be significant, but since `xs'` is ordered the implementation guarantees * that its values are in the same order as they appear in `xs`. Duplicates are * not removed, so `xs'` may contain duplicates if `xs` contains duplicates. * * @func * @memberOf R * @since v0.24.0 * @category Relation * @sig ((a, b) -> Boolean) -> [a] -> [b] -> [a] * @param {Function} pred * @param {Array} xs * @param {Array} ys * @return {Array} * @see R.intersection * @example * * R.innerJoin( * (record, id) => record.id === id, * [{id: 824, name: 'Richie Furay'}, * {id: 956, name: 'Dewey Martin'}, * {id: 313, name: 'Bruce Palmer'}, * {id: 456, name: 'Stephen Stills'}, * {id: 177, name: 'Neil Young'}], * [177, 456, 999] * ); * //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}] */ var innerJoin = /*#__PURE__*/_curry3(function innerJoin(pred, xs, ys) { return _filter(function (x) { return _containsWith(pred, x, ys); }, xs); }); module.exports = innerJoin; /***/ }), /* 785 */ /*!********************************!*\ !*** ../~/ramda/src/insert.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Inserts the supplied element into the list, at the specified `index`. _Note that * this is not destructive_: it returns a copy of the list with the changes. * No lists have been harmed in the application of this function. * * @func * @memberOf R * @since v0.2.2 * @category List * @sig Number -> a -> [a] -> [a] * @param {Number} index The position to insert the element * @param {*} elt The element to insert into the Array * @param {Array} list The list to insert into * @return {Array} A new Array with `elt` inserted at `index`. * @example * * R.insert(2, 'x', [1,2,3,4]); //=> [1,2,'x',3,4] */ var insert = /*#__PURE__*/_curry3(function insert(idx, elt, list) { idx = idx < list.length && idx >= 0 ? idx : list.length; var result = Array.prototype.slice.call(list, 0); result.splice(idx, 0, elt); return result; }); module.exports = insert; /***/ }), /* 786 */ /*!***********************************!*\ !*** ../~/ramda/src/insertAll.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Inserts the sub-list into the list, at the specified `index`. _Note that this is not * destructive_: it returns a copy of the list with the changes. * No lists have been harmed in the application of this function. * * @func * @memberOf R * @since v0.9.0 * @category List * @sig Number -> [a] -> [a] -> [a] * @param {Number} index The position to insert the sub-list * @param {Array} elts The sub-list to insert into the Array * @param {Array} list The list to insert the sub-list into * @return {Array} A new Array with `elts` inserted starting at `index`. * @example * * R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4] */ var insertAll = /*#__PURE__*/_curry3(function insertAll(idx, elts, list) { idx = idx < list.length && idx >= 0 ? idx : list.length; return [].concat(Array.prototype.slice.call(list, 0, idx), elts, Array.prototype.slice.call(list, idx)); }); module.exports = insertAll; /***/ }), /* 787 */ /*!**************************************!*\ !*** ../~/ramda/src/intersection.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { var _contains = /*#__PURE__*/__webpack_require__(/*! ./internal/_contains */ 698); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _filter = /*#__PURE__*/__webpack_require__(/*! ./internal/_filter */ 711); var flip = /*#__PURE__*/__webpack_require__(/*! ./flip */ 766); var uniq = /*#__PURE__*/__webpack_require__(/*! ./uniq */ 788); /** * Combines two lists into a set (i.e. no duplicates) composed of those * elements common to both lists. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The list of elements found in both `list1` and `list2`. * @see R.innerJoin * @example * * R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3] */ var intersection = /*#__PURE__*/_curry2(function intersection(list1, list2) { var lookupList, filteredList; if (list1.length > list2.length) { lookupList = list1; filteredList = list2; } else { lookupList = list2; filteredList = list1; } return uniq(_filter(flip(_contains)(lookupList), filteredList)); }); module.exports = intersection; /***/ }), /* 788 */ /*!******************************!*\ !*** ../~/ramda/src/uniq.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var identity = /*#__PURE__*/__webpack_require__(/*! ./identity */ 777); var uniqBy = /*#__PURE__*/__webpack_require__(/*! ./uniqBy */ 789); /** * Returns a new list containing only one copy of each element in the original * list. [`R.equals`](#equals) is used to determine equality. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] * @param {Array} list The array to consider. * @return {Array} The list of unique items. * @example * * R.uniq([1, 1, 2, 1]); //=> [1, 2] * R.uniq([1, '1']); //=> [1, '1'] * R.uniq([[42], [42]]); //=> [[42]] */ var uniq = /*#__PURE__*/uniqBy(identity); module.exports = uniq; /***/ }), /* 789 */ /*!********************************!*\ !*** ../~/ramda/src/uniqBy.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _Set = /*#__PURE__*/__webpack_require__(/*! ./internal/_Set */ 790); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns a new list containing only one copy of each element in the original * list, based upon the value returned by applying the supplied function to * each list element. Prefers the first item if the supplied function produces * the same value on two items. [`R.equals`](#equals) is used for comparison. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig (a -> b) -> [a] -> [a] * @param {Function} fn A function used to produce a value to use during comparisons. * @param {Array} list The array to consider. * @return {Array} The list of unique items. * @example * * R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10] */ var uniqBy = /*#__PURE__*/_curry2(function uniqBy(fn, list) { var set = new _Set(); var result = []; var idx = 0; var appliedItem, item; while (idx < list.length) { item = list[idx]; appliedItem = fn(item); if (set.add(appliedItem)) { result.push(item); } idx += 1; } return result; }); module.exports = uniqBy; /***/ }), /* 790 */ /*!***************************************!*\ !*** ../~/ramda/src/internal/_Set.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var _contains = /*#__PURE__*/__webpack_require__(/*! ./_contains */ 698); var _Set = /*#__PURE__*/function () { function _Set() { /* globals Set */ this._nativeSet = typeof Set === 'function' ? new Set() : null; this._items = {}; } // until we figure out why jsdoc chokes on this // @param item The item to add to the Set // @returns {boolean} true if the item did not exist prior, otherwise false // _Set.prototype.add = function (item) { return !hasOrAdd(item, true, this); }; // // @param item The item to check for existence in the Set // @returns {boolean} true if the item exists in the Set, otherwise false // _Set.prototype.has = function (item) { return hasOrAdd(item, false, this); }; // // Combines the logic for checking whether an item is a member of the set and // for adding a new item to the set. // // @param item The item to check or add to the Set instance. // @param shouldAdd If true, the item will be added to the set if it doesn't // already exist. // @param set The set instance to check or add to. // @return {boolean} true if the item already existed, otherwise false. // return _Set; }(); function hasOrAdd(item, shouldAdd, set) { var type = typeof item; var prevSize, newSize; switch (type) { case 'string': case 'number': // distinguish between +0 and -0 if (item === 0 && 1 / item === -Infinity) { if (set._items['-0']) { return true; } else { if (shouldAdd) { set._items['-0'] = true; } return false; } } // these types can all utilise the native Set if (set._nativeSet !== null) { if (shouldAdd) { prevSize = set._nativeSet.size; set._nativeSet.add(item); newSize = set._nativeSet.size; return newSize === prevSize; } else { return set._nativeSet.has(item); } } else { if (!(type in set._items)) { if (shouldAdd) { set._items[type] = {}; set._items[type][item] = true; } return false; } else if (item in set._items[type]) { return true; } else { if (shouldAdd) { set._items[type][item] = true; } return false; } } case 'boolean': // set._items['boolean'] holds a two element array // representing [ falseExists, trueExists ] if (type in set._items) { var bIdx = item ? 1 : 0; if (set._items[type][bIdx]) { return true; } else { if (shouldAdd) { set._items[type][bIdx] = true; } return false; } } else { if (shouldAdd) { set._items[type] = item ? [false, true] : [true, false]; } return false; } case 'function': // compare functions for reference equality if (set._nativeSet !== null) { if (shouldAdd) { prevSize = set._nativeSet.size; set._nativeSet.add(item); newSize = set._nativeSet.size; return newSize === prevSize; } else { return set._nativeSet.has(item); } } else { if (!(type in set._items)) { if (shouldAdd) { set._items[type] = [item]; } return false; } if (!_contains(item, set._items[type])) { if (shouldAdd) { set._items[type].push(item); } return false; } return true; } case 'undefined': if (set._items[type]) { return true; } else { if (shouldAdd) { set._items[type] = true; } return false; } case 'object': if (item === null) { if (!set._items['null']) { if (shouldAdd) { set._items['null'] = true; } return false; } return true; } /* falls through */ default: // reduce the search size of heterogeneous sets by creating buckets // for each type. type = Object.prototype.toString.call(item); if (!(type in set._items)) { if (shouldAdd) { set._items[type] = [item]; } return false; } // scan through all previously applied items if (!_contains(item, set._items[type])) { if (shouldAdd) { set._items[type].push(item); } return false; } return true; } } // A simple Set type that honours R.equals semantics module.exports = _Set; /***/ }), /* 791 */ /*!*************************************!*\ !*** ../~/ramda/src/intersperse.js ***! \*************************************/ /***/ (function(module, exports, __webpack_require__) { var _checkForMethod = /*#__PURE__*/__webpack_require__(/*! ./internal/_checkForMethod */ 688); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Creates a new list with the separator interposed between elements. * * Dispatches to the `intersperse` method of the second argument, if present. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig a -> [a] -> [a] * @param {*} separator The element to add to the list. * @param {Array} list The list to be interposed. * @return {Array} The new list. * @example * * R.intersperse('n', ['ba', 'a', 'a']); //=> ['ba', 'n', 'a', 'n', 'a'] */ var intersperse = /*#__PURE__*/_curry2( /*#__PURE__*/_checkForMethod('intersperse', function intersperse(separator, list) { var out = []; var idx = 0; var length = list.length; while (idx < length) { if (idx === length - 1) { out.push(list[idx]); } else { out.push(list[idx], separator); } idx += 1; } return out; })); module.exports = intersperse; /***/ }), /* 792 */ /*!******************************!*\ !*** ../~/ramda/src/into.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _clone = /*#__PURE__*/__webpack_require__(/*! ./internal/_clone */ 678); var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var _isTransformer = /*#__PURE__*/__webpack_require__(/*! ./internal/_isTransformer */ 624); var _reduce = /*#__PURE__*/__webpack_require__(/*! ./internal/_reduce */ 633); var _stepCat = /*#__PURE__*/__webpack_require__(/*! ./internal/_stepCat */ 793); /** * Transforms the items of the list with the transducer and appends the * transformed items to the accumulator using an appropriate iterator function * based on the accumulator type. * * The accumulator can be an array, string, object or a transformer. Iterated * items will be appended to arrays and concatenated to strings. Objects will * be merged directly or 2-item arrays will be merged as key, value pairs. * * The accumulator can also be a transformer object that provides a 2-arity * reducing iterator function, step, 0-arity initial value function, init, and * 1-arity result extraction function result. The step function is used as the * iterator function in reduce. The result function is used to convert the * final accumulator into the return type and in most cases is R.identity. The * init function is used to provide the initial accumulator. * * The iteration is performed with [`R.reduce`](#reduce) after initializing the * transducer. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig a -> (b -> b) -> [c] -> a * @param {*} acc The initial accumulator value. * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @example * * var numbers = [1, 2, 3, 4]; * var transducer = R.compose(R.map(R.add(1)), R.take(2)); * * R.into([], transducer, numbers); //=> [2, 3] * * var intoArray = R.into([]); * intoArray(transducer, numbers); //=> [2, 3] */ var into = /*#__PURE__*/_curry3(function into(acc, xf, list) { return _isTransformer(acc) ? _reduce(xf(acc), acc['@@transducer/init'](), list) : _reduce(xf(_stepCat(acc)), _clone(acc, [], [], false), list); }); module.exports = into; /***/ }), /* 793 */ /*!*******************************************!*\ !*** ../~/ramda/src/internal/_stepCat.js ***! \*******************************************/ /***/ (function(module, exports, __webpack_require__) { var _assign = /*#__PURE__*/__webpack_require__(/*! ./_assign */ 794); var _identity = /*#__PURE__*/__webpack_require__(/*! ./_identity */ 778); var _isArrayLike = /*#__PURE__*/__webpack_require__(/*! ./_isArrayLike */ 634); var _isTransformer = /*#__PURE__*/__webpack_require__(/*! ./_isTransformer */ 624); var objOf = /*#__PURE__*/__webpack_require__(/*! ../objOf */ 796); var _stepCatArray = { '@@transducer/init': Array, '@@transducer/step': function (xs, x) { xs.push(x); return xs; }, '@@transducer/result': _identity }; var _stepCatString = { '@@transducer/init': String, '@@transducer/step': function (a, b) { return a + b; }, '@@transducer/result': _identity }; var _stepCatObject = { '@@transducer/init': Object, '@@transducer/step': function (result, input) { return _assign(result, _isArrayLike(input) ? objOf(input[0], input[1]) : input); }, '@@transducer/result': _identity }; function _stepCat(obj) { if (_isTransformer(obj)) { return obj; } if (_isArrayLike(obj)) { return _stepCatArray; } if (typeof obj === 'string') { return _stepCatString; } if (typeof obj === 'object') { return _stepCatObject; } throw new Error('Cannot create transformer for ' + obj); } module.exports = _stepCat; /***/ }), /* 794 */ /*!******************************************!*\ !*** ../~/ramda/src/internal/_assign.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var _objectAssign = /*#__PURE__*/__webpack_require__(/*! ./_objectAssign */ 795); module.exports = typeof Object.assign === 'function' ? Object.assign : _objectAssign; /***/ }), /* 795 */ /*!************************************************!*\ !*** ../~/ramda/src/internal/_objectAssign.js ***! \************************************************/ /***/ (function(module, exports, __webpack_require__) { var _has = /*#__PURE__*/__webpack_require__(/*! ./_has */ 640); // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign function _objectAssign(target) { if (target == null) { throw new TypeError('Cannot convert undefined or null to object'); } var output = Object(target); var idx = 1; var length = arguments.length; while (idx < length) { var source = arguments[idx]; if (source != null) { for (var nextKey in source) { if (_has(nextKey, source)) { output[nextKey] = source[nextKey]; } } } idx += 1; } return output; } module.exports = _objectAssign; /***/ }), /* 796 */ /*!*******************************!*\ !*** ../~/ramda/src/objOf.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Creates an object containing a single key:value pair. * * @func * @memberOf R * @since v0.18.0 * @category Object * @sig String -> a -> {String:a} * @param {String} key * @param {*} val * @return {Object} * @see R.pair * @example * * var matchPhrases = R.compose( * R.objOf('must'), * R.map(R.objOf('match_phrase')) * ); * matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]} */ var objOf = /*#__PURE__*/_curry2(function objOf(key, val) { var obj = {}; obj[key] = val; return obj; }); module.exports = objOf; /***/ }), /* 797 */ /*!********************************!*\ !*** ../~/ramda/src/invert.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var _has = /*#__PURE__*/__webpack_require__(/*! ./internal/_has */ 640); var keys = /*#__PURE__*/__webpack_require__(/*! ./keys */ 639); /** * Same as [`R.invertObj`](#invertObj), however this accounts for objects with * duplicate values by putting the values into an array. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig {s: x} -> {x: [ s, ... ]} * @param {Object} obj The object or array to invert * @return {Object} out A new object with keys in an array. * @see R.invertObj * @example * * var raceResultsByFirstName = { * first: 'alice', * second: 'jake', * third: 'alice', * }; * R.invert(raceResultsByFirstName); * //=> { 'alice': ['first', 'third'], 'jake':['second'] } */ var invert = /*#__PURE__*/_curry1(function invert(obj) { var props = keys(obj); var len = props.length; var idx = 0; var out = {}; while (idx < len) { var key = props[idx]; var val = obj[key]; var list = _has(val, out) ? out[val] : out[val] = []; list[list.length] = key; idx += 1; } return out; }); module.exports = invert; /***/ }), /* 798 */ /*!***********************************!*\ !*** ../~/ramda/src/invertObj.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var keys = /*#__PURE__*/__webpack_require__(/*! ./keys */ 639); /** * Returns a new object with the keys of the given object as values, and the * values of the given object, which are coerced to strings, as keys. Note * that the last key found is preferred when handling the same value. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig {s: x} -> {x: s} * @param {Object} obj The object or array to invert * @return {Object} out A new object * @see R.invert * @example * * var raceResults = { * first: 'alice', * second: 'jake' * }; * R.invertObj(raceResults); * //=> { 'alice': 'first', 'jake':'second' } * * // Alternatively: * var raceResults = ['alice', 'jake']; * R.invertObj(raceResults); * //=> { 'alice': '0', 'jake':'1' } */ var invertObj = /*#__PURE__*/_curry1(function invertObj(obj) { var props = keys(obj); var len = props.length; var idx = 0; var out = {}; while (idx < len) { var key = props[idx]; out[obj[key]] = key; idx += 1; } return out; }); module.exports = invertObj; /***/ }), /* 799 */ /*!*********************************!*\ !*** ../~/ramda/src/invoker.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _isFunction = /*#__PURE__*/__webpack_require__(/*! ./internal/_isFunction */ 666); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); var toString = /*#__PURE__*/__webpack_require__(/*! ./toString */ 696); /** * Turns a named method with a specified arity into a function that can be * called directly supplied with arguments and a target object. * * The returned function is curried and accepts `arity + 1` parameters where * the final parameter is the target object. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig Number -> String -> (a -> b -> ... -> n -> Object -> *) * @param {Number} arity Number of arguments the returned function should take * before the target object. * @param {String} method Name of the method to call. * @return {Function} A new curried function. * @see R.construct * @example * * var sliceFrom = R.invoker(1, 'slice'); * sliceFrom(6, 'abcdefghijklm'); //=> 'ghijklm' * var sliceFrom6 = R.invoker(2, 'slice')(6); * sliceFrom6(8, 'abcdefghijklm'); //=> 'gh' * @symb R.invoker(0, 'method')(o) = o['method']() * @symb R.invoker(1, 'method')(a, o) = o['method'](a) * @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b) */ var invoker = /*#__PURE__*/_curry2(function invoker(arity, method) { return curryN(arity + 1, function () { var target = arguments[arity]; if (target != null && _isFunction(target[method])) { return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity)); } throw new TypeError(toString(target) + ' does not have a method named "' + method + '"'); }); }); module.exports = invoker; /***/ }), /* 800 */ /*!****************************!*\ !*** ../~/ramda/src/is.js ***! \****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * See if an object (`val`) is an instance of the supplied constructor. This * function will check up the inheritance chain, if any. * * @func * @memberOf R * @since v0.3.0 * @category Type * @sig (* -> {*}) -> a -> Boolean * @param {Object} ctor A constructor * @param {*} val The value to test * @return {Boolean} * @example * * R.is(Object, {}); //=> true * R.is(Number, 1); //=> true * R.is(Object, 1); //=> false * R.is(String, 's'); //=> true * R.is(String, new String('')); //=> true * R.is(Object, new String('')); //=> true * R.is(Object, 's'); //=> false * R.is(Number, {}); //=> false */ var is = /*#__PURE__*/_curry2(function is(Ctor, val) { return val != null && val.constructor === Ctor || val instanceof Ctor; }); module.exports = is; /***/ }), /* 801 */ /*!*********************************!*\ !*** ../~/ramda/src/isEmpty.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var empty = /*#__PURE__*/__webpack_require__(/*! ./empty */ 751); var equals = /*#__PURE__*/__webpack_require__(/*! ./equals */ 700); /** * Returns `true` if the given value is its type's empty value; `false` * otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig a -> Boolean * @param {*} x * @return {Boolean} * @see R.empty * @example * * R.isEmpty([1, 2, 3]); //=> false * R.isEmpty([]); //=> true * R.isEmpty(''); //=> true * R.isEmpty(null); //=> false * R.isEmpty({}); //=> true * R.isEmpty({length: 0}); //=> false */ var isEmpty = /*#__PURE__*/_curry1(function isEmpty(x) { return x != null && equals(x, empty(x)); }); module.exports = isEmpty; /***/ }), /* 802 */ /*!******************************!*\ !*** ../~/ramda/src/join.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var invoker = /*#__PURE__*/__webpack_require__(/*! ./invoker */ 799); /** * Returns a string made by inserting the `separator` between each element and * concatenating all the elements into a single string. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig String -> [a] -> String * @param {Number|String} separator The string used to separate the elements. * @param {Array} xs The elements to join into a string. * @return {String} str The string made by concatenating `xs` with `separator`. * @see R.split * @example * * var spacer = R.join(' '); * spacer(['a', 2, 3.4]); //=> 'a 2 3.4' * R.join('|', [1, 2, 3]); //=> '1|2|3' */ var join = /*#__PURE__*/invoker(1, 'join'); module.exports = join; /***/ }), /* 803 */ /*!******************************!*\ !*** ../~/ramda/src/juxt.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var converge = /*#__PURE__*/__webpack_require__(/*! ./converge */ 718); /** * juxt applies a list of functions to a list of values. * * @func * @memberOf R * @since v0.19.0 * @category Function * @sig [(a, b, ..., m) -> n] -> ((a, b, ..., m) -> [n]) * @param {Array} fns An array of functions * @return {Function} A function that returns a list of values after applying each of the original `fns` to its parameters. * @see R.applySpec * @example * * var getRange = R.juxt([Math.min, Math.max]); * getRange(3, 4, 9, -3); //=> [-3, 9] * @symb R.juxt([f, g, h])(a, b) = [f(a, b), g(a, b), h(a, b)] */ var juxt = /*#__PURE__*/_curry1(function juxt(fns) { return converge(function () { return Array.prototype.slice.call(arguments, 0); }, fns); }); module.exports = juxt; /***/ }), /* 804 */ /*!********************************!*\ !*** ../~/ramda/src/keysIn.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Returns a list containing the names of all the properties of the supplied * object, including prototype properties. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.2.0 * @category Object * @sig {k: v} -> [k] * @param {Object} obj The object to extract properties from * @return {Array} An array of the object's own and prototype properties. * @see R.keys, R.valuesIn * @example * * var F = function() { this.x = 'X'; }; * F.prototype.y = 'Y'; * var f = new F(); * R.keysIn(f); //=> ['x', 'y'] */ var keysIn = /*#__PURE__*/_curry1(function keysIn(obj) { var prop; var ks = []; for (prop in obj) { ks[ks.length] = prop; } return ks; }); module.exports = keysIn; /***/ }), /* 805 */ /*!*************************************!*\ !*** ../~/ramda/src/lastIndexOf.js ***! \*************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _isArray = /*#__PURE__*/__webpack_require__(/*! ./internal/_isArray */ 623); var equals = /*#__PURE__*/__webpack_require__(/*! ./equals */ 700); /** * Returns the position of the last occurrence of an item in an array, or -1 if * the item is not included in the array. [`R.equals`](#equals) is used to * determine equality. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> Number * @param {*} target The item to find. * @param {Array} xs The array to search in. * @return {Number} the index of the target, or -1 if the target is not found. * @see R.indexOf * @example * * R.lastIndexOf(3, [-1,3,3,0,1,2,3,4]); //=> 6 * R.lastIndexOf(10, [1,2,3,4]); //=> -1 */ var lastIndexOf = /*#__PURE__*/_curry2(function lastIndexOf(target, xs) { if (typeof xs.lastIndexOf === 'function' && !_isArray(xs)) { return xs.lastIndexOf(target); } else { var idx = xs.length - 1; while (idx >= 0) { if (equals(xs[idx], target)) { return idx; } idx -= 1; } return -1; } }); module.exports = lastIndexOf; /***/ }), /* 806 */ /*!********************************!*\ !*** ../~/ramda/src/length.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var _isNumber = /*#__PURE__*/__webpack_require__(/*! ./internal/_isNumber */ 807); /** * Returns the number of elements in the array by returning `list.length`. * * @func * @memberOf R * @since v0.3.0 * @category List * @sig [a] -> Number * @param {Array} list The array to inspect. * @return {Number} The length of the array. * @example * * R.length([]); //=> 0 * R.length([1, 2, 3]); //=> 3 */ var length = /*#__PURE__*/_curry1(function length(list) { return list != null && _isNumber(list.length) ? list.length : NaN; }); module.exports = length; /***/ }), /* 807 */ /*!********************************************!*\ !*** ../~/ramda/src/internal/_isNumber.js ***! \********************************************/ /***/ (function(module, exports) { function _isNumber(x) { return Object.prototype.toString.call(x) === '[object Number]'; } module.exports = _isNumber; /***/ }), /* 808 */ /*!******************************!*\ !*** ../~/ramda/src/lens.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var map = /*#__PURE__*/__webpack_require__(/*! ./map */ 631); /** * Returns a lens for the given getter and setter functions. The getter "gets" * the value of the focus; the setter "sets" the value of the focus. The setter * should not mutate the data structure. * * @func * @memberOf R * @since v0.8.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig (s -> a) -> ((a, s) -> s) -> Lens s a * @param {Function} getter * @param {Function} setter * @return {Lens} * @see R.view, R.set, R.over, R.lensIndex, R.lensProp * @example * * var xLens = R.lens(R.prop('x'), R.assoc('x')); * * R.view(xLens, {x: 1, y: 2}); //=> 1 * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} */ var lens = /*#__PURE__*/_curry2(function lens(getter, setter) { return function (toFunctorFn) { return function (target) { return map(function (focus) { return setter(focus, target); }, toFunctorFn(getter(target))); }; }; }); module.exports = lens; /***/ }), /* 809 */ /*!***********************************!*\ !*** ../~/ramda/src/lensIndex.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var lens = /*#__PURE__*/__webpack_require__(/*! ./lens */ 808); var nth = /*#__PURE__*/__webpack_require__(/*! ./nth */ 746); var update = /*#__PURE__*/__webpack_require__(/*! ./update */ 730); /** * Returns a lens whose focus is the specified index. * * @func * @memberOf R * @since v0.14.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Number -> Lens s a * @param {Number} n * @return {Lens} * @see R.view, R.set, R.over * @example * * var headLens = R.lensIndex(0); * * R.view(headLens, ['a', 'b', 'c']); //=> 'a' * R.set(headLens, 'x', ['a', 'b', 'c']); //=> ['x', 'b', 'c'] * R.over(headLens, R.toUpper, ['a', 'b', 'c']); //=> ['A', 'b', 'c'] */ var lensIndex = /*#__PURE__*/_curry1(function lensIndex(n) { return lens(nth(n), update(n)); }); module.exports = lensIndex; /***/ }), /* 810 */ /*!**********************************!*\ !*** ../~/ramda/src/lensPath.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var assocPath = /*#__PURE__*/__webpack_require__(/*! ./assocPath */ 660); var lens = /*#__PURE__*/__webpack_require__(/*! ./lens */ 808); var path = /*#__PURE__*/__webpack_require__(/*! ./path */ 643); /** * Returns a lens whose focus is the specified path. * * @func * @memberOf R * @since v0.19.0 * @category Object * @typedefn Idx = String | Int * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig [Idx] -> Lens s a * @param {Array} path The path to use. * @return {Lens} * @see R.view, R.set, R.over * @example * * var xHeadYLens = R.lensPath(['x', 0, 'y']); * * R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); * //=> 2 * R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); * //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]} * R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); * //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]} */ var lensPath = /*#__PURE__*/_curry1(function lensPath(p) { return lens(path(p), assocPath(p)); }); module.exports = lensPath; /***/ }), /* 811 */ /*!**********************************!*\ !*** ../~/ramda/src/lensProp.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var assoc = /*#__PURE__*/__webpack_require__(/*! ./assoc */ 659); var lens = /*#__PURE__*/__webpack_require__(/*! ./lens */ 808); var prop = /*#__PURE__*/__webpack_require__(/*! ./prop */ 642); /** * Returns a lens whose focus is the specified property. * * @func * @memberOf R * @since v0.14.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig String -> Lens s a * @param {String} k * @return {Lens} * @see R.view, R.set, R.over * @example * * var xLens = R.lensProp('x'); * * R.view(xLens, {x: 1, y: 2}); //=> 1 * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} */ var lensProp = /*#__PURE__*/_curry1(function lensProp(k) { return lens(prop(k), assoc(k)); }); module.exports = lensProp; /***/ }), /* 812 */ /*!****************************!*\ !*** ../~/ramda/src/lt.js ***! \****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns `true` if the first argument is less than the second; `false` * otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @see R.gt * @example * * R.lt(2, 1); //=> false * R.lt(2, 2); //=> false * R.lt(2, 3); //=> true * R.lt('a', 'z'); //=> true * R.lt('z', 'a'); //=> false */ var lt = /*#__PURE__*/_curry2(function lt(a, b) { return a < b; }); module.exports = lt; /***/ }), /* 813 */ /*!*****************************!*\ !*** ../~/ramda/src/lte.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns `true` if the first argument is less than or equal to the second; * `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {Number} a * @param {Number} b * @return {Boolean} * @see R.gte * @example * * R.lte(2, 1); //=> false * R.lte(2, 2); //=> true * R.lte(2, 3); //=> true * R.lte('a', 'z'); //=> true * R.lte('z', 'a'); //=> false */ var lte = /*#__PURE__*/_curry2(function lte(a, b) { return a <= b; }); module.exports = lte; /***/ }), /* 814 */ /*!**********************************!*\ !*** ../~/ramda/src/mapAccum.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * The `mapAccum` function behaves like a combination of map and reduce; it * applies a function to each element of a list, passing an accumulating * parameter from left to right, and returning a final value of this * accumulator together with the new list. * * The iterator function receives two arguments, *acc* and *value*, and should * return a tuple *[acc, value]*. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y]) * @param {Function} fn The function to be called on every element of the input `list`. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.addIndex, R.mapAccumRight * @example * * var digits = ['1', '2', '3', '4']; * var appender = (a, b) => [a + b, a + b]; * * R.mapAccum(appender, 0, digits); //=> ['01234', ['01', '012', '0123', '01234']] * @symb R.mapAccum(f, a, [b, c, d]) = [ * f(f(f(a, b)[0], c)[0], d)[0], * [ * f(a, b)[1], * f(f(a, b)[0], c)[1], * f(f(f(a, b)[0], c)[0], d)[1] * ] * ] */ var mapAccum = /*#__PURE__*/_curry3(function mapAccum(fn, acc, list) { var idx = 0; var len = list.length; var result = []; var tuple = [acc]; while (idx < len) { tuple = fn(tuple[0], list[idx]); result[idx] = tuple[1]; idx += 1; } return [tuple[0], result]; }); module.exports = mapAccum; /***/ }), /* 815 */ /*!***************************************!*\ !*** ../~/ramda/src/mapAccumRight.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * The `mapAccumRight` function behaves like a combination of map and reduce; it * applies a function to each element of a list, passing an accumulating * parameter from right to left, and returning a final value of this * accumulator together with the new list. * * Similar to [`mapAccum`](#mapAccum), except moves through the input list from * the right to the left. * * The iterator function receives two arguments, *value* and *acc*, and should * return a tuple *[value, acc]*. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig ((x, acc) -> (y, acc)) -> acc -> [x] -> ([y], acc) * @param {Function} fn The function to be called on every element of the input `list`. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.addIndex, R.mapAccum * @example * * var digits = ['1', '2', '3', '4']; * var append = (a, b) => [a + b, a + b]; * * R.mapAccumRight(append, 5, digits); //=> [['12345', '2345', '345', '45'], '12345'] * @symb R.mapAccumRight(f, a, [b, c, d]) = [ * [ * f(b, f(c, f(d, a)[0])[0])[1], * f(c, f(d, a)[0])[1], * f(d, a)[1], * ] * f(b, f(c, f(d, a)[0])[0])[0], * ] */ var mapAccumRight = /*#__PURE__*/_curry3(function mapAccumRight(fn, acc, list) { var idx = list.length - 1; var result = []; var tuple = [acc]; while (idx >= 0) { tuple = fn(list[idx], tuple[0]); result[idx] = tuple[1]; idx -= 1; } return [result, tuple[0]]; }); module.exports = mapAccumRight; /***/ }), /* 816 */ /*!***************************************!*\ !*** ../~/ramda/src/mapObjIndexed.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _reduce = /*#__PURE__*/__webpack_require__(/*! ./internal/_reduce */ 633); var keys = /*#__PURE__*/__webpack_require__(/*! ./keys */ 639); /** * An Object-specific version of [`map`](#map). The function is applied to three * arguments: *(value, key, obj)*. If only the value is significant, use * [`map`](#map) instead. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig ((*, String, Object) -> *) -> Object -> Object * @param {Function} fn * @param {Object} obj * @return {Object} * @see R.map * @example * * var values = { x: 1, y: 2, z: 3 }; * var prependKeyAndDouble = (num, key, obj) => key + (num * 2); * * R.mapObjIndexed(prependKeyAndDouble, values); //=> { x: 'x2', y: 'y4', z: 'z6' } */ var mapObjIndexed = /*#__PURE__*/_curry2(function mapObjIndexed(fn, obj) { return _reduce(function (acc, key) { acc[key] = fn(obj[key], key, obj); return acc; }, {}, keys(obj)); }); module.exports = mapObjIndexed; /***/ }), /* 817 */ /*!*******************************!*\ !*** ../~/ramda/src/match.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Tests a regular expression against a String. Note that this function will * return an empty array when there are no matches. This differs from * [`String.prototype.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match) * which returns `null` when there are no matches. * * @func * @memberOf R * @since v0.1.0 * @category String * @sig RegExp -> String -> [String | Undefined] * @param {RegExp} rx A regular expression. * @param {String} str The string to match against * @return {Array} The list of matches or empty array. * @see R.test * @example * * R.match(/([a-z]a)/g, 'bananas'); //=> ['ba', 'na', 'na'] * R.match(/a/, 'b'); //=> [] * R.match(/a/, null); //=> TypeError: null does not have a method named "match" */ var match = /*#__PURE__*/_curry2(function match(rx, str) { return str.match(rx) || []; }); module.exports = match; /***/ }), /* 818 */ /*!*********************************!*\ !*** ../~/ramda/src/mathMod.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _isInteger = /*#__PURE__*/__webpack_require__(/*! ./internal/_isInteger */ 661); /** * `mathMod` behaves like the modulo operator should mathematically, unlike the * `%` operator (and by extension, [`R.modulo`](#modulo)). So while * `-17 % 5` is `-2`, `mathMod(-17, 5)` is `3`. `mathMod` requires Integer * arguments, and returns NaN when the modulus is zero or negative. * * @func * @memberOf R * @since v0.3.0 * @category Math * @sig Number -> Number -> Number * @param {Number} m The dividend. * @param {Number} p the modulus. * @return {Number} The result of `b mod a`. * @see R.modulo * @example * * R.mathMod(-17, 5); //=> 3 * R.mathMod(17, 5); //=> 2 * R.mathMod(17, -5); //=> NaN * R.mathMod(17, 0); //=> NaN * R.mathMod(17.2, 5); //=> NaN * R.mathMod(17, 5.3); //=> NaN * * var clock = R.mathMod(R.__, 12); * clock(15); //=> 3 * clock(24); //=> 0 * * var seventeenMod = R.mathMod(17); * seventeenMod(3); //=> 2 * seventeenMod(4); //=> 1 * seventeenMod(10); //=> 7 */ var mathMod = /*#__PURE__*/_curry2(function mathMod(m, p) { if (!_isInteger(m)) { return NaN; } if (!_isInteger(p) || p < 1) { return NaN; } return (m % p + p) % p; }); module.exports = mathMod; /***/ }), /* 819 */ /*!*******************************!*\ !*** ../~/ramda/src/maxBy.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Takes a function and two values, and returns whichever value produces the * larger result when passed to the provided function. * * @func * @memberOf R * @since v0.8.0 * @category Relation * @sig Ord b => (a -> b) -> a -> a -> a * @param {Function} f * @param {*} a * @param {*} b * @return {*} * @see R.max, R.minBy * @example * * // square :: Number -> Number * var square = n => n * n; * * R.maxBy(square, -3, 2); //=> -3 * * R.reduce(R.maxBy(square), 0, [3, -5, 4, 1, -2]); //=> -5 * R.reduce(R.maxBy(square), 0, []); //=> 0 */ var maxBy = /*#__PURE__*/_curry3(function maxBy(f, a, b) { return f(b) > f(a) ? b : a; }); module.exports = maxBy; /***/ }), /* 820 */ /*!******************************!*\ !*** ../~/ramda/src/mean.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var sum = /*#__PURE__*/__webpack_require__(/*! ./sum */ 821); /** * Returns the mean of the given list of numbers. * * @func * @memberOf R * @since v0.14.0 * @category Math * @sig [Number] -> Number * @param {Array} list * @return {Number} * @see R.median * @example * * R.mean([2, 7, 9]); //=> 6 * R.mean([]); //=> NaN */ var mean = /*#__PURE__*/_curry1(function mean(list) { return sum(list) / list.length; }); module.exports = mean; /***/ }), /* 821 */ /*!*****************************!*\ !*** ../~/ramda/src/sum.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var add = /*#__PURE__*/__webpack_require__(/*! ./add */ 612); var reduce = /*#__PURE__*/__webpack_require__(/*! ./reduce */ 644); /** * Adds together all the elements of a list. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig [Number] -> Number * @param {Array} list An array of numbers * @return {Number} The sum of all the numbers in the list. * @see R.reduce * @example * * R.sum([2,4,6,8,100,1]); //=> 121 */ var sum = /*#__PURE__*/reduce(add, 0); module.exports = sum; /***/ }), /* 822 */ /*!********************************!*\ !*** ../~/ramda/src/median.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var mean = /*#__PURE__*/__webpack_require__(/*! ./mean */ 820); /** * Returns the median of the given list of numbers. * * @func * @memberOf R * @since v0.14.0 * @category Math * @sig [Number] -> Number * @param {Array} list * @return {Number} * @see R.mean * @example * * R.median([2, 9, 7]); //=> 7 * R.median([7, 2, 10, 9]); //=> 8 * R.median([]); //=> NaN */ var median = /*#__PURE__*/_curry1(function median(list) { var len = list.length; if (len === 0) { return NaN; } var width = 2 - len % 2; var idx = (len - width) / 2; return mean(Array.prototype.slice.call(list, 0).sort(function (a, b) { return a < b ? -1 : a > b ? 1 : 0; }).slice(idx, idx + width)); }); module.exports = median; /***/ }), /* 823 */ /*!*********************************!*\ !*** ../~/ramda/src/memoize.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var memoizeWith = /*#__PURE__*/__webpack_require__(/*! ./memoizeWith */ 824); var toString = /*#__PURE__*/__webpack_require__(/*! ./toString */ 696); /** * Creates a new function that, when invoked, caches the result of calling `fn` * for a given argument set and returns the result. Subsequent calls to the * memoized `fn` with the same argument set will not result in an additional * call to `fn`; instead, the cached result for that set of arguments will be * returned. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (*... -> a) -> (*... -> a) * @param {Function} fn The function to memoize. * @return {Function} Memoized version of `fn`. * @see R.memoizeWith * @deprecated since v0.25.0 * @example * * let count = 0; * const factorial = R.memoize(n => { * count += 1; * return R.product(R.range(1, n + 1)); * }); * factorial(5); //=> 120 * factorial(5); //=> 120 * factorial(5); //=> 120 * count; //=> 1 */ var memoize = /*#__PURE__*/memoizeWith(function () { return toString(arguments); }); module.exports = memoize; /***/ }), /* 824 */ /*!*************************************!*\ !*** ../~/ramda/src/memoizeWith.js ***! \*************************************/ /***/ (function(module, exports, __webpack_require__) { var _arity = /*#__PURE__*/__webpack_require__(/*! ./internal/_arity */ 617); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _has = /*#__PURE__*/__webpack_require__(/*! ./internal/_has */ 640); /** * A customisable version of [`R.memoize`](#memoize). `memoizeWith` takes an * additional function that will be applied to a given argument set and used to * create the cache key under which the results of the function to be memoized * will be stored. Care must be taken when implementing key generation to avoid * clashes that may overwrite previous entries erroneously. * * * @func * @memberOf R * @since v0.24.0 * @category Function * @sig (*... -> String) -> (*... -> a) -> (*... -> a) * @param {Function} fn The function to generate the cache key. * @param {Function} fn The function to memoize. * @return {Function} Memoized version of `fn`. * @see R.memoize * @example * * let count = 0; * const factorial = R.memoizeWith(R.identity, n => { * count += 1; * return R.product(R.range(1, n + 1)); * }); * factorial(5); //=> 120 * factorial(5); //=> 120 * factorial(5); //=> 120 * count; //=> 1 */ var memoizeWith = /*#__PURE__*/_curry2(function memoizeWith(mFn, fn) { var cache = {}; return _arity(fn.length, function () { var key = mFn.apply(this, arguments); if (!_has(key, cache)) { cache[key] = fn.apply(this, arguments); } return cache[key]; }); }); module.exports = memoizeWith; /***/ }), /* 825 */ /*!*******************************!*\ !*** ../~/ramda/src/merge.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _assign = /*#__PURE__*/__webpack_require__(/*! ./internal/_assign */ 794); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Create a new object with the own properties of the first object merged with * the own properties of the second object. If a key exists in both objects, * the value from the second object will be used. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {k: v} -> {k: v} -> {k: v} * @param {Object} l * @param {Object} r * @return {Object} * @see R.mergeDeepRight, R.mergeWith, R.mergeWithKey * @example * * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 }); * //=> { 'name': 'fred', 'age': 40 } * * var resetToDefault = R.merge(R.__, {x: 0}); * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2} * @symb R.merge({ x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: 5, z: 3 } */ var merge = /*#__PURE__*/_curry2(function merge(l, r) { return _assign({}, l, r); }); module.exports = merge; /***/ }), /* 826 */ /*!**********************************!*\ !*** ../~/ramda/src/mergeAll.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _assign = /*#__PURE__*/__webpack_require__(/*! ./internal/_assign */ 794); var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Merges a list of objects together into one object. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig [{k: v}] -> {k: v} * @param {Array} list An array of objects * @return {Object} A merged object. * @see R.reduce * @example * * R.mergeAll([{foo:1},{bar:2},{baz:3}]); //=> {foo:1,bar:2,baz:3} * R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2} * @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 } */ var mergeAll = /*#__PURE__*/_curry1(function mergeAll(list) { return _assign.apply(null, [{}].concat(list)); }); module.exports = mergeAll; /***/ }), /* 827 */ /*!***************************************!*\ !*** ../~/ramda/src/mergeDeepLeft.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var mergeDeepWithKey = /*#__PURE__*/__webpack_require__(/*! ./mergeDeepWithKey */ 828); /** * Creates a new object with the own properties of the first object merged with * the own properties of the second object. If a key exists in both objects: * - and both values are objects, the two values will be recursively merged * - otherwise the value from the first object will be used. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig {a} -> {a} -> {a} * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.merge, R.mergeDeepRight, R.mergeDeepWith, R.mergeDeepWithKey * @example * * R.mergeDeepLeft({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, * { age: 40, contact: { email: 'baa@example.com' }}); * //=> { name: 'fred', age: 10, contact: { email: 'moo@example.com' }} */ var mergeDeepLeft = /*#__PURE__*/_curry2(function mergeDeepLeft(lObj, rObj) { return mergeDeepWithKey(function (k, lVal, rVal) { return lVal; }, lObj, rObj); }); module.exports = mergeDeepLeft; /***/ }), /* 828 */ /*!******************************************!*\ !*** ../~/ramda/src/mergeDeepWithKey.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var _isObject = /*#__PURE__*/__webpack_require__(/*! ./internal/_isObject */ 712); var mergeWithKey = /*#__PURE__*/__webpack_require__(/*! ./mergeWithKey */ 829); /** * Creates a new object with the own properties of the two provided objects. * If a key exists in both objects: * - and both associated values are also objects then the values will be * recursively merged. * - otherwise the provided function is applied to the key and associated values * using the resulting value as the new value associated with the key. * If a key only exists in one object, the value will be associated with the key * of the resulting object. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.mergeWithKey, R.mergeDeep, R.mergeDeepWith * @example * * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r * R.mergeDeepWithKey(concatValues, * { a: true, c: { thing: 'foo', values: [10, 20] }}, * { b: true, c: { thing: 'bar', values: [15, 35] }}); * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }} */ var mergeDeepWithKey = /*#__PURE__*/_curry3(function mergeDeepWithKey(fn, lObj, rObj) { return mergeWithKey(function (k, lVal, rVal) { if (_isObject(lVal) && _isObject(rVal)) { return mergeDeepWithKey(fn, lVal, rVal); } else { return fn(k, lVal, rVal); } }, lObj, rObj); }); module.exports = mergeDeepWithKey; /***/ }), /* 829 */ /*!**************************************!*\ !*** ../~/ramda/src/mergeWithKey.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var _has = /*#__PURE__*/__webpack_require__(/*! ./internal/_has */ 640); /** * Creates a new object with the own properties of the two provided objects. If * a key exists in both objects, the provided function is applied to the key * and the values associated with the key in each object, with the result being * used as the value associated with the key in the returned object. * * @func * @memberOf R * @since v0.19.0 * @category Object * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} l * @param {Object} r * @return {Object} * @see R.mergeDeepWithKey, R.merge, R.mergeWith * @example * * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r * R.mergeWithKey(concatValues, * { a: true, thing: 'foo', values: [10, 20] }, * { b: true, thing: 'bar', values: [15, 35] }); * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] } * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 } */ var mergeWithKey = /*#__PURE__*/_curry3(function mergeWithKey(fn, l, r) { var result = {}; var k; for (k in l) { if (_has(k, l)) { result[k] = _has(k, r) ? fn(k, l[k], r[k]) : l[k]; } } for (k in r) { if (_has(k, r) && !_has(k, result)) { result[k] = r[k]; } } return result; }); module.exports = mergeWithKey; /***/ }), /* 830 */ /*!****************************************!*\ !*** ../~/ramda/src/mergeDeepRight.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var mergeDeepWithKey = /*#__PURE__*/__webpack_require__(/*! ./mergeDeepWithKey */ 828); /** * Creates a new object with the own properties of the first object merged with * the own properties of the second object. If a key exists in both objects: * - and both values are objects, the two values will be recursively merged * - otherwise the value from the second object will be used. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig {a} -> {a} -> {a} * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey * @example * * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, * { age: 40, contact: { email: 'baa@example.com' }}); * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }} */ var mergeDeepRight = /*#__PURE__*/_curry2(function mergeDeepRight(lObj, rObj) { return mergeDeepWithKey(function (k, lVal, rVal) { return rVal; }, lObj, rObj); }); module.exports = mergeDeepRight; /***/ }), /* 831 */ /*!***************************************!*\ !*** ../~/ramda/src/mergeDeepWith.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var mergeDeepWithKey = /*#__PURE__*/__webpack_require__(/*! ./mergeDeepWithKey */ 828); /** * Creates a new object with the own properties of the two provided objects. * If a key exists in both objects: * - and both associated values are also objects then the values will be * recursively merged. * - otherwise the provided function is applied to associated values using the * resulting value as the new value associated with the key. * If a key only exists in one object, the value will be associated with the key * of the resulting object. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig ((a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.mergeWith, R.mergeDeep, R.mergeDeepWithKey * @example * * R.mergeDeepWith(R.concat, * { a: true, c: { values: [10, 20] }}, * { b: true, c: { values: [15, 35] }}); * //=> { a: true, b: true, c: { values: [10, 20, 15, 35] }} */ var mergeDeepWith = /*#__PURE__*/_curry3(function mergeDeepWith(fn, lObj, rObj) { return mergeDeepWithKey(function (k, lVal, rVal) { return fn(lVal, rVal); }, lObj, rObj); }); module.exports = mergeDeepWith; /***/ }), /* 832 */ /*!***********************************!*\ !*** ../~/ramda/src/mergeWith.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var mergeWithKey = /*#__PURE__*/__webpack_require__(/*! ./mergeWithKey */ 829); /** * Creates a new object with the own properties of the two provided objects. If * a key exists in both objects, the provided function is applied to the values * associated with the key in each object, with the result being used as the * value associated with the key in the returned object. * * @func * @memberOf R * @since v0.19.0 * @category Object * @sig ((a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} l * @param {Object} r * @return {Object} * @see R.mergeDeepWith, R.merge, R.mergeWithKey * @example * * R.mergeWith(R.concat, * { a: true, values: [10, 20] }, * { b: true, values: [15, 35] }); * //=> { a: true, b: true, values: [10, 20, 15, 35] } */ var mergeWith = /*#__PURE__*/_curry3(function mergeWith(fn, l, r) { return mergeWithKey(function (_, _l, _r) { return fn(_l, _r); }, l, r); }); module.exports = mergeWith; /***/ }), /* 833 */ /*!*****************************!*\ !*** ../~/ramda/src/min.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns the smaller of its two arguments. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> a * @param {*} a * @param {*} b * @return {*} * @see R.minBy, R.max * @example * * R.min(789, 123); //=> 123 * R.min('a', 'b'); //=> 'a' */ var min = /*#__PURE__*/_curry2(function min(a, b) { return b < a ? b : a; }); module.exports = min; /***/ }), /* 834 */ /*!*******************************!*\ !*** ../~/ramda/src/minBy.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Takes a function and two values, and returns whichever value produces the * smaller result when passed to the provided function. * * @func * @memberOf R * @since v0.8.0 * @category Relation * @sig Ord b => (a -> b) -> a -> a -> a * @param {Function} f * @param {*} a * @param {*} b * @return {*} * @see R.min, R.maxBy * @example * * // square :: Number -> Number * var square = n => n * n; * * R.minBy(square, -3, 2); //=> 2 * * R.reduce(R.minBy(square), Infinity, [3, -5, 4, 1, -2]); //=> 1 * R.reduce(R.minBy(square), Infinity, []); //=> Infinity */ var minBy = /*#__PURE__*/_curry3(function minBy(f, a, b) { return f(b) < f(a) ? b : a; }); module.exports = minBy; /***/ }), /* 835 */ /*!********************************!*\ !*** ../~/ramda/src/modulo.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Divides the first parameter by the second and returns the remainder. Note * that this function preserves the JavaScript-style behavior for modulo. For * mathematical modulo see [`mathMod`](#mathMod). * * @func * @memberOf R * @since v0.1.1 * @category Math * @sig Number -> Number -> Number * @param {Number} a The value to the divide. * @param {Number} b The pseudo-modulus * @return {Number} The result of `b % a`. * @see R.mathMod * @example * * R.modulo(17, 3); //=> 2 * // JS behavior: * R.modulo(-17, 3); //=> -2 * R.modulo(17, -3); //=> 2 * * var isOdd = R.modulo(R.__, 2); * isOdd(42); //=> 0 * isOdd(21); //=> 1 */ var modulo = /*#__PURE__*/_curry2(function modulo(a, b) { return a % b; }); module.exports = modulo; /***/ }), /* 836 */ /*!**********************************!*\ !*** ../~/ramda/src/multiply.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Multiplies two numbers. Equivalent to `a * b` but curried. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a The first value. * @param {Number} b The second value. * @return {Number} The result of `a * b`. * @see R.divide * @example * * var double = R.multiply(2); * var triple = R.multiply(3); * double(3); //=> 6 * triple(4); //=> 12 * R.multiply(2, 5); //=> 10 */ var multiply = /*#__PURE__*/_curry2(function multiply(a, b) { return a * b; }); module.exports = multiply; /***/ }), /* 837 */ /*!********************************!*\ !*** ../~/ramda/src/negate.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Negates its argument. * * @func * @memberOf R * @since v0.9.0 * @category Math * @sig Number -> Number * @param {Number} n * @return {Number} * @example * * R.negate(42); //=> -42 */ var negate = /*#__PURE__*/_curry1(function negate(n) { return -n; }); module.exports = negate; /***/ }), /* 838 */ /*!******************************!*\ !*** ../~/ramda/src/none.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _complement = /*#__PURE__*/__webpack_require__(/*! ./internal/_complement */ 709); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xany = /*#__PURE__*/__webpack_require__(/*! ./internal/_xany */ 647); var any = /*#__PURE__*/__webpack_require__(/*! ./any */ 646); /** * Returns `true` if no elements of the list match the predicate, `false` * otherwise. * * Dispatches to the `any` method of the second argument, if present. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig (a -> Boolean) -> [a] -> Boolean * @param {Function} fn The predicate function. * @param {Array} list The array to consider. * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise. * @see R.all, R.any * @example * * var isEven = n => n % 2 === 0; * var isOdd = n => n % 2 === 1; * * R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true * R.none(isOdd, [1, 3, 5, 7, 8, 11]); //=> false */ var none = /*#__PURE__*/_curry2( /*#__PURE__*/_complement( /*#__PURE__*/_dispatchable(['any'], _xany, any))); module.exports = none; /***/ }), /* 839 */ /*!********************************!*\ !*** ../~/ramda/src/nthArg.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); var nth = /*#__PURE__*/__webpack_require__(/*! ./nth */ 746); /** * Returns a function which returns its nth argument. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig Number -> *... -> * * @param {Number} n * @return {Function} * @example * * R.nthArg(1)('a', 'b', 'c'); //=> 'b' * R.nthArg(-1)('a', 'b', 'c'); //=> 'c' * @symb R.nthArg(-1)(a, b, c) = c * @symb R.nthArg(0)(a, b, c) = a * @symb R.nthArg(1)(a, b, c) = b */ var nthArg = /*#__PURE__*/_curry1(function nthArg(n) { var arity = n < 0 ? 1 : n + 1; return curryN(arity, function () { return nth(n, arguments); }); }); module.exports = nthArg; /***/ }), /* 840 */ /*!***************************!*\ !*** ../~/ramda/src/o.js ***! \***************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * `o` is a curried composition function that returns a unary function. * Like [`compose`](#compose), `o` performs right-to-left function composition. * Unlike [`compose`](#compose), the rightmost function passed to `o` will be * invoked with only one argument. * * @func * @memberOf R * @since v0.24.0 * @category Function * @sig (b -> c) -> (a -> b) -> a -> c * @param {Function} f * @param {Function} g * @return {Function} * @see R.compose, R.pipe * @example * * var classyGreeting = name => "The name's " + name.last + ", " + name.first + " " + name.last * var yellGreeting = R.o(R.toUpper, classyGreeting); * yellGreeting({first: 'James', last: 'Bond'}); //=> "THE NAME'S BOND, JAMES BOND" * * R.o(R.multiply(10), R.add(10))(-4) //=> 60 * * @symb R.o(f, g, x) = f(g(x)) */ var o = /*#__PURE__*/_curry3(function o(f, g, x) { return f(g(x)); }); module.exports = o; /***/ }), /* 841 */ /*!****************************!*\ !*** ../~/ramda/src/of.js ***! \****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var _of = /*#__PURE__*/__webpack_require__(/*! ./internal/_of */ 842); /** * Returns a singleton array containing the value provided. * * Note this `of` is different from the ES6 `of`; See * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of * * @func * @memberOf R * @since v0.3.0 * @category Function * @sig a -> [a] * @param {*} x any value * @return {Array} An array wrapping `x`. * @example * * R.of(null); //=> [null] * R.of([42]); //=> [[42]] */ var of = /*#__PURE__*/_curry1(_of); module.exports = of; /***/ }), /* 842 */ /*!**************************************!*\ !*** ../~/ramda/src/internal/_of.js ***! \**************************************/ /***/ (function(module, exports) { function _of(x) { return [x]; } module.exports = _of; /***/ }), /* 843 */ /*!******************************!*\ !*** ../~/ramda/src/omit.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns a partial copy of an object omitting the keys specified. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [String] -> {String: *} -> {String: *} * @param {Array} names an array of String property names to omit from the new object * @param {Object} obj The object to copy from * @return {Object} A new object with properties from `names` not on it. * @see R.pick * @example * * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3} */ var omit = /*#__PURE__*/_curry2(function omit(names, obj) { var result = {}; var index = {}; var idx = 0; var len = names.length; while (idx < len) { index[names[idx]] = 1; idx += 1; } for (var prop in obj) { if (!index.hasOwnProperty(prop)) { result[prop] = obj[prop]; } } return result; }); module.exports = omit; /***/ }), /* 844 */ /*!******************************!*\ !*** ../~/ramda/src/once.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _arity = /*#__PURE__*/__webpack_require__(/*! ./internal/_arity */ 617); var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Accepts a function `fn` and returns a function that guards invocation of * `fn` such that `fn` can only ever be called once, no matter how many times * the returned function is invoked. The first value calculated is returned in * subsequent invocations. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (a... -> b) -> (a... -> b) * @param {Function} fn The function to wrap in a call-only-once wrapper. * @return {Function} The wrapped function. * @example * * var addOneOnce = R.once(x => x + 1); * addOneOnce(10); //=> 11 * addOneOnce(addOneOnce(50)); //=> 11 */ var once = /*#__PURE__*/_curry1(function once(fn) { var called = false; var result; return _arity(fn.length, function () { if (called) { return result; } called = true; result = fn.apply(this, arguments); return result; }); }); module.exports = once; /***/ }), /* 845 */ /*!******************************!*\ !*** ../~/ramda/src/over.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); // `Identity` is a functor that holds a single value, where `map` simply // transforms the held value with the provided function. var Identity = function (x) { return { value: x, map: function (f) { return Identity(f(x)); } }; }; /** * Returns the result of "setting" the portion of the given data structure * focused by the given lens to the result of applying the given function to * the focused value. * * @func * @memberOf R * @since v0.16.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Lens s a -> (a -> a) -> s -> s * @param {Lens} lens * @param {*} v * @param {*} x * @return {*} * @see R.prop, R.lensIndex, R.lensProp * @example * * var headLens = R.lensIndex(0); * * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz'] */ var over = /*#__PURE__*/_curry3(function over(lens, f, x) { // The value returned by the getter function is first transformed with `f`, // then set as the value of an `Identity`. This is then mapped over with the // setter function of the lens. return lens(function (y) { return Identity(f(y)); })(x).value; }); module.exports = over; /***/ }), /* 846 */ /*!******************************!*\ !*** ../~/ramda/src/pair.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Takes two arguments, `fst` and `snd`, and returns `[fst, snd]`. * * @func * @memberOf R * @since v0.18.0 * @category List * @sig a -> b -> (a,b) * @param {*} fst * @param {*} snd * @return {Array} * @see R.objOf, R.of * @example * * R.pair('foo', 'bar'); //=> ['foo', 'bar'] */ var pair = /*#__PURE__*/_curry2(function pair(fst, snd) { return [fst, snd]; }); module.exports = pair; /***/ }), /* 847 */ /*!*********************************!*\ !*** ../~/ramda/src/partial.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _concat = /*#__PURE__*/__webpack_require__(/*! ./internal/_concat */ 615); var _createPartialApplicator = /*#__PURE__*/__webpack_require__(/*! ./internal/_createPartialApplicator */ 848); /** * Takes a function `f` and a list of arguments, and returns a function `g`. * When applied, `g` returns the result of applying `f` to the arguments * provided initially followed by the arguments provided to `g`. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x) * @param {Function} f * @param {Array} args * @return {Function} * @see R.partialRight * @example * * var multiply2 = (a, b) => a * b; * var double = R.partial(multiply2, [2]); * double(2); //=> 4 * * var greet = (salutation, title, firstName, lastName) => * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; * * var sayHello = R.partial(greet, ['Hello']); * var sayHelloToMs = R.partial(sayHello, ['Ms.']); * sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!' * @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d) */ var partial = /*#__PURE__*/_createPartialApplicator(_concat); module.exports = partial; /***/ }), /* 848 */ /*!***********************************************************!*\ !*** ../~/ramda/src/internal/_createPartialApplicator.js ***! \***********************************************************/ /***/ (function(module, exports, __webpack_require__) { var _arity = /*#__PURE__*/__webpack_require__(/*! ./_arity */ 617); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); function _createPartialApplicator(concat) { return _curry2(function (fn, args) { return _arity(Math.max(0, fn.length - args.length), function () { return fn.apply(this, concat(args, arguments)); }); }); } module.exports = _createPartialApplicator; /***/ }), /* 849 */ /*!**************************************!*\ !*** ../~/ramda/src/partialRight.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { var _concat = /*#__PURE__*/__webpack_require__(/*! ./internal/_concat */ 615); var _createPartialApplicator = /*#__PURE__*/__webpack_require__(/*! ./internal/_createPartialApplicator */ 848); var flip = /*#__PURE__*/__webpack_require__(/*! ./flip */ 766); /** * Takes a function `f` and a list of arguments, and returns a function `g`. * When applied, `g` returns the result of applying `f` to the arguments * provided to `g` followed by the arguments provided initially. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x) * @param {Function} f * @param {Array} args * @return {Function} * @see R.partial * @example * * var greet = (salutation, title, firstName, lastName) => * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; * * var greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']); * * greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!' * @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b) */ var partialRight = /*#__PURE__*/_createPartialApplicator( /*#__PURE__*/flip(_concat)); module.exports = partialRight; /***/ }), /* 850 */ /*!***********************************!*\ !*** ../~/ramda/src/partition.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var filter = /*#__PURE__*/__webpack_require__(/*! ./filter */ 710); var juxt = /*#__PURE__*/__webpack_require__(/*! ./juxt */ 803); var reject = /*#__PURE__*/__webpack_require__(/*! ./reject */ 708); /** * Takes a predicate and a list or other `Filterable` object and returns the * pair of filterable objects of the same type of elements which do and do not * satisfy, the predicate, respectively. Filterable objects include plain objects or any object * that has a filter method such as `Array`. * * @func * @memberOf R * @since v0.1.4 * @category List * @sig Filterable f => (a -> Boolean) -> f a -> [f a, f a] * @param {Function} pred A predicate to determine which side the element belongs to. * @param {Array} filterable the list (or other filterable) to partition. * @return {Array} An array, containing first the subset of elements that satisfy the * predicate, and second the subset of elements that do not satisfy. * @see R.filter, R.reject * @example * * R.partition(R.contains('s'), ['sss', 'ttt', 'foo', 'bars']); * // => [ [ 'sss', 'bars' ], [ 'ttt', 'foo' ] ] * * R.partition(R.contains('s'), { a: 'sss', b: 'ttt', foo: 'bars' }); * // => [ { a: 'sss', foo: 'bars' }, { b: 'ttt' } ] */ var partition = /*#__PURE__*/juxt([filter, reject]); module.exports = partition; /***/ }), /* 851 */ /*!********************************!*\ !*** ../~/ramda/src/pathEq.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var equals = /*#__PURE__*/__webpack_require__(/*! ./equals */ 700); var path = /*#__PURE__*/__webpack_require__(/*! ./path */ 643); /** * Determines whether a nested path on an object has a specific value, in * [`R.equals`](#equals) terms. Most likely used to filter a list. * * @func * @memberOf R * @since v0.7.0 * @category Relation * @typedefn Idx = String | Int * @sig [Idx] -> a -> {a} -> Boolean * @param {Array} path The path of the nested property to use * @param {*} val The value to compare the nested property with * @param {Object} obj The object to check the nested property in * @return {Boolean} `true` if the value equals the nested object property, * `false` otherwise. * @example * * var user1 = { address: { zipCode: 90210 } }; * var user2 = { address: { zipCode: 55555 } }; * var user3 = { name: 'Bob' }; * var users = [ user1, user2, user3 ]; * var isFamous = R.pathEq(['address', 'zipCode'], 90210); * R.filter(isFamous, users); //=> [ user1 ] */ var pathEq = /*#__PURE__*/_curry3(function pathEq(_path, val, obj) { return equals(path(_path, obj), val); }); module.exports = pathEq; /***/ }), /* 852 */ /*!********************************!*\ !*** ../~/ramda/src/pathOr.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var defaultTo = /*#__PURE__*/__webpack_require__(/*! ./defaultTo */ 723); var path = /*#__PURE__*/__webpack_require__(/*! ./path */ 643); /** * If the given, non-null object has a value at the given path, returns the * value at that path. Otherwise returns the provided default value. * * @func * @memberOf R * @since v0.18.0 * @category Object * @typedefn Idx = String | Int * @sig a -> [Idx] -> {a} -> a * @param {*} d The default value. * @param {Array} p The path to use. * @param {Object} obj The object to retrieve the nested property from. * @return {*} The data at `path` of the supplied object or the default value. * @example * * R.pathOr('N/A', ['a', 'b'], {a: {b: 2}}); //=> 2 * R.pathOr('N/A', ['a', 'b'], {c: {b: 2}}); //=> "N/A" */ var pathOr = /*#__PURE__*/_curry3(function pathOr(d, p, obj) { return defaultTo(d, path(p, obj)); }); module.exports = pathOr; /***/ }), /* 853 */ /*!***************************************!*\ !*** ../~/ramda/src/pathSatisfies.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var path = /*#__PURE__*/__webpack_require__(/*! ./path */ 643); /** * Returns `true` if the specified object property at given path satisfies the * given predicate; `false` otherwise. * * @func * @memberOf R * @since v0.19.0 * @category Logic * @typedefn Idx = String | Int * @sig (a -> Boolean) -> [Idx] -> {a} -> Boolean * @param {Function} pred * @param {Array} propPath * @param {*} obj * @return {Boolean} * @see R.propSatisfies, R.path * @example * * R.pathSatisfies(y => y > 0, ['x', 'y'], {x: {y: 2}}); //=> true */ var pathSatisfies = /*#__PURE__*/_curry3(function pathSatisfies(pred, propPath, obj) { return propPath.length > 0 && pred(path(propPath, obj)); }); module.exports = pathSatisfies; /***/ }), /* 854 */ /*!******************************!*\ !*** ../~/ramda/src/pick.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns a partial copy of an object containing only the keys specified. If * the key does not exist, the property is ignored. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [k] -> {k: v} -> {k: v} * @param {Array} names an array of String property names to copy onto a new object * @param {Object} obj The object to copy from * @return {Object} A new object with only properties from `names` on it. * @see R.omit, R.props * @example * * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1} */ var pick = /*#__PURE__*/_curry2(function pick(names, obj) { var result = {}; var idx = 0; while (idx < names.length) { if (names[idx] in obj) { result[names[idx]] = obj[names[idx]]; } idx += 1; } return result; }); module.exports = pick; /***/ }), /* 855 */ /*!*********************************!*\ !*** ../~/ramda/src/pickAll.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Similar to `pick` except that this one includes a `key: undefined` pair for * properties that don't exist. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [k] -> {k: v} -> {k: v} * @param {Array} names an array of String property names to copy onto a new object * @param {Object} obj The object to copy from * @return {Object} A new object with only properties from `names` on it. * @see R.pick * @example * * R.pickAll(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} * R.pickAll(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined} */ var pickAll = /*#__PURE__*/_curry2(function pickAll(names, obj) { var result = {}; var idx = 0; var len = names.length; while (idx < len) { var name = names[idx]; result[name] = obj[name]; idx += 1; } return result; }); module.exports = pickAll; /***/ }), /* 856 */ /*!********************************!*\ !*** ../~/ramda/src/pickBy.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns a partial copy of an object containing only the keys that satisfy * the supplied predicate. * * @func * @memberOf R * @since v0.8.0 * @category Object * @sig ((v, k) -> Boolean) -> {k: v} -> {k: v} * @param {Function} pred A predicate to determine whether or not a key * should be included on the output object. * @param {Object} obj The object to copy from * @return {Object} A new object with only properties that satisfy `pred` * on it. * @see R.pick, R.filter * @example * * var isUpperCase = (val, key) => key.toUpperCase() === key; * R.pickBy(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4} */ var pickBy = /*#__PURE__*/_curry2(function pickBy(test, obj) { var result = {}; for (var prop in obj) { if (test(obj[prop], prop, obj)) { result[prop] = obj[prop]; } } return result; }); module.exports = pickBy; /***/ }), /* 857 */ /*!*******************************!*\ !*** ../~/ramda/src/pipeK.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var composeK = /*#__PURE__*/__webpack_require__(/*! ./composeK */ 691); var reverse = /*#__PURE__*/__webpack_require__(/*! ./reverse */ 690); /** * Returns the left-to-right Kleisli composition of the provided functions, * each of which must return a value of a type supported by [`chain`](#chain). * * `R.pipeK(f, g, h)` is equivalent to `R.pipe(f, R.chain(g), R.chain(h))`. * * @func * @memberOf R * @since v0.16.0 * @category Function * @sig Chain m => ((a -> m b), (b -> m c), ..., (y -> m z)) -> (a -> m z) * @param {...Function} * @return {Function} * @see R.composeK * @example * * // parseJson :: String -> Maybe * * // get :: String -> Object -> Maybe * * * // getStateCode :: Maybe String -> Maybe String * var getStateCode = R.pipeK( * parseJson, * get('user'), * get('address'), * get('state'), * R.compose(Maybe.of, R.toUpper) * ); * * getStateCode('{"user":{"address":{"state":"ny"}}}'); * //=> Just('NY') * getStateCode('[Invalid JSON]'); * //=> Nothing() * @symb R.pipeK(f, g, h)(a) = R.chain(h, R.chain(g, f(a))) */ function pipeK() { if (arguments.length === 0) { throw new Error('pipeK requires at least one argument'); } return composeK.apply(this, reverse(arguments)); } module.exports = pipeK; /***/ }), /* 858 */ /*!*********************************!*\ !*** ../~/ramda/src/prepend.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _concat = /*#__PURE__*/__webpack_require__(/*! ./internal/_concat */ 615); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns a new list with the given element at the front, followed by the * contents of the list. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> [a] * @param {*} el The item to add to the head of the output list. * @param {Array} list The array to add to the tail of the output list. * @return {Array} A new array. * @see R.append * @example * * R.prepend('fee', ['fi', 'fo', 'fum']); //=> ['fee', 'fi', 'fo', 'fum'] */ var prepend = /*#__PURE__*/_curry2(function prepend(el, list) { return _concat([el], list); }); module.exports = prepend; /***/ }), /* 859 */ /*!*********************************!*\ !*** ../~/ramda/src/product.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var multiply = /*#__PURE__*/__webpack_require__(/*! ./multiply */ 836); var reduce = /*#__PURE__*/__webpack_require__(/*! ./reduce */ 644); /** * Multiplies together all the elements of a list. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig [Number] -> Number * @param {Array} list An array of numbers * @return {Number} The product of all the numbers in the list. * @see R.reduce * @example * * R.product([2,4,6,8,100,1]); //=> 38400 */ var product = /*#__PURE__*/reduce(multiply, 1); module.exports = product; /***/ }), /* 860 */ /*!*********************************!*\ !*** ../~/ramda/src/project.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _map = /*#__PURE__*/__webpack_require__(/*! ./internal/_map */ 632); var identity = /*#__PURE__*/__webpack_require__(/*! ./identity */ 777); var pickAll = /*#__PURE__*/__webpack_require__(/*! ./pickAll */ 855); var useWith = /*#__PURE__*/__webpack_require__(/*! ./useWith */ 861); /** * Reasonable analog to SQL `select` statement. * * @func * @memberOf R * @since v0.1.0 * @category Object * @category Relation * @sig [k] -> [{k: v}] -> [{k: v}] * @param {Array} props The property names to project * @param {Array} objs The objects to query * @return {Array} An array of objects with just the `props` properties. * @example * * var abby = {name: 'Abby', age: 7, hair: 'blond', grade: 2}; * var fred = {name: 'Fred', age: 12, hair: 'brown', grade: 7}; * var kids = [abby, fred]; * R.project(['name', 'grade'], kids); //=> [{name: 'Abby', grade: 2}, {name: 'Fred', grade: 7}] */ var project = /*#__PURE__*/useWith(_map, [pickAll, identity]); // passing `identity` gives correct arity module.exports = project; /***/ }), /* 861 */ /*!*********************************!*\ !*** ../~/ramda/src/useWith.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); /** * Accepts a function `fn` and a list of transformer functions and returns a * new curried function. When the new function is invoked, it calls the * function `fn` with parameters consisting of the result of calling each * supplied handler on successive arguments to the new function. * * If more arguments are passed to the returned function than transformer * functions, those arguments are passed directly to `fn` as additional * parameters. If you expect additional arguments that don't need to be * transformed, although you can ignore them, it's best to pass an identity * function so that the new function reports the correct arity. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((x1, x2, ...) -> z) -> [(a -> x1), (b -> x2), ...] -> (a -> b -> ... -> z) * @param {Function} fn The function to wrap. * @param {Array} transformers A list of transformer functions * @return {Function} The wrapped function. * @see R.converge * @example * * R.useWith(Math.pow, [R.identity, R.identity])(3, 4); //=> 81 * R.useWith(Math.pow, [R.identity, R.identity])(3)(4); //=> 81 * R.useWith(Math.pow, [R.dec, R.inc])(3, 4); //=> 32 * R.useWith(Math.pow, [R.dec, R.inc])(3)(4); //=> 32 * @symb R.useWith(f, [g, h])(a, b) = f(g(a), h(b)) */ var useWith = /*#__PURE__*/_curry2(function useWith(fn, transformers) { return curryN(transformers.length, function () { var args = []; var idx = 0; while (idx < transformers.length) { args.push(transformers[idx].call(this, arguments[idx])); idx += 1; } return fn.apply(this, args.concat(Array.prototype.slice.call(arguments, transformers.length))); }); }); module.exports = useWith; /***/ }), /* 862 */ /*!********************************!*\ !*** ../~/ramda/src/propEq.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var equals = /*#__PURE__*/__webpack_require__(/*! ./equals */ 700); /** * Returns `true` if the specified object property is equal, in * [`R.equals`](#equals) terms, to the given value; `false` otherwise. * You can test multiple properties with [`R.where`](#where). * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig String -> a -> Object -> Boolean * @param {String} name * @param {*} val * @param {*} obj * @return {Boolean} * @see R.whereEq, R.propSatisfies, R.equals * @example * * var abby = {name: 'Abby', age: 7, hair: 'blond'}; * var fred = {name: 'Fred', age: 12, hair: 'brown'}; * var rusty = {name: 'Rusty', age: 10, hair: 'brown'}; * var alois = {name: 'Alois', age: 15, disposition: 'surly'}; * var kids = [abby, fred, rusty, alois]; * var hasBrownHair = R.propEq('hair', 'brown'); * R.filter(hasBrownHair, kids); //=> [fred, rusty] */ var propEq = /*#__PURE__*/_curry3(function propEq(name, val, obj) { return equals(val, obj[name]); }); module.exports = propEq; /***/ }), /* 863 */ /*!********************************!*\ !*** ../~/ramda/src/propIs.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var is = /*#__PURE__*/__webpack_require__(/*! ./is */ 800); /** * Returns `true` if the specified object property is of the given type; * `false` otherwise. * * @func * @memberOf R * @since v0.16.0 * @category Type * @sig Type -> String -> Object -> Boolean * @param {Function} type * @param {String} name * @param {*} obj * @return {Boolean} * @see R.is, R.propSatisfies * @example * * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true * R.propIs(Number, 'x', {x: 'foo'}); //=> false * R.propIs(Number, 'x', {}); //=> false */ var propIs = /*#__PURE__*/_curry3(function propIs(type, name, obj) { return is(type, obj[name]); }); module.exports = propIs; /***/ }), /* 864 */ /*!********************************!*\ !*** ../~/ramda/src/propOr.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var _has = /*#__PURE__*/__webpack_require__(/*! ./internal/_has */ 640); /** * If the given, non-null object has an own property with the specified name, * returns the value of that property. Otherwise returns the provided default * value. * * @func * @memberOf R * @since v0.6.0 * @category Object * @sig a -> String -> Object -> a * @param {*} val The default value. * @param {String} p The name of the property to return. * @param {Object} obj The object to query. * @return {*} The value of given property of the supplied object or the default value. * @example * * var alice = { * name: 'ALICE', * age: 101 * }; * var favorite = R.prop('favoriteLibrary'); * var favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary'); * * favorite(alice); //=> undefined * favoriteWithDefault(alice); //=> 'Ramda' */ var propOr = /*#__PURE__*/_curry3(function propOr(val, p, obj) { return obj != null && _has(p, obj) ? obj[p] : val; }); module.exports = propOr; /***/ }), /* 865 */ /*!***************************************!*\ !*** ../~/ramda/src/propSatisfies.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Returns `true` if the specified object property satisfies the given * predicate; `false` otherwise. You can test multiple properties with * [`R.where`](#where). * * @func * @memberOf R * @since v0.16.0 * @category Logic * @sig (a -> Boolean) -> String -> {String: a} -> Boolean * @param {Function} pred * @param {String} name * @param {*} obj * @return {Boolean} * @see R.where, R.propEq, R.propIs * @example * * R.propSatisfies(x => x > 0, 'x', {x: 1, y: 2}); //=> true */ var propSatisfies = /*#__PURE__*/_curry3(function propSatisfies(pred, name, obj) { return pred(obj[name]); }); module.exports = propSatisfies; /***/ }), /* 866 */ /*!*******************************!*\ !*** ../~/ramda/src/props.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Acts as multiple `prop`: array of keys in, array of values out. Preserves * order. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [k] -> {k: v} -> [v] * @param {Array} ps The property names to fetch * @param {Object} obj The object to query * @return {Array} The corresponding values or partially applied function. * @example * * R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2] * R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2] * * var fullName = R.compose(R.join(' '), R.props(['first', 'last'])); * fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth' */ var props = /*#__PURE__*/_curry2(function props(ps, obj) { var len = ps.length; var out = []; var idx = 0; while (idx < len) { out[idx] = obj[ps[idx]]; idx += 1; } return out; }); module.exports = props; /***/ }), /* 867 */ /*!*******************************!*\ !*** ../~/ramda/src/range.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _isNumber = /*#__PURE__*/__webpack_require__(/*! ./internal/_isNumber */ 807); /** * Returns a list of numbers from `from` (inclusive) to `to` (exclusive). * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> Number -> [Number] * @param {Number} from The first number in the list. * @param {Number} to One more than the last number in the list. * @return {Array} The list of numbers in tthe set `[a, b)`. * @example * * R.range(1, 5); //=> [1, 2, 3, 4] * R.range(50, 53); //=> [50, 51, 52] */ var range = /*#__PURE__*/_curry2(function range(from, to) { if (!(_isNumber(from) && _isNumber(to))) { throw new TypeError('Both arguments to range must be numbers'); } var result = []; var n = from; while (n < to) { result.push(n); n += 1; } return result; }); module.exports = range; /***/ }), /* 868 */ /*!*************************************!*\ !*** ../~/ramda/src/reduceRight.js ***! \*************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Returns a single item by iterating through the list, successively calling * the iterator function and passing it an accumulator value and the current * value from the array, and then passing the result to the next call. * * Similar to [`reduce`](#reduce), except moves through the input list from the * right to the left. * * The iterator function receives two values: *(value, acc)*, while the arguments' * order of `reduce`'s iterator function is *(acc, value)*. * * Note: `R.reduceRight` does not skip deleted or unassigned indices (sparse * arrays), unlike the native `Array.prototype.reduceRight` method. For more details * on this behavior, see: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description * * @func * @memberOf R * @since v0.1.0 * @category List * @sig ((a, b) -> b) -> b -> [a] -> b * @param {Function} fn The iterator function. Receives two values, the current element from the array * and the accumulator. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduce, R.addIndex * @example * * R.reduceRight(R.subtract, 0, [1, 2, 3, 4]) // => (1 - (2 - (3 - (4 - 0)))) = -2 * // - -2 * // / \ / \ * // 1 - 1 3 * // / \ / \ * // 2 - ==> 2 -1 * // / \ / \ * // 3 - 3 4 * // / \ / \ * // 4 0 4 0 * * @symb R.reduceRight(f, a, [b, c, d]) = f(b, f(c, f(d, a))) */ var reduceRight = /*#__PURE__*/_curry3(function reduceRight(fn, acc, list) { var idx = list.length - 1; while (idx >= 0) { acc = fn(list[idx], acc); idx -= 1; } return acc; }); module.exports = reduceRight; /***/ }), /* 869 */ /*!*************************************!*\ !*** ../~/ramda/src/reduceWhile.js ***! \*************************************/ /***/ (function(module, exports, __webpack_require__) { var _curryN = /*#__PURE__*/__webpack_require__(/*! ./internal/_curryN */ 618); var _reduce = /*#__PURE__*/__webpack_require__(/*! ./internal/_reduce */ 633); var _reduced = /*#__PURE__*/__webpack_require__(/*! ./internal/_reduced */ 626); /** * Like [`reduce`](#reduce), `reduceWhile` returns a single item by iterating * through the list, successively calling the iterator function. `reduceWhile` * also takes a predicate that is evaluated before each step. If the predicate * returns `false`, it "short-circuits" the iteration and returns the current * value of the accumulator. * * @func * @memberOf R * @since v0.22.0 * @category List * @sig ((a, b) -> Boolean) -> ((a, b) -> a) -> a -> [b] -> a * @param {Function} pred The predicate. It is passed the accumulator and the * current element. * @param {Function} fn The iterator function. Receives two values, the * accumulator and the current element. * @param {*} a The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduce, R.reduced * @example * * var isOdd = (acc, x) => x % 2 === 1; * var xs = [1, 3, 5, 60, 777, 800]; * R.reduceWhile(isOdd, R.add, 0, xs); //=> 9 * * var ys = [2, 4, 6] * R.reduceWhile(isOdd, R.add, 111, ys); //=> 111 */ var reduceWhile = /*#__PURE__*/_curryN(4, [], function _reduceWhile(pred, fn, a, list) { return _reduce(function (acc, x) { return pred(acc, x) ? fn(acc, x) : _reduced(acc); }, a, list); }); module.exports = reduceWhile; /***/ }), /* 870 */ /*!*********************************!*\ !*** ../~/ramda/src/reduced.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var _reduced = /*#__PURE__*/__webpack_require__(/*! ./internal/_reduced */ 626); /** * Returns a value wrapped to indicate that it is the final value of the reduce * and transduce functions. The returned value should be considered a black * box: the internal structure is not guaranteed to be stable. * * Note: this optimization is unavailable to functions not explicitly listed * above. For instance, it is not currently supported by * [`reduceRight`](#reduceRight). * * @func * @memberOf R * @since v0.15.0 * @category List * @sig a -> * * @param {*} x The final value of the reduce. * @return {*} The wrapped value. * @see R.reduce, R.transduce * @example * * R.reduce( * (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item), * [], * [1, 2, 3, 4, 5]) // [1, 2, 3] */ var reduced = /*#__PURE__*/_curry1(_reduced); module.exports = reduced; /***/ }), /* 871 */ /*!********************************!*\ !*** ../~/ramda/src/repeat.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var always = /*#__PURE__*/__webpack_require__(/*! ./always */ 607); var times = /*#__PURE__*/__webpack_require__(/*! ./times */ 872); /** * Returns a fixed list of size `n` containing a specified identical value. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig a -> n -> [a] * @param {*} value The value to repeat. * @param {Number} n The desired size of the output list. * @return {Array} A new array containing `n` `value`s. * @see R.times * @example * * R.repeat('hi', 5); //=> ['hi', 'hi', 'hi', 'hi', 'hi'] * * var obj = {}; * var repeatedObjs = R.repeat(obj, 5); //=> [{}, {}, {}, {}, {}] * repeatedObjs[0] === repeatedObjs[1]; //=> true * @symb R.repeat(a, 0) = [] * @symb R.repeat(a, 1) = [a] * @symb R.repeat(a, 2) = [a, a] */ var repeat = /*#__PURE__*/_curry2(function repeat(value, n) { return times(always(value), n); }); module.exports = repeat; /***/ }), /* 872 */ /*!*******************************!*\ !*** ../~/ramda/src/times.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Calls an input function `n` times, returning an array containing the results * of those function calls. * * `fn` is passed one argument: The current value of `n`, which begins at `0` * and is gradually incremented to `n - 1`. * * @func * @memberOf R * @since v0.2.3 * @category List * @sig (Number -> a) -> Number -> [a] * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`. * @param {Number} n A value between `0` and `n - 1`. Increments after each function call. * @return {Array} An array containing the return values of all calls to `fn`. * @see R.repeat * @example * * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4] * @symb R.times(f, 0) = [] * @symb R.times(f, 1) = [f(0)] * @symb R.times(f, 2) = [f(0), f(1)] */ var times = /*#__PURE__*/_curry2(function times(fn, n) { var len = Number(n); var idx = 0; var list; if (len < 0 || isNaN(len)) { throw new RangeError('n must be a non-negative number'); } list = new Array(len); while (idx < len) { list[idx] = fn(idx); idx += 1; } return list; }); module.exports = times; /***/ }), /* 873 */ /*!*********************************!*\ !*** ../~/ramda/src/replace.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Replace a substring or regex match in a string with a replacement. * * @func * @memberOf R * @since v0.7.0 * @category String * @sig RegExp|String -> String -> String -> String * @param {RegExp|String} pattern A regular expression or a substring to match. * @param {String} replacement The string to replace the matches with. * @param {String} str The String to do the search and replacement in. * @return {String} The result. * @example * * R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo' * R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo' * * // Use the "g" (global) flag to replace all occurrences: * R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar' */ var replace = /*#__PURE__*/_curry3(function replace(regex, replacement, str) { return str.replace(regex, replacement); }); module.exports = replace; /***/ }), /* 874 */ /*!******************************!*\ !*** ../~/ramda/src/scan.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Scan is similar to [`reduce`](#reduce), but returns a list of successively * reduced values from the left * * @func * @memberOf R * @since v0.10.0 * @category List * @sig ((a, b) -> a) -> a -> [b] -> [a] * @param {Function} fn The iterator function. Receives two values, the accumulator and the * current element from the array * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {Array} A list of all intermediately reduced values. * @see R.reduce * @example * * var numbers = [1, 2, 3, 4]; * var factorials = R.scan(R.multiply, 1, numbers); //=> [1, 1, 2, 6, 24] * @symb R.scan(f, a, [b, c]) = [a, f(a, b), f(f(a, b), c)] */ var scan = /*#__PURE__*/_curry3(function scan(fn, acc, list) { var idx = 0; var len = list.length; var result = [acc]; while (idx < len) { acc = fn(acc, list[idx]); result[idx + 1] = acc; idx += 1; } return result; }); module.exports = scan; /***/ }), /* 875 */ /*!**********************************!*\ !*** ../~/ramda/src/sequence.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var ap = /*#__PURE__*/__webpack_require__(/*! ./ap */ 649); var map = /*#__PURE__*/__webpack_require__(/*! ./map */ 631); var prepend = /*#__PURE__*/__webpack_require__(/*! ./prepend */ 858); var reduceRight = /*#__PURE__*/__webpack_require__(/*! ./reduceRight */ 868); /** * Transforms a [Traversable](https://github.com/fantasyland/fantasy-land#traversable) * of [Applicative](https://github.com/fantasyland/fantasy-land#applicative) into an * Applicative of Traversable. * * Dispatches to the `sequence` method of the second argument, if present. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig (Applicative f, Traversable t) => (a -> f a) -> t (f a) -> f (t a) * @param {Function} of * @param {*} traversable * @return {*} * @see R.traverse * @example * * R.sequence(Maybe.of, [Just(1), Just(2), Just(3)]); //=> Just([1, 2, 3]) * R.sequence(Maybe.of, [Just(1), Just(2), Nothing()]); //=> Nothing() * * R.sequence(R.of, Just([1, 2, 3])); //=> [Just(1), Just(2), Just(3)] * R.sequence(R.of, Nothing()); //=> [Nothing()] */ var sequence = /*#__PURE__*/_curry2(function sequence(of, traversable) { return typeof traversable.sequence === 'function' ? traversable.sequence(of) : reduceRight(function (x, acc) { return ap(map(prepend, x), acc); }, of([]), traversable); }); module.exports = sequence; /***/ }), /* 876 */ /*!*****************************!*\ !*** ../~/ramda/src/set.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var always = /*#__PURE__*/__webpack_require__(/*! ./always */ 607); var over = /*#__PURE__*/__webpack_require__(/*! ./over */ 845); /** * Returns the result of "setting" the portion of the given data structure * focused by the given lens to the given value. * * @func * @memberOf R * @since v0.16.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Lens s a -> a -> s -> s * @param {Lens} lens * @param {*} v * @param {*} x * @return {*} * @see R.prop, R.lensIndex, R.lensProp * @example * * var xLens = R.lensProp('x'); * * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} * R.set(xLens, 8, {x: 1, y: 2}); //=> {x: 8, y: 2} */ var set = /*#__PURE__*/_curry3(function set(lens, v, x) { return over(lens, always(v), x); }); module.exports = set; /***/ }), /* 877 */ /*!******************************!*\ !*** ../~/ramda/src/sort.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns a copy of the list, sorted according to the comparator function, * which should accept two values at a time and return a negative number if the * first value is smaller, a positive number if it's larger, and zero if they * are equal. Please note that this is a **copy** of the list. It does not * modify the original. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig ((a, a) -> Number) -> [a] -> [a] * @param {Function} comparator A sorting function :: a -> b -> Int * @param {Array} list The list to sort * @return {Array} a new array with its elements sorted by the comparator function. * @example * * var diff = function(a, b) { return a - b; }; * R.sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7] */ var sort = /*#__PURE__*/_curry2(function sort(comparator, list) { return Array.prototype.slice.call(list, 0).sort(comparator); }); module.exports = sort; /***/ }), /* 878 */ /*!********************************!*\ !*** ../~/ramda/src/sortBy.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Sorts the list according to the supplied function. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord b => (a -> b) -> [a] -> [a] * @param {Function} fn * @param {Array} list The list to sort. * @return {Array} A new list sorted by the keys generated by `fn`. * @example * * var sortByFirstItem = R.sortBy(R.prop(0)); * var sortByNameCaseInsensitive = R.sortBy(R.compose(R.toLower, R.prop('name'))); * var pairs = [[-1, 1], [-2, 2], [-3, 3]]; * sortByFirstItem(pairs); //=> [[-3, 3], [-2, 2], [-1, 1]] * var alice = { * name: 'ALICE', * age: 101 * }; * var bob = { * name: 'Bob', * age: -10 * }; * var clara = { * name: 'clara', * age: 314.159 * }; * var people = [clara, bob, alice]; * sortByNameCaseInsensitive(people); //=> [alice, bob, clara] */ var sortBy = /*#__PURE__*/_curry2(function sortBy(fn, list) { return Array.prototype.slice.call(list, 0).sort(function (a, b) { var aa = fn(a); var bb = fn(b); return aa < bb ? -1 : aa > bb ? 1 : 0; }); }); module.exports = sortBy; /***/ }), /* 879 */ /*!**********************************!*\ !*** ../~/ramda/src/sortWith.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Sorts a list according to a list of comparators. * * @func * @memberOf R * @since v0.23.0 * @category Relation * @sig [(a, a) -> Number] -> [a] -> [a] * @param {Array} functions A list of comparator functions. * @param {Array} list The list to sort. * @return {Array} A new list sorted according to the comarator functions. * @example * * var alice = { * name: 'alice', * age: 40 * }; * var bob = { * name: 'bob', * age: 30 * }; * var clara = { * name: 'clara', * age: 40 * }; * var people = [clara, bob, alice]; * var ageNameSort = R.sortWith([ * R.descend(R.prop('age')), * R.ascend(R.prop('name')) * ]); * ageNameSort(people); //=> [alice, clara, bob] */ var sortWith = /*#__PURE__*/_curry2(function sortWith(fns, list) { return Array.prototype.slice.call(list, 0).sort(function (a, b) { var result = 0; var i = 0; while (result === 0 && i < fns.length) { result = fns[i](a, b); i += 1; } return result; }); }); module.exports = sortWith; /***/ }), /* 880 */ /*!*******************************!*\ !*** ../~/ramda/src/split.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var invoker = /*#__PURE__*/__webpack_require__(/*! ./invoker */ 799); /** * Splits a string into an array of strings based on the given * separator. * * @func * @memberOf R * @since v0.1.0 * @category String * @sig (String | RegExp) -> String -> [String] * @param {String|RegExp} sep The pattern. * @param {String} str The string to separate into an array. * @return {Array} The array of strings from `str` separated by `str`. * @see R.join * @example * * var pathComponents = R.split('/'); * R.tail(pathComponents('/usr/local/bin/node')); //=> ['usr', 'local', 'bin', 'node'] * * R.split('.', 'a.b.c.xyz.d'); //=> ['a', 'b', 'c', 'xyz', 'd'] */ var split = /*#__PURE__*/invoker(1, 'split'); module.exports = split; /***/ }), /* 881 */ /*!*********************************!*\ !*** ../~/ramda/src/splitAt.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var length = /*#__PURE__*/__webpack_require__(/*! ./length */ 806); var slice = /*#__PURE__*/__webpack_require__(/*! ./slice */ 689); /** * Splits a given list or string at a given index. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig Number -> [a] -> [[a], [a]] * @sig Number -> String -> [String, String] * @param {Number} index The index where the array/string is split. * @param {Array|String} array The array/string to be split. * @return {Array} * @example * * R.splitAt(1, [1, 2, 3]); //=> [[1], [2, 3]] * R.splitAt(5, 'hello world'); //=> ['hello', ' world'] * R.splitAt(-1, 'foobar'); //=> ['fooba', 'r'] */ var splitAt = /*#__PURE__*/_curry2(function splitAt(index, array) { return [slice(0, index, array), slice(index, length(array), array)]; }); module.exports = splitAt; /***/ }), /* 882 */ /*!************************************!*\ !*** ../~/ramda/src/splitEvery.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var slice = /*#__PURE__*/__webpack_require__(/*! ./slice */ 689); /** * Splits a collection into slices of the specified length. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig Number -> [a] -> [[a]] * @sig Number -> String -> [String] * @param {Number} n * @param {Array} list * @return {Array} * @example * * R.splitEvery(3, [1, 2, 3, 4, 5, 6, 7]); //=> [[1, 2, 3], [4, 5, 6], [7]] * R.splitEvery(3, 'foobarbaz'); //=> ['foo', 'bar', 'baz'] */ var splitEvery = /*#__PURE__*/_curry2(function splitEvery(n, list) { if (n <= 0) { throw new Error('First argument to splitEvery must be a positive integer'); } var result = []; var idx = 0; while (idx < list.length) { result.push(slice(idx, idx += n, list)); } return result; }); module.exports = splitEvery; /***/ }), /* 883 */ /*!***********************************!*\ !*** ../~/ramda/src/splitWhen.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Takes a list and a predicate and returns a pair of lists with the following properties: * * - the result of concatenating the two output lists is equivalent to the input list; * - none of the elements of the first output list satisfies the predicate; and * - if the second output list is non-empty, its first element satisfies the predicate. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig (a -> Boolean) -> [a] -> [[a], [a]] * @param {Function} pred The predicate that determines where the array is split. * @param {Array} list The array to be split. * @return {Array} * @example * * R.splitWhen(R.equals(2), [1, 2, 3, 1, 2, 3]); //=> [[1], [2, 3, 1, 2, 3]] */ var splitWhen = /*#__PURE__*/_curry2(function splitWhen(pred, list) { var idx = 0; var len = list.length; var prefix = []; while (idx < len && !pred(list[idx])) { prefix.push(list[idx]); idx += 1; } return [prefix, Array.prototype.slice.call(list, idx)]; }); module.exports = splitWhen; /***/ }), /* 884 */ /*!************************************!*\ !*** ../~/ramda/src/startsWith.js ***! \************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var equals = /*#__PURE__*/__webpack_require__(/*! ./equals */ 700); var take = /*#__PURE__*/__webpack_require__(/*! ./take */ 736); /** * Checks if a list starts with the provided values * * @func * @memberOf R * @since v0.24.0 * @category List * @sig [a] -> Boolean * @sig String -> Boolean * @param {*} prefix * @param {*} list * @return {Boolean} * @example * * R.startsWith('a', 'abc') //=> true * R.startsWith('b', 'abc') //=> false * R.startsWith(['a'], ['a', 'b', 'c']) //=> true * R.startsWith(['b'], ['a', 'b', 'c']) //=> false */ var startsWith = /*#__PURE__*/_curry2(function (prefix, list) { return equals(take(prefix.length, list), prefix); }); module.exports = startsWith; /***/ }), /* 885 */ /*!**********************************!*\ !*** ../~/ramda/src/subtract.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Subtracts its second argument from its first argument. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a The first value. * @param {Number} b The second value. * @return {Number} The result of `a - b`. * @see R.add * @example * * R.subtract(10, 8); //=> 2 * * var minus5 = R.subtract(R.__, 5); * minus5(17); //=> 12 * * var complementaryAngle = R.subtract(90); * complementaryAngle(30); //=> 60 * complementaryAngle(72); //=> 18 */ var subtract = /*#__PURE__*/_curry2(function subtract(a, b) { return Number(a) - Number(b); }); module.exports = subtract; /***/ }), /* 886 */ /*!*********************************************!*\ !*** ../~/ramda/src/symmetricDifference.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var concat = /*#__PURE__*/__webpack_require__(/*! ./concat */ 695); var difference = /*#__PURE__*/__webpack_require__(/*! ./difference */ 725); /** * Finds the set (i.e. no duplicates) of all elements contained in the first or * second list, but not both. * * @func * @memberOf R * @since v0.19.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` or `list2`, but not both. * @see R.symmetricDifferenceWith, R.difference, R.differenceWith * @example * * R.symmetricDifference([1,2,3,4], [7,6,5,4,3]); //=> [1,2,7,6,5] * R.symmetricDifference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5,1,2] */ var symmetricDifference = /*#__PURE__*/_curry2(function symmetricDifference(list1, list2) { return concat(difference(list1, list2), difference(list2, list1)); }); module.exports = symmetricDifference; /***/ }), /* 887 */ /*!*************************************************!*\ !*** ../~/ramda/src/symmetricDifferenceWith.js ***! \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var concat = /*#__PURE__*/__webpack_require__(/*! ./concat */ 695); var differenceWith = /*#__PURE__*/__webpack_require__(/*! ./differenceWith */ 726); /** * Finds the set (i.e. no duplicates) of all elements contained in the first or * second list, but not both. Duplication is determined according to the value * returned by applying the supplied predicate to two list elements. * * @func * @memberOf R * @since v0.19.0 * @category Relation * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` or `list2`, but not both. * @see R.symmetricDifference, R.difference, R.differenceWith * @example * * var eqA = R.eqBy(R.prop('a')); * var l1 = [{a: 1}, {a: 2}, {a: 3}, {a: 4}]; * var l2 = [{a: 3}, {a: 4}, {a: 5}, {a: 6}]; * R.symmetricDifferenceWith(eqA, l1, l2); //=> [{a: 1}, {a: 2}, {a: 5}, {a: 6}] */ var symmetricDifferenceWith = /*#__PURE__*/_curry3(function symmetricDifferenceWith(pred, list1, list2) { return concat(differenceWith(pred, list1, list2), differenceWith(pred, list2, list1)); }); module.exports = symmetricDifferenceWith; /***/ }), /* 888 */ /*!***************************************!*\ !*** ../~/ramda/src/takeLastWhile.js ***! \***************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var slice = /*#__PURE__*/__webpack_require__(/*! ./slice */ 689); /** * Returns a new list containing the last `n` elements of a given list, passing * each value to the supplied predicate function, and terminating when the * predicate function returns `false`. Excludes the element that caused the * predicate function to fail. The predicate function is passed one argument: * *(value)*. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} fn The function called per iteration. * @param {Array} xs The collection to iterate over. * @return {Array} A new array. * @see R.dropLastWhile, R.addIndex * @example * * var isNotOne = x => x !== 1; * * R.takeLastWhile(isNotOne, [1, 2, 3, 4]); //=> [2, 3, 4] * * R.takeLastWhile(x => x !== 'R' , 'Ramda'); //=> 'amda' */ var takeLastWhile = /*#__PURE__*/_curry2(function takeLastWhile(fn, xs) { var idx = xs.length - 1; while (idx >= 0 && fn(xs[idx])) { idx -= 1; } return slice(idx + 1, Infinity, xs); }); module.exports = takeLastWhile; /***/ }), /* 889 */ /*!***********************************!*\ !*** ../~/ramda/src/takeWhile.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xtakeWhile = /*#__PURE__*/__webpack_require__(/*! ./internal/_xtakeWhile */ 890); var slice = /*#__PURE__*/__webpack_require__(/*! ./slice */ 689); /** * Returns a new list containing the first `n` elements of a given list, * passing each value to the supplied predicate function, and terminating when * the predicate function returns `false`. Excludes the element that caused the * predicate function to fail. The predicate function is passed one argument: * *(value)*. * * Dispatches to the `takeWhile` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} fn The function called per iteration. * @param {Array} xs The collection to iterate over. * @return {Array} A new array. * @see R.dropWhile, R.transduce, R.addIndex * @example * * var isNotFour = x => x !== 4; * * R.takeWhile(isNotFour, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3] * * R.takeWhile(x => x !== 'd' , 'Ramda'); //=> 'Ram' */ var takeWhile = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['takeWhile'], _xtakeWhile, function takeWhile(fn, xs) { var idx = 0; var len = xs.length; while (idx < len && fn(xs[idx])) { idx += 1; } return slice(0, idx, xs); })); module.exports = takeWhile; /***/ }), /* 890 */ /*!**********************************************!*\ !*** ../~/ramda/src/internal/_xtakeWhile.js ***! \**********************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _reduced = /*#__PURE__*/__webpack_require__(/*! ./_reduced */ 626); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XTakeWhile = /*#__PURE__*/function () { function XTakeWhile(f, xf) { this.xf = xf; this.f = f; } XTakeWhile.prototype['@@transducer/init'] = _xfBase.init; XTakeWhile.prototype['@@transducer/result'] = _xfBase.result; XTakeWhile.prototype['@@transducer/step'] = function (result, input) { return this.f(input) ? this.xf['@@transducer/step'](result, input) : _reduced(result); }; return XTakeWhile; }(); var _xtakeWhile = /*#__PURE__*/_curry2(function _xtakeWhile(f, xf) { return new XTakeWhile(f, xf); }); module.exports = _xtakeWhile; /***/ }), /* 891 */ /*!*****************************!*\ !*** ../~/ramda/src/tap.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _dispatchable = /*#__PURE__*/__webpack_require__(/*! ./internal/_dispatchable */ 622); var _xtap = /*#__PURE__*/__webpack_require__(/*! ./internal/_xtap */ 892); /** * Runs the given function with the supplied object, then returns the object. * * Acts as a transducer if a transformer is given as second parameter. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (a -> *) -> a -> a * @param {Function} fn The function to call with `x`. The return value of `fn` will be thrown away. * @param {*} x * @return {*} `x`. * @example * * var sayX = x => console.log('x is ' + x); * R.tap(sayX, 100); //=> 100 * // logs 'x is 100' * @symb R.tap(f, a) = a */ var tap = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable([], _xtap, function tap(fn, x) { fn(x); return x; })); module.exports = tap; /***/ }), /* 892 */ /*!****************************************!*\ !*** ../~/ramda/src/internal/_xtap.js ***! \****************************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ 613); var _xfBase = /*#__PURE__*/__webpack_require__(/*! ./_xfBase */ 627); var XTap = /*#__PURE__*/function () { function XTap(f, xf) { this.xf = xf; this.f = f; } XTap.prototype['@@transducer/init'] = _xfBase.init; XTap.prototype['@@transducer/result'] = _xfBase.result; XTap.prototype['@@transducer/step'] = function (result, input) { this.f(input); return this.xf['@@transducer/step'](result, input); }; return XTap; }(); var _xtap = /*#__PURE__*/_curry2(function _xtap(f, xf) { return new XTap(f, xf); }); module.exports = _xtap; /***/ }), /* 893 */ /*!******************************!*\ !*** ../~/ramda/src/test.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _cloneRegExp = /*#__PURE__*/__webpack_require__(/*! ./internal/_cloneRegExp */ 679); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _isRegExp = /*#__PURE__*/__webpack_require__(/*! ./internal/_isRegExp */ 894); var toString = /*#__PURE__*/__webpack_require__(/*! ./toString */ 696); /** * Determines whether a given string matches a given regular expression. * * @func * @memberOf R * @since v0.12.0 * @category String * @sig RegExp -> String -> Boolean * @param {RegExp} pattern * @param {String} str * @return {Boolean} * @see R.match * @example * * R.test(/^x/, 'xyz'); //=> true * R.test(/^y/, 'xyz'); //=> false */ var test = /*#__PURE__*/_curry2(function test(pattern, str) { if (!_isRegExp(pattern)) { throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + toString(pattern)); } return _cloneRegExp(pattern).test(str); }); module.exports = test; /***/ }), /* 894 */ /*!********************************************!*\ !*** ../~/ramda/src/internal/_isRegExp.js ***! \********************************************/ /***/ (function(module, exports) { function _isRegExp(x) { return Object.prototype.toString.call(x) === '[object RegExp]'; } module.exports = _isRegExp; /***/ }), /* 895 */ /*!*********************************!*\ !*** ../~/ramda/src/toLower.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var invoker = /*#__PURE__*/__webpack_require__(/*! ./invoker */ 799); /** * The lower case version of a string. * * @func * @memberOf R * @since v0.9.0 * @category String * @sig String -> String * @param {String} str The string to lower case. * @return {String} The lower case version of `str`. * @see R.toUpper * @example * * R.toLower('XYZ'); //=> 'xyz' */ var toLower = /*#__PURE__*/invoker(0, 'toLowerCase'); module.exports = toLower; /***/ }), /* 896 */ /*!*********************************!*\ !*** ../~/ramda/src/toPairs.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var _has = /*#__PURE__*/__webpack_require__(/*! ./internal/_has */ 640); /** * Converts an object into an array of key, value arrays. Only the object's * own properties are used. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.4.0 * @category Object * @sig {String: *} -> [[String,*]] * @param {Object} obj The object to extract from * @return {Array} An array of key, value arrays from the object's own properties. * @see R.fromPairs * @example * * R.toPairs({a: 1, b: 2, c: 3}); //=> [['a', 1], ['b', 2], ['c', 3]] */ var toPairs = /*#__PURE__*/_curry1(function toPairs(obj) { var pairs = []; for (var prop in obj) { if (_has(prop, obj)) { pairs[pairs.length] = [prop, obj[prop]]; } } return pairs; }); module.exports = toPairs; /***/ }), /* 897 */ /*!***********************************!*\ !*** ../~/ramda/src/toPairsIn.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Converts an object into an array of key, value arrays. The object's own * properties and prototype properties are used. Note that the order of the * output array is not guaranteed to be consistent across different JS * platforms. * * @func * @memberOf R * @since v0.4.0 * @category Object * @sig {String: *} -> [[String,*]] * @param {Object} obj The object to extract from * @return {Array} An array of key, value arrays from the object's own * and prototype properties. * @example * * var F = function() { this.x = 'X'; }; * F.prototype.y = 'Y'; * var f = new F(); * R.toPairsIn(f); //=> [['x','X'], ['y','Y']] */ var toPairsIn = /*#__PURE__*/_curry1(function toPairsIn(obj) { var pairs = []; for (var prop in obj) { pairs[pairs.length] = [prop, obj[prop]]; } return pairs; }); module.exports = toPairsIn; /***/ }), /* 898 */ /*!*********************************!*\ !*** ../~/ramda/src/toUpper.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var invoker = /*#__PURE__*/__webpack_require__(/*! ./invoker */ 799); /** * The upper case version of a string. * * @func * @memberOf R * @since v0.9.0 * @category String * @sig String -> String * @param {String} str The string to upper case. * @return {String} The upper case version of `str`. * @see R.toLower * @example * * R.toUpper('abc'); //=> 'ABC' */ var toUpper = /*#__PURE__*/invoker(0, 'toUpperCase'); module.exports = toUpper; /***/ }), /* 899 */ /*!***********************************!*\ !*** ../~/ramda/src/transduce.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _reduce = /*#__PURE__*/__webpack_require__(/*! ./internal/_reduce */ 633); var _xwrap = /*#__PURE__*/__webpack_require__(/*! ./internal/_xwrap */ 636); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); /** * Initializes a transducer using supplied iterator function. Returns a single * item by iterating through the list, successively calling the transformed * iterator function and passing it an accumulator value and the current value * from the array, and then passing the result to the next call. * * The iterator function receives two values: *(acc, value)*. It will be * wrapped as a transformer to initialize the transducer. A transformer can be * passed directly in place of an iterator function. In both cases, iteration * may be stopped early with the [`R.reduced`](#reduced) function. * * A transducer is a function that accepts a transformer and returns a * transformer and can be composed directly. * * A transformer is an an object that provides a 2-arity reducing iterator * function, step, 0-arity initial value function, init, and 1-arity result * extraction function, result. The step function is used as the iterator * function in reduce. The result function is used to convert the final * accumulator into the return type and in most cases is * [`R.identity`](#identity). The init function can be used to provide an * initial accumulator, but is ignored by transduce. * * The iteration is performed with [`R.reduce`](#reduce) after initializing the transducer. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig (c -> c) -> ((a, b) -> a) -> a -> [b] -> a * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. * @param {Function} fn The iterator function. Receives two values, the accumulator and the * current element from the array. Wrapped as transformer, if necessary, and used to * initialize the transducer * @param {*} acc The initial accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduce, R.reduced, R.into * @example * * var numbers = [1, 2, 3, 4]; * var transducer = R.compose(R.map(R.add(1)), R.take(2)); * R.transduce(transducer, R.flip(R.append), [], numbers); //=> [2, 3] * * var isOdd = (x) => x % 2 === 1; * var firstOddTransducer = R.compose(R.filter(isOdd), R.take(1)); * R.transduce(firstOddTransducer, R.flip(R.append), [], R.range(0, 100)); //=> [1] */ var transduce = /*#__PURE__*/curryN(4, function transduce(xf, fn, acc, list) { return _reduce(xf(typeof fn === 'function' ? _xwrap(fn) : fn), acc, list); }); module.exports = transduce; /***/ }), /* 900 */ /*!***********************************!*\ !*** ../~/ramda/src/transpose.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Transposes the rows and columns of a 2D list. * When passed a list of `n` lists of length `x`, * returns a list of `x` lists of length `n`. * * * @func * @memberOf R * @since v0.19.0 * @category List * @sig [[a]] -> [[a]] * @param {Array} list A 2D list * @return {Array} A 2D list * @example * * R.transpose([[1, 'a'], [2, 'b'], [3, 'c']]) //=> [[1, 2, 3], ['a', 'b', 'c']] * R.transpose([[1, 2, 3], ['a', 'b', 'c']]) //=> [[1, 'a'], [2, 'b'], [3, 'c']] * * // If some of the rows are shorter than the following rows, their elements are skipped: * R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]] * @symb R.transpose([[a], [b], [c]]) = [a, b, c] * @symb R.transpose([[a, b], [c, d]]) = [[a, c], [b, d]] * @symb R.transpose([[a, b], [c]]) = [[a, c], [b]] */ var transpose = /*#__PURE__*/_curry1(function transpose(outerlist) { var i = 0; var result = []; while (i < outerlist.length) { var innerlist = outerlist[i]; var j = 0; while (j < innerlist.length) { if (typeof result[j] === 'undefined') { result[j] = []; } result[j].push(innerlist[j]); j += 1; } i += 1; } return result; }); module.exports = transpose; /***/ }), /* 901 */ /*!**********************************!*\ !*** ../~/ramda/src/traverse.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var map = /*#__PURE__*/__webpack_require__(/*! ./map */ 631); var sequence = /*#__PURE__*/__webpack_require__(/*! ./sequence */ 875); /** * Maps an [Applicative](https://github.com/fantasyland/fantasy-land#applicative)-returning * function over a [Traversable](https://github.com/fantasyland/fantasy-land#traversable), * then uses [`sequence`](#sequence) to transform the resulting Traversable of Applicative * into an Applicative of Traversable. * * Dispatches to the `traverse` method of the third argument, if present. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig (Applicative f, Traversable t) => (a -> f a) -> (a -> f b) -> t a -> f (t b) * @param {Function} of * @param {Function} f * @param {*} traversable * @return {*} * @see R.sequence * @example * * // Returns `Nothing` if the given divisor is `0` * safeDiv = n => d => d === 0 ? Nothing() : Just(n / d) * * R.traverse(Maybe.of, safeDiv(10), [2, 4, 5]); //=> Just([5, 2.5, 2]) * R.traverse(Maybe.of, safeDiv(10), [2, 0, 5]); //=> Nothing */ var traverse = /*#__PURE__*/_curry3(function traverse(of, f, traversable) { return typeof traversable['fantasy-land/traverse'] === 'function' ? traversable['fantasy-land/traverse'](f, of) : sequence(of, map(f, traversable)); }); module.exports = traverse; /***/ }), /* 902 */ /*!******************************!*\ !*** ../~/ramda/src/trim.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + '\u2029\uFEFF'; var zeroWidth = '\u200b'; var hasProtoTrim = typeof String.prototype.trim === 'function'; /** * Removes (strips) whitespace from both ends of the string. * * @func * @memberOf R * @since v0.6.0 * @category String * @sig String -> String * @param {String} str The string to trim. * @return {String} Trimmed version of `str`. * @example * * R.trim(' xyz '); //=> 'xyz' * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z'] */ var _trim = !hasProtoTrim || /*#__PURE__*/ws.trim() || ! /*#__PURE__*/zeroWidth.trim() ? function trim(str) { var beginRx = new RegExp('^[' + ws + '][' + ws + ']*'); var endRx = new RegExp('[' + ws + '][' + ws + ']*$'); return str.replace(beginRx, '').replace(endRx, ''); } : function trim(str) { return str.trim(); }; var trim = /*#__PURE__*/_curry1(_trim); module.exports = trim; /***/ }), /* 903 */ /*!**********************************!*\ !*** ../~/ramda/src/tryCatch.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _arity = /*#__PURE__*/__webpack_require__(/*! ./internal/_arity */ 617); var _concat = /*#__PURE__*/__webpack_require__(/*! ./internal/_concat */ 615); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * `tryCatch` takes two functions, a `tryer` and a `catcher`. The returned * function evaluates the `tryer`; if it does not throw, it simply returns the * result. If the `tryer` *does* throw, the returned function evaluates the * `catcher` function and returns its result. Note that for effective * composition with this function, both the `tryer` and `catcher` functions * must return the same type of results. * * @func * @memberOf R * @since v0.20.0 * @category Function * @sig (...x -> a) -> ((e, ...x) -> a) -> (...x -> a) * @param {Function} tryer The function that may throw. * @param {Function} catcher The function that will be evaluated if `tryer` throws. * @return {Function} A new function that will catch exceptions and send then to the catcher. * @example * * R.tryCatch(R.prop('x'), R.F)({x: true}); //=> true * R.tryCatch(R.prop('x'), R.F)(null); //=> false */ var tryCatch = /*#__PURE__*/_curry2(function _tryCatch(tryer, catcher) { return _arity(tryer.length, function () { try { return tryer.apply(this, arguments); } catch (e) { return catcher.apply(this, _concat([e], arguments)); } }); }); module.exports = tryCatch; /***/ }), /* 904 */ /*!*********************************!*\ !*** ../~/ramda/src/unapply.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Takes a function `fn`, which takes a single array argument, and returns a * function which: * * - takes any number of positional arguments; * - passes these arguments to `fn` as an array; and * - returns the result. * * In other words, `R.unapply` derives a variadic function from a function which * takes an array. `R.unapply` is the inverse of [`R.apply`](#apply). * * @func * @memberOf R * @since v0.8.0 * @category Function * @sig ([*...] -> a) -> (*... -> a) * @param {Function} fn * @return {Function} * @see R.apply * @example * * R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]' * @symb R.unapply(f)(a, b) = f([a, b]) */ var unapply = /*#__PURE__*/_curry1(function unapply(fn) { return function () { return fn(Array.prototype.slice.call(arguments, 0)); }; }); module.exports = unapply; /***/ }), /* 905 */ /*!*******************************!*\ !*** ../~/ramda/src/unary.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); var nAry = /*#__PURE__*/__webpack_require__(/*! ./nAry */ 664); /** * Wraps a function of any arity (including nullary) in a function that accepts * exactly 1 parameter. Any extraneous parameters will not be passed to the * supplied function. * * @func * @memberOf R * @since v0.2.0 * @category Function * @sig (* -> b) -> (a -> b) * @param {Function} fn The function to wrap. * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of * arity 1. * @see R.binary, R.nAry * @example * * var takesTwoArgs = function(a, b) { * return [a, b]; * }; * takesTwoArgs.length; //=> 2 * takesTwoArgs(1, 2); //=> [1, 2] * * var takesOneArg = R.unary(takesTwoArgs); * takesOneArg.length; //=> 1 * // Only 1 argument is passed to the wrapped function * takesOneArg(1, 2); //=> [1, undefined] * @symb R.unary(f)(a, b, c) = f(a) */ var unary = /*#__PURE__*/_curry1(function unary(fn) { return nAry(1, fn); }); module.exports = unary; /***/ }), /* 906 */ /*!**********************************!*\ !*** ../~/ramda/src/uncurryN.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ 616); /** * Returns a function of arity `n` from a (manually) curried function. * * @func * @memberOf R * @since v0.14.0 * @category Function * @sig Number -> (a -> b) -> (a -> c) * @param {Number} length The arity for the returned function. * @param {Function} fn The function to uncurry. * @return {Function} A new function. * @see R.curry * @example * * var addFour = a => b => c => d => a + b + c + d; * * var uncurriedAddFour = R.uncurryN(4, addFour); * uncurriedAddFour(1, 2, 3, 4); //=> 10 */ var uncurryN = /*#__PURE__*/_curry2(function uncurryN(depth, fn) { return curryN(depth, function () { var currentDepth = 1; var value = fn; var idx = 0; var endIdx; while (currentDepth <= depth && typeof value === 'function') { endIdx = currentDepth === depth ? arguments.length : idx + value.length; value = value.apply(this, Array.prototype.slice.call(arguments, idx, endIdx)); currentDepth += 1; idx = endIdx; } return value; }); }); module.exports = uncurryN; /***/ }), /* 907 */ /*!********************************!*\ !*** ../~/ramda/src/unfold.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Builds a list from a seed value. Accepts an iterator function, which returns * either false to stop iteration or an array of length 2 containing the value * to add to the resulting list and the seed to be used in the next call to the * iterator function. * * The iterator function receives one argument: *(seed)*. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig (a -> [b]) -> * -> [b] * @param {Function} fn The iterator function. receives one argument, `seed`, and returns * either false to quit iteration or an array of length two to proceed. The element * at index 0 of this array will be added to the resulting array, and the element * at index 1 will be passed to the next call to `fn`. * @param {*} seed The seed value. * @return {Array} The final list. * @example * * var f = n => n > 50 ? false : [-n, n + 10]; * R.unfold(f, 10); //=> [-10, -20, -30, -40, -50] * @symb R.unfold(f, x) = [f(x)[0], f(f(x)[1])[0], f(f(f(x)[1])[1])[0], ...] */ var unfold = /*#__PURE__*/_curry2(function unfold(fn, seed) { var pair = fn(seed); var result = []; while (pair && pair.length) { result[result.length] = pair[0]; pair = fn(pair[1]); } return result; }); module.exports = unfold; /***/ }), /* 908 */ /*!*******************************!*\ !*** ../~/ramda/src/union.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _concat = /*#__PURE__*/__webpack_require__(/*! ./internal/_concat */ 615); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var compose = /*#__PURE__*/__webpack_require__(/*! ./compose */ 684); var uniq = /*#__PURE__*/__webpack_require__(/*! ./uniq */ 788); /** * Combines two lists into a set (i.e. no duplicates) composed of the elements * of each list. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} as The first list. * @param {Array} bs The second list. * @return {Array} The first and second lists concatenated, with * duplicates removed. * @example * * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4] */ var union = /*#__PURE__*/_curry2( /*#__PURE__*/compose(uniq, _concat)); module.exports = union; /***/ }), /* 909 */ /*!***********************************!*\ !*** ../~/ramda/src/unionWith.js ***! \***********************************/ /***/ (function(module, exports, __webpack_require__) { var _concat = /*#__PURE__*/__webpack_require__(/*! ./internal/_concat */ 615); var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); var uniqWith = /*#__PURE__*/__webpack_require__(/*! ./uniqWith */ 910); /** * Combines two lists into a set (i.e. no duplicates) composed of the elements * of each list. Duplication is determined according to the value returned by * applying the supplied predicate to two list elements. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig ((a, a) -> Boolean) -> [*] -> [*] -> [*] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The first and second lists concatenated, with * duplicates removed. * @see R.union * @example * * var l1 = [{a: 1}, {a: 2}]; * var l2 = [{a: 1}, {a: 4}]; * R.unionWith(R.eqBy(R.prop('a')), l1, l2); //=> [{a: 1}, {a: 2}, {a: 4}] */ var unionWith = /*#__PURE__*/_curry3(function unionWith(pred, list1, list2) { return uniqWith(pred, _concat(list1, list2)); }); module.exports = unionWith; /***/ }), /* 910 */ /*!**********************************!*\ !*** ../~/ramda/src/uniqWith.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _containsWith = /*#__PURE__*/__webpack_require__(/*! ./internal/_containsWith */ 703); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Returns a new list containing only one copy of each element in the original * list, based upon the value returned by applying the supplied predicate to * two list elements. Prefers the first item if two items compare equal based * on the predicate. * * @func * @memberOf R * @since v0.2.0 * @category List * @sig ((a, a) -> Boolean) -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list The array to consider. * @return {Array} The list of unique items. * @example * * var strEq = R.eqBy(String); * R.uniqWith(strEq)([1, '1', 2, 1]); //=> [1, 2] * R.uniqWith(strEq)([{}, {}]); //=> [{}] * R.uniqWith(strEq)([1, '1', 1]); //=> [1] * R.uniqWith(strEq)(['1', 1, 1]); //=> ['1'] */ var uniqWith = /*#__PURE__*/_curry2(function uniqWith(pred, list) { var idx = 0; var len = list.length; var result = []; var item; while (idx < len) { item = list[idx]; if (!_containsWith(pred, item, result)) { result[result.length] = item; } idx += 1; } return result; }); module.exports = uniqWith; /***/ }), /* 911 */ /*!********************************!*\ !*** ../~/ramda/src/unless.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Tests the final argument by passing it to the given predicate function. If * the predicate is not satisfied, the function will return the result of * calling the `whenFalseFn` function with the same argument. If the predicate * is satisfied, the argument is returned as is. * * @func * @memberOf R * @since v0.18.0 * @category Logic * @sig (a -> Boolean) -> (a -> a) -> a -> a * @param {Function} pred A predicate function * @param {Function} whenFalseFn A function to invoke when the `pred` evaluates * to a falsy value. * @param {*} x An object to test with the `pred` function and * pass to `whenFalseFn` if necessary. * @return {*} Either `x` or the result of applying `x` to `whenFalseFn`. * @see R.ifElse, R.when * @example * * let safeInc = R.unless(R.isNil, R.inc); * safeInc(null); //=> null * safeInc(1); //=> 2 */ var unless = /*#__PURE__*/_curry3(function unless(pred, whenFalseFn, x) { return pred(x) ? x : whenFalseFn(x); }); module.exports = unless; /***/ }), /* 912 */ /*!********************************!*\ !*** ../~/ramda/src/unnest.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _identity = /*#__PURE__*/__webpack_require__(/*! ./internal/_identity */ 778); var chain = /*#__PURE__*/__webpack_require__(/*! ./chain */ 671); /** * Shorthand for `R.chain(R.identity)`, which removes one level of nesting from * any [Chain](https://github.com/fantasyland/fantasy-land#chain). * * @func * @memberOf R * @since v0.3.0 * @category List * @sig Chain c => c (c a) -> c a * @param {*} list * @return {*} * @see R.flatten, R.chain * @example * * R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]] * R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6] */ var unnest = /*#__PURE__*/chain(_identity); module.exports = unnest; /***/ }), /* 913 */ /*!*******************************!*\ !*** ../~/ramda/src/until.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Takes a predicate, a transformation function, and an initial value, * and returns a value of the same type as the initial value. * It does so by applying the transformation until the predicate is satisfied, * at which point it returns the satisfactory value. * * @func * @memberOf R * @since v0.20.0 * @category Logic * @sig (a -> Boolean) -> (a -> a) -> a -> a * @param {Function} pred A predicate function * @param {Function} fn The iterator function * @param {*} init Initial value * @return {*} Final value that satisfies predicate * @example * * R.until(R.gt(R.__, 100), R.multiply(2))(1) // => 128 */ var until = /*#__PURE__*/_curry3(function until(pred, fn, init) { var val = init; while (!pred(val)) { val = fn(val); } return val; }); module.exports = until; /***/ }), /* 914 */ /*!**********************************!*\ !*** ../~/ramda/src/valuesIn.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ 608); /** * Returns a list of all the properties, including prototype properties, of the * supplied object. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.2.0 * @category Object * @sig {k: v} -> [v] * @param {Object} obj The object to extract values from * @return {Array} An array of the values of the object's own and prototype properties. * @see R.values, R.keysIn * @example * * var F = function() { this.x = 'X'; }; * F.prototype.y = 'Y'; * var f = new F(); * R.valuesIn(f); //=> ['X', 'Y'] */ var valuesIn = /*#__PURE__*/_curry1(function valuesIn(obj) { var prop; var vs = []; for (prop in obj) { vs[vs.length] = obj[prop]; } return vs; }); module.exports = valuesIn; /***/ }), /* 915 */ /*!******************************!*\ !*** ../~/ramda/src/view.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); // `Const` is a functor that effectively ignores the function given to `map`. var Const = function (x) { return { value: x, 'fantasy-land/map': function () { return this; } }; }; /** * Returns a "view" of the given data structure, determined by the given lens. * The lens's focus determines which portion of the data structure is visible. * * @func * @memberOf R * @since v0.16.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Lens s a -> s -> a * @param {Lens} lens * @param {*} x * @return {*} * @see R.prop, R.lensIndex, R.lensProp * @example * * var xLens = R.lensProp('x'); * * R.view(xLens, {x: 1, y: 2}); //=> 1 * R.view(xLens, {x: 4, y: 2}); //=> 4 */ var view = /*#__PURE__*/_curry2(function view(lens, x) { // Using `Const` effectively ignores the setter function of the `lens`, // leaving the value returned by the getter function unmodified. return lens(Const)(x).value; }); module.exports = view; /***/ }), /* 916 */ /*!******************************!*\ !*** ../~/ramda/src/when.js ***! \******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Tests the final argument by passing it to the given predicate function. If * the predicate is satisfied, the function will return the result of calling * the `whenTrueFn` function with the same argument. If the predicate is not * satisfied, the argument is returned as is. * * @func * @memberOf R * @since v0.18.0 * @category Logic * @sig (a -> Boolean) -> (a -> a) -> a -> a * @param {Function} pred A predicate function * @param {Function} whenTrueFn A function to invoke when the `condition` * evaluates to a truthy value. * @param {*} x An object to test with the `pred` function and * pass to `whenTrueFn` if necessary. * @return {*} Either `x` or the result of applying `x` to `whenTrueFn`. * @see R.ifElse, R.unless * @example * * // truncate :: String -> String * var truncate = R.when( * R.propSatisfies(R.gt(R.__, 10), 'length'), * R.pipe(R.take(10), R.append('…'), R.join('')) * ); * truncate('12345'); //=> '12345' * truncate('0123456789ABC'); //=> '0123456789…' */ var when = /*#__PURE__*/_curry3(function when(pred, whenTrueFn, x) { return pred(x) ? whenTrueFn(x) : x; }); module.exports = when; /***/ }), /* 917 */ /*!*******************************!*\ !*** ../~/ramda/src/where.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var _has = /*#__PURE__*/__webpack_require__(/*! ./internal/_has */ 640); /** * Takes a spec object and a test object; returns true if the test satisfies * the spec. Each of the spec's own properties must be a predicate function. * Each predicate is applied to the value of the corresponding property of the * test object. `where` returns true if all the predicates return true, false * otherwise. * * `where` is well suited to declaratively expressing constraints for other * functions such as [`filter`](#filter) and [`find`](#find). * * @func * @memberOf R * @since v0.1.1 * @category Object * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean * @param {Object} spec * @param {Object} testObj * @return {Boolean} * @see R.propSatisfies, R.whereEq * @example * * // pred :: Object -> Boolean * var pred = R.where({ * a: R.equals('foo'), * b: R.complement(R.equals('bar')), * x: R.gt(R.__, 10), * y: R.lt(R.__, 20) * }); * * pred({a: 'foo', b: 'xxx', x: 11, y: 19}); //=> true * pred({a: 'xxx', b: 'xxx', x: 11, y: 19}); //=> false * pred({a: 'foo', b: 'bar', x: 11, y: 19}); //=> false * pred({a: 'foo', b: 'xxx', x: 10, y: 19}); //=> false * pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> false */ var where = /*#__PURE__*/_curry2(function where(spec, testObj) { for (var prop in spec) { if (_has(prop, spec) && !spec[prop](testObj[prop])) { return false; } } return true; }); module.exports = where; /***/ }), /* 918 */ /*!*********************************!*\ !*** ../~/ramda/src/whereEq.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var equals = /*#__PURE__*/__webpack_require__(/*! ./equals */ 700); var map = /*#__PURE__*/__webpack_require__(/*! ./map */ 631); var where = /*#__PURE__*/__webpack_require__(/*! ./where */ 917); /** * Takes a spec object and a test object; returns true if the test satisfies * the spec, false otherwise. An object satisfies the spec if, for each of the * spec's own properties, accessing that property of the object gives the same * value (in [`R.equals`](#equals) terms) as accessing that property of the * spec. * * `whereEq` is a specialization of [`where`](#where). * * @func * @memberOf R * @since v0.14.0 * @category Object * @sig {String: *} -> {String: *} -> Boolean * @param {Object} spec * @param {Object} testObj * @return {Boolean} * @see R.propEq, R.where * @example * * // pred :: Object -> Boolean * var pred = R.whereEq({a: 1, b: 2}); * * pred({a: 1}); //=> false * pred({a: 1, b: 2}); //=> true * pred({a: 1, b: 2, c: 3}); //=> true * pred({a: 1, b: 1}); //=> false */ var whereEq = /*#__PURE__*/_curry2(function whereEq(spec, testObj) { return where(map(equals, spec), testObj); }); module.exports = whereEq; /***/ }), /* 919 */ /*!*********************************!*\ !*** ../~/ramda/src/without.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _contains = /*#__PURE__*/__webpack_require__(/*! ./internal/_contains */ 698); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); var flip = /*#__PURE__*/__webpack_require__(/*! ./flip */ 766); var reject = /*#__PURE__*/__webpack_require__(/*! ./reject */ 708); /** * Returns a new list without values in the first argument. * [`R.equals`](#equals) is used to determine equality. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig [a] -> [a] -> [a] * @param {Array} list1 The values to be removed from `list2`. * @param {Array} list2 The array to remove values from. * @return {Array} The new array without values in `list1`. * @see R.transduce, R.difference * @example * * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4] */ var without = /*#__PURE__*/_curry2(function (xs, list) { return reject(flip(_contains)(xs), list); }); module.exports = without; /***/ }), /* 920 */ /*!*******************************!*\ !*** ../~/ramda/src/xprod.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Creates a new list out of the two supplied by creating each possible pair * from the lists. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [b] -> [[a,b]] * @param {Array} as The first list. * @param {Array} bs The second list. * @return {Array} The list made by combining each possible pair from * `as` and `bs` into pairs (`[a, b]`). * @example * * R.xprod([1, 2], ['a', 'b']); //=> [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] * @symb R.xprod([a, b], [c, d]) = [[a, c], [a, d], [b, c], [b, d]] */ var xprod = /*#__PURE__*/_curry2(function xprod(a, b) { // = xprodWith(prepend); (takes about 3 times as long...) var idx = 0; var ilen = a.length; var j; var jlen = b.length; var result = []; while (idx < ilen) { j = 0; while (j < jlen) { result[result.length] = [a[idx], b[j]]; j += 1; } idx += 1; } return result; }); module.exports = xprod; /***/ }), /* 921 */ /*!*****************************!*\ !*** ../~/ramda/src/zip.js ***! \*****************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Creates a new list out of the two supplied by pairing up equally-positioned * items from both lists. The returned list is truncated to the length of the * shorter of the two input lists. * Note: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [b] -> [[a,b]] * @param {Array} list1 The first array to consider. * @param {Array} list2 The second array to consider. * @return {Array} The list made by pairing up same-indexed elements of `list1` and `list2`. * @example * * R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']] * @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]] */ var zip = /*#__PURE__*/_curry2(function zip(a, b) { var rv = []; var idx = 0; var len = Math.min(a.length, b.length); while (idx < len) { rv[idx] = [a[idx], b[idx]]; idx += 1; } return rv; }); module.exports = zip; /***/ }), /* 922 */ /*!********************************!*\ !*** ../~/ramda/src/zipObj.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ 613); /** * Creates a new object out of a list of keys and a list of values. * Key/value pairing is truncated to the length of the shorter of the two lists. * Note: `zipObj` is equivalent to `pipe(zip, fromPairs)`. * * @func * @memberOf R * @since v0.3.0 * @category List * @sig [String] -> [*] -> {String: *} * @param {Array} keys The array that will be properties on the output object. * @param {Array} values The list of values on the output object. * @return {Object} The object made by pairing up same-indexed elements of `keys` and `values`. * @example * * R.zipObj(['a', 'b', 'c'], [1, 2, 3]); //=> {a: 1, b: 2, c: 3} */ var zipObj = /*#__PURE__*/_curry2(function zipObj(keys, values) { var idx = 0; var len = Math.min(keys.length, values.length); var out = {}; while (idx < len) { out[keys[idx]] = values[idx]; idx += 1; } return out; }); module.exports = zipObj; /***/ }), /* 923 */ /*!*********************************!*\ !*** ../~/ramda/src/zipWith.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ 620); /** * Creates a new list out of the two supplied by applying the function to each * equally-positioned pair in the lists. The returned list is truncated to the * length of the shorter of the two input lists. * * @function * @memberOf R * @since v0.1.0 * @category List * @sig ((a, b) -> c) -> [a] -> [b] -> [c] * @param {Function} fn The function used to combine the two elements into one value. * @param {Array} list1 The first array to consider. * @param {Array} list2 The second array to consider. * @return {Array} The list made by combining same-indexed elements of `list1` and `list2` * using `fn`. * @example * * var f = (x, y) => { * // ... * }; * R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']); * //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')] * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)] */ var zipWith = /*#__PURE__*/_curry3(function zipWith(fn, a, b) { var rv = []; var idx = 0; var len = Math.min(a.length, b.length); while (idx < len) { rv[idx] = fn(a[idx], b[idx]); idx += 1; } return rv; }); module.exports = zipWith; /***/ }), /* 924 */ /*!********************************!*\ !*** ../~/deep-equal/index.js ***! \********************************/ /***/ (function(module, exports, __webpack_require__) { var pSlice = Array.prototype.slice; var objectKeys = __webpack_require__(/*! ./lib/keys.js */ 925); var isArguments = __webpack_require__(/*! ./lib/is_arguments.js */ 926); var deepEqual = module.exports = function (actual, expected, opts) { if (!opts) opts = {}; // 7.1. All identical values are equivalent, as determined by ===. if (actual === expected) { return true; } else if (actual instanceof Date && expected instanceof Date) { return actual.getTime() === expected.getTime(); // 7.3. Other pairs that do not both pass typeof value == 'object', // equivalence is determined by ==. } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') { return opts.strict ? actual === expected : actual == expected; // 7.4. For all other Object pairs, including Array objects, equivalence is // determined by having the same number of owned properties (as verified // with Object.prototype.hasOwnProperty.call), the same set of keys // (although not necessarily the same order), equivalent values for every // corresponding key, and an identical 'prototype' property. Note: this // accounts for both named and indexed properties on Arrays. } else { return objEquiv(actual, expected, opts); } } function isUndefinedOrNull(value) { return value === null || value === undefined; } function isBuffer (x) { if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false; if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { return false; } if (x.length > 0 && typeof x[0] !== 'number') return false; return true; } function objEquiv(a, b, opts) { var i, key; if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) return false; // an identical 'prototype' property. if (a.prototype !== b.prototype) return false; //~~~I've managed to break Object.keys through screwy arguments passing. // Converting to array solves the problem. if (isArguments(a)) { if (!isArguments(b)) { return false; } a = pSlice.call(a); b = pSlice.call(b); return deepEqual(a, b, opts); } if (isBuffer(a)) { if (!isBuffer(b)) { return false; } if (a.length !== b.length) return false; for (i = 0; i < a.length; i++) { if (a[i] !== b[i]) return false; } return true; } try { var ka = objectKeys(a), kb = objectKeys(b); } catch (e) {//happens when one is a string literal and the other isn't return false; } // having the same number of owned properties (keys incorporates // hasOwnProperty) if (ka.length != kb.length) return false; //the same set of keys (although not necessarily the same order), ka.sort(); kb.sort(); //~~~cheap key test for (i = ka.length - 1; i >= 0; i--) { if (ka[i] != kb[i]) return false; } //equivalent values for every corresponding key, and //~~~possibly expensive deep test for (i = ka.length - 1; i >= 0; i--) { key = ka[i]; if (!deepEqual(a[key], b[key], opts)) return false; } return typeof a === typeof b; } /***/ }), /* 925 */ /*!***********************************!*\ !*** ../~/deep-equal/lib/keys.js ***! \***********************************/ /***/ (function(module, exports) { exports = module.exports = typeof Object.keys === 'function' ? Object.keys : shim; exports.shim = shim; function shim (obj) { var keys = []; for (var key in obj) keys.push(key); return keys; } /***/ }), /* 926 */ /*!*******************************************!*\ !*** ../~/deep-equal/lib/is_arguments.js ***! \*******************************************/ /***/ (function(module, exports) { var supportsArgumentsClass = (function(){ return Object.prototype.toString.call(arguments) })() == '[object Arguments]'; exports = module.exports = supportsArgumentsClass ? supported : unsupported; exports.supported = supported; function supported(object) { return Object.prototype.toString.call(object) == '[object Arguments]'; }; exports.unsupported = unsupported; function unsupported(object){ return object && typeof object == 'object' && typeof object.length == 'number' && Object.prototype.hasOwnProperty.call(object, 'callee') && !Object.prototype.propertyIsEnumerable.call(object, 'callee') || false; }; /***/ }), /* 927 */ /*!*********************************!*\ !*** ./styled/Slider.styled.js ***! \*********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Label = exports.targetStyles = exports.Handle = exports.HandleContainer = exports.SliderContainer = undefined; var _templateObject = _taggedTemplateLiteral(['\n ', ';\n\n & .rc-slider-disabled,\n .rc-slider-disabled .rc-slider-handle {\n background-color: unset !important;\n }\n\n & .rc-slider-track {\n ', ';\n }\n'], ['\n ', ';\n\n & .rc-slider-disabled,\n .rc-slider-disabled .rc-slider-handle {\n background-color: unset !important;\n }\n\n & .rc-slider-track {\n ', ';\n }\n']), _templateObject2 = _taggedTemplateLiteral(['\n box-shadow: none !important;\n '], ['\n box-shadow: none !important;\n ']), _templateObject3 = _taggedTemplateLiteral(['\n position: absolute;\n\n /* remove rc-slider-handle styles */\n width: auto;\n height: auto;\n border-radius: unset;\n border: none;\n background: none;\n margin: 0 !important;\n\n ', ';\n'], ['\n position: absolute;\n\n /* remove rc-slider-handle styles */\n width: auto;\n height: auto;\n border-radius: unset;\n border: none;\n background: none;\n margin: 0 !important;\n\n ', ';\n']), _templateObject4 = _taggedTemplateLiteral(['\n ', ';\n'], ['\n ', ';\n']), _templateObject5 = _taggedTemplateLiteral(['\n right: 9px;\n '], ['\n right: 9px;\n ']), _templateObject6 = _taggedTemplateLiteral(['\n bottom: 12px;\n '], ['\n bottom: 12px;\n ']), _templateObject7 = _taggedTemplateLiteral(['\n z-index: 1;\n\n ', ';\n'], ['\n z-index: 1;\n\n ', ';\n']), _templateObject8 = _taggedTemplateLiteral(['\n left: 3px;\n bottom: ', '%;\n '], ['\n left: 3px;\n bottom: ', '%;\n ']), _templateObject9 = _taggedTemplateLiteral(['\n left: ', '%;\n '], ['\n left: ', '%;\n ']), _templateObject10 = _taggedTemplateLiteral(['\n /* remove rc-slider-handle styles */\n width: auto;\n height: auto;\n border-radius: unset;\n border: none;\n background: none;\n margin: 0 !important;\n\n ', ';\n'], ['\n /* remove rc-slider-handle styles */\n width: auto;\n height: auto;\n border-radius: unset;\n border: none;\n background: none;\n margin: 0 !important;\n\n ', ';\n']), _templateObject11 = _taggedTemplateLiteral(['\n /* remove rc-slider-handle styles */\n width: auto;\n height: auto;\n border-radius: unset;\n border: none;\n background: none !important;\n margin: 0 !important;\n\n /* remove rc-slider-handle styles */\n box-shadow: none !important;\n\n ', ';\n'], ['\n /* remove rc-slider-handle styles */\n width: auto;\n height: auto;\n border-radius: unset;\n border: none;\n background: none !important;\n margin: 0 !important;\n\n /* remove rc-slider-handle styles */\n box-shadow: none !important;\n\n ', ';\n']), _templateObject12 = _taggedTemplateLiteral(['\n position: absolute;\n\n ', '\n\n ', '\n\n ', ';\n'], ['\n position: absolute;\n\n ', '\n\n ', '\n\n ', ';\n']), _templateObject13 = _taggedTemplateLiteral(['\n & .dark-handle-custom-fill {\n fill: ', ';\n }\n '], ['\n & .dark-handle-custom-fill {\n fill: ', ';\n }\n ']), _templateObject14 = _taggedTemplateLiteral(['\n & path {\n stroke: ', ';\n }\n '], ['\n & path {\n stroke: ', ';\n }\n ']), _templateObject15 = _taggedTemplateLiteral(['\n top: 0;\n right: 0;\n '], ['\n top: 0;\n right: 0;\n ']), _templateObject16 = _taggedTemplateLiteral(['\n bottom: 0;\n left: 0;\n '], ['\n bottom: 0;\n left: 0;\n ']), _templateObject17 = _taggedTemplateLiteral(['\n transform: translate(', '%, ', '%) rotate(', 'deg);\n '], ['\n transform: translate(', '%, ', '%) rotate(', 'deg);\n ']), _templateObject18 = _taggedTemplateLiteral(['\n ', ' ', ';\n'], ['\n ', ' ', ';\n']), _templateObject19 = _taggedTemplateLiteral(['\n /* remove rc-slider-handle styles */\n margin: 0 !important;\n width: auto;\n height: auto;\n\n user-select: none;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n background: #fff;\n font-size: 12px;\n padding: 2px 4px;\n border-radius: 3px;\n\n & .label {\n font-size: 8px;\n font-weight: 600;\n }\n\n & .value {\n font-size: 20px;\n line-height: 1.1;\n }\n\n ', ' ', ';\n'], ['\n /* remove rc-slider-handle styles */\n margin: 0 !important;\n width: auto;\n height: auto;\n\n user-select: none;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n background: #fff;\n font-size: 12px;\n padding: 2px 4px;\n border-radius: 3px;\n\n & .label {\n font-size: 8px;\n font-weight: 600;\n }\n\n & .value {\n font-size: 20px;\n line-height: 1.1;\n }\n\n ', ' ', ';\n']), _templateObject20 = _taggedTemplateLiteral(['\n /* remove dark-gradient.css styles */\n box-shadow: none !important;\n\n background: #101010;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.3) -50%, rgba(0, 0, 0, 0.7) 100%);\n'], ['\n /* remove dark-gradient.css styles */\n box-shadow: none !important;\n\n background: #101010;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.3) -50%, rgba(0, 0, 0, 0.7) 100%);\n']), _templateObject21 = _taggedTemplateLiteral(['\n border: 1px solid ', ';\n\n &:hover {\n border: 1px solid ', ';\n }\n'], ['\n border: 1px solid ', ';\n\n &:hover {\n border: 1px solid ', ';\n }\n']), _templateObject22 = _taggedTemplateLiteral(['\n color: ', ';\n\n ', ';\n'], ['\n color: ', ';\n\n ', ';\n']), _templateObject23 = _taggedTemplateLiteral(['\n transform: translate(', 'px, -50%);\n '], ['\n transform: translate(', 'px, -50%);\n ']), _templateObject24 = _taggedTemplateLiteral(['\n transform: translate(-50%, ', 'px);\n '], ['\n transform: translate(-50%, ', 'px);\n ']), _templateObject25 = _taggedTemplateLiteral(['\n color: ', ';\n\n ', ' ', ';\n'], ['\n color: ', ';\n\n ', ' ', ';\n']), _templateObject26 = _taggedTemplateLiteral(['\n right: 0;\n '], ['\n right: 0;\n ']), _templateObject27 = _taggedTemplateLiteral(['\n top: 0;\n '], ['\n top: 0;\n ']); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; var _DarkGradient = __webpack_require__(/*! ./shared/DarkGradient */ 415); var UnstyledDarkHandle = _DarkGradient.UnstyledDarkHandle; var _constants = __webpack_require__(/*! ./constants */ 18); var colors = _constants.colors; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var SliderContainer = exports.SliderContainer = styled.div(_templateObject, function (_ref) { var vertical = _ref.vertical, size = _ref.size; if (size) return vertical ? 'height: ' + size + 'px;' : 'width: ' + size + 'px'; }, function (_ref2) { var theme = _ref2.theme; return theme.dark && css(_templateObject2); }); var HandleContainer = exports.HandleContainer = styled.div(_templateObject3, function (_ref3) { var isTarget = _ref3.isTarget; return isTarget ? targetHandleContainer : sliderHandleContainer; }); var targetHandleContainer = css(_templateObject4, function (_ref4) { var vertical = _ref4.vertical; return vertical ? css(_templateObject5) : css(_templateObject6); }); var sliderHandleContainer = css(_templateObject7, function (_ref5) { var vertical = _ref5.vertical, offset = _ref5.offset; return vertical ? css(_templateObject8, offset) : css(_templateObject9, offset); }); var UnstyledLightHandle = function UnstyledLightHandle(_ref6) { var className = _ref6.className; return React.createElement( 'svg', { className: className, width: '6', height: '18', viewBox: '0 0 6 18', version: '1.1', xmlns: 'http://www.w3.org/2000/svg', xmlnsXlink: 'http://www.w3.org/1999/xlink' }, React.createElement('path', { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M 4.61171 15.9753L 5.33436 2.96765C 5.40881 1.62753 4.34219 0.5 3 0.5C 1.65781 0.5 0.591189 1.62753 0.66564 2.96765L 1.38829 15.9753C 1.43581 16.8307 2.14329 17.5 3 17.5C 3.85671 17.5 4.56419 16.8307 4.61171 15.9753Z', strokeMiterlimit: '8', fill: '#fff' }) ); }; var Handle = exports.Handle = function Handle(props) { return props.theme.dark ? React.createElement(DarkHandle, props) : React.createElement(LightHandle, props); }; var LightHandle = styled(UnstyledLightHandle)(_templateObject10, function (_ref7) { var isTarget = _ref7.isTarget; return isTarget ? targetHandle : sliderHandle; }); var DarkHandle = styled(UnstyledDarkHandle)(_templateObject11, function (_ref8) { var isTarget = _ref8.isTarget; return isTarget ? targetHandle : sliderHandle; }); var targetHandle = css(_templateObject12, function (_ref9) { var theme = _ref9.theme, color = _ref9.color; return theme.dark ? css(_templateObject13, color || theme.detail) : css(_templateObject14, color || theme.detail); }, function (_ref10) { var vertical = _ref10.vertical; return vertical ? css(_templateObject15) : css(_templateObject16); }, function (_ref11) { var vertical = _ref11.vertical, theme = _ref11.theme; var deltaX = -50; var deltaY = 55; var rotation = 0; if (vertical) { deltaX = theme.dark ? 40 : 0; deltaY = -50; rotation = 270; } return css(_templateObject17, deltaX, deltaY, rotation); }); var sliderHandle = css(_templateObject18, function (_ref12) { var theme = _ref12.theme, color = _ref12.color; return theme.dark ? css(_templateObject13, color || theme.primary) : css(_templateObject14, color || theme.primary); }, function (_ref13) { var vertical = _ref13.vertical; var deltaX = -50; var deltaY = -40; var rotation = 0; if (vertical) { deltaX = -2; deltaY = -50; rotation = 270; } return css(_templateObject17, deltaX, deltaY, rotation); }); var targetStyles = exports.targetStyles = { width: 'auto', marginLeft: 0, marginBottom: 0, textAlign: 'center' }; var Label = exports.Label = styled.div(_templateObject19, function (_ref14) { var theme = _ref14.theme; return theme.dark ? darkLabel : lightLabel; }, function (_ref15) { var isTarget = _ref15.isTarget; return isTarget ? targetLabel : sliderLabel; }); var darkLabel = css(_templateObject20); var lightLabel = css(_templateObject21, colors.GREY, colors.GREY); var targetLabel = css(_templateObject22, function (_ref16) { var color = _ref16.color, theme = _ref16.theme; return color || theme.detail; }, function (_ref17) { var vertical = _ref17.vertical; var offset = vertical ? -9 : -5; return vertical ? css(_templateObject23, offset) : css(_templateObject24, offset); }); var sliderLabel = css(_templateObject25, function (_ref18) { var color = _ref18.color, theme = _ref18.theme; return color || theme.primary; }, function (_ref19) { var vertical = _ref19.vertical; return vertical ? css(_templateObject26) : css(_templateObject27); }, function (_ref20) { var vertical = _ref20.vertical, label = _ref20.label, value = _ref20.value; var offset = label && (value || value === 0) ? -44 : -22; if (vertical) { offset = -3; } return vertical ? css(_templateObject23, offset) : css(_templateObject24, offset); }); exports.default = { SliderContainer: SliderContainer, Handle: Handle, targetStyles: targetStyles, Label: Label }; /***/ }), /* 928 */ /*!**********************************!*\ !*** ./components/Tank.react.js ***! \**********************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _Tank = __webpack_require__(/*! ../styled/Tank.styled */ 929); var TankContainer = _Tank.TankContainer; var TankFill = _Tank.TankFill; var TickContainer = _Tank.TickContainer; var Tick = _Tank.Tick; var Container = _Tank.Container; var _CurrentValue = __webpack_require__(/*! ../styled/CurrentValue.styled */ 422); var CurrentValue = _interopRequireDefault(_CurrentValue).default; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; var _logarithm = __webpack_require__(/*! ../helpers/logarithm */ 423); var log = _interopRequireDefault(_logarithm).default; var _util = __webpack_require__(/*! ../helpers/util */ 416); var computeProgress = _util.computeProgress; var sanitizeRangeValue = _util.sanitizeRangeValue; var _scale = __webpack_require__(/*! ../helpers/scale */ 424); var generateScale = _interopRequireDefault(_scale).default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * A Tank component that fills to * a value between some range. */ var Tank = function Tank(props) { var min = props.min, max = props.max, showCurrentValue = props.showCurrentValue, units = props.units, className = props.className, id = props.id, style = props.style, color = props.color, logarithmic = props.logarithmic, base = props.base, height = props.height, width = props.width; var dirtyValue = logarithmic ? log.compute(props.value, base) : props.value; var value = sanitizeRangeValue({ min: min, max: max, value: dirtyValue }); var percentageFill = computeProgress({ min: min, max: max, value: value }); var formatter = logarithmic ? log.generateLogFormatter({ base: base }) : null; var scale = generateScale(_extends({}, props, { formatter: formatter })); var renderTicks = function renderTicks() { return Object.entries(scale).map(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), k = _ref2[0], v = _ref2[1]; return React.createElement( Tick, { key: k, xPosition: computeProgress({ min: min, max: max, value: k }) }, React.createElement('div', { className: 'tick' }), React.createElement( 'div', { className: 'label' }, React.createElement( 'div', { style: v && v.style ? v.style : null }, v && v.label || v ) ) ); }); }; var scaleContainer = React.createElement( TickContainer, { xPositioned: scale }, renderTicks() ); var currentValue = React.createElement( CurrentValue, { units: units, valueColor: '#535D63' }, logarithmic ? log.formatValue(value, base) : value ); return React.createElement( 'div', { className: className, id: id, style: style }, React.createElement( LabelContainer, props, React.createElement( Container, null, scaleContainer, React.createElement( TankContainer, { height: height, width: width }, React.createElement(TankFill, { color: color, height: percentageFill + '%' }), showCurrentValue && currentValue ) ) ) ); }; Tank.defaultProps = { min: 0, max: 10, height: 192, width: 112, base: 10, labelPosition: 'top' }; Tank.propTypes = { /** * The ID used to identify this component in Dash callbacks */ id: PropTypes.string, /** * The value of tank. If logarithmic, the displayed value * will be the logarithm of the inputted value. */ value: PropTypes.number, /** * The height of the tank in pixels */ height: PropTypes.number, /** * The width of the tank in pixels */ width: PropTypes.number, /** * The color of tank fill */ color: PropTypes.string, /** * The minimum value of the tank. If logarithmic, * represents minimum exponent. */ min: PropTypes.number, /** * The maximum value of the tank. If logarithmic, * represents the maximum exponent. */ max: PropTypes.number, /** * Base to be used in logarithmic scale. */ base: PropTypes.number, /** * If set to true, a logarithmic scale will be * used. */ logarithmic: PropTypes.bool, /** * If true, the current value of the tank * will be displayed */ showCurrentValue: PropTypes.bool, /** * Label for the current value */ units: PropTypes.string, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: PropTypes.shape({ /** * Value to start the scale from. Defaults * to min. */ start: PropTypes.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: PropTypes.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: PropTypes.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: PropTypes.oneOfType([ /** * Label for the mark */ PropTypes.number, /** * Style object with label */ PropTypes.shape({ style: PropTypes.string, label: PropTypes.string })]) }), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object }; exports.default = Tank; /***/ }), /* 929 */ /*!*******************************!*\ !*** ./styled/Tank.styled.js ***! \*******************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Container = exports.Tick = exports.TickContainer = exports.TankFill = exports.TankContainer = undefined; var _templateObject = _taggedTemplateLiteral(['\n position: relative;\n width: ', ';\n height: ', ';\n z-index: 2;\n border-radius: ', ';\n\n ', ';\n'], ['\n position: relative;\n width: ', ';\n height: ', ';\n z-index: 2;\n border-radius: ', ';\n\n ', ';\n']), _templateObject2 = _taggedTemplateLiteral(['\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n'], ['\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n']), _templateObject3 = _taggedTemplateLiteral(['\n background: ', ';\n'], ['\n background: ', ';\n']), _templateObject4 = _taggedTemplateLiteral(['\n position: absolute;\n bottom: 0;\n width: 100%;\n height: ', ';\n\n border-radius: ', ';\n\n ', ';\n'], ['\n position: absolute;\n bottom: 0;\n width: 100%;\n height: ', ';\n\n border-radius: ', ';\n\n ', ';\n']), _templateObject5 = _taggedTemplateLiteral(['\n background: ', ';\n background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 30%, rgba(255, 255, 255, 0.7) 100%);\n background-blend-mode: overlay;\n box-shadow: 0 0 6px 1px\n ', ';\n'], ['\n background: ', ';\n background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 30%, rgba(255, 255, 255, 0.7) 100%);\n background-blend-mode: overlay;\n box-shadow: 0 0 6px 1px\n ', ';\n']), _templateObject6 = _taggedTemplateLiteral(['\n position: relative;\n ', ' display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin-right: 4px;\n margin-top: -6px;\n margin-bottom: -6px;\n'], ['\n position: relative;\n ', ' display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin-right: 4px;\n margin-top: -6px;\n margin-bottom: -6px;\n']), _templateObject7 = _taggedTemplateLiteral(['\n direction: rtl;\n '], ['\n direction: rtl;\n ']), _templateObject8 = _taggedTemplateLiteral(['\n ', ' display: flex;\n align-items: center;\n justify-content: flex-end;\n height: 18px;\n\n & .label {\n font-size: 12px;\n text-align: right;\n margin-right: 4px;\n white-space: nowrap;\n }\n\n & .tick {\n height: 1px;\n width: ', 'px;\n background: ', ';\n }\n'], ['\n ', ' display: flex;\n align-items: center;\n justify-content: flex-end;\n height: 18px;\n\n & .label {\n font-size: 12px;\n text-align: right;\n margin-right: 4px;\n white-space: nowrap;\n }\n\n & .tick {\n height: 1px;\n width: ', 'px;\n background: ', ';\n }\n']), _templateObject9 = _taggedTemplateLiteral(['\n position: absolute;\n bottom: ', ';\n '], ['\n position: absolute;\n bottom: ', ';\n ']), _templateObject10 = _taggedTemplateLiteral(['\n display: flex;\n flex-direction: row;\n\n ', ';\n'], ['\n display: flex;\n flex-direction: row;\n\n ', ';\n']), _templateObject11 = _taggedTemplateLiteral(['\n margin-top: 8px;\n margin-left: ', ';\n '], ['\n margin-top: 8px;\n margin-left: ', ';\n ']); var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var css = _styledComponents.css; var _color = __webpack_require__(/*! color */ 404); var Color = _interopRequireDefault(_color).default; var _constants = __webpack_require__(/*! ./constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var TankContainer = exports.TankContainer = styled.div(_templateObject, function (_ref) { var width = _ref.width; return width + 'px'; }, function (_ref2) { var height = _ref2.height; return height + 'px'; }, function (_ref3) { var thermometer = _ref3.thermometer; return thermometer ? '40px' : '0'; }, function (_ref4) { var theme = _ref4.theme; return theme.dark ? darkTankContainer : lightTankContainer; }); TankContainer.defaultProps = { theme: light }; var darkTankContainer = css(_templateObject2); var lightTankContainer = css(_templateObject3, function (props) { return props.theme.secondary; }); var TankFill = exports.TankFill = styled.div(_templateObject4, function (_ref5) { var height = _ref5.height; return height || 0; }, function (_ref6) { var thermometer = _ref6.thermometer; return thermometer ? '40px' : '0'; }, function (_ref7) { var theme = _ref7.theme; return theme.dark ? darkTankFill : lightTankFill; }); TankFill.defaultProps = { theme: light }; var darkTankFill = css(_templateObject5, function (_ref8) { var color = _ref8.color, theme = _ref8.theme; return color || theme.primary; }, function (_ref9) { var color = _ref9.color, theme = _ref9.theme; return Color(color || theme.primary).alpha(0.7).string(); }); var lightTankFill = css(_templateObject3, function (_ref10) { var color = _ref10.color, theme = _ref10.theme; return color || theme.primary; }); var TickContainer = exports.TickContainer = styled.div(_templateObject6, function (_ref11) { var xPositioned = _ref11.xPositioned; return xPositioned && css(_templateObject7); }); var Tick = exports.Tick = styled.div(_templateObject8, function (_ref12) { var xPosition = _ref12.xPosition; return xPosition || xPosition === 0 ? css(_templateObject9, 'calc(' + xPosition + '% - ' + xPosition / 100.0 * 18 + 'px)') : ''; }, function (props) { return props.width || 4; }, function (props) { return props.theme.detail; }); Tick.defaultProps = { theme: light }; var Container = exports.Container = styled.div(_templateObject10, function (_ref13) { var thermometer = _ref13.thermometer; return thermometer ? css(_templateObject11, function (_ref14) { var xPositioned = _ref14.xPositioned; return xPositioned ? '-4px' : '-24px'; }) : ''; }); /***/ }), /* 930 */ /*!*****************************************!*\ !*** ./components/Thermometer.react.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var withTheme = _styledComponents.withTheme; var _Thermometer = __webpack_require__(/*! ../styled/Thermometer.styled */ 931); var Bulb = _Thermometer.Bulb; var CurrentValueContainer = _Thermometer.CurrentValueContainer; var ThermometerContainer = _Thermometer.ThermometerContainer; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; var _Tank = __webpack_require__(/*! ../styled/Tank.styled */ 929); var TankContainer = _Tank.TankContainer; var TankFill = _Tank.TankFill; var TickContainer = _Tank.TickContainer; var Tick = _Tank.Tick; var Container = _Tank.Container; var _CurrentValue = __webpack_require__(/*! ../styled/CurrentValue.styled */ 422); var CurrentValue = _interopRequireDefault(_CurrentValue).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; var _logarithm = __webpack_require__(/*! ../helpers/logarithm */ 423); var log = _interopRequireDefault(_logarithm).default; var _util = __webpack_require__(/*! ../helpers/util */ 416); var sanitizeRangeValue = _util.sanitizeRangeValue; var computeProgress = _util.computeProgress; var _scale = __webpack_require__(/*! ../helpers/scale */ 424); var generateScale = _interopRequireDefault(_scale).default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * A thermometer component that * fills to a value between some * range */ var Thermometer = function Thermometer(props) { var min = props.min, max = props.max, id = props.id, className = props.className, style = props.style, logarithmic = props.logarithmic, base = props.base, showCurrentValue = props.showCurrentValue, units = props.units, theme = props.theme, color = props.color, height = props.height, width = props.width; var dirtyValue = logarithmic ? log.compute(props.value, base) : props.value; var value = sanitizeRangeValue({ min: min, max: max, value: dirtyValue }); var formatter = logarithmic ? log.generateLogFormatter({ base: base }) : null; var scale = generateScale(_extends({}, props, { formatter: formatter })); var renderTicks = function renderTicks() { return Object.entries(scale).map(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), k = _ref2[0], v = _ref2[1]; return React.createElement( Tick, { key: k, xPosition: computeProgress({ min: min, max: max, value: k }) }, React.createElement('div', { className: 'tick' }), React.createElement( 'div', { className: 'label', style: v && v.style ? v.style : null }, v && v.label || v ) ); }); }; var scaleContainer = React.createElement( TickContainer, { xPositioned: scale }, renderTicks() ); var currentValue = React.createElement( CurrentValueContainer, null, React.createElement( CurrentValue, { valueColor: color, units: units, css: 'top: 0;' }, logarithmic ? log.formatValue(value, base) : value.toFixed(1) ) ); return React.createElement( 'div', { id: id, className: className, style: style }, React.createElement( LabelContainer, _extends({}, props, { labelCSS: props.labelPosition === 'top' ? null : 'transform: translateY(-30px);' }), React.createElement( ThermometerContainer, null, React.createElement( Container, { thermometer: true, xPositioned: scale }, scaleContainer, React.createElement( TankContainer, { thermometer: true, height: height, width: width }, React.createElement(TankFill, { thermometer: true, color: color, height: computeProgress({ min: min, max: max, value: value }) + '%' }), theme.dark ? null : React.createElement(Bulb, { on: value !== min, color: color }) ) ), showCurrentValue && currentValue ) ) ); }; Thermometer.defaultProps = { min: 0, max: 10, height: 192, width: 20, base: 10, labelPosition: 'top', theme: light }; Thermometer.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The value of thermometer. If logarthmic, the value * displayed will be the logarithm of the inputted value. */ value: PropTypes.number, /** * The height of the thermometer in pixels */ height: PropTypes.number, /** * The width of the thermometer in pixels */ width: PropTypes.number, /** * The color of the thermometer fill/current value text */ color: PropTypes.string, /** * The minimum value of the thermometer. If logarithmic, * represents the minimum exponent. */ min: PropTypes.number, /** * The maximum value of the thermometer. If logarithmic, * represents the maximum exponent. */ max: PropTypes.number, /** * Base to be used in logarithmic scale. */ base: PropTypes.number, /** * If set to true, a logarithmic scale will be * used. */ logarithmic: PropTypes.bool, /** * If true, the current value of the * thermometer will be displayed */ showCurrentValue: PropTypes.bool, /** * Label for the current value */ units: PropTypes.string, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: PropTypes.shape({ /** * Value to start the scale from. Defaults * to min. */ start: PropTypes.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: PropTypes.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: PropTypes.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: PropTypes.oneOfType([ /** * Label for the mark */ PropTypes.number, /** * Style object with label */ PropTypes.shape({ style: PropTypes.string, label: PropTypes.string })]) }), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object }; exports.default = withTheme(Thermometer); /***/ }), /* 931 */ /*!**************************************!*\ !*** ./styled/Thermometer.styled.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.CurrentValueContainer = exports.Bulb = exports.ThermometerContainer = undefined; var _templateObject = _taggedTemplateLiteral(['\n display: flex;\n flex-direction: column;\n align-items: center;\n'], ['\n display: flex;\n flex-direction: column;\n align-items: center;\n']), _templateObject2 = _taggedTemplateLiteral(['\n width: ', 'px;\n height: ', 'px;\n border-radius: 50%;\n background-color: ', ';\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n bottom: -', 'px;\n z-index: -1;\n'], ['\n width: ', 'px;\n height: ', 'px;\n border-radius: 50%;\n background-color: ', ';\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n bottom: -', 'px;\n z-index: -1;\n']), _templateObject3 = _taggedTemplateLiteral(['\n display: flex;\n width: 100%;\n flex-direction: column;\n align-items: center;\n text-align: center;\n\n & > div {\n margin-top: 56px;\n line-height: 28px;\n }\n'], ['\n display: flex;\n width: 100%;\n flex-direction: column;\n align-items: center;\n text-align: center;\n\n & > div {\n margin-top: 56px;\n line-height: 28px;\n }\n']); var _styledComponents = __webpack_require__(/*! styled-components */ 10); var styled = _interopRequireDefault(_styledComponents).default; var _constants = __webpack_require__(/*! ./constants */ 18); var light = _constants.light; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var WIDTH = 20; var ThermometerContainer = exports.ThermometerContainer = styled.div(_templateObject); var Bulb = exports.Bulb = styled.div(_templateObject2, 1.5 * WIDTH, 1.5 * WIDTH, function (props) { return props.on ? props.color || props.theme.primary : props.theme.secondary; }, WIDTH); Bulb.defaultProps = { theme: light }; var CurrentValueContainer = exports.CurrentValueContainer = styled.div(_templateObject3); CurrentValueContainer.defaultProps = { theme: light }; /***/ }), /* 932 */ /*!***********************************************!*\ !*** ./components/DarkThemeProvider.react.js ***! \***********************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var ThemeProvider = _styledComponents.ThemeProvider; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var dark = _constants.dark; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * DarkThemeProvider is a component that is placed at the root of * the component tree to make all components match the dark theme */ function DarkThemeProvider(props) { return React.createElement( ThemeProvider, { theme: props.theme || dark }, React.createElement( 'div', null, props.children ) ); } DarkThemeProvider.propTypes = { /** * The children of this component */ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]), /** * Theme object to override with a custom theme */ theme: PropTypes.shape({ /** * Highlight color */ primary: PropTypes.string, /** * Supporting color */ secondary: PropTypes.string, /** * Color used for UI details, like borders */ detail: PropTypes.string, /** * True for Dark mode, false for Light */ dark: PropTypes.bool }) }; exports.default = DarkThemeProvider; /***/ }), /* 933 */ /*!**************************************!*\ !*** ./components/Joystick.react.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ 2); var React = _interopRequireDefault(_react).default; var Component = _react.Component; var _propTypes = __webpack_require__(/*! prop-types */ 3); var PropTypes = _interopRequireDefault(_propTypes).default; var _styledComponents = __webpack_require__(/*! styled-components */ 10); var withTheme = _styledComponents.withTheme; var _nipplejs = __webpack_require__(/*! nipplejs */ 934); var joystick = _interopRequireDefault(_nipplejs).default; var _constants = __webpack_require__(/*! ../styled/constants */ 18); var light = _constants.light; var _LabelContainer = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ 23); var LabelContainer = _interopRequireDefault(_LabelContainer).default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * A joystick. */ var Joystick = function (_Component) { _inherits(Joystick, _Component); function Joystick(props) { _classCallCheck(this, Joystick); var _this = _possibleConstructorReturn(this, (Joystick.__proto__ || Object.getPrototypeOf(Joystick)).call(this, props)); _this.lastAngle = 0; return _this; } _createClass(Joystick, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; var _props = this.props, size = _props.size, setProps = _props.setProps; this.manager = joystick.create({ mode: 'static', color: 'grey', size: size, position: { left: '50%', top: '50%' }, zone: this.zoneRef }); this.manager.on('move', function (e, data) { var degree = data.angle.degree, force = data.force; _this2.lastAngle = degree; if (setProps) { setProps({ angle: degree, force: force }); } }); this.manager.on('end', function () { if (setProps) { setProps({ angle: _this2.lastAngle, force: 0 }); } }); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.manager.destroy(); } }, { key: 'render', value: function render() { var _this3 = this; var _props2 = this.props, id = _props2.id, className = _props2.className, style = _props2.style, size = _props2.size; return React.createElement( 'div', { id: id, className: className, style: style }, React.createElement( LabelContainer, this.props, React.createElement('div', { ref: function ref(_ref) { return _this3.zoneRef = _ref; }, style: { position: 'relative', width: size + 'px', height: size + 'px' } }) ) ); } }]); return Joystick; }(Component); Joystick.defaultProps = { size: 100, theme: light, labelPosition: 'top' }; Joystick.propTypes = { /** * The ID used to identify the color picker in Dash callbacks */ id: PropTypes.string, /** * If true, color cannot be picked. */ disabled: PropTypes.bool, /** * Joystick angle in degrees, 0 = right, 90 = up, 180 = left, 270 = down */ angle: PropTypes.number, /** * Joystick force: distance between cursor and center in big-circle radii */ force: PropTypes.number, /** * Size (width) of the component in pixels */ size: PropTypes.number, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string })]), /** * Where the indicator label is positioned */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element */ className: PropTypes.string, /** * Dash-assigned callback that gets fired when * the color picker's value changes */ setProps: PropTypes.func, /** * Style to apply to the root component element */ style: PropTypes.object }; exports.default = withTheme(Joystick); /***/ }), /* 934 */ /*!**************************************!*\ !*** ../~/nipplejs/dist/nipplejs.js ***! \**************************************/ /***/ (function(module, exports, __webpack_require__) { (function(f){if(true){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.nipplejs = f()}})(function(){var define,module,exports; 'use strict'; // Constants var isTouch = !!('ontouchstart' in window); var isPointer = window.PointerEvent ? true : false; var isMSPointer = window.MSPointerEvent ? true : false; var events = { touch: { start: 'touchstart', move: 'touchmove', end: 'touchend, touchcancel' }, mouse: { start: 'mousedown', move: 'mousemove', end: 'mouseup' }, pointer: { start: 'pointerdown', move: 'pointermove', end: 'pointerup, pointercancel' }, MSPointer: { start: 'MSPointerDown', move: 'MSPointerMove', end: 'MSPointerUp' } }; var toBind; var secondBind = {}; if (isPointer) { toBind = events.pointer; } else if (isMSPointer) { toBind = events.MSPointer; } else if (isTouch) { toBind = events.touch; secondBind = events.mouse; } else { toBind = events.mouse; } /////////////////////// /// UTILS /// /////////////////////// var u = {}; u.distance = function (p1, p2) { var dx = p2.x - p1.x; var dy = p2.y - p1.y; return Math.sqrt((dx * dx) + (dy * dy)); }; u.angle = function(p1, p2) { var dx = p2.x - p1.x; var dy = p2.y - p1.y; return u.degrees(Math.atan2(dy, dx)); }; u.findCoord = function(p, d, a) { var b = {x: 0, y: 0}; a = u.radians(a); b.x = p.x - d * Math.cos(a); b.y = p.y - d * Math.sin(a); return b; }; u.radians = function(a) { return a * (Math.PI / 180); }; u.degrees = function(a) { return a * (180 / Math.PI); }; u.bindEvt = function (el, arg, handler) { var types = arg.split(/[ ,]+/g); var type; for (var i = 0; i < types.length; i += 1) { type = types[i]; if (el.addEventListener) { el.addEventListener(type, handler, false); } else if (el.attachEvent) { el.attachEvent(type, handler); } } }; u.unbindEvt = function (el, arg, handler) { var types = arg.split(/[ ,]+/g); var type; for (var i = 0; i < types.length; i += 1) { type = types[i]; if (el.removeEventListener) { el.removeEventListener(type, handler); } else if (el.detachEvent) { el.detachEvent(type, handler); } } }; u.trigger = function (el, type, data) { var evt = new CustomEvent(type, data); el.dispatchEvent(evt); }; u.prepareEvent = function (evt) { evt.preventDefault(); return evt.type.match(/^touch/) ? evt.changedTouches : evt; }; u.getScroll = function () { var x = (window.pageXOffset !== undefined) ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body) .scrollLeft; var y = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body) .scrollTop; return { x: x, y: y }; }; u.applyPosition = function (el, pos) { if (pos.top || pos.right || pos.bottom || pos.left) { el.style.top = pos.top; el.style.right = pos.right; el.style.bottom = pos.bottom; el.style.left = pos.left; } else { el.style.left = pos.x + 'px'; el.style.top = pos.y + 'px'; } }; u.getTransitionStyle = function (property, values, time) { var obj = u.configStylePropertyObject(property); for (var i in obj) { if (obj.hasOwnProperty(i)) { if (typeof values === 'string') { obj[i] = values + ' ' + time; } else { var st = ''; for (var j = 0, max = values.length; j < max; j += 1) { st += values[j] + ' ' + time + ', '; } obj[i] = st.slice(0, -2); } } } return obj; }; u.getVendorStyle = function (property, value) { var obj = u.configStylePropertyObject(property); for (var i in obj) { if (obj.hasOwnProperty(i)) { obj[i] = value; } } return obj; }; u.configStylePropertyObject = function (prop) { var obj = {}; obj[prop] = ''; var vendors = ['webkit', 'Moz', 'o']; vendors.forEach(function (vendor) { obj[vendor + prop.charAt(0).toUpperCase() + prop.slice(1)] = ''; }); return obj; }; u.extend = function (objA, objB) { for (var i in objB) { if (objB.hasOwnProperty(i)) { objA[i] = objB[i]; } } return objA; }; // Overwrite only what's already present u.safeExtend = function (objA, objB) { var obj = {}; for (var i in objA) { if (objA.hasOwnProperty(i) && objB.hasOwnProperty(i)) { obj[i] = objB[i]; } else if (objA.hasOwnProperty(i)) { obj[i] = objA[i]; } } return obj; }; // Map for array or unique item. u.map = function (ar, fn) { if (ar.length) { for (var i = 0, max = ar.length; i < max; i += 1) { fn(ar[i]); } } else { fn(ar); } }; /////////////////////// /// SUPER CLASS /// /////////////////////// function Super () {}; // Basic event system. Super.prototype.on = function (arg, cb) { var self = this; var types = arg.split(/[ ,]+/g); var type; self._handlers_ = self._handlers_ || {}; for (var i = 0; i < types.length; i += 1) { type = types[i]; self._handlers_[type] = self._handlers_[type] || []; self._handlers_[type].push(cb); } return self; }; Super.prototype.off = function (type, cb) { var self = this; self._handlers_ = self._handlers_ || {}; if (type === undefined) { self._handlers_ = {}; } else if (cb === undefined) { self._handlers_[type] = null; } else if (self._handlers_[type] && self._handlers_[type].indexOf(cb) >= 0) { self._handlers_[type].splice(self._handlers_[type].indexOf(cb), 1); } return self; }; Super.prototype.trigger = function (arg, data) { var self = this; var types = arg.split(/[ ,]+/g); var type; self._handlers_ = self._handlers_ || {}; for (var i = 0; i < types.length; i += 1) { type = types[i]; if (self._handlers_[type] && self._handlers_[type].length) { self._handlers_[type].forEach(function (handler) { handler.call(self, { type: type, target: self }, data); }); } } }; // Configuration Super.prototype.config = function (options) { var self = this; self.options = self.defaults || {}; if (options) { self.options = u.safeExtend(self.options, options); } }; // Bind internal events. Super.prototype.bindEvt = function (el, type) { var self = this; self._domHandlers_ = self._domHandlers_ || {}; self._domHandlers_[type] = function () { if (typeof self['on' + type] === 'function') { self['on' + type].apply(self, arguments); } else { console.warn('[WARNING] : Missing "on' + type + '" handler.'); } }; u.bindEvt(el, toBind[type], self._domHandlers_[type]); if (secondBind[type]) { // Support for both touch and mouse at the same time. u.bindEvt(el, secondBind[type], self._domHandlers_[type]); } return self; }; // Unbind dom events. Super.prototype.unbindEvt = function (el, type) { var self = this; self._domHandlers_ = self._domHandlers_ || {}; u.unbindEvt(el, toBind[type], self._domHandlers_[type]); if (secondBind[type]) { // Support for both touch and mouse at the same time. u.unbindEvt(el, secondBind[type], self._domHandlers_[type]); } delete self._domHandlers_[type]; return this; }; /////////////////////// /// THE NIPPLE /// /////////////////////// function Nipple (collection, options) { this.identifier = options.identifier; this.position = options.position; this.frontPosition = options.frontPosition; this.collection = collection; // Defaults this.defaults = { size: 100, threshold: 0.1, color: 'white', fadeTime: 250, dataOnly: false, restJoystick: true, restOpacity: 0.5, mode: 'dynamic', zone: document.body, lockX: false, lockY: false }; this.config(options); // Overwrites if (this.options.mode === 'dynamic') { this.options.restOpacity = 0; } this.id = Nipple.id; Nipple.id += 1; this.buildEl() .stylize(); // Nipple's API. this.instance = { el: this.ui.el, on: this.on.bind(this), off: this.off.bind(this), show: this.show.bind(this), hide: this.hide.bind(this), add: this.addToDom.bind(this), remove: this.removeFromDom.bind(this), destroy: this.destroy.bind(this), resetDirection: this.resetDirection.bind(this), computeDirection: this.computeDirection.bind(this), trigger: this.trigger.bind(this), position: this.position, frontPosition: this.frontPosition, ui: this.ui, identifier: this.identifier, id: this.id, options: this.options }; return this.instance; }; Nipple.prototype = new Super(); Nipple.constructor = Nipple; Nipple.id = 0; // Build the dom element of the Nipple instance. Nipple.prototype.buildEl = function (options) { this.ui = {}; if (this.options.dataOnly) { return this; } this.ui.el = document.createElement('div'); this.ui.back = document.createElement('div'); this.ui.front = document.createElement('div'); this.ui.el.className = 'nipple collection_' + this.collection.id; this.ui.back.className = 'back'; this.ui.front.className = 'front'; this.ui.el.setAttribute('id', 'nipple_' + this.collection.id + '_' + this.id); this.ui.el.appendChild(this.ui.back); this.ui.el.appendChild(this.ui.front); return this; }; // Apply CSS to the Nipple instance. Nipple.prototype.stylize = function () { if (this.options.dataOnly) { return this; } var animTime = this.options.fadeTime + 'ms'; var borderStyle = u.getVendorStyle('borderRadius', '50%'); var transitStyle = u.getTransitionStyle('transition', 'opacity', animTime); var styles = {}; styles.el = { position: 'absolute', opacity: this.options.restOpacity, display: 'block', 'zIndex': 999 }; styles.back = { position: 'absolute', display: 'block', width: this.options.size + 'px', height: this.options.size + 'px', marginLeft: -this.options.size / 2 + 'px', marginTop: -this.options.size / 2 + 'px', background: this.options.color, 'opacity': '.5' }; styles.front = { width: this.options.size / 2 + 'px', height: this.options.size / 2 + 'px', position: 'absolute', display: 'block', marginLeft: -this.options.size / 4 + 'px', marginTop: -this.options.size / 4 + 'px', background: this.options.color, 'opacity': '.5' }; u.extend(styles.el, transitStyle); u.extend(styles.back, borderStyle); u.extend(styles.front, borderStyle); this.applyStyles(styles); return this; }; Nipple.prototype.applyStyles = function (styles) { // Apply styles for (var i in this.ui) { if (this.ui.hasOwnProperty(i)) { for (var j in styles[i]) { this.ui[i].style[j] = styles[i][j]; } } } return this; }; // Inject the Nipple instance into DOM. Nipple.prototype.addToDom = function () { // We're not adding it if we're dataOnly or already in dom. if (this.options.dataOnly || document.body.contains(this.ui.el)) { return this; } this.options.zone.appendChild(this.ui.el); return this; }; // Remove the Nipple instance from DOM. Nipple.prototype.removeFromDom = function () { if (this.options.dataOnly || !document.body.contains(this.ui.el)) { return this; } this.options.zone.removeChild(this.ui.el); return this; }; // Entirely destroy this nipple Nipple.prototype.destroy = function () { clearTimeout(this.removeTimeout); clearTimeout(this.showTimeout); clearTimeout(this.restTimeout); this.trigger('destroyed', this.instance); this.removeFromDom(); this.off(); }; // Fade in the Nipple instance. Nipple.prototype.show = function (cb) { var self = this; if (self.options.dataOnly) { return self; } clearTimeout(self.removeTimeout); clearTimeout(self.showTimeout); clearTimeout(self.restTimeout); self.addToDom(); self.restCallback(); setTimeout(function () { self.ui.el.style.opacity = 1; }, 0); self.showTimeout = setTimeout(function () { self.trigger('shown', self.instance); if (typeof cb === 'function') { cb.call(this); } }, self.options.fadeTime); return self; }; // Fade out the Nipple instance. Nipple.prototype.hide = function (cb) { var self = this; if (self.options.dataOnly) { return self; } self.ui.el.style.opacity = self.options.restOpacity; clearTimeout(self.removeTimeout); clearTimeout(self.showTimeout); clearTimeout(self.restTimeout); self.removeTimeout = setTimeout( function () { var display = self.options.mode === 'dynamic' ? 'none' : 'block'; self.ui.el.style.display = display; if (typeof cb === 'function') { cb.call(self); } self.trigger('hidden', self.instance); }, self.options.fadeTime ); if (self.options.restJoystick) { self.restPosition(); } return self; }; Nipple.prototype.restPosition = function (cb) { var self = this; self.frontPosition = { x: 0, y: 0 }; var animTime = self.options.fadeTime + 'ms'; var transitStyle = {}; transitStyle.front = u.getTransitionStyle('transition', ['top', 'left'], animTime); var styles = {front: {}}; styles.front = { left: self.frontPosition.x + 'px', top: self.frontPosition.y + 'px' }; self.applyStyles(transitStyle); self.applyStyles(styles); self.restTimeout = setTimeout( function () { if (typeof cb === 'function') { cb.call(self); } self.restCallback(); }, self.options.fadeTime ); }; Nipple.prototype.restCallback = function () { var self = this; var transitStyle = {}; transitStyle.front = u.getTransitionStyle('transition', 'none', ''); self.applyStyles(transitStyle); self.trigger('rested', self.instance); }; Nipple.prototype.resetDirection = function () { // Fully rebuild the object to let the iteration possible. this.direction = { x: false, y: false, angle: false }; }; Nipple.prototype.computeDirection = function (obj) { var rAngle = obj.angle.radian; var angle45 = Math.PI / 4; var angle90 = Math.PI / 2; var direction, directionX, directionY; // Angular direction // \ UP / // \ / // LEFT RIGHT // / \ // /DOWN \ // if ( rAngle > angle45 && rAngle < (angle45 * 3) && !obj.lockX ) { direction = 'up'; } else if ( rAngle > -angle45 && rAngle <= angle45 && !obj.lockY ) { direction = 'left'; } else if ( rAngle > (-angle45 * 3) && rAngle <= -angle45 && !obj.lockX ) { direction = 'down'; } else if (!obj.lockY) { direction = 'right'; } // Plain direction // UP | // _______ | RIGHT // LEFT | // DOWN | if (!obj.lockY) { if (rAngle > -angle90 && rAngle < angle90) { directionX = 'left'; } else { directionX = 'right'; } } if (!obj.lockX) { if (rAngle > 0) { directionY = 'up'; } else { directionY = 'down'; } } if (obj.force > this.options.threshold) { var oldDirection = {}; for (var i in this.direction) { if (this.direction.hasOwnProperty(i)) { oldDirection[i] = this.direction[i]; } } var same = {}; this.direction = { x: directionX, y: directionY, angle: direction }; obj.direction = this.direction; for (var i in oldDirection) { if (oldDirection[i] === this.direction[i]) { same[i] = true; } } // If all 3 directions are the same, we don't trigger anything. if (same.x && same.y && same.angle) { return obj; } if (!same.x || !same.y) { this.trigger('plain', obj); } if (!same.x) { this.trigger('plain:' + directionX, obj); } if (!same.y) { this.trigger('plain:' + directionY, obj); } if (!same.angle) { this.trigger('dir dir:' + direction, obj); } } return obj; }; /* global Nipple, Super */ /////////////////////////// /// THE COLLECTION /// /////////////////////////// function Collection (manager, options) { var self = this; self.nipples = []; self.idles = []; self.actives = []; self.ids = []; self.pressureIntervals = {}; self.manager = manager; self.id = Collection.id; Collection.id += 1; // Defaults self.defaults = { zone: document.body, multitouch: false, maxNumberOfNipples: 10, mode: 'dynamic', position: {top: 0, left: 0}, catchDistance: 200, size: 100, threshold: 0.1, color: 'white', fadeTime: 250, dataOnly: false, restJoystick: true, restOpacity: 0.5, lockX: false, lockY: false }; self.config(options); // Overwrites if (self.options.mode === 'static' || self.options.mode === 'semi') { self.options.multitouch = false; } if (!self.options.multitouch) { self.options.maxNumberOfNipples = 1; } self.updateBox(); self.prepareNipples(); self.bindings(); self.begin(); return self.nipples; } Collection.prototype = new Super(); Collection.constructor = Collection; Collection.id = 0; Collection.prototype.prepareNipples = function () { var self = this; var nips = self.nipples; // Public API Preparation. nips.on = self.on.bind(self); nips.off = self.off.bind(self); nips.options = self.options; nips.destroy = self.destroy.bind(self); nips.ids = self.ids; nips.id = self.id; nips.processOnMove = self.processOnMove.bind(self); nips.processOnEnd = self.processOnEnd.bind(self); nips.get = function (id) { if (id === undefined) { return nips[0]; } for (var i = 0, max = nips.length; i < max; i += 1) { if (nips[i].identifier === id) { return nips[i]; } } return false; }; }; Collection.prototype.bindings = function () { var self = this; // Touch start event. self.bindEvt(self.options.zone, 'start'); // Avoid native touch actions (scroll, zoom etc...) on the zone. self.options.zone.style.touchAction = 'none'; self.options.zone.style.msTouchAction = 'none'; }; Collection.prototype.begin = function () { var self = this; var opts = self.options; // We place our static nipple // if needed. if (opts.mode === 'static') { var nipple = self.createNipple( opts.position, self.manager.getIdentifier() ); // Add it to the dom. nipple.add(); // Store it in idles. self.idles.push(nipple); } }; // Nipple Factory Collection.prototype.createNipple = function (position, identifier) { var self = this; var scroll = u.getScroll(); var toPutOn = {}; var opts = self.options; if (position.x && position.y) { toPutOn = { x: position.x - (scroll.x + self.box.left), y: position.y - (scroll.y + self.box.top) }; } else if ( position.top || position.right || position.bottom || position.left ) { // We need to compute the position X / Y of the joystick. var dumb = document.createElement('DIV'); dumb.style.display = 'hidden'; dumb.style.top = position.top; dumb.style.right = position.right; dumb.style.bottom = position.bottom; dumb.style.left = position.left; dumb.style.position = 'absolute'; opts.zone.appendChild(dumb); var dumbBox = dumb.getBoundingClientRect(); opts.zone.removeChild(dumb); toPutOn = position; position = { x: dumbBox.left + scroll.x, y: dumbBox.top + scroll.y }; } var nipple = new Nipple(self, { color: opts.color, size: opts.size, threshold: opts.threshold, fadeTime: opts.fadeTime, dataOnly: opts.dataOnly, restJoystick: opts.restJoystick, restOpacity: opts.restOpacity, mode: opts.mode, identifier: identifier, position: position, zone: opts.zone, frontPosition: { x: 0, y: 0 } }); if (!opts.dataOnly) { u.applyPosition(nipple.ui.el, toPutOn); u.applyPosition(nipple.ui.front, nipple.frontPosition); } self.nipples.push(nipple); self.trigger('added ' + nipple.identifier + ':added', nipple); self.manager.trigger('added ' + nipple.identifier + ':added', nipple); self.bindNipple(nipple); return nipple; }; Collection.prototype.updateBox = function () { var self = this; self.box = self.options.zone.getBoundingClientRect(); }; Collection.prototype.bindNipple = function (nipple) { var self = this; var type; // Bubble up identified events. var handler = function (evt, data) { // Identify the event type with the nipple's id. type = evt.type + ' ' + data.id + ':' + evt.type; self.trigger(type, data); }; // When it gets destroyed. nipple.on('destroyed', self.onDestroyed.bind(self)); // Other events that will get bubbled up. nipple.on('shown hidden rested dir plain', handler); nipple.on('dir:up dir:right dir:down dir:left', handler); nipple.on('plain:up plain:right plain:down plain:left', handler); }; Collection.prototype.pressureFn = function (touch, nipple, identifier) { var self = this; var previousPressure = 0; clearInterval(self.pressureIntervals[identifier]); // Create an interval that will read the pressure every 100ms self.pressureIntervals[identifier] = setInterval(function () { var pressure = touch.force || touch.pressure || touch.webkitForce || 0; if (pressure !== previousPressure) { nipple.trigger('pressure', pressure); self.trigger('pressure ' + nipple.identifier + ':pressure', pressure); previousPressure = pressure; } }.bind(self), 100); }; Collection.prototype.onstart = function (evt) { var self = this; var opts = self.options; evt = u.prepareEvent(evt); // Update the box position self.updateBox(); var process = function (touch) { // If we can create new nipples // meaning we don't have more active nipples than we should. if (self.actives.length < opts.maxNumberOfNipples) { self.processOnStart(touch); } }; u.map(evt, process); // We ask upstream to bind the document // on 'move' and 'end' self.manager.bindDocument(); return false; }; Collection.prototype.processOnStart = function (evt) { var self = this; var opts = self.options; var indexInIdles; var identifier = self.manager.getIdentifier(evt); var pressure = evt.force || evt.pressure || evt.webkitForce || 0; var position = { x: evt.pageX, y: evt.pageY }; var nipple = self.getOrCreate(identifier, position); // Update its touch identifier if (nipple.identifier !== identifier) { self.manager.removeIdentifier(nipple.identifier); } nipple.identifier = identifier; var process = function (nip) { // Trigger the start. nip.trigger('start', nip); self.trigger('start ' + nip.id + ':start', nip); nip.show(); if (pressure > 0) { self.pressureFn(evt, nip, nip.identifier); } // Trigger the first move event. self.processOnMove(evt); }; // Transfer it from idles to actives. if ((indexInIdles = self.idles.indexOf(nipple)) >= 0) { self.idles.splice(indexInIdles, 1); } // Store the nipple in the actives array self.actives.push(nipple); self.ids.push(nipple.identifier); if (opts.mode !== 'semi') { process(nipple); } else { // In semi we check the distance of the touch // to decide if we have to reset the nipple var distance = u.distance(position, nipple.position); if (distance <= opts.catchDistance) { process(nipple); } else { nipple.destroy(); self.processOnStart(evt); return; } } return nipple; }; Collection.prototype.getOrCreate = function (identifier, position) { var self = this; var opts = self.options; var nipple; // If we're in static or semi, we might already have an active. if (/(semi|static)/.test(opts.mode)) { // Get the active one. // TODO: Multi-touche for semi and static will start here. // Return the nearest one. nipple = self.idles[0]; if (nipple) { self.idles.splice(0, 1); return nipple; } if (opts.mode === 'semi') { // If we're in semi mode, we need to create one. return self.createNipple(position, identifier); } console.warn('Coudln\'t find the needed nipple.'); return false; } // In dynamic, we create a new one. nipple = self.createNipple(position, identifier); return nipple; }; Collection.prototype.processOnMove = function (evt) { var self = this; var opts = self.options; var identifier = self.manager.getIdentifier(evt); var nipple = self.nipples.get(identifier); if (!nipple) { // This is here just for safety. // It shouldn't happen. console.error('Found zombie joystick with ID ' + identifier); self.manager.removeIdentifier(identifier); return; } nipple.identifier = identifier; var size = nipple.options.size / 2; var pos = { x: evt.pageX, y: evt.pageY }; var dist = u.distance(pos, nipple.position); var angle = u.angle(pos, nipple.position); var rAngle = u.radians(angle); var force = dist / size; // If distance is bigger than nipple's size // we clamp the position. if (dist > size) { dist = size; pos = u.findCoord(nipple.position, dist, angle); } var xPosition = pos.x - nipple.position.x var yPosition = pos.y - nipple.position.y if (opts.lockX){ yPosition = 0 } if (opts.lockY) { xPosition = 0 } nipple.frontPosition = { x: xPosition, y: yPosition }; if (!opts.dataOnly) { u.applyPosition(nipple.ui.front, nipple.frontPosition); } // Prepare event's datas. var toSend = { identifier: nipple.identifier, position: pos, force: force, pressure: evt.force || evt.pressure || evt.webkitForce || 0, distance: dist, angle: { radian: rAngle, degree: angle }, instance: nipple, lockX: opts.lockX, lockY: opts.lockY }; // Compute the direction's datas. toSend = nipple.computeDirection(toSend); // Offset angles to follow units circle. toSend.angle = { radian: u.radians(180 - angle), degree: 180 - angle }; // Send everything to everyone. nipple.trigger('move', toSend); self.trigger('move ' + nipple.id + ':move', toSend); }; Collection.prototype.processOnEnd = function (evt) { var self = this; var opts = self.options; var identifier = self.manager.getIdentifier(evt); var nipple = self.nipples.get(identifier); var removedIdentifier = self.manager.removeIdentifier(nipple.identifier); if (!nipple) { return; } if (!opts.dataOnly) { nipple.hide(function () { if (opts.mode === 'dynamic') { nipple.trigger('removed', nipple); self.trigger('removed ' + nipple.id + ':removed', nipple); self.manager .trigger('removed ' + nipple.id + ':removed', nipple); nipple.destroy(); } }); } // Clear the pressure interval reader clearInterval(self.pressureIntervals[nipple.identifier]); // Reset the direciton of the nipple, to be able to trigger a new direction // on start. nipple.resetDirection(); nipple.trigger('end', nipple); self.trigger('end ' + nipple.id + ':end', nipple); // Remove identifier from our bank. if (self.ids.indexOf(nipple.identifier) >= 0) { self.ids.splice(self.ids.indexOf(nipple.identifier), 1); } // Clean our actives array. if (self.actives.indexOf(nipple) >= 0) { self.actives.splice(self.actives.indexOf(nipple), 1); } if (/(semi|static)/.test(opts.mode)) { // Transfer nipple from actives to idles // if we're in semi or static mode. self.idles.push(nipple); } else if (self.nipples.indexOf(nipple) >= 0) { // Only if we're not in semi or static mode // we can remove the instance. self.nipples.splice(self.nipples.indexOf(nipple), 1); } // We unbind move and end. self.manager.unbindDocument(); // We add back the identifier of the idle nipple; if (/(semi|static)/.test(opts.mode)) { self.manager.ids[removedIdentifier.id] = removedIdentifier.identifier; } }; // Remove destroyed nipple from the lists Collection.prototype.onDestroyed = function(evt, nipple) { var self = this; if (self.nipples.indexOf(nipple) >= 0) { self.nipples.splice(self.nipples.indexOf(nipple), 1); } if (self.actives.indexOf(nipple) >= 0) { self.actives.splice(self.actives.indexOf(nipple), 1); } if (self.idles.indexOf(nipple) >= 0) { self.idles.splice(self.idles.indexOf(nipple), 1); } if (self.ids.indexOf(nipple.identifier) >= 0) { self.ids.splice(self.ids.indexOf(nipple.identifier), 1); } // Remove the identifier from our bank self.manager.removeIdentifier(nipple.identifier); // We unbind move and end. self.manager.unbindDocument(); }; // Cleanly destroy the manager Collection.prototype.destroy = function () { var self = this; self.unbindEvt(self.options.zone, 'start'); // Destroy nipples. self.nipples.forEach(function(nipple) { nipple.destroy(); }); // Clean 3DTouch intervals. for (var i in self.pressureIntervals) { if (self.pressureIntervals.hasOwnProperty(i)) { clearInterval(self.pressureIntervals[i]); } } // Notify the manager passing the instance self.trigger('destroyed', self.nipples); // We unbind move and end. self.manager.unbindDocument(); // Unbind everything. self.off(); }; /* global u, Super, Collection */ /////////////////////// /// MANAGER /// /////////////////////// function Manager (options) { var self = this; self.ids = {}; self.index = 0; self.collections = []; self.config(options); self.prepareCollections(); // Listen for resize, to reposition every joysticks var resizeTimer; u.bindEvt(window, 'resize', function (evt) { clearTimeout(resizeTimer); resizeTimer = setTimeout(function () { var pos; var scroll = u.getScroll(); self.collections.forEach(function (collection) { collection.forEach(function (nipple) { pos = nipple.el.getBoundingClientRect(); nipple.position = { x: scroll.x + pos.left, y: scroll.y + pos.top }; }); }); }, 100); }); return self.collections; }; Manager.prototype = new Super(); Manager.constructor = Manager; Manager.prototype.prepareCollections = function () { var self = this; // Public API Preparation. self.collections.create = self.create.bind(self); // Listen to anything self.collections.on = self.on.bind(self); // Unbind general events self.collections.off = self.off.bind(self); // Destroy everything self.collections.destroy = self.destroy.bind(self); // Get any nipple self.collections.get = function (id) { var nipple; self.collections.every(function (collection) { if (nipple = collection.get(id)) { return false; } return true; }); return nipple; }; }; Manager.prototype.create = function (options) { return this.createCollection(options); }; // Collection Factory Manager.prototype.createCollection = function (options) { var self = this; var collection = new Collection(self, options); self.bindCollection(collection); self.collections.push(collection); return collection; }; Manager.prototype.bindCollection = function (collection) { var self = this; var type; // Bubble up identified events. var handler = function (evt, data) { // Identify the event type with the nipple's identifier. type = evt.type + ' ' + data.id + ':' + evt.type; self.trigger(type, data); }; // When it gets destroyed we clean. collection.on('destroyed', self.onDestroyed.bind(self)); // Other events that will get bubbled up. collection.on('shown hidden rested dir plain', handler); collection.on('dir:up dir:right dir:down dir:left', handler); collection.on('plain:up plain:right plain:down plain:left', handler); }; Manager.prototype.bindDocument = function () { var self = this; // Bind only if not already binded if (!self.binded) { self.bindEvt(document, 'move') .bindEvt(document, 'end'); self.binded = true; } }; Manager.prototype.unbindDocument = function (force) { var self = this; // If there are no touch left // unbind the document. if (!Object.keys(self.ids).length || force === true) { self.unbindEvt(document, 'move') .unbindEvt(document, 'end'); self.binded = false; } }; Manager.prototype.getIdentifier = function (evt) { var id; // If no event, simple increment if (!evt) { id = this.index; } else { // Extract identifier from event object. // Unavailable in mouse events so replaced by latest increment. id = evt.identifier === undefined ? evt.pointerId : evt.identifier; if (id === undefined) { id = this.latest || 0; } } if (this.ids[id] === undefined) { this.ids[id] = this.index; this.index += 1; } // Keep the latest id used in case we're using an unidentified mouseEvent this.latest = id; return this.ids[id]; }; Manager.prototype.removeIdentifier = function (identifier) { var removed = {}; for (var id in this.ids) { if (this.ids[id] === identifier) { removed.id = id; removed.identifier = this.ids[id]; delete this.ids[id]; break; } } return removed; }; Manager.prototype.onmove = function (evt) { var self = this; self.onAny('move', evt); return false; }; Manager.prototype.onend = function (evt) { var self = this; self.onAny('end', evt); return false; }; Manager.prototype.oncancel = function (evt) { var self = this; self.onAny('end', evt); return false; }; Manager.prototype.onAny = function (which, evt) { var self = this; var id; var processFn = 'processOn' + which.charAt(0).toUpperCase() + which.slice(1); evt = u.prepareEvent(evt); var processColl = function (e, id, coll) { if (coll.ids.indexOf(id) >= 0) { coll[processFn](e); // Mark the event to avoid cleaning it later. e._found_ = true; } }; var processEvt = function (e) { id = self.getIdentifier(e); u.map(self.collections, processColl.bind(null, e, id)); // If the event isn't handled by any collection, // we need to clean its identifier. if (!e._found_) { self.removeIdentifier(id); } }; u.map(evt, processEvt); return false; }; // Cleanly destroy the manager Manager.prototype.destroy = function () { var self = this; self.unbindDocument(true); self.ids = {}; self.index = 0; self.collections.forEach(function(collection) { collection.destroy(); }); self.off(); }; // When a collection gets destroyed // we clean behind. Manager.prototype.onDestroyed = function (evt, coll) { var self = this; if (self.collections.indexOf(coll) < 0) { return false; } self.collections.splice(self.collections.indexOf(coll), 1); }; var factory = new Manager(); return { create: function (options) { return factory.create(options); }, factory: factory }; }); /***/ }) /******/ ]); //# sourceMappingURL=http://127.0.0.1:8080/build/bundle.js.map ================================================ FILE: inst/deps/dash_daq.dev.js ================================================ window["dash_daq"] = /******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ function webpackJsonpCallback(data) { /******/ var chunkIds = data[0]; /******/ var moreModules = data[1]; /******/ /******/ /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0, resolves = []; /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { /******/ resolves.push(installedChunks[chunkId][0]); /******/ } /******/ installedChunks[chunkId] = 0; /******/ } /******/ for(moduleId in moreModules) { /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { /******/ modules[moduleId] = moreModules[moduleId]; /******/ } /******/ } /******/ if(parentJsonpFunction) parentJsonpFunction(data); /******/ /******/ while(resolves.length) { /******/ resolves.shift()(); /******/ } /******/ /******/ }; /******/ /******/ /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // object to store loaded and loading chunks /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // Promise = chunk loading, 0 = chunk loaded /******/ var installedChunks = { /******/ "main": 0 /******/ }; /******/ /******/ /******/ /******/ // script path function /******/ function jsonpScriptSrc(chunkId) { /******/ return __webpack_require__.p + "" + ({"async-colorpicker":"async-colorpicker"}[chunkId]||chunkId) + ".js" /******/ } /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ // This file contains only the entry chunk. /******/ // The chunk loading function for additional chunks /******/ __webpack_require__.e = function requireEnsure(chunkId) { /******/ var promises = []; /******/ /******/ /******/ // JSONP chunk loading for javascript /******/ /******/ var installedChunkData = installedChunks[chunkId]; /******/ if(installedChunkData !== 0) { // 0 means "already installed". /******/ /******/ // a Promise means "currently loading". /******/ if(installedChunkData) { /******/ promises.push(installedChunkData[2]); /******/ } else { /******/ // setup Promise in chunk cache /******/ var promise = new Promise(function(resolve, reject) { /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; /******/ }); /******/ promises.push(installedChunkData[2] = promise); /******/ /******/ // start chunk loading /******/ var script = document.createElement('script'); /******/ var onScriptComplete; /******/ /******/ script.charset = 'utf-8'; /******/ script.timeout = 120; /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ script.src = jsonpScriptSrc(chunkId); /******/ /******/ // create error before stack unwound to get useful stacktrace later /******/ var error = new Error(); /******/ onScriptComplete = function (event) { /******/ // avoid mem leaks in IE. /******/ script.onerror = script.onload = null; /******/ clearTimeout(timeout); /******/ var chunk = installedChunks[chunkId]; /******/ if(chunk !== 0) { /******/ if(chunk) { /******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); /******/ var realSrc = event && event.target && event.target.src; /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; /******/ error.name = 'ChunkLoadError'; /******/ error.type = errorType; /******/ error.request = realSrc; /******/ chunk[1](error); /******/ } /******/ installedChunks[chunkId] = undefined; /******/ } /******/ }; /******/ var timeout = setTimeout(function(){ /******/ onScriptComplete({ type: 'timeout', target: script }); /******/ }, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ document.head.appendChild(script); /******/ } /******/ } /******/ return Promise.all(promises); /******/ }; /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // on error function for async loading /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; /******/ var getCurrentScript = function() { /******/ var script = document.currentScript; /******/ if (!script) { /******/ /* Shim for IE11 and below */ /******/ /* Do not take into account async scripts and inline scripts */ /******/ var scripts = Array.from(document.getElementsByTagName('script')).filter(function(s) { return !s.async && !s.text && !s.textContent; }); /******/ script = scripts.slice(-1)[0]; /******/ } /******/ /******/ return script; /******/ }; /******/ /******/ var isLocalScript = function(script) { /******/ return /\/_dash-component-suites\//.test(script.src); /******/ }; /******/ /******/ Object.defineProperty(__webpack_require__, 'p', { /******/ get: (function () { /******/ var script = getCurrentScript(); /******/ /******/ var url = script.src.split('/').slice(0, -1).join('/') + '/'; /******/ /******/ return function() { /******/ return url; /******/ }; /******/ })() /******/ }); /******/ /******/ if (typeof jsonpScriptSrc !== 'undefined') { /******/ var __jsonpScriptSrc__ = jsonpScriptSrc; /******/ jsonpScriptSrc = function(chunkId) { /******/ var script = getCurrentScript(); /******/ var isLocal = isLocalScript(script); /******/ /******/ var src = __jsonpScriptSrc__(chunkId); /******/ /******/ if(!isLocal) { /******/ return src; /******/ } /******/ /******/ var srcFragments = src.split('/'); /******/ var fileFragments = srcFragments.slice(-1)[0].split('.'); /******/ /******/ fileFragments.splice(1, 0, "v0_5_1m1634418925"); /******/ srcFragments.splice(-1, 1, fileFragments.join('.')) /******/ /******/ return srcFragments.join('/'); /******/ }; /******/ } /******/ /******/ /******/ var jsonpArray = window["webpackJsonpdash_daq"] = window["webpackJsonpdash_daq"] || []; /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); /******/ jsonpArray.push = webpackJsonpCallback; /******/ jsonpArray = jsonpArray.slice(); /******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); /******/ var parentJsonpFunction = oldJsonpFunction; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./src/index.js"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js": /*!*******************************************************************************!*\ !*** ./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js ***! \*******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/memoize.browser.esm.js"); var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23 var index = Object(_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) { return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 /* o */ && prop.charCodeAt(1) === 110 /* n */ && prop.charCodeAt(2) < 91; } /* Z+1 */ ); /* harmony default export */ __webpack_exports__["default"] = (index); /***/ }), /***/ "./node_modules/@emotion/memoize/dist/memoize.browser.esm.js": /*!*******************************************************************!*\ !*** ./node_modules/@emotion/memoize/dist/memoize.browser.esm.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function memoize(fn) { var cache = {}; return function (arg) { if (cache[arg] === undefined) cache[arg] = fn(arg); return cache[arg]; }; } /* harmony default export */ __webpack_exports__["default"] = (memoize); /***/ }), /***/ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js": /*!*********************************************************************!*\ !*** ./node_modules/@emotion/unitless/dist/unitless.browser.esm.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var unitlessKeys = { animationIterationCount: 1, borderImageOutset: 1, borderImageSlice: 1, borderImageWidth: 1, boxFlex: 1, boxFlexGroup: 1, boxOrdinalGroup: 1, columnCount: 1, columns: 1, flex: 1, flexGrow: 1, flexPositive: 1, flexShrink: 1, flexNegative: 1, flexOrder: 1, gridRow: 1, gridRowEnd: 1, gridRowSpan: 1, gridRowStart: 1, gridColumn: 1, gridColumnEnd: 1, gridColumnSpan: 1, gridColumnStart: 1, msGridRow: 1, msGridRowSpan: 1, msGridColumn: 1, msGridColumnSpan: 1, fontWeight: 1, lineHeight: 1, opacity: 1, order: 1, orphans: 1, tabSize: 1, widows: 1, zIndex: 1, zoom: 1, WebkitLineClamp: 1, // SVG-related properties fillOpacity: 1, floodOpacity: 1, stopOpacity: 1, strokeDasharray: 1, strokeDashoffset: 1, strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 }; /* harmony default export */ __webpack_exports__["default"] = (unitlessKeys); /***/ }), /***/ "./node_modules/add-dom-event-listener/lib/EventBaseObject.js": /*!********************************************************************!*\ !*** ./node_modules/add-dom-event-listener/lib/EventBaseObject.js ***! \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * @ignore * base event object for custom and dom event. * @author yiminghe@gmail.com */ Object.defineProperty(exports, "__esModule", { value: true }); function returnFalse() { return false; } function returnTrue() { return true; } function EventBaseObject() { this.timeStamp = Date.now(); this.target = undefined; this.currentTarget = undefined; } EventBaseObject.prototype = { isEventObject: 1, constructor: EventBaseObject, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, preventDefault: function preventDefault() { this.isDefaultPrevented = returnTrue; }, stopPropagation: function stopPropagation() { this.isPropagationStopped = returnTrue; }, stopImmediatePropagation: function stopImmediatePropagation() { this.isImmediatePropagationStopped = returnTrue; // fixed 1.2 // call stopPropagation implicitly this.stopPropagation(); }, halt: function halt(immediate) { if (immediate) { this.stopImmediatePropagation(); } else { this.stopPropagation(); } this.preventDefault(); } }; exports["default"] = EventBaseObject; module.exports = exports["default"]; /***/ }), /***/ "./node_modules/add-dom-event-listener/lib/EventObject.js": /*!****************************************************************!*\ !*** ./node_modules/add-dom-event-listener/lib/EventObject.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * @ignore * event object for dom * @author yiminghe@gmail.com */ Object.defineProperty(exports, '__esModule', { value: true }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _EventBaseObject = __webpack_require__(/*! ./EventBaseObject */ "./node_modules/add-dom-event-listener/lib/EventBaseObject.js"); var _EventBaseObject2 = _interopRequireDefault(_EventBaseObject); var _objectAssign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js"); var _objectAssign2 = _interopRequireDefault(_objectAssign); var TRUE = true; var FALSE = false; var commonProps = ['altKey', 'bubbles', 'cancelable', 'ctrlKey', 'currentTarget', 'eventPhase', 'metaKey', 'shiftKey', 'target', 'timeStamp', 'view', 'type']; function isNullOrUndefined(w) { return w === null || w === undefined; } var eventNormalizers = [{ reg: /^key/, props: ['char', 'charCode', 'key', 'keyCode', 'which'], fix: function fix(event, nativeEvent) { if (isNullOrUndefined(event.which)) { event.which = !isNullOrUndefined(nativeEvent.charCode) ? nativeEvent.charCode : nativeEvent.keyCode; } // add metaKey to non-Mac browsers (use ctrl for PC 's and Meta for Macs) if (event.metaKey === undefined) { event.metaKey = event.ctrlKey; } } }, { reg: /^touch/, props: ['touches', 'changedTouches', 'targetTouches'] }, { reg: /^hashchange$/, props: ['newURL', 'oldURL'] }, { reg: /^gesturechange$/i, props: ['rotation', 'scale'] }, { reg: /^(mousewheel|DOMMouseScroll)$/, props: [], fix: function fix(event, nativeEvent) { var deltaX = undefined; var deltaY = undefined; var delta = undefined; var wheelDelta = nativeEvent.wheelDelta; var axis = nativeEvent.axis; var wheelDeltaY = nativeEvent.wheelDeltaY; var wheelDeltaX = nativeEvent.wheelDeltaX; var detail = nativeEvent.detail; // ie/webkit if (wheelDelta) { delta = wheelDelta / 120; } // gecko if (detail) { // press control e.detail == 1 else e.detail == 3 delta = 0 - (detail % 3 === 0 ? detail / 3 : detail); } // Gecko if (axis !== undefined) { if (axis === event.HORIZONTAL_AXIS) { deltaY = 0; deltaX = 0 - delta; } else if (axis === event.VERTICAL_AXIS) { deltaX = 0; deltaY = delta; } } // Webkit if (wheelDeltaY !== undefined) { deltaY = wheelDeltaY / 120; } if (wheelDeltaX !== undefined) { deltaX = -1 * wheelDeltaX / 120; } // 默认 deltaY (ie) if (!deltaX && !deltaY) { deltaY = delta; } if (deltaX !== undefined) { /** * deltaX of mousewheel event * @property deltaX * @member Event.DomEvent.Object */ event.deltaX = deltaX; } if (deltaY !== undefined) { /** * deltaY of mousewheel event * @property deltaY * @member Event.DomEvent.Object */ event.deltaY = deltaY; } if (delta !== undefined) { /** * delta of mousewheel event * @property delta * @member Event.DomEvent.Object */ event.delta = delta; } } }, { reg: /^mouse|contextmenu|click|mspointer|(^DOMMouseScroll$)/i, props: ['buttons', 'clientX', 'clientY', 'button', 'offsetX', 'relatedTarget', 'which', 'fromElement', 'toElement', 'offsetY', 'pageX', 'pageY', 'screenX', 'screenY'], fix: function fix(event, nativeEvent) { var eventDoc = undefined; var doc = undefined; var body = undefined; var target = event.target; var button = nativeEvent.button; // Calculate pageX/Y if missing and clientX/Y available if (target && isNullOrUndefined(event.pageX) && !isNullOrUndefined(nativeEvent.clientX)) { eventDoc = target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = nativeEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); event.pageY = nativeEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); } // which for click: 1 === left; 2 === middle; 3 === right // do not use button if (!event.which && button !== undefined) { if (button & 1) { event.which = 1; } else if (button & 2) { event.which = 3; } else if (button & 4) { event.which = 2; } else { event.which = 0; } } // add relatedTarget, if necessary if (!event.relatedTarget && event.fromElement) { event.relatedTarget = event.fromElement === target ? event.toElement : event.fromElement; } return event; } }]; function retTrue() { return TRUE; } function retFalse() { return FALSE; } function DomEventObject(nativeEvent) { var type = nativeEvent.type; var isNative = typeof nativeEvent.stopPropagation === 'function' || typeof nativeEvent.cancelBubble === 'boolean'; _EventBaseObject2['default'].call(this); this.nativeEvent = nativeEvent; // in case dom event has been mark as default prevented by lower dom node var isDefaultPrevented = retFalse; if ('defaultPrevented' in nativeEvent) { isDefaultPrevented = nativeEvent.defaultPrevented ? retTrue : retFalse; } else if ('getPreventDefault' in nativeEvent) { // https://bugzilla.mozilla.org/show_bug.cgi?id=691151 isDefaultPrevented = nativeEvent.getPreventDefault() ? retTrue : retFalse; } else if ('returnValue' in nativeEvent) { isDefaultPrevented = nativeEvent.returnValue === FALSE ? retTrue : retFalse; } this.isDefaultPrevented = isDefaultPrevented; var fixFns = []; var fixFn = undefined; var l = undefined; var prop = undefined; var props = commonProps.concat(); eventNormalizers.forEach(function (normalizer) { if (type.match(normalizer.reg)) { props = props.concat(normalizer.props); if (normalizer.fix) { fixFns.push(normalizer.fix); } } }); l = props.length; // clone properties of the original event object while (l) { prop = props[--l]; this[prop] = nativeEvent[prop]; } // fix target property, if necessary if (!this.target && isNative) { this.target = nativeEvent.srcElement || document; // srcElement might not be defined either } // check if target is a text node (safari) if (this.target && this.target.nodeType === 3) { this.target = this.target.parentNode; } l = fixFns.length; while (l) { fixFn = fixFns[--l]; fixFn(this, nativeEvent); } this.timeStamp = nativeEvent.timeStamp || Date.now(); } var EventBaseObjectProto = _EventBaseObject2['default'].prototype; (0, _objectAssign2['default'])(DomEventObject.prototype, EventBaseObjectProto, { constructor: DomEventObject, preventDefault: function preventDefault() { var e = this.nativeEvent; // if preventDefault exists run it on the original event if (e.preventDefault) { e.preventDefault(); } else { // otherwise set the returnValue property of the original event to FALSE (IE) e.returnValue = FALSE; } EventBaseObjectProto.preventDefault.call(this); }, stopPropagation: function stopPropagation() { var e = this.nativeEvent; // if stopPropagation exists run it on the original event if (e.stopPropagation) { e.stopPropagation(); } else { // otherwise set the cancelBubble property of the original event to TRUE (IE) e.cancelBubble = TRUE; } EventBaseObjectProto.stopPropagation.call(this); } }); exports['default'] = DomEventObject; module.exports = exports['default']; /***/ }), /***/ "./node_modules/add-dom-event-listener/lib/index.js": /*!**********************************************************!*\ !*** ./node_modules/add-dom-event-listener/lib/index.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, '__esModule', { value: true }); exports['default'] = addEventListener; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _EventObject = __webpack_require__(/*! ./EventObject */ "./node_modules/add-dom-event-listener/lib/EventObject.js"); var _EventObject2 = _interopRequireDefault(_EventObject); function addEventListener(target, eventType, callback, option) { function wrapCallback(e) { var ne = new _EventObject2['default'](e); callback.call(target, ne); } if (target.addEventListener) { var _ret = (function () { var useCapture = false; if (typeof option === 'object') { useCapture = option.capture || false; } else if (typeof option === 'boolean') { useCapture = option; } target.addEventListener(eventType, wrapCallback, option || false); return { v: { remove: function remove() { target.removeEventListener(eventType, wrapCallback, useCapture); } } }; })(); if (typeof _ret === 'object') return _ret.v; } else if (target.attachEvent) { target.attachEvent('on' + eventType, wrapCallback); return { remove: function remove() { target.detachEvent('on' + eventType, wrapCallback); } }; } } module.exports = exports['default']; /***/ }), /***/ "./node_modules/babel-runtime/core-js/array/from.js": /*!**********************************************************!*\ !*** ./node_modules/babel-runtime/core-js/array/from.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/array/from */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/array/from.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/object/assign.js": /*!*************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/object/assign.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/assign */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/assign.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/object/create.js": /*!*************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/object/create.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/create */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/create.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/object/define-property.js": /*!**********************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/object/define-property.js ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/define-property */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/define-property.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js": /*!**********************************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/get-own-property-descriptor */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-own-property-descriptor.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/object/get-prototype-of.js": /*!***********************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/object/get-prototype-of.js ***! \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/get-prototype-of */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-prototype-of.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/object/set-prototype-of.js": /*!***********************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/object/set-prototype-of.js ***! \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/set-prototype-of */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/set-prototype-of.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/symbol.js": /*!******************************************************!*\ !*** ./node_modules/babel-runtime/core-js/symbol.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/symbol */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/index.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/core-js/symbol/iterator.js": /*!***************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/symbol/iterator.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(/*! core-js/library/fn/symbol/iterator */ "./node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/iterator.js"), __esModule: true }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/classCallCheck.js": /*!**************************************************************!*\ !*** ./node_modules/babel-runtime/helpers/classCallCheck.js ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/createClass.js": /*!***********************************************************!*\ !*** ./node_modules/babel-runtime/helpers/createClass.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(/*! ../core-js/object/define-property */ "./node_modules/babel-runtime/core-js/object/define-property.js"); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; (0, _defineProperty2.default)(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /***/ }), /***/ "./node_modules/babel-runtime/helpers/defineProperty.js": /*!**************************************************************!*\ !*** ./node_modules/babel-runtime/helpers/defineProperty.js ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(/*! ../core-js/object/define-property */ "./node_modules/babel-runtime/core-js/object/define-property.js"); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (obj, key, value) { if (key in obj) { (0, _defineProperty2.default)(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/extends.js": /*!*******************************************************!*\ !*** ./node_modules/babel-runtime/helpers/extends.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _assign = __webpack_require__(/*! ../core-js/object/assign */ "./node_modules/babel-runtime/core-js/object/assign.js"); var _assign2 = _interopRequireDefault(_assign); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = _assign2.default || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/get.js": /*!***************************************************!*\ !*** ./node_modules/babel-runtime/helpers/get.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _getPrototypeOf = __webpack_require__(/*! ../core-js/object/get-prototype-of */ "./node_modules/babel-runtime/core-js/object/get-prototype-of.js"); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); var _getOwnPropertyDescriptor = __webpack_require__(/*! ../core-js/object/get-own-property-descriptor */ "./node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js"); var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); if (desc === undefined) { var parent = (0, _getPrototypeOf2.default)(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/inherits.js": /*!********************************************************!*\ !*** ./node_modules/babel-runtime/helpers/inherits.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _setPrototypeOf = __webpack_require__(/*! ../core-js/object/set-prototype-of */ "./node_modules/babel-runtime/core-js/object/set-prototype-of.js"); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); var _create = __webpack_require__(/*! ../core-js/object/create */ "./node_modules/babel-runtime/core-js/object/create.js"); var _create2 = _interopRequireDefault(_create); var _typeof2 = __webpack_require__(/*! ../helpers/typeof */ "./node_modules/babel-runtime/helpers/typeof.js"); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); } subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/objectWithoutProperties.js": /*!***********************************************************************!*\ !*** ./node_modules/babel-runtime/helpers/objectWithoutProperties.js ***! \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js": /*!*************************************************************************!*\ !*** ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js ***! \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _typeof2 = __webpack_require__(/*! ../helpers/typeof */ "./node_modules/babel-runtime/helpers/typeof.js"); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/toConsumableArray.js": /*!*****************************************************************!*\ !*** ./node_modules/babel-runtime/helpers/toConsumableArray.js ***! \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _from = __webpack_require__(/*! ../core-js/array/from */ "./node_modules/babel-runtime/core-js/array/from.js"); var _from2 = _interopRequireDefault(_from); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return (0, _from2.default)(arr); } }; /***/ }), /***/ "./node_modules/babel-runtime/helpers/typeof.js": /*!******************************************************!*\ !*** ./node_modules/babel-runtime/helpers/typeof.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _iterator = __webpack_require__(/*! ../core-js/symbol/iterator */ "./node_modules/babel-runtime/core-js/symbol/iterator.js"); var _iterator2 = _interopRequireDefault(_iterator); var _symbol = __webpack_require__(/*! ../core-js/symbol */ "./node_modules/babel-runtime/core-js/symbol.js"); var _symbol2 = _interopRequireDefault(_symbol); var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { return typeof obj === "undefined" ? "undefined" : _typeof(obj); } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/array/from.js": /*!**********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/array/from.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.string.iterator */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.string.iterator.js"); __webpack_require__(/*! ../../modules/es6.array.from */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.array.from.js"); module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Array.from; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/assign.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/object/assign.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.assign */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.assign.js"); module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Object.assign; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/create.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/object/create.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.create.js"); var $Object = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Object; module.exports = function create(P, D) { return $Object.create(P, D); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/define-property.js": /*!**********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/object/define-property.js ***! \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.define-property */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.define-property.js"); var $Object = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Object; module.exports = function defineProperty(it, key, desc) { return $Object.defineProperty(it, key, desc); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-own-property-descriptor.js": /*!**********************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-own-property-descriptor.js ***! \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.get-own-property-descriptor */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js"); var $Object = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Object; module.exports = function getOwnPropertyDescriptor(it, key) { return $Object.getOwnPropertyDescriptor(it, key); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-prototype-of.js": /*!***********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-prototype-of.js ***! \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.get-prototype-of */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-prototype-of.js"); module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Object.getPrototypeOf; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/object/set-prototype-of.js": /*!***********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/object/set-prototype-of.js ***! \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.object.set-prototype-of */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.set-prototype-of.js"); module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Object.setPrototypeOf; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/index.js": /*!************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/index.js ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.symbol */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.symbol.js"); __webpack_require__(/*! ../../modules/es6.object.to-string */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.to-string.js"); __webpack_require__(/*! ../../modules/es7.symbol.async-iterator */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.async-iterator.js"); __webpack_require__(/*! ../../modules/es7.symbol.observable */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.observable.js"); module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").Symbol; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/iterator.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/iterator.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ../../modules/es6.string.iterator */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.string.iterator.js"); __webpack_require__(/*! ../../modules/web.dom.iterable */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/web.dom.iterable.js"); module.exports = __webpack_require__(/*! ../../modules/_wks-ext */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-ext.js").f('iterator'); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_a-function.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_a-function.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_add-to-unscopables.js": /*!************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_add-to-unscopables.js ***! \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function () { /* empty */ }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js"); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_array-includes.js": /*!********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_array-includes.js ***! \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-length.js"); var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-absolute-index.js"); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); var length = toLength(O.length); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_classof.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_classof.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(/*! ./_cof */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_cof.js"); var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_cof.js": /*!*********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_cof.js ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js": /*!**********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { var core = module.exports = { version: '2.6.9' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_create-property.js": /*!*********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_create-property.js ***! \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js"); var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js"); module.exports = function (object, index, value) { if (index in object) $defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ctx.js": /*!*********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_ctx.js ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_a-function.js"); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_defined.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_defined.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(/*! ./_fails */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js")(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_dom-create.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_dom-create.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js"); var document = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js").document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-bug-keys.js": /*!*******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-bug-keys.js ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-keys.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-keys.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys.js"); var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gops.js"); var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-pie.js"); module.exports = function (it) { var result = getKeys(it); var getSymbols = gOPS.f; if (getSymbols) { var symbols = getSymbols(it); var isEnum = pIE.f; var i = 0; var key; while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); } return result; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js": /*!************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js"); var core = __webpack_require__(/*! ./_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js"); var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ctx.js"); var hide = __webpack_require__(/*! ./_hide */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js"); var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var IS_WRAP = type & $export.W; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE]; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; var key, own, out; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; if (own && has(exports, key)) continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function (C) { var F = function (a, b, c) { if (this instanceof C) { switch (arguments.length) { case 0: return new C(); case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if (IS_PROTO) { (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js": /*!***********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js ***! \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js": /*!************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js": /*!*********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js": /*!**********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js"); var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js"); module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js") ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_html.js": /*!**********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_html.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var document = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js").document; module.exports = document && document.documentElement; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ie8-dom-define.js": /*!********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_ie8-dom-define.js ***! \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js")(function () { return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iobject.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iobject.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(/*! ./_cof */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_cof.js"); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array-iter.js": /*!*******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array-iter.js ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js"); var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array.js": /*!**************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array.js ***! \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(/*! ./_cof */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_cof.js"); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-call.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-call.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js"); module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (e) { var ret = iterator['return']; if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-create.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-create.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var create = __webpack_require__(/*! ./_object-create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-create.js"); var descriptor = __webpack_require__(/*! ./_property-desc */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js"); var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-to-string-tag.js"); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(/*! ./_hide */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js")(IteratorPrototype, __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-define.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-define.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_library.js"); var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_redefine.js"); var hide = __webpack_require__(/*! ./_hide */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js"); var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js"); var $iterCreate = __webpack_require__(/*! ./_iter-create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-create.js"); var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-to-string-tag.js"); var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gpo.js"); var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix native if ($anyNative) { IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-detect.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-detect.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('iterator'); var SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function () { SAFE_CLOSING = true; }; // eslint-disable-next-line no-throw-literal Array.from(riter, function () { throw 2; }); } catch (e) { /* empty */ } module.exports = function (exec, skipClosing) { if (!skipClosing && !SAFE_CLOSING) return false; var safe = false; try { var arr = [7]; var iter = arr[ITERATOR](); iter.next = function () { return { done: safe = true }; }; arr[ITERATOR] = function () { return iter; }; exec(arr); } catch (e) { /* empty */ } return safe; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-step.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-step.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (done, value) { return { value: value, done: !!done }; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_library.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_library.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = true; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_meta.js": /*!**********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_meta.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(/*! ./_uid */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_uid.js")('meta'); var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js"); var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var setDesc = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js").f; var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; var FREEZE = !__webpack_require__(/*! ./_fails */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js")(function () { return isExtensible(Object.preventExtensions({})); }); var setMeta = function (it) { setDesc(it, META, { value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function (it, create) { if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-assign.js": /*!*******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-assign.js ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 19.1.2.1 Object.assign(target, source, ...) var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js"); var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys.js"); var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gops.js"); var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-pie.js"); var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js"); var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iobject.js"); var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(/*! ./_fails */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js")(function () { var A = {}; var B = {}; // eslint-disable-next-line no-undef var S = Symbol(); var K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function (k) { B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars var T = toObject(target); var aLen = arguments.length; var index = 1; var getSymbols = gOPS.f; var isEnum = pIE.f; while (aLen > index) { var S = IObject(arguments[index++]); var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); var length = keys.length; var j = 0; var key; while (length > j) { key = keys[j++]; if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; } } return T; } : $assign; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-create.js": /*!*******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-create.js ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js"); var dPs = __webpack_require__(/*! ./_object-dps */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dps.js"); var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-bug-keys.js"); var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(/*! ./_dom-create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_dom-create.js")('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; __webpack_require__(/*! ./_html */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_html.js").appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js"); var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ie8-dom-define.js"); var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-primitive.js"); var dP = Object.defineProperty; exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dps.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dps.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js"); var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js"); var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys.js"); module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = getKeys(Properties); var length = keys.length; var i = 0; var P; while (length > i) dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopd.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopd.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-pie.js"); var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js"); var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-primitive.js"); var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ie8-dom-define.js"); var gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js") ? gOPD : function getOwnPropertyDescriptor(O, P) { O = toIObject(O); P = toPrimitive(P, true); if (IE8_DOM_DEFINE) try { return gOPD(O, P); } catch (e) { /* empty */ } if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn-ext.js": /*!*********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn-ext.js ***! \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn.js").f; var toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function (it) { try { return gOPN(it); } catch (e) { return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it) { return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys-internal.js"); var hiddenKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-bug-keys.js").concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gops.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gops.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gpo.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gpo.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js"); var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); var ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function (O) { O = toObject(O); if (has(O, IE_PROTO)) return O[IE_PROTO]; if (typeof O.constructor == 'function' && O instanceof O.constructor) { return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys-internal.js": /*!**************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys-internal.js ***! \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_array-includes.js")(false); var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys.js": /*!*****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys.js ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys-internal.js"); var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-bug-keys.js"); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-pie.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-pie.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-sap.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-sap.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); var core = __webpack_require__(/*! ./_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js"); var fails = __webpack_require__(/*! ./_fails */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js"); module.exports = function (KEY, exec) { var fn = (core.Object || {})[KEY] || Object[KEY]; var exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js": /*!*******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_redefine.js": /*!**************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_redefine.js ***! \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(/*! ./_hide */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js"); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-proto.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-proto.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js"); var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js"); var check = function (O, proto) { anObject(O); if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function (test, buggy, set) { try { set = __webpack_require__(/*! ./_ctx */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ctx.js")(Function.call, __webpack_require__(/*! ./_object-gopd */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopd.js").f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch (e) { buggy = true; } return function setPrototypeOf(O, proto) { check(O, proto); if (buggy) O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-to-string-tag.js": /*!***********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-to-string-tag.js ***! \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js").f; var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared-key.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared-key.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(/*! ./_shared */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared.js")('keys'); var uid = __webpack_require__(/*! ./_uid */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_uid.js"); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared.js": /*!************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared.js ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(/*! ./_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js"); var global = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js"); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: __webpack_require__(/*! ./_library */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_library.js") ? 'pure' : 'global', copyright: '© 2019 Denis Pushkarev (zloirock.ru)' }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_string-at.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_string-at.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-integer.js"); var defined = __webpack_require__(/*! ./_defined */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_defined.js"); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { return function (that, pos) { var s = String(defined(that)); var i = toInteger(pos); var l = s.length; var a, b; if (i < 0 || i >= l) return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-absolute-index.js": /*!***********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-absolute-index.js ***! \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-integer.js"); var max = Math.max; var min = Math.min; module.exports = function (index, length) { index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-integer.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-integer.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iobject.js"); var defined = __webpack_require__(/*! ./_defined */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_defined.js"); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-length.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-length.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-integer.js"); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(/*! ./_defined */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_defined.js"); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-primitive.js": /*!******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-primitive.js ***! \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js"); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_uid.js": /*!*********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_uid.js ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-define.js": /*!****************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-define.js ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js"); var core = __webpack_require__(/*! ./_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js"); var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_library.js"); var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-ext.js"); var defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js").f; module.exports = function (name) { var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-ext.js": /*!*************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-ext.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { exports.f = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js"); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js": /*!*********************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(/*! ./_shared */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared.js")('wks'); var uid = __webpack_require__(/*! ./_uid */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_uid.js"); var Symbol = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js").Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/core.get-iterator-method.js": /*!*****************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/core.get-iterator-method.js ***! \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(/*! ./_classof */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_classof.js"); var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('iterator'); var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js"); module.exports = __webpack_require__(/*! ./_core */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js").getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.array.from.js": /*!*******************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.array.from.js ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_ctx.js"); var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js"); var call = __webpack_require__(/*! ./_iter-call */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-call.js"); var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array-iter.js"); var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-length.js"); var createProperty = __webpack_require__(/*! ./_create-property */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_create-property.js"); var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/core.get-iterator-method.js"); $export($export.S + $export.F * !__webpack_require__(/*! ./_iter-detect */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-detect.js")(function (iter) { Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var O = toObject(arrayLike); var C = typeof this == 'function' ? this : Array; var aLen = arguments.length; var mapfn = aLen > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var index = 0; var iterFn = getIterFn(O); var length, result, step, iterator; if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for (result = new C(length); length > index; index++) { createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.array.iterator.js": /*!***********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.array.iterator.js ***! \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_add-to-unscopables.js"); var step = __webpack_require__(/*! ./_iter-step */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-step.js"); var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js"); var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = __webpack_require__(/*! ./_iter-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-define.js")(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function () { var O = this._t; var kind = this._k; var index = this._i++; if (!O || index >= O.length) { this._t = undefined; return step(1); } if (kind == 'keys') return step(0, index); if (kind == 'values') return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.assign.js": /*!**********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.assign.js ***! \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); $export($export.S + $export.F, 'Object', { assign: __webpack_require__(/*! ./_object-assign */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-assign.js") }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.create.js": /*!**********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.create.js ***! \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', { create: __webpack_require__(/*! ./_object-create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-create.js") }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.define-property.js": /*!*******************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.define-property.js ***! \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js"), 'Object', { defineProperty: __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js").f }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js": /*!*******************************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js ***! \*******************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); var $getOwnPropertyDescriptor = __webpack_require__(/*! ./_object-gopd */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopd.js").f; __webpack_require__(/*! ./_object-sap */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-sap.js")('getOwnPropertyDescriptor', function () { return function getOwnPropertyDescriptor(it, key) { return $getOwnPropertyDescriptor(toIObject(it), key); }; }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-prototype-of.js": /*!********************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-prototype-of.js ***! \********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 Object.getPrototypeOf(O) var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js"); var $getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gpo.js"); __webpack_require__(/*! ./_object-sap */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-sap.js")('getPrototypeOf', function () { return function getPrototypeOf(it) { return $getPrototypeOf(toObject(it)); }; }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.set-prototype-of.js": /*!********************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.set-prototype-of.js ***! \********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(/*! ./_set-proto */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-proto.js").set }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.to-string.js": /*!*************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.to-string.js ***! \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.string.iterator.js": /*!************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.string.iterator.js ***! \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $at = __webpack_require__(/*! ./_string-at */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_string-at.js")(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(/*! ./_iter-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-define.js")(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function () { var O = this._t; var index = this._i; var point; if (index >= O.length) return { value: undefined, done: true }; point = $at(O, index); this._i += point.length; return { value: point, done: false }; }); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.symbol.js": /*!***************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.symbol.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // ECMAScript 6 symbols shim var global = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js"); var has = __webpack_require__(/*! ./_has */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js"); var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js"); var $export = __webpack_require__(/*! ./_export */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js"); var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_redefine.js"); var META = __webpack_require__(/*! ./_meta */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_meta.js").KEY; var $fails = __webpack_require__(/*! ./_fails */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js"); var shared = __webpack_require__(/*! ./_shared */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_shared.js"); var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_set-to-string-tag.js"); var uid = __webpack_require__(/*! ./_uid */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_uid.js"); var wks = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js"); var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-ext.js"); var wksDefine = __webpack_require__(/*! ./_wks-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-define.js"); var enumKeys = __webpack_require__(/*! ./_enum-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-keys.js"); var isArray = __webpack_require__(/*! ./_is-array */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array.js"); var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js"); var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js"); var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js"); var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js"); var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_to-primitive.js"); var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js"); var _create = __webpack_require__(/*! ./_object-create */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-create.js"); var gOPNExt = __webpack_require__(/*! ./_object-gopn-ext */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn-ext.js"); var $GOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopd.js"); var $GOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gops.js"); var $DP = __webpack_require__(/*! ./_object-dp */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js"); var $keys = __webpack_require__(/*! ./_object-keys */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys.js"); var gOPD = $GOPD.f; var dP = $DP.f; var gOPN = gOPNExt.f; var $Symbol = global.Symbol; var $JSON = global.JSON; var _stringify = $JSON && $JSON.stringify; var PROTOTYPE = 'prototype'; var HIDDEN = wks('_hidden'); var TO_PRIMITIVE = wks('toPrimitive'); var isEnum = {}.propertyIsEnumerable; var SymbolRegistry = shared('symbol-registry'); var AllSymbols = shared('symbols'); var OPSymbols = shared('op-symbols'); var ObjectProto = Object[PROTOTYPE]; var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; var QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function () { return _create(dP({}, 'a', { get: function () { return dP(this, 'a', { value: 7 }).a; } })).a != 7; }) ? function (it, key, D) { var protoDesc = gOPD(ObjectProto, key); if (protoDesc) delete ObjectProto[key]; dP(it, key, D); if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); } : dP; var wrap = function (tag) { var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { return typeof it == 'symbol'; } : function (it) { return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D) { if (it === ObjectProto) $defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if (has(AllSymbols, key)) { if (!D.enumerable) { if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; D = _create(D, { enumerable: createDesc(0, false) }); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P) { anObject(it); var keys = enumKeys(P = toIObject(P)); var i = 0; var l = keys.length; var key; while (l > i) $defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P) { return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key) { var E = isEnum.call(this, key = toPrimitive(key, true)); if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { it = toIObject(it); key = toPrimitive(key, true); if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; var D = gOPD(it, key); if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it) { var names = gOPN(toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { var IS_OP = it === ObjectProto; var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if (!USE_NATIVE) { $Symbol = function Symbol() { if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function (value) { if (this === ObjectProto) $set.call(OPSymbols, value); if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString() { return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; __webpack_require__(/*! ./_object-gopn */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn.js").f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__(/*! ./_object-pie */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_object-pie.js").f = $propertyIsEnumerable; $GOPS.f = $getOwnPropertySymbols; if (DESCRIPTORS && !__webpack_require__(/*! ./_library */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_library.js")) { redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function (name) { return wrap(wks(name)); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); for (var es6Symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function (key) { return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; }, useSetter: function () { setter = true; }, useSimple: function () { setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives // https://bugs.chromium.org/p/v8/issues/detail?id=3443 var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { getOwnPropertySymbols: function getOwnPropertySymbols(it) { return $GOPS.f(toObject(it)); } }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it) { var args = [it]; var i = 1; var replacer, $replacer; while (arguments.length > i) args.push(arguments[i++]); $replacer = replacer = args[1]; if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined if (!isArray(replacer)) replacer = function (key, value) { if (typeof $replacer == 'function') value = $replacer.call(this, key, value); if (!isSymbol(value)) return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(/*! ./_hide */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.async-iterator.js": /*!******************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.async-iterator.js ***! \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ./_wks-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-define.js")('asyncIterator'); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.observable.js": /*!**************************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.observable.js ***! \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ./_wks-define */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-define.js")('observable'); /***/ }), /***/ "./node_modules/babel-runtime/node_modules/core-js/library/modules/web.dom.iterable.js": /*!*********************************************************************************************!*\ !*** ./node_modules/babel-runtime/node_modules/core-js/library/modules/web.dom.iterable.js ***! \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ./es6.array.iterator */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/es6.array.iterator.js"); var global = __webpack_require__(/*! ./_global */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js"); var hide = __webpack_require__(/*! ./_hide */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js"); var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js"); var TO_STRING_TAG = __webpack_require__(/*! ./_wks */ "./node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js")('toStringTag'); var DOMIterables = ('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(','); for (var i = 0; i < DOMIterables.length; i++) { var NAME = DOMIterables[i]; var Collection = global[NAME]; var proto = Collection && Collection.prototype; if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } /***/ }), /***/ "./node_modules/classnames/index.js": /*!******************************************!*\ !*** ./node_modules/classnames/index.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames () { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg) && arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } else if (argType === 'object') { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } return classes.join(' '); } if ( true && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return classNames; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }()); /***/ }), /***/ "./node_modules/color-convert/conversions.js": /*!***************************************************!*\ !*** ./node_modules/color-convert/conversions.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ var cssKeywords = __webpack_require__(/*! color-name */ "./node_modules/color-name/index.js"); // NOTE: conversions should only return primitive values (i.e. arrays, or // values that give correct `typeof` results). // do not use box values types (i.e. Number(), String(), etc.) var reverseKeywords = {}; for (var key in cssKeywords) { if (cssKeywords.hasOwnProperty(key)) { reverseKeywords[cssKeywords[key]] = key; } } var convert = module.exports = { rgb: {channels: 3, labels: 'rgb'}, hsl: {channels: 3, labels: 'hsl'}, hsv: {channels: 3, labels: 'hsv'}, hwb: {channels: 3, labels: 'hwb'}, cmyk: {channels: 4, labels: 'cmyk'}, xyz: {channels: 3, labels: 'xyz'}, lab: {channels: 3, labels: 'lab'}, lch: {channels: 3, labels: 'lch'}, hex: {channels: 1, labels: ['hex']}, keyword: {channels: 1, labels: ['keyword']}, ansi16: {channels: 1, labels: ['ansi16']}, ansi256: {channels: 1, labels: ['ansi256']}, hcg: {channels: 3, labels: ['h', 'c', 'g']}, apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, gray: {channels: 1, labels: ['gray']} }; // hide .channels and .labels properties for (var model in convert) { if (convert.hasOwnProperty(model)) { if (!('channels' in convert[model])) { throw new Error('missing channels property: ' + model); } if (!('labels' in convert[model])) { throw new Error('missing channel labels property: ' + model); } if (convert[model].labels.length !== convert[model].channels) { throw new Error('channel and label counts mismatch: ' + model); } var channels = convert[model].channels; var labels = convert[model].labels; delete convert[model].channels; delete convert[model].labels; Object.defineProperty(convert[model], 'channels', {value: channels}); Object.defineProperty(convert[model], 'labels', {value: labels}); } } convert.rgb.hsl = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var min = Math.min(r, g, b); var max = Math.max(r, g, b); var delta = max - min; var h; var s; var l; if (max === min) { h = 0; } else if (r === max) { h = (g - b) / delta; } else if (g === max) { h = 2 + (b - r) / delta; } else if (b === max) { h = 4 + (r - g) / delta; } h = Math.min(h * 60, 360); if (h < 0) { h += 360; } l = (min + max) / 2; if (max === min) { s = 0; } else if (l <= 0.5) { s = delta / (max + min); } else { s = delta / (2 - max - min); } return [h, s * 100, l * 100]; }; convert.rgb.hsv = function (rgb) { var rdif; var gdif; var bdif; var h; var s; var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var v = Math.max(r, g, b); var diff = v - Math.min(r, g, b); var diffc = function (c) { return (v - c) / 6 / diff + 1 / 2; }; if (diff === 0) { h = s = 0; } else { s = diff / v; rdif = diffc(r); gdif = diffc(g); bdif = diffc(b); if (r === v) { h = bdif - gdif; } else if (g === v) { h = (1 / 3) + rdif - bdif; } else if (b === v) { h = (2 / 3) + gdif - rdif; } if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } } return [ h * 360, s * 100, v * 100 ]; }; convert.rgb.hwb = function (rgb) { var r = rgb[0]; var g = rgb[1]; var b = rgb[2]; var h = convert.rgb.hsl(rgb)[0]; var w = 1 / 255 * Math.min(r, Math.min(g, b)); b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); return [h, w * 100, b * 100]; }; convert.rgb.cmyk = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var c; var m; var y; var k; k = Math.min(1 - r, 1 - g, 1 - b); c = (1 - r - k) / (1 - k) || 0; m = (1 - g - k) / (1 - k) || 0; y = (1 - b - k) / (1 - k) || 0; return [c * 100, m * 100, y * 100, k * 100]; }; /** * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance * */ function comparativeDistance(x, y) { return ( Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2) ); } convert.rgb.keyword = function (rgb) { var reversed = reverseKeywords[rgb]; if (reversed) { return reversed; } var currentClosestDistance = Infinity; var currentClosestKeyword; for (var keyword in cssKeywords) { if (cssKeywords.hasOwnProperty(keyword)) { var value = cssKeywords[keyword]; // Compute comparative distance var distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest if (distance < currentClosestDistance) { currentClosestDistance = distance; currentClosestKeyword = keyword; } } } return currentClosestKeyword; }; convert.keyword.rgb = function (keyword) { return cssKeywords[keyword]; }; convert.rgb.xyz = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; // assume sRGB r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); return [x * 100, y * 100, z * 100]; }; convert.rgb.lab = function (rgb) { var xyz = convert.rgb.xyz(rgb); var x = xyz[0]; var y = xyz[1]; var z = xyz[2]; var l; var a; var b; x /= 95.047; y /= 100; z /= 108.883; x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); l = (116 * y) - 16; a = 500 * (x - y); b = 200 * (y - z); return [l, a, b]; }; convert.hsl.rgb = function (hsl) { var h = hsl[0] / 360; var s = hsl[1] / 100; var l = hsl[2] / 100; var t1; var t2; var t3; var rgb; var val; if (s === 0) { val = l * 255; return [val, val, val]; } if (l < 0.5) { t2 = l * (1 + s); } else { t2 = l + s - l * s; } t1 = 2 * l - t2; rgb = [0, 0, 0]; for (var i = 0; i < 3; i++) { t3 = h + 1 / 3 * -(i - 1); if (t3 < 0) { t3++; } if (t3 > 1) { t3--; } if (6 * t3 < 1) { val = t1 + (t2 - t1) * 6 * t3; } else if (2 * t3 < 1) { val = t2; } else if (3 * t3 < 2) { val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; } else { val = t1; } rgb[i] = val * 255; } return rgb; }; convert.hsl.hsv = function (hsl) { var h = hsl[0]; var s = hsl[1] / 100; var l = hsl[2] / 100; var smin = s; var lmin = Math.max(l, 0.01); var sv; var v; l *= 2; s *= (l <= 1) ? l : 2 - l; smin *= lmin <= 1 ? lmin : 2 - lmin; v = (l + s) / 2; sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); return [h, sv * 100, v * 100]; }; convert.hsv.rgb = function (hsv) { var h = hsv[0] / 60; var s = hsv[1] / 100; var v = hsv[2] / 100; var hi = Math.floor(h) % 6; var f = h - Math.floor(h); var p = 255 * v * (1 - s); var q = 255 * v * (1 - (s * f)); var t = 255 * v * (1 - (s * (1 - f))); v *= 255; switch (hi) { case 0: return [v, t, p]; case 1: return [q, v, p]; case 2: return [p, v, t]; case 3: return [p, q, v]; case 4: return [t, p, v]; case 5: return [v, p, q]; } }; convert.hsv.hsl = function (hsv) { var h = hsv[0]; var s = hsv[1] / 100; var v = hsv[2] / 100; var vmin = Math.max(v, 0.01); var lmin; var sl; var l; l = (2 - s) * v; lmin = (2 - s) * vmin; sl = s * vmin; sl /= (lmin <= 1) ? lmin : 2 - lmin; sl = sl || 0; l /= 2; return [h, sl * 100, l * 100]; }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb convert.hwb.rgb = function (hwb) { var h = hwb[0] / 360; var wh = hwb[1] / 100; var bl = hwb[2] / 100; var ratio = wh + bl; var i; var v; var f; var n; // wh + bl cant be > 1 if (ratio > 1) { wh /= ratio; bl /= ratio; } i = Math.floor(6 * h); v = 1 - bl; f = 6 * h - i; if ((i & 0x01) !== 0) { f = 1 - f; } n = wh + f * (v - wh); // linear interpolation var r; var g; var b; switch (i) { default: case 6: case 0: r = v; g = n; b = wh; break; case 1: r = n; g = v; b = wh; break; case 2: r = wh; g = v; b = n; break; case 3: r = wh; g = n; b = v; break; case 4: r = n; g = wh; b = v; break; case 5: r = v; g = wh; b = n; break; } return [r * 255, g * 255, b * 255]; }; convert.cmyk.rgb = function (cmyk) { var c = cmyk[0] / 100; var m = cmyk[1] / 100; var y = cmyk[2] / 100; var k = cmyk[3] / 100; var r; var g; var b; r = 1 - Math.min(1, c * (1 - k) + k); g = 1 - Math.min(1, m * (1 - k) + k); b = 1 - Math.min(1, y * (1 - k) + k); return [r * 255, g * 255, b * 255]; }; convert.xyz.rgb = function (xyz) { var x = xyz[0] / 100; var y = xyz[1] / 100; var z = xyz[2] / 100; var r; var g; var b; r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); // assume sRGB r = r > 0.0031308 ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) : r * 12.92; g = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) : g * 12.92; b = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) : b * 12.92; r = Math.min(Math.max(0, r), 1); g = Math.min(Math.max(0, g), 1); b = Math.min(Math.max(0, b), 1); return [r * 255, g * 255, b * 255]; }; convert.xyz.lab = function (xyz) { var x = xyz[0]; var y = xyz[1]; var z = xyz[2]; var l; var a; var b; x /= 95.047; y /= 100; z /= 108.883; x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); l = (116 * y) - 16; a = 500 * (x - y); b = 200 * (y - z); return [l, a, b]; }; convert.lab.xyz = function (lab) { var l = lab[0]; var a = lab[1]; var b = lab[2]; var x; var y; var z; y = (l + 16) / 116; x = a / 500 + y; z = y - b / 200; var y2 = Math.pow(y, 3); var x2 = Math.pow(x, 3); var z2 = Math.pow(z, 3); y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; x *= 95.047; y *= 100; z *= 108.883; return [x, y, z]; }; convert.lab.lch = function (lab) { var l = lab[0]; var a = lab[1]; var b = lab[2]; var hr; var h; var c; hr = Math.atan2(b, a); h = hr * 360 / 2 / Math.PI; if (h < 0) { h += 360; } c = Math.sqrt(a * a + b * b); return [l, c, h]; }; convert.lch.lab = function (lch) { var l = lch[0]; var c = lch[1]; var h = lch[2]; var a; var b; var hr; hr = h / 360 * 2 * Math.PI; a = c * Math.cos(hr); b = c * Math.sin(hr); return [l, a, b]; }; convert.rgb.ansi16 = function (args) { var r = args[0]; var g = args[1]; var b = args[2]; var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization value = Math.round(value / 50); if (value === 0) { return 30; } var ansi = 30 + ((Math.round(b / 255) << 2) | (Math.round(g / 255) << 1) | Math.round(r / 255)); if (value === 2) { ansi += 60; } return ansi; }; convert.hsv.ansi16 = function (args) { // optimization here; we already know the value and don't need to get // it converted for us. return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); }; convert.rgb.ansi256 = function (args) { var r = args[0]; var g = args[1]; var b = args[2]; // we use the extended greyscale palette here, with the exception of // black and white. normal palette only has 4 greyscale shades. if (r === g && g === b) { if (r < 8) { return 16; } if (r > 248) { return 231; } return Math.round(((r - 8) / 247) * 24) + 232; } var ansi = 16 + (36 * Math.round(r / 255 * 5)) + (6 * Math.round(g / 255 * 5)) + Math.round(b / 255 * 5); return ansi; }; convert.ansi16.rgb = function (args) { var color = args % 10; // handle greyscale if (color === 0 || color === 7) { if (args > 50) { color += 3.5; } color = color / 10.5 * 255; return [color, color, color]; } var mult = (~~(args > 50) + 1) * 0.5; var r = ((color & 1) * mult) * 255; var g = (((color >> 1) & 1) * mult) * 255; var b = (((color >> 2) & 1) * mult) * 255; return [r, g, b]; }; convert.ansi256.rgb = function (args) { // handle greyscale if (args >= 232) { var c = (args - 232) * 10 + 8; return [c, c, c]; } args -= 16; var rem; var r = Math.floor(args / 36) / 5 * 255; var g = Math.floor((rem = args % 36) / 6) / 5 * 255; var b = (rem % 6) / 5 * 255; return [r, g, b]; }; convert.rgb.hex = function (args) { var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF); var string = integer.toString(16).toUpperCase(); return '000000'.substring(string.length) + string; }; convert.hex.rgb = function (args) { var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); if (!match) { return [0, 0, 0]; } var colorString = match[0]; if (match[0].length === 3) { colorString = colorString.split('').map(function (char) { return char + char; }).join(''); } var integer = parseInt(colorString, 16); var r = (integer >> 16) & 0xFF; var g = (integer >> 8) & 0xFF; var b = integer & 0xFF; return [r, g, b]; }; convert.rgb.hcg = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var max = Math.max(Math.max(r, g), b); var min = Math.min(Math.min(r, g), b); var chroma = (max - min); var grayscale; var hue; if (chroma < 1) { grayscale = min / (1 - chroma); } else { grayscale = 0; } if (chroma <= 0) { hue = 0; } else if (max === r) { hue = ((g - b) / chroma) % 6; } else if (max === g) { hue = 2 + (b - r) / chroma; } else { hue = 4 + (r - g) / chroma + 4; } hue /= 6; hue %= 1; return [hue * 360, chroma * 100, grayscale * 100]; }; convert.hsl.hcg = function (hsl) { var s = hsl[1] / 100; var l = hsl[2] / 100; var c = 1; var f = 0; if (l < 0.5) { c = 2.0 * s * l; } else { c = 2.0 * s * (1.0 - l); } if (c < 1.0) { f = (l - 0.5 * c) / (1.0 - c); } return [hsl[0], c * 100, f * 100]; }; convert.hsv.hcg = function (hsv) { var s = hsv[1] / 100; var v = hsv[2] / 100; var c = s * v; var f = 0; if (c < 1.0) { f = (v - c) / (1 - c); } return [hsv[0], c * 100, f * 100]; }; convert.hcg.rgb = function (hcg) { var h = hcg[0] / 360; var c = hcg[1] / 100; var g = hcg[2] / 100; if (c === 0.0) { return [g * 255, g * 255, g * 255]; } var pure = [0, 0, 0]; var hi = (h % 1) * 6; var v = hi % 1; var w = 1 - v; var mg = 0; switch (Math.floor(hi)) { case 0: pure[0] = 1; pure[1] = v; pure[2] = 0; break; case 1: pure[0] = w; pure[1] = 1; pure[2] = 0; break; case 2: pure[0] = 0; pure[1] = 1; pure[2] = v; break; case 3: pure[0] = 0; pure[1] = w; pure[2] = 1; break; case 4: pure[0] = v; pure[1] = 0; pure[2] = 1; break; default: pure[0] = 1; pure[1] = 0; pure[2] = w; } mg = (1.0 - c) * g; return [ (c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255 ]; }; convert.hcg.hsv = function (hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var v = c + g * (1.0 - c); var f = 0; if (v > 0.0) { f = c / v; } return [hcg[0], f * 100, v * 100]; }; convert.hcg.hsl = function (hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var l = g * (1.0 - c) + 0.5 * c; var s = 0; if (l > 0.0 && l < 0.5) { s = c / (2 * l); } else if (l >= 0.5 && l < 1.0) { s = c / (2 * (1 - l)); } return [hcg[0], s * 100, l * 100]; }; convert.hcg.hwb = function (hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var v = c + g * (1.0 - c); return [hcg[0], (v - c) * 100, (1 - v) * 100]; }; convert.hwb.hcg = function (hwb) { var w = hwb[1] / 100; var b = hwb[2] / 100; var v = 1 - b; var c = v - w; var g = 0; if (c < 1) { g = (v - c) / (1 - c); } return [hwb[0], c * 100, g * 100]; }; convert.apple.rgb = function (apple) { return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; }; convert.rgb.apple = function (rgb) { return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; }; convert.gray.rgb = function (args) { return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; }; convert.gray.hsl = convert.gray.hsv = function (args) { return [0, 0, args[0]]; }; convert.gray.hwb = function (gray) { return [0, 100, gray[0]]; }; convert.gray.cmyk = function (gray) { return [0, 0, 0, gray[0]]; }; convert.gray.lab = function (gray) { return [gray[0], 0, 0]; }; convert.gray.hex = function (gray) { var val = Math.round(gray[0] / 100 * 255) & 0xFF; var integer = (val << 16) + (val << 8) + val; var string = integer.toString(16).toUpperCase(); return '000000'.substring(string.length) + string; }; convert.rgb.gray = function (rgb) { var val = (rgb[0] + rgb[1] + rgb[2]) / 3; return [val / 255 * 100]; }; /***/ }), /***/ "./node_modules/color-convert/index.js": /*!*********************************************!*\ !*** ./node_modules/color-convert/index.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var conversions = __webpack_require__(/*! ./conversions */ "./node_modules/color-convert/conversions.js"); var route = __webpack_require__(/*! ./route */ "./node_modules/color-convert/route.js"); var convert = {}; var models = Object.keys(conversions); function wrapRaw(fn) { var wrappedFn = function (args) { if (args === undefined || args === null) { return args; } if (arguments.length > 1) { args = Array.prototype.slice.call(arguments); } return fn(args); }; // preserve .conversion property if there is one if ('conversion' in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } function wrapRounded(fn) { var wrappedFn = function (args) { if (args === undefined || args === null) { return args; } if (arguments.length > 1) { args = Array.prototype.slice.call(arguments); } var result = fn(args); // we're assuming the result is an array here. // see notice in conversions.js; don't use box types // in conversion functions. if (typeof result === 'object') { for (var len = result.length, i = 0; i < len; i++) { result[i] = Math.round(result[i]); } } return result; }; // preserve .conversion property if there is one if ('conversion' in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } models.forEach(function (fromModel) { convert[fromModel] = {}; Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); var routes = route(fromModel); var routeModels = Object.keys(routes); routeModels.forEach(function (toModel) { var fn = routes[toModel]; convert[fromModel][toModel] = wrapRounded(fn); convert[fromModel][toModel].raw = wrapRaw(fn); }); }); module.exports = convert; /***/ }), /***/ "./node_modules/color-convert/route.js": /*!*********************************************!*\ !*** ./node_modules/color-convert/route.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var conversions = __webpack_require__(/*! ./conversions */ "./node_modules/color-convert/conversions.js"); /* this function routes a model to all other models. all functions that are routed have a property `.conversion` attached to the returned synthetic function. This property is an array of strings, each with the steps in between the 'from' and 'to' color models (inclusive). conversions that are not possible simply are not included. */ function buildGraph() { var graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3 var models = Object.keys(conversions); for (var len = models.length, i = 0; i < len; i++) { graph[models[i]] = { // http://jsperf.com/1-vs-infinity // micro-opt, but this is simple. distance: -1, parent: null }; } return graph; } // https://en.wikipedia.org/wiki/Breadth-first_search function deriveBFS(fromModel) { var graph = buildGraph(); var queue = [fromModel]; // unshift -> queue -> pop graph[fromModel].distance = 0; while (queue.length) { var current = queue.pop(); var adjacents = Object.keys(conversions[current]); for (var len = adjacents.length, i = 0; i < len; i++) { var adjacent = adjacents[i]; var node = graph[adjacent]; if (node.distance === -1) { node.distance = graph[current].distance + 1; node.parent = current; queue.unshift(adjacent); } } } return graph; } function link(from, to) { return function (args) { return to(from(args)); }; } function wrapConversion(toModel, graph) { var path = [graph[toModel].parent, toModel]; var fn = conversions[graph[toModel].parent][toModel]; var cur = graph[toModel].parent; while (graph[cur].parent) { path.unshift(graph[cur].parent); fn = link(conversions[graph[cur].parent][cur], fn); cur = graph[cur].parent; } fn.conversion = path; return fn; } module.exports = function (fromModel) { var graph = deriveBFS(fromModel); var conversion = {}; var models = Object.keys(graph); for (var len = models.length, i = 0; i < len; i++) { var toModel = models[i]; var node = graph[toModel]; if (node.parent === null) { // no possible conversion, or this node is the source model. continue; } conversion[toModel] = wrapConversion(toModel, graph); } return conversion; }; /***/ }), /***/ "./node_modules/color-name/index.js": /*!******************************************!*\ !*** ./node_modules/color-name/index.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], "aqua": [0, 255, 255], "aquamarine": [127, 255, 212], "azure": [240, 255, 255], "beige": [245, 245, 220], "bisque": [255, 228, 196], "black": [0, 0, 0], "blanchedalmond": [255, 235, 205], "blue": [0, 0, 255], "blueviolet": [138, 43, 226], "brown": [165, 42, 42], "burlywood": [222, 184, 135], "cadetblue": [95, 158, 160], "chartreuse": [127, 255, 0], "chocolate": [210, 105, 30], "coral": [255, 127, 80], "cornflowerblue": [100, 149, 237], "cornsilk": [255, 248, 220], "crimson": [220, 20, 60], "cyan": [0, 255, 255], "darkblue": [0, 0, 139], "darkcyan": [0, 139, 139], "darkgoldenrod": [184, 134, 11], "darkgray": [169, 169, 169], "darkgreen": [0, 100, 0], "darkgrey": [169, 169, 169], "darkkhaki": [189, 183, 107], "darkmagenta": [139, 0, 139], "darkolivegreen": [85, 107, 47], "darkorange": [255, 140, 0], "darkorchid": [153, 50, 204], "darkred": [139, 0, 0], "darksalmon": [233, 150, 122], "darkseagreen": [143, 188, 143], "darkslateblue": [72, 61, 139], "darkslategray": [47, 79, 79], "darkslategrey": [47, 79, 79], "darkturquoise": [0, 206, 209], "darkviolet": [148, 0, 211], "deeppink": [255, 20, 147], "deepskyblue": [0, 191, 255], "dimgray": [105, 105, 105], "dimgrey": [105, 105, 105], "dodgerblue": [30, 144, 255], "firebrick": [178, 34, 34], "floralwhite": [255, 250, 240], "forestgreen": [34, 139, 34], "fuchsia": [255, 0, 255], "gainsboro": [220, 220, 220], "ghostwhite": [248, 248, 255], "gold": [255, 215, 0], "goldenrod": [218, 165, 32], "gray": [128, 128, 128], "green": [0, 128, 0], "greenyellow": [173, 255, 47], "grey": [128, 128, 128], "honeydew": [240, 255, 240], "hotpink": [255, 105, 180], "indianred": [205, 92, 92], "indigo": [75, 0, 130], "ivory": [255, 255, 240], "khaki": [240, 230, 140], "lavender": [230, 230, 250], "lavenderblush": [255, 240, 245], "lawngreen": [124, 252, 0], "lemonchiffon": [255, 250, 205], "lightblue": [173, 216, 230], "lightcoral": [240, 128, 128], "lightcyan": [224, 255, 255], "lightgoldenrodyellow": [250, 250, 210], "lightgray": [211, 211, 211], "lightgreen": [144, 238, 144], "lightgrey": [211, 211, 211], "lightpink": [255, 182, 193], "lightsalmon": [255, 160, 122], "lightseagreen": [32, 178, 170], "lightskyblue": [135, 206, 250], "lightslategray": [119, 136, 153], "lightslategrey": [119, 136, 153], "lightsteelblue": [176, 196, 222], "lightyellow": [255, 255, 224], "lime": [0, 255, 0], "limegreen": [50, 205, 50], "linen": [250, 240, 230], "magenta": [255, 0, 255], "maroon": [128, 0, 0], "mediumaquamarine": [102, 205, 170], "mediumblue": [0, 0, 205], "mediumorchid": [186, 85, 211], "mediumpurple": [147, 112, 219], "mediumseagreen": [60, 179, 113], "mediumslateblue": [123, 104, 238], "mediumspringgreen": [0, 250, 154], "mediumturquoise": [72, 209, 204], "mediumvioletred": [199, 21, 133], "midnightblue": [25, 25, 112], "mintcream": [245, 255, 250], "mistyrose": [255, 228, 225], "moccasin": [255, 228, 181], "navajowhite": [255, 222, 173], "navy": [0, 0, 128], "oldlace": [253, 245, 230], "olive": [128, 128, 0], "olivedrab": [107, 142, 35], "orange": [255, 165, 0], "orangered": [255, 69, 0], "orchid": [218, 112, 214], "palegoldenrod": [238, 232, 170], "palegreen": [152, 251, 152], "paleturquoise": [175, 238, 238], "palevioletred": [219, 112, 147], "papayawhip": [255, 239, 213], "peachpuff": [255, 218, 185], "peru": [205, 133, 63], "pink": [255, 192, 203], "plum": [221, 160, 221], "powderblue": [176, 224, 230], "purple": [128, 0, 128], "rebeccapurple": [102, 51, 153], "red": [255, 0, 0], "rosybrown": [188, 143, 143], "royalblue": [65, 105, 225], "saddlebrown": [139, 69, 19], "salmon": [250, 128, 114], "sandybrown": [244, 164, 96], "seagreen": [46, 139, 87], "seashell": [255, 245, 238], "sienna": [160, 82, 45], "silver": [192, 192, 192], "skyblue": [135, 206, 235], "slateblue": [106, 90, 205], "slategray": [112, 128, 144], "slategrey": [112, 128, 144], "snow": [255, 250, 250], "springgreen": [0, 255, 127], "steelblue": [70, 130, 180], "tan": [210, 180, 140], "teal": [0, 128, 128], "thistle": [216, 191, 216], "tomato": [255, 99, 71], "turquoise": [64, 224, 208], "violet": [238, 130, 238], "wheat": [245, 222, 179], "white": [255, 255, 255], "whitesmoke": [245, 245, 245], "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; /***/ }), /***/ "./node_modules/color-string/index.js": /*!********************************************!*\ !*** ./node_modules/color-string/index.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ var colorNames = __webpack_require__(/*! color-name */ "./node_modules/color-name/index.js"); var swizzle = __webpack_require__(/*! simple-swizzle */ "./node_modules/simple-swizzle/index.js"); var reverseNames = {}; // create a list of reverse color names for (var name in colorNames) { if (colorNames.hasOwnProperty(name)) { reverseNames[colorNames[name]] = name; } } var cs = module.exports = { to: {}, get: {} }; cs.get = function (string) { var prefix = string.substring(0, 3).toLowerCase(); var val; var model; switch (prefix) { case 'hsl': val = cs.get.hsl(string); model = 'hsl'; break; case 'hwb': val = cs.get.hwb(string); model = 'hwb'; break; default: val = cs.get.rgb(string); model = 'rgb'; break; } if (!val) { return null; } return {model: model, value: val}; }; cs.get.rgb = function (string) { if (!string) { return null; } var abbr = /^#([a-f0-9]{3,4})$/i; var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i; var rgba = /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var keyword = /(\D+)/; var rgb = [0, 0, 0, 1]; var match; var i; var hexAlpha; if (match = string.match(hex)) { hexAlpha = match[2]; match = match[1]; for (i = 0; i < 3; i++) { // https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19 var i2 = i * 2; rgb[i] = parseInt(match.slice(i2, i2 + 2), 16); } if (hexAlpha) { rgb[3] = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100; } } else if (match = string.match(abbr)) { match = match[1]; hexAlpha = match[3]; for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i] + match[i], 16); } if (hexAlpha) { rgb[3] = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100; } } else if (match = string.match(rgba)) { for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i + 1], 0); } if (match[4]) { rgb[3] = parseFloat(match[4]); } } else if (match = string.match(per)) { for (i = 0; i < 3; i++) { rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55); } if (match[4]) { rgb[3] = parseFloat(match[4]); } } else if (match = string.match(keyword)) { if (match[1] === 'transparent') { return [0, 0, 0, 0]; } rgb = colorNames[match[1]]; if (!rgb) { return null; } rgb[3] = 1; return rgb; } else { return null; } for (i = 0; i < 3; i++) { rgb[i] = clamp(rgb[i], 0, 255); } rgb[3] = clamp(rgb[3], 0, 1); return rgb; }; cs.get.hsl = function (string) { if (!string) { return null; } var hsl = /^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var match = string.match(hsl); if (match) { var alpha = parseFloat(match[4]); var h = (parseFloat(match[1]) + 360) % 360; var s = clamp(parseFloat(match[2]), 0, 100); var l = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, s, l, a]; } return null; }; cs.get.hwb = function (string) { if (!string) { return null; } var hwb = /^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var match = string.match(hwb); if (match) { var alpha = parseFloat(match[4]); var h = ((parseFloat(match[1]) % 360) + 360) % 360; var w = clamp(parseFloat(match[2]), 0, 100); var b = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, w, b, a]; } return null; }; cs.to.hex = function () { var rgba = swizzle(arguments); return ( '#' + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? (hexDouble(Math.round(rgba[3] * 255))) : '') ); }; cs.to.rgb = function () { var rgba = swizzle(arguments); return rgba.length < 4 || rgba[3] === 1 ? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')' : 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')'; }; cs.to.rgb.percent = function () { var rgba = swizzle(arguments); var r = Math.round(rgba[0] / 255 * 100); var g = Math.round(rgba[1] / 255 * 100); var b = Math.round(rgba[2] / 255 * 100); return rgba.length < 4 || rgba[3] === 1 ? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)' : 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')'; }; cs.to.hsl = function () { var hsla = swizzle(arguments); return hsla.length < 4 || hsla[3] === 1 ? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)' : 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')'; }; // hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax // (hwb have alpha optional & 1 is default value) cs.to.hwb = function () { var hwba = swizzle(arguments); var a = ''; if (hwba.length >= 4 && hwba[3] !== 1) { a = ', ' + hwba[3]; } return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')'; }; cs.to.keyword = function (rgb) { return reverseNames[rgb.slice(0, 3)]; }; // helpers function clamp(num, min, max) { return Math.min(Math.max(min, num), max); } function hexDouble(num) { var str = num.toString(16).toUpperCase(); return (str.length < 2) ? '0' + str : str; } /***/ }), /***/ "./node_modules/color/index.js": /*!*************************************!*\ !*** ./node_modules/color/index.js ***! \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var colorString = __webpack_require__(/*! color-string */ "./node_modules/color-string/index.js"); var convert = __webpack_require__(/*! color-convert */ "./node_modules/color-convert/index.js"); var _slice = [].slice; var skippedModels = [ // to be honest, I don't really feel like keyword belongs in color convert, but eh. 'keyword', // gray conflicts with some method names, and has its own method defined. 'gray', // shouldn't really be in color-convert either... 'hex' ]; var hashedModelKeys = {}; Object.keys(convert).forEach(function (model) { hashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model; }); var limiters = {}; function Color(obj, model) { if (!(this instanceof Color)) { return new Color(obj, model); } if (model && model in skippedModels) { model = null; } if (model && !(model in convert)) { throw new Error('Unknown model: ' + model); } var i; var channels; if (typeof obj === 'undefined') { this.model = 'rgb'; this.color = [0, 0, 0]; this.valpha = 1; } else if (obj instanceof Color) { this.model = obj.model; this.color = obj.color.slice(); this.valpha = obj.valpha; } else if (typeof obj === 'string') { var result = colorString.get(obj); if (result === null) { throw new Error('Unable to parse color from string: ' + obj); } this.model = result.model; channels = convert[this.model].channels; this.color = result.value.slice(0, channels); this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1; } else if (obj.length) { this.model = model || 'rgb'; channels = convert[this.model].channels; var newArr = _slice.call(obj, 0, channels); this.color = zeroArray(newArr, channels); this.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1; } else if (typeof obj === 'number') { // this is always RGB - can be converted later on. obj &= 0xFFFFFF; this.model = 'rgb'; this.color = [ (obj >> 16) & 0xFF, (obj >> 8) & 0xFF, obj & 0xFF ]; this.valpha = 1; } else { this.valpha = 1; var keys = Object.keys(obj); if ('alpha' in obj) { keys.splice(keys.indexOf('alpha'), 1); this.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0; } var hashedKeys = keys.sort().join(''); if (!(hashedKeys in hashedModelKeys)) { throw new Error('Unable to parse color from object: ' + JSON.stringify(obj)); } this.model = hashedModelKeys[hashedKeys]; var labels = convert[this.model].labels; var color = []; for (i = 0; i < labels.length; i++) { color.push(obj[labels[i]]); } this.color = zeroArray(color); } // perform limitations (clamping, etc.) if (limiters[this.model]) { channels = convert[this.model].channels; for (i = 0; i < channels; i++) { var limit = limiters[this.model][i]; if (limit) { this.color[i] = limit(this.color[i]); } } } this.valpha = Math.max(0, Math.min(1, this.valpha)); if (Object.freeze) { Object.freeze(this); } } Color.prototype = { toString: function () { return this.string(); }, toJSON: function () { return this[this.model](); }, string: function (places) { var self = this.model in colorString.to ? this : this.rgb(); self = self.round(typeof places === 'number' ? places : 1); var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); return colorString.to[self.model](args); }, percentString: function (places) { var self = this.rgb().round(typeof places === 'number' ? places : 1); var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); return colorString.to.rgb.percent(args); }, array: function () { return this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha); }, object: function () { var result = {}; var channels = convert[this.model].channels; var labels = convert[this.model].labels; for (var i = 0; i < channels; i++) { result[labels[i]] = this.color[i]; } if (this.valpha !== 1) { result.alpha = this.valpha; } return result; }, unitArray: function () { var rgb = this.rgb().color; rgb[0] /= 255; rgb[1] /= 255; rgb[2] /= 255; if (this.valpha !== 1) { rgb.push(this.valpha); } return rgb; }, unitObject: function () { var rgb = this.rgb().object(); rgb.r /= 255; rgb.g /= 255; rgb.b /= 255; if (this.valpha !== 1) { rgb.alpha = this.valpha; } return rgb; }, round: function (places) { places = Math.max(places || 0, 0); return new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model); }, alpha: function (val) { if (arguments.length) { return new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model); } return this.valpha; }, // rgb red: getset('rgb', 0, maxfn(255)), green: getset('rgb', 1, maxfn(255)), blue: getset('rgb', 2, maxfn(255)), hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style saturationl: getset('hsl', 1, maxfn(100)), lightness: getset('hsl', 2, maxfn(100)), saturationv: getset('hsv', 1, maxfn(100)), value: getset('hsv', 2, maxfn(100)), chroma: getset('hcg', 1, maxfn(100)), gray: getset('hcg', 2, maxfn(100)), white: getset('hwb', 1, maxfn(100)), wblack: getset('hwb', 2, maxfn(100)), cyan: getset('cmyk', 0, maxfn(100)), magenta: getset('cmyk', 1, maxfn(100)), yellow: getset('cmyk', 2, maxfn(100)), black: getset('cmyk', 3, maxfn(100)), x: getset('xyz', 0, maxfn(100)), y: getset('xyz', 1, maxfn(100)), z: getset('xyz', 2, maxfn(100)), l: getset('lab', 0, maxfn(100)), a: getset('lab', 1), b: getset('lab', 2), keyword: function (val) { if (arguments.length) { return new Color(val); } return convert[this.model].keyword(this.color); }, hex: function (val) { if (arguments.length) { return new Color(val); } return colorString.to.hex(this.rgb().round().color); }, rgbNumber: function () { var rgb = this.rgb().color; return ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF); }, luminosity: function () { // http://www.w3.org/TR/WCAG20/#relativeluminancedef var rgb = this.rgb().color; var lum = []; for (var i = 0; i < rgb.length; i++) { var chan = rgb[i] / 255; lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4); } return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; }, contrast: function (color2) { // http://www.w3.org/TR/WCAG20/#contrast-ratiodef var lum1 = this.luminosity(); var lum2 = color2.luminosity(); if (lum1 > lum2) { return (lum1 + 0.05) / (lum2 + 0.05); } return (lum2 + 0.05) / (lum1 + 0.05); }, level: function (color2) { var contrastRatio = this.contrast(color2); if (contrastRatio >= 7.1) { return 'AAA'; } return (contrastRatio >= 4.5) ? 'AA' : ''; }, isDark: function () { // YIQ equation from http://24ways.org/2010/calculating-color-contrast var rgb = this.rgb().color; var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000; return yiq < 128; }, isLight: function () { return !this.isDark(); }, negate: function () { var rgb = this.rgb(); for (var i = 0; i < 3; i++) { rgb.color[i] = 255 - rgb.color[i]; } return rgb; }, lighten: function (ratio) { var hsl = this.hsl(); hsl.color[2] += hsl.color[2] * ratio; return hsl; }, darken: function (ratio) { var hsl = this.hsl(); hsl.color[2] -= hsl.color[2] * ratio; return hsl; }, saturate: function (ratio) { var hsl = this.hsl(); hsl.color[1] += hsl.color[1] * ratio; return hsl; }, desaturate: function (ratio) { var hsl = this.hsl(); hsl.color[1] -= hsl.color[1] * ratio; return hsl; }, whiten: function (ratio) { var hwb = this.hwb(); hwb.color[1] += hwb.color[1] * ratio; return hwb; }, blacken: function (ratio) { var hwb = this.hwb(); hwb.color[2] += hwb.color[2] * ratio; return hwb; }, grayscale: function () { // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale var rgb = this.rgb().color; var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; return Color.rgb(val, val, val); }, fade: function (ratio) { return this.alpha(this.valpha - (this.valpha * ratio)); }, opaquer: function (ratio) { return this.alpha(this.valpha + (this.valpha * ratio)); }, rotate: function (degrees) { var hsl = this.hsl(); var hue = hsl.color[0]; hue = (hue + degrees) % 360; hue = hue < 0 ? 360 + hue : hue; hsl.color[0] = hue; return hsl; }, mix: function (mixinColor, weight) { // ported from sass implementation in C // https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209 if (!mixinColor || !mixinColor.rgb) { throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor); } var color1 = mixinColor.rgb(); var color2 = this.rgb(); var p = weight === undefined ? 0.5 : weight; var w = 2 * p - 1; var a = color1.alpha() - color2.alpha(); var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0; var w2 = 1 - w1; return Color.rgb( w1 * color1.red() + w2 * color2.red(), w1 * color1.green() + w2 * color2.green(), w1 * color1.blue() + w2 * color2.blue(), color1.alpha() * p + color2.alpha() * (1 - p)); } }; // model conversion methods and static constructors Object.keys(convert).forEach(function (model) { if (skippedModels.indexOf(model) !== -1) { return; } var channels = convert[model].channels; // conversion methods Color.prototype[model] = function () { if (this.model === model) { return new Color(this); } if (arguments.length) { return new Color(arguments, model); } var newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha; return new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model); }; // 'static' construction methods Color[model] = function (color) { if (typeof color === 'number') { color = zeroArray(_slice.call(arguments), channels); } return new Color(color, model); }; }); function roundTo(num, places) { return Number(num.toFixed(places)); } function roundToPlace(places) { return function (num) { return roundTo(num, places); }; } function getset(model, channel, modifier) { model = Array.isArray(model) ? model : [model]; model.forEach(function (m) { (limiters[m] || (limiters[m] = []))[channel] = modifier; }); model = model[0]; return function (val) { var result; if (arguments.length) { if (modifier) { val = modifier(val); } result = this[model](); result.color[channel] = val; return result; } result = this[model]().color[channel]; if (modifier) { result = modifier(result); } return result; }; } function maxfn(max) { return function (v) { return Math.max(0, Math.min(max, v)); }; } function assertArray(val) { return Array.isArray(val) ? val : [val]; } function zeroArray(arr, length) { for (var i = 0; i < length; i++) { if (typeof arr[i] !== 'number') { arr[i] = 0; } } return arr; } module.exports = Color; /***/ }), /***/ "./node_modules/conic-gradient/conic-gradient.js": /*!*******************************************************!*\ !*** ./node_modules/conic-gradient/conic-gradient.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * CSS conic-gradient() polyfill * By Lea Verou — http://lea.verou.me * MIT license */ (function(){ var π = Math.PI; var τ = 2 * π; var ε = .00001; var deg = π/180; var dummy = document.createElement("div"); document.head.appendChild(dummy); var _ = self.ConicGradient = function(o) { var me = this; _.all.push(this); o = o || {}; this.canvas = document.createElement("canvas"); this.context = this.canvas.getContext("2d"); this.repeating = !!o.repeating; this.size = o.size || Math.max(innerWidth, innerHeight); this.canvas.width = this.canvas.height = this.size; var stops = o.stops; this.stops = (stops || "").split(/\s*,(?![^(]*\))\s*/); // commas that are not followed by a ) without a ( first this.from = 0; for (var i=0; i 0) { var first = this.stops[0].clone(); first.pos = 0; this.stops.unshift(first); } // Add dummy last stop or set first stop’s position to 100% if it doesn’t have one if (this.stops[this.stops.length - 1].pos === undefined) { this.stops[this.stops.length - 1].pos = 1; } else if (!this.repeating && this.stops[this.stops.length - 1].pos < 1) { var last = this.stops[this.stops.length - 1].clone(); last.pos = 1; this.stops.push(last); } this.stops.forEach(function(stop, i){ if (stop.pos === undefined) { // Evenly space color stops with no position for (var j=i+1; this[j]; j++) { if (this[j].pos !== undefined) { stop.pos = this[i-1].pos + (this[j].pos - this[i-1].pos)/(j-i+1); break; } } } else if (i > 0) { // Normalize color stops whose position is smaller than the position of the stop before them stop.pos = Math.max(stop.pos, this[i-1].pos); } }, this.stops); if (this.repeating) { // Repeat color stops until >= 1 var stops = this.stops.slice(); var lastStop = stops[stops.length-1]; var difference = lastStop.pos - stops[0].pos; for (var i=0; this.stops[this.stops.length-1].pos < 1 && i<10000; i++) { for (var j=0; j' + '' + ''; }, get png() { return this.canvas.toDataURL(); }, get r() { return Math.sqrt(2) * this.size / 2; }, // Paint the conical gradient on the canvas // Algorithm inspired from http://jsdo.it/akm2/yr9B paint: function() { var c = this.context; var radius = this.r; var x = this.size / 2; var stopIndex = 0; // The index of the current color var stop = this.stops[stopIndex], prevStop; var diff, t; // Transform coordinate system so that angles start from the top left, like in CSS c.translate(this.size/2, this.size/2); c.rotate(-90*deg); c.rotate(this.from*deg); c.translate(-this.size/2, -this.size/2); for (var i = 0; i < 360;) { if (i/360 + ε >= stop.pos) { // Switch color stop do { prevStop = stop; stopIndex++; stop = this.stops[stopIndex]; } while(stop && stop != prevStop && stop.pos === prevStop.pos); if (!stop) { break; } var sameColor = prevStop.color + "" === stop.color + "" && prevStop != stop; diff = prevStop.color.map(function(c, i){ return stop.color[i] - c; }); } t = (i/360 - prevStop.pos) / (stop.pos - prevStop.pos); var interpolated = sameColor? stop.color : diff.map(function(d,i){ var ret = d * t + prevStop.color[i]; return i < 3? ret & 255 : ret; }); // Draw a series of arcs, 1deg each c.fillStyle = 'rgba(' + interpolated.join(",") + ')'; c.beginPath(); c.moveTo(x, x); if (sameColor) { var θ = 360 * (stop.pos - prevStop.pos); } else { var θ = .5; } var beginArg = i*deg; beginArg = Math.min(360*deg, beginArg); // .02: To prevent empty blank line and corresponding moire // only non-alpha colors are cared now var endArg = beginArg + θ*deg; endArg = Math.min(360*deg, endArg + .02); c.arc(x, x, radius, beginArg, endArg); c.closePath(); c.fill(); i += θ; } } }; _.ColorStop = function(gradient, stop) { this.gradient = gradient; if (stop) { var parts = stop.match(/^(.+?)(?:\s+([\d.]+)(%|deg|turn|grad|rad)?)?(?:\s+([\d.]+)(%|deg|turn|grad|rad)?)?\s*$/); this.color = _.ColorStop.colorToRGBA(parts[1]); if (parts[2]) { var unit = parts[3]; if (unit == "%" || parts[2] === "0" && !unit) { this.pos = parts[2]/100; } else if (unit == "turn") { this.pos = +parts[2]; } else if (unit == "deg") { this.pos = parts[2] / 360; } else if (unit == "grad") { this.pos = parts[2] / 400; } else if (unit == "rad") { this.pos = parts[2] / τ; } } if (parts[4]) { this.next = new _.ColorStop(gradient, parts[1] + " " + parts[4] + parts[5]); } } } _.ColorStop.prototype = { clone: function() { var ret = new _.ColorStop(this.gradient); ret.color = this.color; ret.pos = this.pos; return ret; }, toString: function() { return "rgba(" + this.color.join(", ") + ") " + this.pos * 100 + "%"; } }; _.ColorStop.colorToRGBA = function(color) { if (!Array.isArray(color) && color.indexOf("from") == -1) { dummy.style.color = color; var rgba = getComputedStyle(dummy).color.match(/rgba?\(([\d.]+), ([\d.]+), ([\d.]+)(?:, ([\d.]+))?\)/); if (rgba) { rgba.shift(); rgba = rgba.map(function(a) { return +a }); rgba[3] = isNaN(rgba[3])? 1 : rgba[3]; } return rgba || [0,0,0,0]; } return color; }; })(); if (self.StyleFix) { // Test if conic gradients are supported first: (function(){ var dummy = document.createElement("p"); dummy.style.backgroundImage = "conic-gradient(white, black)"; dummy.style.backgroundImage = PrefixFree.prefix + "conic-gradient(white, black)"; if (!dummy.style.backgroundImage) { // Not supported, use polyfill StyleFix.register(function(css, raw) { if (css.indexOf("conic-gradient") > -1) { css = css.replace(/(?:repeating-)?conic-gradient\(\s*((?:\([^()]+\)|[^;()}])+?)\)/g, function(gradient, stops) { return new ConicGradient({ stops: stops, repeating: gradient.indexOf("repeating-") > -1 }); }); } return css; }); } })(); } /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/rc-slider/assets/index.css": /*!***************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/rc-slider/assets/index.css ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // Imports var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); exports = ___CSS_LOADER_API_IMPORT___(false); // Module exports.push([module.i, ".rc-slider {\n position: relative;\n height: 14px;\n padding: 5px 0;\n width: 100%;\n border-radius: 6px;\n -ms-touch-action: none;\n touch-action: none;\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-rail {\n position: absolute;\n width: 100%;\n background-color: #e9e9e9;\n height: 4px;\n border-radius: 6px;\n}\n.rc-slider-track {\n position: absolute;\n left: 0;\n height: 4px;\n border-radius: 6px;\n background-color: #abe2fb;\n}\n.rc-slider-handle {\n position: absolute;\n width: 14px;\n height: 14px;\n cursor: pointer;\n cursor: -webkit-grab;\n margin-top: -5px;\n cursor: grab;\n border-radius: 50%;\n border: solid 2px #96dbfa;\n background-color: #fff;\n -ms-touch-action: pan-x;\n touch-action: pan-x;\n}\n.rc-slider-handle:focus {\n border-color: #57c5f7;\n box-shadow: 0 0 0 5px #96dbfa;\n outline: none;\n}\n.rc-slider-handle-click-focused:focus {\n border-color: #96dbfa;\n box-shadow: unset;\n}\n.rc-slider-handle:hover {\n border-color: #57c5f7;\n}\n.rc-slider-handle:active {\n border-color: #57c5f7;\n box-shadow: 0 0 5px #57c5f7;\n cursor: -webkit-grabbing;\n cursor: grabbing;\n}\n.rc-slider-mark {\n position: absolute;\n top: 18px;\n left: 0;\n width: 100%;\n font-size: 12px;\n}\n.rc-slider-mark-text {\n position: absolute;\n display: inline-block;\n vertical-align: middle;\n text-align: center;\n cursor: pointer;\n color: #999;\n}\n.rc-slider-mark-text-active {\n color: #666;\n}\n.rc-slider-step {\n position: absolute;\n width: 100%;\n height: 4px;\n background: transparent;\n}\n.rc-slider-dot {\n position: absolute;\n bottom: -2px;\n margin-left: -4px;\n width: 8px;\n height: 8px;\n border: 2px solid #e9e9e9;\n background-color: #fff;\n cursor: pointer;\n border-radius: 50%;\n vertical-align: middle;\n}\n.rc-slider-dot-active {\n border-color: #96dbfa;\n}\n.rc-slider-dot-reverse {\n margin-left: 0;\n margin-right: -4px;\n}\n.rc-slider-disabled {\n background-color: #e9e9e9;\n}\n.rc-slider-disabled .rc-slider-track {\n background-color: #ccc;\n}\n.rc-slider-disabled .rc-slider-handle,\n.rc-slider-disabled .rc-slider-dot {\n border-color: #ccc;\n box-shadow: none;\n background-color: #fff;\n cursor: not-allowed;\n}\n.rc-slider-disabled .rc-slider-mark-text,\n.rc-slider-disabled .rc-slider-dot {\n cursor: not-allowed !important;\n}\n.rc-slider-vertical {\n width: 14px;\n height: 100%;\n padding: 0 5px;\n}\n.rc-slider-vertical .rc-slider-rail {\n height: 100%;\n width: 4px;\n}\n.rc-slider-vertical .rc-slider-track {\n left: 5px;\n bottom: 0;\n width: 4px;\n}\n.rc-slider-vertical .rc-slider-handle {\n margin-left: -5px;\n -ms-touch-action: pan-y;\n touch-action: pan-y;\n}\n.rc-slider-vertical .rc-slider-mark {\n top: 0;\n left: 18px;\n height: 100%;\n}\n.rc-slider-vertical .rc-slider-step {\n height: 100%;\n width: 4px;\n}\n.rc-slider-vertical .rc-slider-dot {\n left: 2px;\n margin-bottom: -4px;\n}\n.rc-slider-vertical .rc-slider-dot:first-child {\n margin-bottom: -4px;\n}\n.rc-slider-vertical .rc-slider-dot:last-child {\n margin-bottom: -4px;\n}\n.rc-slider-tooltip-zoom-down-enter,\n.rc-slider-tooltip-zoom-down-appear {\n animation-duration: .3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n}\n.rc-slider-tooltip-zoom-down-leave {\n animation-duration: .3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n}\n.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active,\n.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active {\n animation-name: rcSliderTooltipZoomDownIn;\n animation-play-state: running;\n}\n.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active {\n animation-name: rcSliderTooltipZoomDownOut;\n animation-play-state: running;\n}\n.rc-slider-tooltip-zoom-down-enter,\n.rc-slider-tooltip-zoom-down-appear {\n transform: scale(0, 0);\n animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);\n}\n.rc-slider-tooltip-zoom-down-leave {\n animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n}\n@keyframes rcSliderTooltipZoomDownIn {\n 0% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n 100% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n}\n@keyframes rcSliderTooltipZoomDownOut {\n 0% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n 100% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n}\n.rc-slider-tooltip {\n position: absolute;\n left: -9999px;\n top: -9999px;\n visibility: visible;\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-tooltip * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-tooltip-hidden {\n display: none;\n}\n.rc-slider-tooltip-placement-top {\n padding: 4px 0 8px 0;\n}\n.rc-slider-tooltip-inner {\n padding: 6px 2px;\n min-width: 24px;\n height: 24px;\n font-size: 12px;\n line-height: 1;\n color: #fff;\n text-align: center;\n text-decoration: none;\n background-color: #6c6c6c;\n border-radius: 6px;\n box-shadow: 0 0 4px #d9d9d9;\n}\n.rc-slider-tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow {\n bottom: 4px;\n left: 50%;\n margin-left: -4px;\n border-width: 4px 4px 0;\n border-top-color: #6c6c6c;\n}\n", ""]); // Exports module.exports = exports; /***/ }), /***/ "./node_modules/css-loader/dist/runtime/api.js": /*!*****************************************************!*\ !*** ./node_modules/css-loader/dist/runtime/api.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader // eslint-disable-next-line func-names module.exports = function (useSourceMap) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap); if (item[2]) { return "@media ".concat(item[2], " {").concat(content, "}"); } return content; }).join(''); }; // import a list of modules into the list // eslint-disable-next-line func-names list.i = function (modules, mediaQuery, dedupe) { if (typeof modules === 'string') { // eslint-disable-next-line no-param-reassign modules = [[null, modules, '']]; } var alreadyImportedModules = {}; if (dedupe) { for (var i = 0; i < this.length; i++) { // eslint-disable-next-line prefer-destructuring var id = this[i][0]; if (id != null) { alreadyImportedModules[id] = true; } } } for (var _i = 0; _i < modules.length; _i++) { var item = [].concat(modules[_i]); if (dedupe && alreadyImportedModules[item[0]]) { // eslint-disable-next-line no-continue continue; } if (mediaQuery) { if (!item[2]) { item[2] = mediaQuery; } else { item[2] = "".concat(mediaQuery, " and ").concat(item[2]); } } list.push(item); } }; return list; }; function cssWithMappingToString(item, useSourceMap) { var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring var cssMapping = item[3]; if (!cssMapping) { return content; } if (useSourceMap && typeof btoa === 'function') { var sourceMapping = toComment(cssMapping); var sourceURLs = cssMapping.sources.map(function (source) { return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */"); }); return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); } return [content].join('\n'); } // Adapted from convert-source-map (MIT) function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); return "/*# ".concat(data, " */"); } /***/ }), /***/ "./node_modules/deep-equal/index.js": /*!******************************************!*\ !*** ./node_modules/deep-equal/index.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var pSlice = Array.prototype.slice; var objectKeys = __webpack_require__(/*! ./lib/keys.js */ "./node_modules/deep-equal/lib/keys.js"); var isArguments = __webpack_require__(/*! ./lib/is_arguments.js */ "./node_modules/deep-equal/lib/is_arguments.js"); var deepEqual = module.exports = function (actual, expected, opts) { if (!opts) opts = {}; // 7.1. All identical values are equivalent, as determined by ===. if (actual === expected) { return true; } else if (actual instanceof Date && expected instanceof Date) { return actual.getTime() === expected.getTime(); // 7.3. Other pairs that do not both pass typeof value == 'object', // equivalence is determined by ==. } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') { return opts.strict ? actual === expected : actual == expected; // 7.4. For all other Object pairs, including Array objects, equivalence is // determined by having the same number of owned properties (as verified // with Object.prototype.hasOwnProperty.call), the same set of keys // (although not necessarily the same order), equivalent values for every // corresponding key, and an identical 'prototype' property. Note: this // accounts for both named and indexed properties on Arrays. } else { return objEquiv(actual, expected, opts); } } function isUndefinedOrNull(value) { return value === null || value === undefined; } function isBuffer (x) { if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false; if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { return false; } if (x.length > 0 && typeof x[0] !== 'number') return false; return true; } function objEquiv(a, b, opts) { var i, key; if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) return false; // an identical 'prototype' property. if (a.prototype !== b.prototype) return false; //~~~I've managed to break Object.keys through screwy arguments passing. // Converting to array solves the problem. if (isArguments(a)) { if (!isArguments(b)) { return false; } a = pSlice.call(a); b = pSlice.call(b); return deepEqual(a, b, opts); } if (isBuffer(a)) { if (!isBuffer(b)) { return false; } if (a.length !== b.length) return false; for (i = 0; i < a.length; i++) { if (a[i] !== b[i]) return false; } return true; } try { var ka = objectKeys(a), kb = objectKeys(b); } catch (e) {//happens when one is a string literal and the other isn't return false; } // having the same number of owned properties (keys incorporates // hasOwnProperty) if (ka.length != kb.length) return false; //the same set of keys (although not necessarily the same order), ka.sort(); kb.sort(); //~~~cheap key test for (i = ka.length - 1; i >= 0; i--) { if (ka[i] != kb[i]) return false; } //equivalent values for every corresponding key, and //~~~possibly expensive deep test for (i = ka.length - 1; i >= 0; i--) { key = ka[i]; if (!deepEqual(a[key], b[key], opts)) return false; } return typeof a === typeof b; } /***/ }), /***/ "./node_modules/deep-equal/lib/is_arguments.js": /*!*****************************************************!*\ !*** ./node_modules/deep-equal/lib/is_arguments.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { var supportsArgumentsClass = (function(){ return Object.prototype.toString.call(arguments) })() == '[object Arguments]'; exports = module.exports = supportsArgumentsClass ? supported : unsupported; exports.supported = supported; function supported(object) { return Object.prototype.toString.call(object) == '[object Arguments]'; }; exports.unsupported = unsupported; function unsupported(object){ return object && typeof object == 'object' && typeof object.length == 'number' && Object.prototype.hasOwnProperty.call(object, 'callee') && !Object.prototype.propertyIsEnumerable.call(object, 'callee') || false; }; /***/ }), /***/ "./node_modules/deep-equal/lib/keys.js": /*!*********************************************!*\ !*** ./node_modules/deep-equal/lib/keys.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { exports = module.exports = typeof Object.keys === 'function' ? Object.keys : shim; exports.shim = shim; function shim (obj) { var keys = []; for (var key in obj) keys.push(key); return keys; } /***/ }), /***/ "./node_modules/dom-align/dist-web/index.js": /*!**************************************************!*\ !*** ./node_modules/dom-align/dist-web/index.js ***! \**************************************************/ /*! exports provided: default, alignElement, alignPoint */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alignElement", function() { return alignElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alignPoint", function() { return alignPoint; }); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } var vendorPrefix; var jsCssMap = { Webkit: '-webkit-', Moz: '-moz-', // IE did it wrong again ... ms: '-ms-', O: '-o-' }; function getVendorPrefix() { if (vendorPrefix !== undefined) { return vendorPrefix; } vendorPrefix = ''; var style = document.createElement('p').style; var testProp = 'Transform'; for (var key in jsCssMap) { if (key + testProp in style) { vendorPrefix = key; } } return vendorPrefix; } function getTransitionName() { return getVendorPrefix() ? "".concat(getVendorPrefix(), "TransitionProperty") : 'transitionProperty'; } function getTransformName() { return getVendorPrefix() ? "".concat(getVendorPrefix(), "Transform") : 'transform'; } function setTransitionProperty(node, value) { var name = getTransitionName(); if (name) { node.style[name] = value; if (name !== 'transitionProperty') { node.style.transitionProperty = value; } } } function setTransform(node, value) { var name = getTransformName(); if (name) { node.style[name] = value; if (name !== 'transform') { node.style.transform = value; } } } function getTransitionProperty(node) { return node.style.transitionProperty || node.style[getTransitionName()]; } function getTransformXY(node) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var matrix = transform.replace(/[^0-9\-.,]/g, '').split(','); return { x: parseFloat(matrix[12] || matrix[4], 0), y: parseFloat(matrix[13] || matrix[5], 0) }; } return { x: 0, y: 0 }; } var matrix2d = /matrix\((.*)\)/; var matrix3d = /matrix3d\((.*)\)/; function setTransformXY(node, xy) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var arr; var match2d = transform.match(matrix2d); if (match2d) { match2d = match2d[1]; arr = match2d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[4] = xy.x; arr[5] = xy.y; setTransform(node, "matrix(".concat(arr.join(','), ")")); } else { var match3d = transform.match(matrix3d)[1]; arr = match3d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[12] = xy.x; arr[13] = xy.y; setTransform(node, "matrix3d(".concat(arr.join(','), ")")); } } else { setTransform(node, "translateX(".concat(xy.x, "px) translateY(").concat(xy.y, "px) translateZ(0)")); } } var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; var getComputedStyleX; // https://stackoverflow.com/a/3485654/3040605 function forceRelayout(elem) { var originalStyle = elem.style.display; elem.style.display = 'none'; elem.offsetHeight; // eslint-disable-line elem.style.display = originalStyle; } function css(el, name, v) { var value = v; if (_typeof(name) === 'object') { for (var i in name) { if (name.hasOwnProperty(i)) { css(el, i, name[i]); } } return undefined; } if (typeof value !== 'undefined') { if (typeof value === 'number') { value = "".concat(value, "px"); } el.style[name] = value; return undefined; } return getComputedStyleX(el, name); } function getClientPosition(elem) { var box; var x; var y; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin x = box.left; y = box.top; // In IE, most of the time, 2 extra pixels are added to the top and left // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and // IE6 standards mode, this border can be overridden by setting the // document element's border to zero -- thus, we cannot rely on the // offset always being 2 pixels. // In quirks mode, the offset can be determined by querying the body's // clientLeft/clientTop, but in standards mode, it is found by querying // the document element's clientLeft/clientTop. Since we already called // getClientBoundingRect we have already forced a reflow, so it is not // too expensive just to query them all. // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 // 窗口边框标准是设 documentElement ,quirks 时设置 body // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 // 标准 ie 下 docElem.clientTop 就是 border-top // ie7 html 即窗口边框改变不了。永远为 2 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function getScroll(w, top) { var ret = w["page".concat(top ? 'Y' : 'X', "Offset")]; var method = "scroll".concat(top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getScrollLeft(w) { return getScroll(w); } function getScrollTop(w) { return getScroll(w, true); } function getOffset(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScrollLeft(w); pos.top += getScrollTop(w); return pos; } /** * A crude way of determining if an object is a window * @member util */ function isWindow(obj) { // must use == for ie8 /* eslint eqeqeq:0 */ return obj !== null && obj !== undefined && obj == obj.window; } function getDocument(node) { if (isWindow(node)) { return node.document; } if (node.nodeType === 9) { return node; } return node.ownerDocument; } function _getComputedStyle(elem, name, cs) { var computedStyle = cs; var val = ''; var d = getDocument(elem); computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61 if (computedStyle) { val = computedStyle.getPropertyValue(name) || computedStyle[name]; } return val; } var _RE_NUM_NO_PX = new RegExp("^(".concat(RE_NUM, ")(?!px)[a-z%]+$"), 'i'); var RE_POS = /^(top|right|bottom|left)$/; var CURRENT_STYLE = 'currentStyle'; var RUNTIME_STYLE = 'runtimeStyle'; var LEFT = 'left'; var PX = 'px'; function _getComputedStyleIE(elem, name) { // currentStyle maybe null // http://msdn.microsoft.com/en-us/library/ms535231.aspx var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 // 在 ie 下不对,需要直接用 offset 方式 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // exclude left right for relativity if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { // Remember the original values var style = elem.style; var left = style[LEFT]; var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; ret = style.pixelLeft + PX; // Revert the changed values style[LEFT] = left; elem[RUNTIME_STYLE][LEFT] = rsLeft; } return ret === '' ? 'auto' : ret; } if (typeof window !== 'undefined') { getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; } function getOffsetDirection(dir, option) { if (dir === 'left') { return option.useCssRight ? 'right' : dir; } return option.useCssBottom ? 'bottom' : dir; } function oppositeOffsetDirection(dir) { if (dir === 'left') { return 'right'; } else if (dir === 'right') { return 'left'; } else if (dir === 'top') { return 'bottom'; } else if (dir === 'bottom') { return 'top'; } } // 设置 elem 相对 elem.ownerDocument 的坐标 function setLeftTop(elem, offset, option) { // set position first, in-case top/left are set even on static elem if (css(elem, 'position') === 'static') { elem.style.position = 'relative'; } var presetH = -999; var presetV = -999; var horizontalProperty = getOffsetDirection('left', option); var verticalProperty = getOffsetDirection('top', option); var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty); var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty); if (horizontalProperty !== 'left') { presetH = 999; } if (verticalProperty !== 'top') { presetV = 999; } var originalTransition = ''; var originalOffset = getOffset(elem); if ('left' in offset || 'top' in offset) { originalTransition = getTransitionProperty(elem) || ''; setTransitionProperty(elem, 'none'); } if ('left' in offset) { elem.style[oppositeHorizontalProperty] = ''; elem.style[horizontalProperty] = "".concat(presetH, "px"); } if ('top' in offset) { elem.style[oppositeVerticalProperty] = ''; elem.style[verticalProperty] = "".concat(presetV, "px"); } // force relayout forceRelayout(elem); var old = getOffset(elem); var originalStyle = {}; for (var key in offset) { if (offset.hasOwnProperty(key)) { var dir = getOffsetDirection(key, option); var preset = key === 'left' ? presetH : presetV; var off = originalOffset[key] - old[key]; if (dir === key) { originalStyle[dir] = preset + off; } else { originalStyle[dir] = preset - off; } } } css(elem, originalStyle); // force relayout forceRelayout(elem); if ('left' in offset || 'top' in offset) { setTransitionProperty(elem, originalTransition); } var ret = {}; for (var _key in offset) { if (offset.hasOwnProperty(_key)) { var _dir = getOffsetDirection(_key, option); var _off = offset[_key] - originalOffset[_key]; if (_key === _dir) { ret[_dir] = originalStyle[_dir] + _off; } else { ret[_dir] = originalStyle[_dir] - _off; } } } css(elem, ret); } function setTransform$1(elem, offset) { var originalOffset = getOffset(elem); var originalXY = getTransformXY(elem); var resultXY = { x: originalXY.x, y: originalXY.y }; if ('left' in offset) { resultXY.x = originalXY.x + offset.left - originalOffset.left; } if ('top' in offset) { resultXY.y = originalXY.y + offset.top - originalOffset.top; } setTransformXY(elem, resultXY); } function setOffset(elem, offset, option) { if (option.ignoreShake) { var oriOffset = getOffset(elem); var oLeft = oriOffset.left.toFixed(0); var oTop = oriOffset.top.toFixed(0); var tLeft = offset.left.toFixed(0); var tTop = offset.top.toFixed(0); if (oLeft === tLeft && oTop === tTop) { return; } } if (option.useCssRight || option.useCssBottom) { setLeftTop(elem, offset, option); } else if (option.useCssTransform && getTransformName() in document.body.style) { setTransform$1(elem, offset); } else { setLeftTop(elem, offset, option); } } function each(arr, fn) { for (var i = 0; i < arr.length; i++) { fn(arr[i]); } } function isBorderBoxFn(elem) { return getComputedStyleX(elem, 'boxSizing') === 'border-box'; } var BOX_MODELS = ['margin', 'border', 'padding']; var CONTENT_INDEX = -1; var PADDING_INDEX = 2; var BORDER_INDEX = 1; var MARGIN_INDEX = 0; function swap(elem, options, callback) { var old = {}; var style = elem.style; var name; // Remember the old values, and insert the new ones for (name in options) { if (options.hasOwnProperty(name)) { old[name] = style[name]; style[name] = options[name]; } } callback.call(elem); // Revert the old values for (name in options) { if (options.hasOwnProperty(name)) { style[name] = old[name]; } } } function getPBMWidth(elem, props, which) { var value = 0; var prop; var j; var i; for (j = 0; j < props.length; j++) { prop = props[j]; if (prop) { for (i = 0; i < which.length; i++) { var cssProp = void 0; if (prop === 'border') { cssProp = "".concat(prop).concat(which[i], "Width"); } else { cssProp = prop + which[i]; } value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; } } } return value; } var domUtils = { getParent: function getParent(element) { var parent = element; do { if (parent.nodeType === 11 && parent.host) { parent = parent.host; } else { parent = parent.parentNode; } } while (parent && parent.nodeType !== 1 && parent.nodeType !== 9); return parent; } }; each(['Width', 'Height'], function (name) { domUtils["doc".concat(name)] = function (refWin) { var d = refWin.document; return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight // ie standard mode : documentElement.scrollHeight> body.scrollHeight d.documentElement["scroll".concat(name)], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? d.body["scroll".concat(name)], domUtils["viewport".concat(name)](d)); }; domUtils["viewport".concat(name)] = function (win) { // pc browser includes scrollbar in window.innerWidth var prop = "client".concat(name); var doc = win.document; var body = doc.body; var documentElement = doc.documentElement; var documentElementProp = documentElement[prop]; // 标准模式取 documentElement // backcompat 取 body return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; }; }); /* 得到元素的大小信息 @param elem @param name @param {String} [extra] 'padding' : (css width) + padding 'border' : (css width) + padding + border 'margin' : (css width) + padding + border + margin */ function getWH(elem, name, ex) { var extra = ex; if (isWindow(elem)) { return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); } else if (elem.nodeType === 9) { return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); } var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; var borderBoxValue = name === 'width' ? elem.getBoundingClientRect().width : elem.getBoundingClientRect().height; var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); var cssBoxValue = 0; if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) { borderBoxValue = undefined; // Fall back to computed then un computed css if necessary cssBoxValue = getComputedStyleX(elem, name); if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) { cssBoxValue = elem.style[name] || 0; } // Normalize '', auto, and prepare for extra cssBoxValue = parseFloat(cssBoxValue) || 0; } if (extra === undefined) { extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; } var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; var val = borderBoxValue || cssBoxValue; if (extra === CONTENT_INDEX) { if (borderBoxValueOrIsBorderBox) { return val - getPBMWidth(elem, ['border', 'padding'], which); } return cssBoxValue; } else if (borderBoxValueOrIsBorderBox) { if (extra === BORDER_INDEX) { return val; } return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which) : getPBMWidth(elem, ['margin'], which)); } return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which); } var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; // fix #119 : https://github.com/kissyteam/kissy/issues/119 function getWHIgnoreDisplay() { for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) { args[_key2] = arguments[_key2]; } var val; var elem = args[0]; // in case elem is window // elem.offsetWidth === undefined if (elem.offsetWidth !== 0) { val = getWH.apply(undefined, args); } else { swap(elem, cssShow, function () { val = getWH.apply(undefined, args); }); } return val; } each(['width', 'height'], function (name) { var first = name.charAt(0).toUpperCase() + name.slice(1); domUtils["outer".concat(first)] = function (el, includeMargin) { return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); }; var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; domUtils[name] = function (elem, v) { var val = v; if (val !== undefined) { if (elem) { var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); if (isBorderBox) { val += getPBMWidth(elem, ['padding', 'border'], which); } return css(elem, name, val); } return undefined; } return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); }; }); function mix(to, from) { for (var i in from) { if (from.hasOwnProperty(i)) { to[i] = from[i]; } } return to; } var utils = { getWindow: function getWindow(node) { if (node && node.document && node.setTimeout) { return node; } var doc = node.ownerDocument || node; return doc.defaultView || doc.parentWindow; }, getDocument: getDocument, offset: function offset(el, value, option) { if (typeof value !== 'undefined') { setOffset(el, value, option || {}); } else { return getOffset(el); } }, isWindow: isWindow, each: each, css: css, clone: function clone(obj) { var i; var ret = {}; for (i in obj) { if (obj.hasOwnProperty(i)) { ret[i] = obj[i]; } } var overflow = obj.overflow; if (overflow) { for (i in obj) { if (obj.hasOwnProperty(i)) { ret.overflow[i] = obj.overflow[i]; } } } return ret; }, mix: mix, getWindowScrollLeft: function getWindowScrollLeft(w) { return getScrollLeft(w); }, getWindowScrollTop: function getWindowScrollTop(w) { return getScrollTop(w); }, merge: function merge() { var ret = {}; for (var i = 0; i < arguments.length; i++) { utils.mix(ret, i < 0 || arguments.length <= i ? undefined : arguments[i]); } return ret; }, viewportWidth: 0, viewportHeight: 0 }; mix(utils, domUtils); /** * 得到会导致元素显示不全的祖先元素 */ var getParent = utils.getParent; function getOffsetParent(element) { if (utils.isWindow(element) || element.nodeType === 9) { return null; } // ie 这个也不是完全可行 /*
元素 6 高 100px 宽 50px
*/ // element.offsetParent does the right thing in ie7 and below. Return parent with layout! // In other browsers it only includes elements with position absolute, relative or // fixed, not elements with overflow set to auto or scroll. // if (UA.ie && ieMode < 8) { // return element.offsetParent; // } // 统一的 offsetParent 方法 var doc = utils.getDocument(element); var body = doc.body; var parent; var positionStyle = utils.css(element, 'position'); var skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute'; if (!skipStatic) { return element.nodeName.toLowerCase() === 'html' ? null : getParent(element); } for (parent = getParent(element); parent && parent !== body && parent.nodeType !== 9; parent = getParent(parent)) { positionStyle = utils.css(parent, 'position'); if (positionStyle !== 'static') { return parent; } } return null; } var getParent$1 = utils.getParent; function isAncestorFixed(element) { if (utils.isWindow(element) || element.nodeType === 9) { return false; } var doc = utils.getDocument(element); var body = doc.body; var parent = null; for (parent = getParent$1(element); parent && parent !== body; parent = getParent$1(parent)) { var positionStyle = utils.css(parent, 'position'); if (positionStyle === 'fixed') { return true; } } return false; } /** * 获得元素的显示部分的区域 */ function getVisibleRectForElement(element) { var visibleRect = { left: 0, right: Infinity, top: 0, bottom: Infinity }; var el = getOffsetParent(element); var doc = utils.getDocument(element); var win = doc.defaultView || doc.parentWindow; var body = doc.body; var documentElement = doc.documentElement; // Determine the size of the visible rect by climbing the dom accounting for // all scrollable containers. while (el) { // clientWidth is zero for inline block elements in ie. if ((navigator.userAgent.indexOf('MSIE') === -1 || el.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire // viewport. In some browsers, el.offsetParent may be // document.documentElement, so check for that too. el !== body && el !== documentElement && utils.css(el, 'overflow') !== 'visible') { var pos = utils.offset(el); // add border pos.left += el.clientLeft; pos.top += el.clientTop; visibleRect.top = Math.max(visibleRect.top, pos.top); visibleRect.right = Math.min(visibleRect.right, // consider area without scrollBar pos.left + el.clientWidth); visibleRect.bottom = Math.min(visibleRect.bottom, pos.top + el.clientHeight); visibleRect.left = Math.max(visibleRect.left, pos.left); } else if (el === body || el === documentElement) { break; } el = getOffsetParent(el); } // Set element position to fixed // make sure absolute element itself don't affect it's visible area // https://github.com/ant-design/ant-design/issues/7601 var originalPosition = null; if (!utils.isWindow(element) && element.nodeType !== 9) { originalPosition = element.style.position; var position = utils.css(element, 'position'); if (position === 'absolute') { element.style.position = 'fixed'; } } var scrollX = utils.getWindowScrollLeft(win); var scrollY = utils.getWindowScrollTop(win); var viewportWidth = utils.viewportWidth(win); var viewportHeight = utils.viewportHeight(win); var documentWidth = documentElement.scrollWidth; var documentHeight = documentElement.scrollHeight; // scrollXXX on html is sync with body which means overflow: hidden on body gets wrong scrollXXX. // We should cut this ourself. var bodyStyle = window.getComputedStyle(body); if (bodyStyle.overflowX === 'hidden') { documentWidth = win.innerWidth; } if (bodyStyle.overflowY === 'hidden') { documentHeight = win.innerHeight; } // Reset element position after calculate the visible area if (element.style) { element.style.position = originalPosition; } if (isAncestorFixed(element)) { // Clip by viewport's size. visibleRect.left = Math.max(visibleRect.left, scrollX); visibleRect.top = Math.max(visibleRect.top, scrollY); visibleRect.right = Math.min(visibleRect.right, scrollX + viewportWidth); visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + viewportHeight); } else { // Clip by document's size. var maxVisibleWidth = Math.max(documentWidth, scrollX + viewportWidth); visibleRect.right = Math.min(visibleRect.right, maxVisibleWidth); var maxVisibleHeight = Math.max(documentHeight, scrollY + viewportHeight); visibleRect.bottom = Math.min(visibleRect.bottom, maxVisibleHeight); } return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null; } function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) { var pos = utils.clone(elFuturePos); var size = { width: elRegion.width, height: elRegion.height }; if (overflow.adjustX && pos.left < visibleRect.left) { pos.left = visibleRect.left; } // Left edge inside and right edge outside viewport, try to resize it. if (overflow.resizeWidth && pos.left >= visibleRect.left && pos.left + size.width > visibleRect.right) { size.width -= pos.left + size.width - visibleRect.right; } // Right edge outside viewport, try to move it. if (overflow.adjustX && pos.left + size.width > visibleRect.right) { // 保证左边界和可视区域左边界对齐 pos.left = Math.max(visibleRect.right - size.width, visibleRect.left); } // Top edge outside viewport, try to move it. if (overflow.adjustY && pos.top < visibleRect.top) { pos.top = visibleRect.top; } // Top edge inside and bottom edge outside viewport, try to resize it. if (overflow.resizeHeight && pos.top >= visibleRect.top && pos.top + size.height > visibleRect.bottom) { size.height -= pos.top + size.height - visibleRect.bottom; } // Bottom edge outside viewport, try to move it. if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) { // 保证上边界和可视区域上边界对齐 pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top); } return utils.mix(pos, size); } function getRegion(node) { var offset; var w; var h; if (!utils.isWindow(node) && node.nodeType !== 9) { offset = utils.offset(node); w = utils.outerWidth(node); h = utils.outerHeight(node); } else { var win = utils.getWindow(node); offset = { left: utils.getWindowScrollLeft(win), top: utils.getWindowScrollTop(win) }; w = utils.viewportWidth(win); h = utils.viewportHeight(win); } offset.width = w; offset.height = h; return offset; } /** * 获取 node 上的 align 对齐点 相对于页面的坐标 */ function getAlignOffset(region, align) { var V = align.charAt(0); var H = align.charAt(1); var w = region.width; var h = region.height; var x = region.left; var y = region.top; if (V === 'c') { y += h / 2; } else if (V === 'b') { y += h; } if (H === 'c') { x += w / 2; } else if (H === 'r') { x += w; } return { left: x, top: y }; } function getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) { var p1 = getAlignOffset(refNodeRegion, points[1]); var p2 = getAlignOffset(elRegion, points[0]); var diff = [p2.left - p1.left, p2.top - p1.top]; return { left: Math.round(elRegion.left - diff[0] + offset[0] - targetOffset[0]), top: Math.round(elRegion.top - diff[1] + offset[1] - targetOffset[1]) }; } /** * align dom node flexibly * @author yiminghe@gmail.com */ function isFailX(elFuturePos, elRegion, visibleRect) { return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right; } function isFailY(elFuturePos, elRegion, visibleRect) { return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom; } function isCompleteFailX(elFuturePos, elRegion, visibleRect) { return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left; } function isCompleteFailY(elFuturePos, elRegion, visibleRect) { return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top; } function flip(points, reg, map) { var ret = []; utils.each(points, function (p) { ret.push(p.replace(reg, function (m) { return map[m]; })); }); return ret; } function flipOffset(offset, index) { offset[index] = -offset[index]; return offset; } function convertOffset(str, offsetLen) { var n; if (/%$/.test(str)) { n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen; } else { n = parseInt(str, 10); } return n || 0; } function normalizeOffset(offset, el) { offset[0] = convertOffset(offset[0], el.width); offset[1] = convertOffset(offset[1], el.height); } /** * @param el * @param tgtRegion 参照节点所占的区域: { left, top, width, height } * @param align */ function doAlign(el, tgtRegion, align, isTgtRegionVisible) { var points = align.points; var offset = align.offset || [0, 0]; var targetOffset = align.targetOffset || [0, 0]; var overflow = align.overflow; var source = align.source || el; offset = [].concat(offset); targetOffset = [].concat(targetOffset); overflow = overflow || {}; var newOverflowCfg = {}; var fail = 0; // 当前节点可以被放置的显示区域 var visibleRect = getVisibleRectForElement(source); // 当前节点所占的区域, left/top/width/height var elRegion = getRegion(source); // 将 offset 转换成数值,支持百分比 normalizeOffset(offset, elRegion); normalizeOffset(targetOffset, tgtRegion); // 当前节点将要被放置的位置 var elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset); // 当前节点将要所处的区域 var newElRegion = utils.merge(elRegion, elFuturePos); // 如果可视区域不能完全放置当前节点时允许调整 if (visibleRect && (overflow.adjustX || overflow.adjustY) && isTgtRegionVisible) { if (overflow.adjustX) { // 如果横向不能放下 if (isFailX(elFuturePos, elRegion, visibleRect)) { // 对齐位置反下 var newPoints = flip(points, /[lr]/gi, { l: 'r', r: 'l' }); // 偏移量也反下 var newOffset = flipOffset(offset, 0); var newTargetOffset = flipOffset(targetOffset, 0); var newElFuturePos = getElFuturePos(elRegion, tgtRegion, newPoints, newOffset, newTargetOffset); if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) { fail = 1; points = newPoints; offset = newOffset; targetOffset = newTargetOffset; } } } if (overflow.adjustY) { // 如果纵向不能放下 if (isFailY(elFuturePos, elRegion, visibleRect)) { // 对齐位置反下 var _newPoints = flip(points, /[tb]/gi, { t: 'b', b: 't' }); // 偏移量也反下 var _newOffset = flipOffset(offset, 1); var _newTargetOffset = flipOffset(targetOffset, 1); var _newElFuturePos = getElFuturePos(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset); if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) { fail = 1; points = _newPoints; offset = _newOffset; targetOffset = _newTargetOffset; } } } // 如果失败,重新计算当前节点将要被放置的位置 if (fail) { elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset); utils.mix(newElRegion, elFuturePos); } var isStillFailX = isFailX(elFuturePos, elRegion, visibleRect); var isStillFailY = isFailY(elFuturePos, elRegion, visibleRect); // 检查反下后的位置是否可以放下了,如果仍然放不下: // 1. 复原修改过的定位参数 if (isStillFailX || isStillFailY) { points = align.points; offset = align.offset || [0, 0]; targetOffset = align.targetOffset || [0, 0]; } // 2. 只有指定了可以调整当前方向才调整 newOverflowCfg.adjustX = overflow.adjustX && isStillFailX; newOverflowCfg.adjustY = overflow.adjustY && isStillFailY; // 确实要调整,甚至可能会调整高度宽度 if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) { newElRegion = adjustForViewport(elFuturePos, elRegion, visibleRect, newOverflowCfg); } } // need judge to in case set fixed with in css on height auto element if (newElRegion.width !== elRegion.width) { utils.css(source, 'width', utils.width(source) + newElRegion.width - elRegion.width); } if (newElRegion.height !== elRegion.height) { utils.css(source, 'height', utils.height(source) + newElRegion.height - elRegion.height); } // https://github.com/kissyteam/kissy/issues/190 // 相对于屏幕位置没变,而 left/top 变了 // 例如
utils.offset(source, { left: newElRegion.left, top: newElRegion.top }, { useCssRight: align.useCssRight, useCssBottom: align.useCssBottom, useCssTransform: align.useCssTransform, ignoreShake: align.ignoreShake }); return { points: points, offset: offset, targetOffset: targetOffset, overflow: newOverflowCfg }; } /** * 2012-04-26 yiminghe@gmail.com * - 优化智能对齐算法 * - 慎用 resizeXX * * 2011-07-13 yiminghe@gmail.com note: * - 增加智能对齐,以及大小调整选项 **/ function isOutOfVisibleRect(target) { var visibleRect = getVisibleRectForElement(target); var targetRegion = getRegion(target); return !visibleRect || targetRegion.left + targetRegion.width <= visibleRect.left || targetRegion.top + targetRegion.height <= visibleRect.top || targetRegion.left >= visibleRect.right || targetRegion.top >= visibleRect.bottom; } function alignElement(el, refNode, align) { var target = align.target || refNode; var refNodeRegion = getRegion(target); var isTargetNotOutOfVisible = !isOutOfVisibleRect(target); return doAlign(el, refNodeRegion, align, isTargetNotOutOfVisible); } alignElement.__getOffsetParent = getOffsetParent; alignElement.__getVisibleRectForElement = getVisibleRectForElement; /** * `tgtPoint`: { pageX, pageY } or { clientX, clientY }. * If client position provided, will internal convert to page position. */ function alignPoint(el, tgtPoint, align) { var pageX; var pageY; var doc = utils.getDocument(el); var win = doc.defaultView || doc.parentWindow; var scrollX = utils.getWindowScrollLeft(win); var scrollY = utils.getWindowScrollTop(win); var viewportWidth = utils.viewportWidth(win); var viewportHeight = utils.viewportHeight(win); if ('pageX' in tgtPoint) { pageX = tgtPoint.pageX; } else { pageX = scrollX + tgtPoint.clientX; } if ('pageY' in tgtPoint) { pageY = tgtPoint.pageY; } else { pageY = scrollY + tgtPoint.clientY; } var tgtRegion = { left: pageX, top: pageY, width: 0, height: 0 }; var pointInView = pageX >= 0 && pageX <= scrollX + viewportWidth && pageY >= 0 && pageY <= scrollY + viewportHeight; // Provide default target point var points = [align.points[0], 'cc']; return doAlign(el, tgtRegion, _objectSpread2({}, align, { points: points }), pointInView); } /* harmony default export */ __webpack_exports__["default"] = (alignElement); //# sourceMappingURL=index.js.map /***/ }), /***/ "./node_modules/is-arrayish/index.js": /*!*******************************************!*\ !*** ./node_modules/is-arrayish/index.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function isArrayish(obj) { if (!obj || typeof obj === 'string') { return false; } return obj instanceof Array || Array.isArray(obj) || (obj.length >= 0 && (obj.splice instanceof Function || (Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String'))); }; /***/ }), /***/ "./node_modules/is-what/dist/index.esm.js": /*!************************************************!*\ !*** ./node_modules/is-what/dist/index.esm.js ***! \************************************************/ /*! exports provided: getType, isUndefined, isNull, isPlainObject, isObject, isAnyObject, isObjectLike, isFunction, isArray, isString, isFullString, isEmptyString, isNumber, isBoolean, isRegExp, isDate, isSymbol, isPrimitive, isType */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getType", function() { return getType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUndefined", function() { return isUndefined; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNull", function() { return isNull; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlainObject", function() { return isPlainObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isAnyObject", function() { return isAnyObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObjectLike", function() { return isObjectLike; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isString", function() { return isString; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFullString", function() { return isFullString; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmptyString", function() { return isEmptyString; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumber", function() { return isNumber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBoolean", function() { return isBoolean; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRegExp", function() { return isRegExp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSymbol", function() { return isSymbol; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPrimitive", function() { return isPrimitive; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isType", function() { return isType; }); /** * Returns the object type of the given payload * * @param {*} payload * @returns {string} */ function getType(payload) { return Object.prototype.toString.call(payload).slice(8, -1); } /** * Returns whether the payload is undefined * * @param {*} payload * @returns {payload is undefined} */ function isUndefined(payload) { return getType(payload) === 'Undefined'; } /** * Returns whether the payload is null * * @param {*} payload * @returns {payload is null} */ function isNull(payload) { return getType(payload) === 'Null'; } /** * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes) * * @param {*} payload * @returns {payload is {[key: string]: any}} */ function isPlainObject(payload) { if (getType(payload) !== 'Object') return false; return (payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype); } /** * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes) * * @param {*} payload * @returns {payload is {[key: string]: any}} */ function isObject(payload) { return isPlainObject(payload); } /** * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes) * * @param {*} payload * @returns {payload is {[key: string]: any}} */ function isAnyObject(payload) { return getType(payload) === 'Object'; } /** * Returns whether the payload is an object like a type passed in < > * * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop. * * @template T this must be passed in < > * @param {*} payload * @returns {payload is T} */ function isObjectLike(payload) { return isAnyObject(payload); } /** * Returns whether the payload is a function * * @param {*} payload * @returns {payload is Function} */ function isFunction(payload) { return getType(payload) === 'Function'; } /** * Returns whether the payload is an array * * @param {*} payload * @returns {payload is undefined} */ function isArray(payload) { return getType(payload) === 'Array'; } /** * Returns whether the payload is a string * * @param {*} payload * @returns {payload is string} */ function isString(payload) { return getType(payload) === 'String'; } /** * Returns whether the payload is a string, BUT returns false for '' * * @param {*} payload * @returns {payload is string} */ function isFullString(payload) { return isString(payload) && payload !== ''; } /** * Returns whether the payload is '' * * @param {*} payload * @returns {payload is string} */ function isEmptyString(payload) { return payload === ''; } /** * Returns whether the payload is a number * * This will return false for NaN * * @param {*} payload * @returns {payload is number} */ function isNumber(payload) { return (getType(payload) === 'Number' && !isNaN(payload)); } /** * Returns whether the payload is a boolean * * @param {*} payload * @returns {payload is boolean} */ function isBoolean(payload) { return getType(payload) === 'Boolean'; } /** * Returns whether the payload is a regular expression * * @param {*} payload * @returns {payload is RegExp} */ function isRegExp(payload) { return getType(payload) === 'RegExp'; } /** * Returns whether the payload is a date, and that the date is Valid * * @param {*} payload * @returns {payload is Date} */ function isDate(payload) { return (getType(payload) === 'Date' && !isNaN(payload)); } /** * Returns whether the payload is a Symbol * * @param {*} payload * @returns {payload is symbol} */ function isSymbol(payload) { return (getType(payload) === 'Symbol'); } /** * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol) * * @param {*} payload * @returns {(payload is boolean | null | undefined | number | string | symbol)} */ function isPrimitive(payload) { return (isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload)); } /** * Does a generic check to check that the given payload is of a given type. * In cases like Number, it will return true for NaN as NaN is a Number (thanks javascript!); * It will, however, differentiate between object and null * * @template T * @param {*} payload * @param {T} type * @throws {TypeError} Will throw type error if type is an invalid type * @returns {payload is T} */ function isType(payload, type) { if (!(type instanceof Function)) { throw new TypeError('Type must be a function'); } if (!type.hasOwnProperty('prototype')) { throw new TypeError('Type is not a class'); } // Classes usually have names (as functions usually have names) var name = type.name; return (getType(payload) === name) || Boolean(payload && (payload.constructor === type)); } /***/ }), /***/ "./node_modules/memoize-one/dist/memoize-one.esm.js": /*!**********************************************************!*\ !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function areInputsEqual(newInputs, lastInputs) { if (newInputs.length !== lastInputs.length) { return false; } for (var i = 0; i < newInputs.length; i++) { if (newInputs[i] !== lastInputs[i]) { return false; } } return true; } function memoizeOne(resultFn, isEqual) { if (isEqual === void 0) { isEqual = areInputsEqual; } var lastThis; var lastArgs = []; var lastResult; var calledOnce = false; function memoized() { var newArgs = []; for (var _i = 0; _i < arguments.length; _i++) { newArgs[_i] = arguments[_i]; } if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) { return lastResult; } lastResult = resultFn.apply(this, newArgs); calledOnce = true; lastThis = this; lastArgs = newArgs; return lastResult; } return memoized; } /* harmony default export */ __webpack_exports__["default"] = (memoizeOne); /***/ }), /***/ "./node_modules/merge-anything/dist/index.esm.js": /*!*******************************************************!*\ !*** ./node_modules/merge-anything/dist/index.esm.js ***! \*******************************************************/ /*! exports provided: default, merge, concatArrays */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatArrays", function() { return concatArrays; }); /* harmony import */ var is_what__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-what */ "./node_modules/is-what/dist/index.esm.js"); function assignProp(carry, key, newVal, originalObject) { var propType = originalObject.propertyIsEnumerable(key) ? 'enumerable' : 'nonenumerable'; if (propType === 'enumerable') carry[key] = newVal; if (propType === 'nonenumerable') { Object.defineProperty(carry, key, { value: newVal, enumerable: false, writable: true, configurable: true }); } } function mergeRecursively(origin, newComer, extensions) { // work directly on newComer if its not an object if (!Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isPlainObject"])(newComer)) { // extend merge rules if (extensions && Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isArray"])(extensions)) { extensions.forEach(function (extend) { newComer = extend(origin, newComer); }); } return newComer; } // define newObject to merge all values upon var newObject = {}; if (Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isPlainObject"])(origin)) { var props_1 = Object.getOwnPropertyNames(origin); var symbols_1 = Object.getOwnPropertySymbols(origin); newObject = props_1.concat(symbols_1).reduce(function (carry, key) { // @ts-ignore var targetVal = origin[key]; if ((!Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isSymbol"])(key) && !Object.getOwnPropertyNames(newComer).includes(key)) || (Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isSymbol"])(key) && !Object.getOwnPropertySymbols(newComer).includes(key))) { assignProp(carry, key, targetVal, origin); } return carry; }, {}); } var props = Object.getOwnPropertyNames(newComer); var symbols = Object.getOwnPropertySymbols(newComer); var result = props.concat(symbols).reduce(function (carry, key) { // re-define the origin and newComer as targetVal and newVal var newVal = newComer[key]; var targetVal = (Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isPlainObject"])(origin)) // @ts-ignore ? origin[key] : undefined; // extend merge rules if (extensions && Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isArray"])(extensions)) { extensions.forEach(function (extend) { newVal = extend(targetVal, newVal); }); } // When newVal is an object do the merge recursively if (targetVal !== undefined && Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isPlainObject"])(newVal)) { newVal = mergeRecursively(targetVal, newVal, extensions); } assignProp(carry, key, newVal, newComer); return carry; }, newObject); return result; } /** * Merge anything recursively. * Objects get merged, special objects (classes etc.) are re-assigned "as is". * Basic types overwrite objects or other basic types. * * @param {(IConfig | any)} origin * @param {...any[]} newComers * @returns the result */ function merge(origin) { var newComers = []; for (var _i = 1; _i < arguments.length; _i++) { newComers[_i - 1] = arguments[_i]; } var extensions = null; var base = origin; if (Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isPlainObject"])(origin) && origin.extensions && Object.keys(origin).length === 1) { base = {}; extensions = origin.extensions; } return newComers.reduce(function (result, newComer) { return mergeRecursively(result, newComer, extensions); }, base); } function concatArrays(originVal, newVal) { if (Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isArray"])(originVal) && Object(is_what__WEBPACK_IMPORTED_MODULE_0__["isArray"])(newVal)) { // concat logic return originVal.concat(newVal); } return newVal; // always return newVal as fallback!! } /* harmony default export */ __webpack_exports__["default"] = (merge); /***/ }), /***/ "./node_modules/nipplejs/dist/nipplejs.js": /*!************************************************!*\ !*** ./node_modules/nipplejs/dist/nipplejs.js ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { (function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports; 'use strict'; // Constants var isTouch = !!('ontouchstart' in window); var isPointer = window.PointerEvent ? true : false; var isMSPointer = window.MSPointerEvent ? true : false; var events = { touch: { start: 'touchstart', move: 'touchmove', end: 'touchend, touchcancel' }, mouse: { start: 'mousedown', move: 'mousemove', end: 'mouseup' }, pointer: { start: 'pointerdown', move: 'pointermove', end: 'pointerup, pointercancel' }, MSPointer: { start: 'MSPointerDown', move: 'MSPointerMove', end: 'MSPointerUp' } }; var toBind; var secondBind = {}; if (isPointer) { toBind = events.pointer; } else if (isMSPointer) { toBind = events.MSPointer; } else if (isTouch) { toBind = events.touch; secondBind = events.mouse; } else { toBind = events.mouse; } /////////////////////// /// UTILS /// /////////////////////// var u = {}; u.distance = function (p1, p2) { var dx = p2.x - p1.x; var dy = p2.y - p1.y; return Math.sqrt((dx * dx) + (dy * dy)); }; u.angle = function(p1, p2) { var dx = p2.x - p1.x; var dy = p2.y - p1.y; return u.degrees(Math.atan2(dy, dx)); }; u.findCoord = function(p, d, a) { var b = {x: 0, y: 0}; a = u.radians(a); b.x = p.x - d * Math.cos(a); b.y = p.y - d * Math.sin(a); return b; }; u.radians = function(a) { return a * (Math.PI / 180); }; u.degrees = function(a) { return a * (180 / Math.PI); }; u.bindEvt = function (el, arg, handler) { var types = arg.split(/[ ,]+/g); var type; for (var i = 0; i < types.length; i += 1) { type = types[i]; if (el.addEventListener) { el.addEventListener(type, handler, false); } else if (el.attachEvent) { el.attachEvent(type, handler); } } }; u.unbindEvt = function (el, arg, handler) { var types = arg.split(/[ ,]+/g); var type; for (var i = 0; i < types.length; i += 1) { type = types[i]; if (el.removeEventListener) { el.removeEventListener(type, handler); } else if (el.detachEvent) { el.detachEvent(type, handler); } } }; u.trigger = function (el, type, data) { var evt = new CustomEvent(type, data); el.dispatchEvent(evt); }; u.prepareEvent = function (evt) { evt.preventDefault(); return evt.type.match(/^touch/) ? evt.changedTouches : evt; }; u.getScroll = function () { var x = (window.pageXOffset !== undefined) ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body) .scrollLeft; var y = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body) .scrollTop; return { x: x, y: y }; }; u.applyPosition = function (el, pos) { if (pos.top || pos.right || pos.bottom || pos.left) { el.style.top = pos.top; el.style.right = pos.right; el.style.bottom = pos.bottom; el.style.left = pos.left; } else { el.style.left = pos.x + 'px'; el.style.top = pos.y + 'px'; } }; u.getTransitionStyle = function (property, values, time) { var obj = u.configStylePropertyObject(property); for (var i in obj) { if (obj.hasOwnProperty(i)) { if (typeof values === 'string') { obj[i] = values + ' ' + time; } else { var st = ''; for (var j = 0, max = values.length; j < max; j += 1) { st += values[j] + ' ' + time + ', '; } obj[i] = st.slice(0, -2); } } } return obj; }; u.getVendorStyle = function (property, value) { var obj = u.configStylePropertyObject(property); for (var i in obj) { if (obj.hasOwnProperty(i)) { obj[i] = value; } } return obj; }; u.configStylePropertyObject = function (prop) { var obj = {}; obj[prop] = ''; var vendors = ['webkit', 'Moz', 'o']; vendors.forEach(function (vendor) { obj[vendor + prop.charAt(0).toUpperCase() + prop.slice(1)] = ''; }); return obj; }; u.extend = function (objA, objB) { for (var i in objB) { if (objB.hasOwnProperty(i)) { objA[i] = objB[i]; } } return objA; }; // Overwrite only what's already present u.safeExtend = function (objA, objB) { var obj = {}; for (var i in objA) { if (objA.hasOwnProperty(i) && objB.hasOwnProperty(i)) { obj[i] = objB[i]; } else if (objA.hasOwnProperty(i)) { obj[i] = objA[i]; } } return obj; }; // Map for array or unique item. u.map = function (ar, fn) { if (ar.length) { for (var i = 0, max = ar.length; i < max; i += 1) { fn(ar[i]); } } else { fn(ar); } }; /////////////////////// /// SUPER CLASS /// /////////////////////// function Super () {}; // Basic event system. Super.prototype.on = function (arg, cb) { var self = this; var types = arg.split(/[ ,]+/g); var type; self._handlers_ = self._handlers_ || {}; for (var i = 0; i < types.length; i += 1) { type = types[i]; self._handlers_[type] = self._handlers_[type] || []; self._handlers_[type].push(cb); } return self; }; Super.prototype.off = function (type, cb) { var self = this; self._handlers_ = self._handlers_ || {}; if (type === undefined) { self._handlers_ = {}; } else if (cb === undefined) { self._handlers_[type] = null; } else if (self._handlers_[type] && self._handlers_[type].indexOf(cb) >= 0) { self._handlers_[type].splice(self._handlers_[type].indexOf(cb), 1); } return self; }; Super.prototype.trigger = function (arg, data) { var self = this; var types = arg.split(/[ ,]+/g); var type; self._handlers_ = self._handlers_ || {}; for (var i = 0; i < types.length; i += 1) { type = types[i]; if (self._handlers_[type] && self._handlers_[type].length) { self._handlers_[type].forEach(function (handler) { handler.call(self, { type: type, target: self }, data); }); } } }; // Configuration Super.prototype.config = function (options) { var self = this; self.options = self.defaults || {}; if (options) { self.options = u.safeExtend(self.options, options); } }; // Bind internal events. Super.prototype.bindEvt = function (el, type) { var self = this; self._domHandlers_ = self._domHandlers_ || {}; self._domHandlers_[type] = function () { if (typeof self['on' + type] === 'function') { self['on' + type].apply(self, arguments); } else { console.warn('[WARNING] : Missing "on' + type + '" handler.'); } }; u.bindEvt(el, toBind[type], self._domHandlers_[type]); if (secondBind[type]) { // Support for both touch and mouse at the same time. u.bindEvt(el, secondBind[type], self._domHandlers_[type]); } return self; }; // Unbind dom events. Super.prototype.unbindEvt = function (el, type) { var self = this; self._domHandlers_ = self._domHandlers_ || {}; u.unbindEvt(el, toBind[type], self._domHandlers_[type]); if (secondBind[type]) { // Support for both touch and mouse at the same time. u.unbindEvt(el, secondBind[type], self._domHandlers_[type]); } delete self._domHandlers_[type]; return this; }; /////////////////////// /// THE NIPPLE /// /////////////////////// function Nipple (collection, options) { this.identifier = options.identifier; this.position = options.position; this.frontPosition = options.frontPosition; this.collection = collection; // Defaults this.defaults = { size: 100, threshold: 0.1, color: 'white', fadeTime: 250, dataOnly: false, restJoystick: true, restOpacity: 0.5, mode: 'dynamic', zone: document.body, lockX: false, lockY: false }; this.config(options); // Overwrites if (this.options.mode === 'dynamic') { this.options.restOpacity = 0; } this.id = Nipple.id; Nipple.id += 1; this.buildEl() .stylize(); // Nipple's API. this.instance = { el: this.ui.el, on: this.on.bind(this), off: this.off.bind(this), show: this.show.bind(this), hide: this.hide.bind(this), add: this.addToDom.bind(this), remove: this.removeFromDom.bind(this), destroy: this.destroy.bind(this), resetDirection: this.resetDirection.bind(this), computeDirection: this.computeDirection.bind(this), trigger: this.trigger.bind(this), position: this.position, frontPosition: this.frontPosition, ui: this.ui, identifier: this.identifier, id: this.id, options: this.options }; return this.instance; }; Nipple.prototype = new Super(); Nipple.constructor = Nipple; Nipple.id = 0; // Build the dom element of the Nipple instance. Nipple.prototype.buildEl = function (options) { this.ui = {}; if (this.options.dataOnly) { return this; } this.ui.el = document.createElement('div'); this.ui.back = document.createElement('div'); this.ui.front = document.createElement('div'); this.ui.el.className = 'nipple collection_' + this.collection.id; this.ui.back.className = 'back'; this.ui.front.className = 'front'; this.ui.el.setAttribute('id', 'nipple_' + this.collection.id + '_' + this.id); this.ui.el.appendChild(this.ui.back); this.ui.el.appendChild(this.ui.front); return this; }; // Apply CSS to the Nipple instance. Nipple.prototype.stylize = function () { if (this.options.dataOnly) { return this; } var animTime = this.options.fadeTime + 'ms'; var borderStyle = u.getVendorStyle('borderRadius', '50%'); var transitStyle = u.getTransitionStyle('transition', 'opacity', animTime); var styles = {}; styles.el = { position: 'absolute', opacity: this.options.restOpacity, display: 'block', 'zIndex': 999 }; styles.back = { position: 'absolute', display: 'block', width: this.options.size + 'px', height: this.options.size + 'px', marginLeft: -this.options.size / 2 + 'px', marginTop: -this.options.size / 2 + 'px', background: this.options.color, 'opacity': '.5' }; styles.front = { width: this.options.size / 2 + 'px', height: this.options.size / 2 + 'px', position: 'absolute', display: 'block', marginLeft: -this.options.size / 4 + 'px', marginTop: -this.options.size / 4 + 'px', background: this.options.color, 'opacity': '.5' }; u.extend(styles.el, transitStyle); u.extend(styles.back, borderStyle); u.extend(styles.front, borderStyle); this.applyStyles(styles); return this; }; Nipple.prototype.applyStyles = function (styles) { // Apply styles for (var i in this.ui) { if (this.ui.hasOwnProperty(i)) { for (var j in styles[i]) { this.ui[i].style[j] = styles[i][j]; } } } return this; }; // Inject the Nipple instance into DOM. Nipple.prototype.addToDom = function () { // We're not adding it if we're dataOnly or already in dom. if (this.options.dataOnly || document.body.contains(this.ui.el)) { return this; } this.options.zone.appendChild(this.ui.el); return this; }; // Remove the Nipple instance from DOM. Nipple.prototype.removeFromDom = function () { if (this.options.dataOnly || !document.body.contains(this.ui.el)) { return this; } this.options.zone.removeChild(this.ui.el); return this; }; // Entirely destroy this nipple Nipple.prototype.destroy = function () { clearTimeout(this.removeTimeout); clearTimeout(this.showTimeout); clearTimeout(this.restTimeout); this.trigger('destroyed', this.instance); this.removeFromDom(); this.off(); }; // Fade in the Nipple instance. Nipple.prototype.show = function (cb) { var self = this; if (self.options.dataOnly) { return self; } clearTimeout(self.removeTimeout); clearTimeout(self.showTimeout); clearTimeout(self.restTimeout); self.addToDom(); self.restCallback(); setTimeout(function () { self.ui.el.style.opacity = 1; }, 0); self.showTimeout = setTimeout(function () { self.trigger('shown', self.instance); if (typeof cb === 'function') { cb.call(this); } }, self.options.fadeTime); return self; }; // Fade out the Nipple instance. Nipple.prototype.hide = function (cb) { var self = this; if (self.options.dataOnly) { return self; } self.ui.el.style.opacity = self.options.restOpacity; clearTimeout(self.removeTimeout); clearTimeout(self.showTimeout); clearTimeout(self.restTimeout); self.removeTimeout = setTimeout( function () { var display = self.options.mode === 'dynamic' ? 'none' : 'block'; self.ui.el.style.display = display; if (typeof cb === 'function') { cb.call(self); } self.trigger('hidden', self.instance); }, self.options.fadeTime ); if (self.options.restJoystick) { self.restPosition(); } return self; }; Nipple.prototype.restPosition = function (cb) { var self = this; self.frontPosition = { x: 0, y: 0 }; var animTime = self.options.fadeTime + 'ms'; var transitStyle = {}; transitStyle.front = u.getTransitionStyle('transition', ['top', 'left'], animTime); var styles = {front: {}}; styles.front = { left: self.frontPosition.x + 'px', top: self.frontPosition.y + 'px' }; self.applyStyles(transitStyle); self.applyStyles(styles); self.restTimeout = setTimeout( function () { if (typeof cb === 'function') { cb.call(self); } self.restCallback(); }, self.options.fadeTime ); }; Nipple.prototype.restCallback = function () { var self = this; var transitStyle = {}; transitStyle.front = u.getTransitionStyle('transition', 'none', ''); self.applyStyles(transitStyle); self.trigger('rested', self.instance); }; Nipple.prototype.resetDirection = function () { // Fully rebuild the object to let the iteration possible. this.direction = { x: false, y: false, angle: false }; }; Nipple.prototype.computeDirection = function (obj) { var rAngle = obj.angle.radian; var angle45 = Math.PI / 4; var angle90 = Math.PI / 2; var direction, directionX, directionY; // Angular direction // \ UP / // \ / // LEFT RIGHT // / \ // /DOWN \ // if ( rAngle > angle45 && rAngle < (angle45 * 3) && !obj.lockX ) { direction = 'up'; } else if ( rAngle > -angle45 && rAngle <= angle45 && !obj.lockY ) { direction = 'left'; } else if ( rAngle > (-angle45 * 3) && rAngle <= -angle45 && !obj.lockX ) { direction = 'down'; } else if (!obj.lockY) { direction = 'right'; } // Plain direction // UP | // _______ | RIGHT // LEFT | // DOWN | if (!obj.lockY) { if (rAngle > -angle90 && rAngle < angle90) { directionX = 'left'; } else { directionX = 'right'; } } if (!obj.lockX) { if (rAngle > 0) { directionY = 'up'; } else { directionY = 'down'; } } if (obj.force > this.options.threshold) { var oldDirection = {}; for (var i in this.direction) { if (this.direction.hasOwnProperty(i)) { oldDirection[i] = this.direction[i]; } } var same = {}; this.direction = { x: directionX, y: directionY, angle: direction }; obj.direction = this.direction; for (var i in oldDirection) { if (oldDirection[i] === this.direction[i]) { same[i] = true; } } // If all 3 directions are the same, we don't trigger anything. if (same.x && same.y && same.angle) { return obj; } if (!same.x || !same.y) { this.trigger('plain', obj); } if (!same.x) { this.trigger('plain:' + directionX, obj); } if (!same.y) { this.trigger('plain:' + directionY, obj); } if (!same.angle) { this.trigger('dir dir:' + direction, obj); } } return obj; }; /* global Nipple, Super */ /////////////////////////// /// THE COLLECTION /// /////////////////////////// function Collection (manager, options) { var self = this; self.nipples = []; self.idles = []; self.actives = []; self.ids = []; self.pressureIntervals = {}; self.manager = manager; self.id = Collection.id; Collection.id += 1; // Defaults self.defaults = { zone: document.body, multitouch: false, maxNumberOfNipples: 10, mode: 'dynamic', position: {top: 0, left: 0}, catchDistance: 200, size: 100, threshold: 0.1, color: 'white', fadeTime: 250, dataOnly: false, restJoystick: true, restOpacity: 0.5, lockX: false, lockY: false }; self.config(options); // Overwrites if (self.options.mode === 'static' || self.options.mode === 'semi') { self.options.multitouch = false; } if (!self.options.multitouch) { self.options.maxNumberOfNipples = 1; } self.updateBox(); self.prepareNipples(); self.bindings(); self.begin(); return self.nipples; } Collection.prototype = new Super(); Collection.constructor = Collection; Collection.id = 0; Collection.prototype.prepareNipples = function () { var self = this; var nips = self.nipples; // Public API Preparation. nips.on = self.on.bind(self); nips.off = self.off.bind(self); nips.options = self.options; nips.destroy = self.destroy.bind(self); nips.ids = self.ids; nips.id = self.id; nips.processOnMove = self.processOnMove.bind(self); nips.processOnEnd = self.processOnEnd.bind(self); nips.get = function (id) { if (id === undefined) { return nips[0]; } for (var i = 0, max = nips.length; i < max; i += 1) { if (nips[i].identifier === id) { return nips[i]; } } return false; }; }; Collection.prototype.bindings = function () { var self = this; // Touch start event. self.bindEvt(self.options.zone, 'start'); // Avoid native touch actions (scroll, zoom etc...) on the zone. self.options.zone.style.touchAction = 'none'; self.options.zone.style.msTouchAction = 'none'; }; Collection.prototype.begin = function () { var self = this; var opts = self.options; // We place our static nipple // if needed. if (opts.mode === 'static') { var nipple = self.createNipple( opts.position, self.manager.getIdentifier() ); // Add it to the dom. nipple.add(); // Store it in idles. self.idles.push(nipple); } }; // Nipple Factory Collection.prototype.createNipple = function (position, identifier) { var self = this; var scroll = u.getScroll(); var toPutOn = {}; var opts = self.options; if (position.x && position.y) { toPutOn = { x: position.x - (scroll.x + self.box.left), y: position.y - (scroll.y + self.box.top) }; } else if ( position.top || position.right || position.bottom || position.left ) { // We need to compute the position X / Y of the joystick. var dumb = document.createElement('DIV'); dumb.style.display = 'hidden'; dumb.style.top = position.top; dumb.style.right = position.right; dumb.style.bottom = position.bottom; dumb.style.left = position.left; dumb.style.position = 'absolute'; opts.zone.appendChild(dumb); var dumbBox = dumb.getBoundingClientRect(); opts.zone.removeChild(dumb); toPutOn = position; position = { x: dumbBox.left + scroll.x, y: dumbBox.top + scroll.y }; } var nipple = new Nipple(self, { color: opts.color, size: opts.size, threshold: opts.threshold, fadeTime: opts.fadeTime, dataOnly: opts.dataOnly, restJoystick: opts.restJoystick, restOpacity: opts.restOpacity, mode: opts.mode, identifier: identifier, position: position, zone: opts.zone, frontPosition: { x: 0, y: 0 } }); if (!opts.dataOnly) { u.applyPosition(nipple.ui.el, toPutOn); u.applyPosition(nipple.ui.front, nipple.frontPosition); } self.nipples.push(nipple); self.trigger('added ' + nipple.identifier + ':added', nipple); self.manager.trigger('added ' + nipple.identifier + ':added', nipple); self.bindNipple(nipple); return nipple; }; Collection.prototype.updateBox = function () { var self = this; self.box = self.options.zone.getBoundingClientRect(); }; Collection.prototype.bindNipple = function (nipple) { var self = this; var type; // Bubble up identified events. var handler = function (evt, data) { // Identify the event type with the nipple's id. type = evt.type + ' ' + data.id + ':' + evt.type; self.trigger(type, data); }; // When it gets destroyed. nipple.on('destroyed', self.onDestroyed.bind(self)); // Other events that will get bubbled up. nipple.on('shown hidden rested dir plain', handler); nipple.on('dir:up dir:right dir:down dir:left', handler); nipple.on('plain:up plain:right plain:down plain:left', handler); }; Collection.prototype.pressureFn = function (touch, nipple, identifier) { var self = this; var previousPressure = 0; clearInterval(self.pressureIntervals[identifier]); // Create an interval that will read the pressure every 100ms self.pressureIntervals[identifier] = setInterval(function () { var pressure = touch.force || touch.pressure || touch.webkitForce || 0; if (pressure !== previousPressure) { nipple.trigger('pressure', pressure); self.trigger('pressure ' + nipple.identifier + ':pressure', pressure); previousPressure = pressure; } }.bind(self), 100); }; Collection.prototype.onstart = function (evt) { var self = this; var opts = self.options; evt = u.prepareEvent(evt); // Update the box position self.updateBox(); var process = function (touch) { // If we can create new nipples // meaning we don't have more active nipples than we should. if (self.actives.length < opts.maxNumberOfNipples) { self.processOnStart(touch); } }; u.map(evt, process); // We ask upstream to bind the document // on 'move' and 'end' self.manager.bindDocument(); return false; }; Collection.prototype.processOnStart = function (evt) { var self = this; var opts = self.options; var indexInIdles; var identifier = self.manager.getIdentifier(evt); var pressure = evt.force || evt.pressure || evt.webkitForce || 0; var position = { x: evt.pageX, y: evt.pageY }; var nipple = self.getOrCreate(identifier, position); // Update its touch identifier if (nipple.identifier !== identifier) { self.manager.removeIdentifier(nipple.identifier); } nipple.identifier = identifier; var process = function (nip) { // Trigger the start. nip.trigger('start', nip); self.trigger('start ' + nip.id + ':start', nip); nip.show(); if (pressure > 0) { self.pressureFn(evt, nip, nip.identifier); } // Trigger the first move event. self.processOnMove(evt); }; // Transfer it from idles to actives. if ((indexInIdles = self.idles.indexOf(nipple)) >= 0) { self.idles.splice(indexInIdles, 1); } // Store the nipple in the actives array self.actives.push(nipple); self.ids.push(nipple.identifier); if (opts.mode !== 'semi') { process(nipple); } else { // In semi we check the distance of the touch // to decide if we have to reset the nipple var distance = u.distance(position, nipple.position); if (distance <= opts.catchDistance) { process(nipple); } else { nipple.destroy(); self.processOnStart(evt); return; } } return nipple; }; Collection.prototype.getOrCreate = function (identifier, position) { var self = this; var opts = self.options; var nipple; // If we're in static or semi, we might already have an active. if (/(semi|static)/.test(opts.mode)) { // Get the active one. // TODO: Multi-touche for semi and static will start here. // Return the nearest one. nipple = self.idles[0]; if (nipple) { self.idles.splice(0, 1); return nipple; } if (opts.mode === 'semi') { // If we're in semi mode, we need to create one. return self.createNipple(position, identifier); } console.warn('Coudln\'t find the needed nipple.'); return false; } // In dynamic, we create a new one. nipple = self.createNipple(position, identifier); return nipple; }; Collection.prototype.processOnMove = function (evt) { var self = this; var opts = self.options; var identifier = self.manager.getIdentifier(evt); var nipple = self.nipples.get(identifier); if (!nipple) { // This is here just for safety. // It shouldn't happen. console.error('Found zombie joystick with ID ' + identifier); self.manager.removeIdentifier(identifier); return; } nipple.identifier = identifier; var size = nipple.options.size / 2; var pos = { x: evt.pageX, y: evt.pageY }; var dist = u.distance(pos, nipple.position); var angle = u.angle(pos, nipple.position); var rAngle = u.radians(angle); var force = dist / size; // If distance is bigger than nipple's size // we clamp the position. if (dist > size) { dist = size; pos = u.findCoord(nipple.position, dist, angle); } var xPosition = pos.x - nipple.position.x var yPosition = pos.y - nipple.position.y if (opts.lockX){ yPosition = 0 } if (opts.lockY) { xPosition = 0 } nipple.frontPosition = { x: xPosition, y: yPosition }; if (!opts.dataOnly) { u.applyPosition(nipple.ui.front, nipple.frontPosition); } // Prepare event's datas. var toSend = { identifier: nipple.identifier, position: pos, force: force, pressure: evt.force || evt.pressure || evt.webkitForce || 0, distance: dist, angle: { radian: rAngle, degree: angle }, instance: nipple, lockX: opts.lockX, lockY: opts.lockY }; // Compute the direction's datas. toSend = nipple.computeDirection(toSend); // Offset angles to follow units circle. toSend.angle = { radian: u.radians(180 - angle), degree: 180 - angle }; // Send everything to everyone. nipple.trigger('move', toSend); self.trigger('move ' + nipple.id + ':move', toSend); }; Collection.prototype.processOnEnd = function (evt) { var self = this; var opts = self.options; var identifier = self.manager.getIdentifier(evt); var nipple = self.nipples.get(identifier); var removedIdentifier = self.manager.removeIdentifier(nipple.identifier); if (!nipple) { return; } if (!opts.dataOnly) { nipple.hide(function () { if (opts.mode === 'dynamic') { nipple.trigger('removed', nipple); self.trigger('removed ' + nipple.id + ':removed', nipple); self.manager .trigger('removed ' + nipple.id + ':removed', nipple); nipple.destroy(); } }); } // Clear the pressure interval reader clearInterval(self.pressureIntervals[nipple.identifier]); // Reset the direciton of the nipple, to be able to trigger a new direction // on start. nipple.resetDirection(); nipple.trigger('end', nipple); self.trigger('end ' + nipple.id + ':end', nipple); // Remove identifier from our bank. if (self.ids.indexOf(nipple.identifier) >= 0) { self.ids.splice(self.ids.indexOf(nipple.identifier), 1); } // Clean our actives array. if (self.actives.indexOf(nipple) >= 0) { self.actives.splice(self.actives.indexOf(nipple), 1); } if (/(semi|static)/.test(opts.mode)) { // Transfer nipple from actives to idles // if we're in semi or static mode. self.idles.push(nipple); } else if (self.nipples.indexOf(nipple) >= 0) { // Only if we're not in semi or static mode // we can remove the instance. self.nipples.splice(self.nipples.indexOf(nipple), 1); } // We unbind move and end. self.manager.unbindDocument(); // We add back the identifier of the idle nipple; if (/(semi|static)/.test(opts.mode)) { self.manager.ids[removedIdentifier.id] = removedIdentifier.identifier; } }; // Remove destroyed nipple from the lists Collection.prototype.onDestroyed = function(evt, nipple) { var self = this; if (self.nipples.indexOf(nipple) >= 0) { self.nipples.splice(self.nipples.indexOf(nipple), 1); } if (self.actives.indexOf(nipple) >= 0) { self.actives.splice(self.actives.indexOf(nipple), 1); } if (self.idles.indexOf(nipple) >= 0) { self.idles.splice(self.idles.indexOf(nipple), 1); } if (self.ids.indexOf(nipple.identifier) >= 0) { self.ids.splice(self.ids.indexOf(nipple.identifier), 1); } // Remove the identifier from our bank self.manager.removeIdentifier(nipple.identifier); // We unbind move and end. self.manager.unbindDocument(); }; // Cleanly destroy the manager Collection.prototype.destroy = function () { var self = this; self.unbindEvt(self.options.zone, 'start'); // Destroy nipples. self.nipples.forEach(function(nipple) { nipple.destroy(); }); // Clean 3DTouch intervals. for (var i in self.pressureIntervals) { if (self.pressureIntervals.hasOwnProperty(i)) { clearInterval(self.pressureIntervals[i]); } } // Notify the manager passing the instance self.trigger('destroyed', self.nipples); // We unbind move and end. self.manager.unbindDocument(); // Unbind everything. self.off(); }; /* global u, Super, Collection */ /////////////////////// /// MANAGER /// /////////////////////// function Manager (options) { var self = this; self.ids = {}; self.index = 0; self.collections = []; self.config(options); self.prepareCollections(); // Listen for resize, to reposition every joysticks var resizeTimer; u.bindEvt(window, 'resize', function (evt) { clearTimeout(resizeTimer); resizeTimer = setTimeout(function () { var pos; var scroll = u.getScroll(); self.collections.forEach(function (collection) { collection.forEach(function (nipple) { pos = nipple.el.getBoundingClientRect(); nipple.position = { x: scroll.x + pos.left, y: scroll.y + pos.top }; }); }); }, 100); }); return self.collections; }; Manager.prototype = new Super(); Manager.constructor = Manager; Manager.prototype.prepareCollections = function () { var self = this; // Public API Preparation. self.collections.create = self.create.bind(self); // Listen to anything self.collections.on = self.on.bind(self); // Unbind general events self.collections.off = self.off.bind(self); // Destroy everything self.collections.destroy = self.destroy.bind(self); // Get any nipple self.collections.get = function (id) { var nipple; self.collections.every(function (collection) { if (nipple = collection.get(id)) { return false; } return true; }); return nipple; }; }; Manager.prototype.create = function (options) { return this.createCollection(options); }; // Collection Factory Manager.prototype.createCollection = function (options) { var self = this; var collection = new Collection(self, options); self.bindCollection(collection); self.collections.push(collection); return collection; }; Manager.prototype.bindCollection = function (collection) { var self = this; var type; // Bubble up identified events. var handler = function (evt, data) { // Identify the event type with the nipple's identifier. type = evt.type + ' ' + data.id + ':' + evt.type; self.trigger(type, data); }; // When it gets destroyed we clean. collection.on('destroyed', self.onDestroyed.bind(self)); // Other events that will get bubbled up. collection.on('shown hidden rested dir plain', handler); collection.on('dir:up dir:right dir:down dir:left', handler); collection.on('plain:up plain:right plain:down plain:left', handler); }; Manager.prototype.bindDocument = function () { var self = this; // Bind only if not already binded if (!self.binded) { self.bindEvt(document, 'move') .bindEvt(document, 'end'); self.binded = true; } }; Manager.prototype.unbindDocument = function (force) { var self = this; // If there are no touch left // unbind the document. if (!Object.keys(self.ids).length || force === true) { self.unbindEvt(document, 'move') .unbindEvt(document, 'end'); self.binded = false; } }; Manager.prototype.getIdentifier = function (evt) { var id; // If no event, simple increment if (!evt) { id = this.index; } else { // Extract identifier from event object. // Unavailable in mouse events so replaced by latest increment. id = evt.identifier === undefined ? evt.pointerId : evt.identifier; if (id === undefined) { id = this.latest || 0; } } if (this.ids[id] === undefined) { this.ids[id] = this.index; this.index += 1; } // Keep the latest id used in case we're using an unidentified mouseEvent this.latest = id; return this.ids[id]; }; Manager.prototype.removeIdentifier = function (identifier) { var removed = {}; for (var id in this.ids) { if (this.ids[id] === identifier) { removed.id = id; removed.identifier = this.ids[id]; delete this.ids[id]; break; } } return removed; }; Manager.prototype.onmove = function (evt) { var self = this; self.onAny('move', evt); return false; }; Manager.prototype.onend = function (evt) { var self = this; self.onAny('end', evt); return false; }; Manager.prototype.oncancel = function (evt) { var self = this; self.onAny('end', evt); return false; }; Manager.prototype.onAny = function (which, evt) { var self = this; var id; var processFn = 'processOn' + which.charAt(0).toUpperCase() + which.slice(1); evt = u.prepareEvent(evt); var processColl = function (e, id, coll) { if (coll.ids.indexOf(id) >= 0) { coll[processFn](e); // Mark the event to avoid cleaning it later. e._found_ = true; } }; var processEvt = function (e) { id = self.getIdentifier(e); u.map(self.collections, processColl.bind(null, e, id)); // If the event isn't handled by any collection, // we need to clean its identifier. if (!e._found_) { self.removeIdentifier(id); } }; u.map(evt, processEvt); return false; }; // Cleanly destroy the manager Manager.prototype.destroy = function () { var self = this; self.unbindDocument(true); self.ids = {}; self.index = 0; self.collections.forEach(function(collection) { collection.destroy(); }); self.off(); }; // When a collection gets destroyed // we clean behind. Manager.prototype.onDestroyed = function (evt, coll) { var self = this; if (self.collections.indexOf(coll) < 0) { return false; } self.collections.splice(self.collections.indexOf(coll), 1); }; var factory = new Manager(); return { create: function (options) { return factory.create(options); }, factory: factory }; }); /***/ }), /***/ "./node_modules/object-assign/index.js": /*!*********************************************!*\ !*** ./node_modules/object-assign/index.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* object-assign (c) Sindre Sorhus @license MIT */ /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } module.exports = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; /***/ }), /***/ "./node_modules/performance-now/lib/performance-now.js": /*!*************************************************************!*\ !*** ./node_modules/performance-now/lib/performance-now.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.12.2 (function() { var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; if ((typeof performance !== "undefined" && performance !== null) && performance.now) { module.exports = function() { return performance.now(); }; } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { module.exports = function() { return (getNanoSeconds() - nodeLoadTime) / 1e6; }; hrtime = process.hrtime; getNanoSeconds = function() { var hr; hr = hrtime(); return hr[0] * 1e9 + hr[1]; }; moduleLoadTime = getNanoSeconds(); upTime = process.uptime() * 1e9; nodeLoadTime = moduleLoadTime - upTime; } else if (Date.now) { module.exports = function() { return Date.now() - loadTime; }; loadTime = Date.now(); } else { module.exports = function() { return new Date().getTime() - loadTime; }; loadTime = new Date().getTime(); } }).call(this); //# sourceMappingURL=performance-now.js.map /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"))) /***/ }), /***/ "./node_modules/process/browser.js": /*!*****************************************!*\ !*** ./node_modules/process/browser.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /***/ "./node_modules/raf/index.js": /*!***********************************!*\ !*** ./node_modules/raf/index.js ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(/*! performance-now */ "./node_modules/performance-now/lib/performance-now.js") , root = typeof window === 'undefined' ? global : window , vendors = ['moz', 'webkit'] , suffix = 'AnimationFrame' , raf = root['request' + suffix] , caf = root['cancel' + suffix] || root['cancelRequest' + suffix] for(var i = 0; !raf && i < vendors.length; i++) { raf = root[vendors[i] + 'Request' + suffix] caf = root[vendors[i] + 'Cancel' + suffix] || root[vendors[i] + 'CancelRequest' + suffix] } // Some versions of FF have rAF but not cAF if(!raf || !caf) { var last = 0 , id = 0 , queue = [] , frameDuration = 1000 / 60 raf = function(callback) { if(queue.length === 0) { var _now = now() , next = Math.max(0, frameDuration - (_now - last)) last = next + _now setTimeout(function() { var cp = queue.slice(0) // Clear queue here to prevent // callbacks from appending listeners // to the current frame's queue queue.length = 0 for(var i = 0; i < cp.length; i++) { if(!cp[i].cancelled) { try{ cp[i].callback(last) } catch(e) { setTimeout(function() { throw e }, 0) } } } }, Math.round(next)) } queue.push({ handle: ++id, callback: callback, cancelled: false }) return id } caf = function(handle) { for(var i = 0; i < queue.length; i++) { if(queue[i].handle === handle) { queue[i].cancelled = true } } } } module.exports = function(fn) { // Wrap in a new function to prevent // `cancel` potentially being assigned // to the native rAF function return raf.call(root, fn) } module.exports.cancel = function() { caf.apply(root, arguments) } module.exports.polyfill = function(object) { if (!object) { object = root; } object.requestAnimationFrame = raf object.cancelAnimationFrame = caf } /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), /***/ "./node_modules/ramda/es/F.js": /*!************************************!*\ !*** ./node_modules/ramda/es/F.js ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _always__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./always */ "./node_modules/ramda/es/always.js"); /** * A function that always returns `false`. Any passed in parameters are ignored. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig * -> Boolean * @param {*} * @return {Boolean} * @see R.always, R.T * @example * * R.F(); //=> false */ var F = /*#__PURE__*/Object(_always__WEBPACK_IMPORTED_MODULE_0__["default"])(false); /* harmony default export */ __webpack_exports__["default"] = (F); /***/ }), /***/ "./node_modules/ramda/es/T.js": /*!************************************!*\ !*** ./node_modules/ramda/es/T.js ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _always__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./always */ "./node_modules/ramda/es/always.js"); /** * A function that always returns `true`. Any passed in parameters are ignored. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig * -> Boolean * @param {*} * @return {Boolean} * @see R.always, R.F * @example * * R.T(); //=> true */ var T = /*#__PURE__*/Object(_always__WEBPACK_IMPORTED_MODULE_0__["default"])(true); /* harmony default export */ __webpack_exports__["default"] = (T); /***/ }), /***/ "./node_modules/ramda/es/__.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/__.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * A special placeholder value used to specify "gaps" within curried functions, * allowing partial application of any combination of arguments, regardless of * their positions. * * If `g` is a curried ternary function and `_` is `R.__`, the following are * equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2, _)(1, 3)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * @constant * @memberOf R * @since v0.6.0 * @category Function * @example * * var greet = R.replace('{name}', R.__, 'Hello, {name}!'); * greet('Alice'); //=> 'Hello, Alice!' */ /* harmony default export */ __webpack_exports__["default"] = ({ '@@functional/placeholder': true }); /***/ }), /***/ "./node_modules/ramda/es/add.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/add.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Adds two values. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a * @param {Number} b * @return {Number} * @see R.subtract * @example * * R.add(2, 3); //=> 5 * R.add(7)(10); //=> 17 */ var add = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function add(a, b) { return Number(a) + Number(b); }); /* harmony default export */ __webpack_exports__["default"] = (add); /***/ }), /***/ "./node_modules/ramda/es/addIndex.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/addIndex.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Creates a new list iteration function from an existing one by adding two new * parameters to its callback function: the current index, and the entire list. * * This would turn, for instance, [`R.map`](#map) function into one that * more closely resembles `Array.prototype.map`. Note that this will only work * for functions in which the iteration callback function is the first * parameter, and where the list is the last parameter. (This latter might be * unimportant if the list parameter is not used.) * * @func * @memberOf R * @since v0.15.0 * @category Function * @category List * @sig ((a ... -> b) ... -> [a] -> *) -> (a ..., Int, [a] -> b) ... -> [a] -> *) * @param {Function} fn A list iteration function that does not pass index or list to its callback * @return {Function} An altered list iteration function that passes (item, index, list) to its callback * @example * * var mapIndexed = R.addIndex(R.map); * mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']); * //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r'] */ var addIndex = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])(function addIndex(fn) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_2__["default"])(fn.length, function () { var idx = 0; var origFn = arguments[0]; var list = arguments[arguments.length - 1]; var args = Array.prototype.slice.call(arguments, 0); args[0] = function () { var result = origFn.apply(this, Object(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments, [idx, list])); idx += 1; return result; }; return fn.apply(this, args); }); }); /* harmony default export */ __webpack_exports__["default"] = (addIndex); /***/ }), /***/ "./node_modules/ramda/es/adjust.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/adjust.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Applies a function to the value at the given index of an array, returning a * new copy of the array with the element at the given index replaced with the * result of the function application. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig (a -> a) -> Number -> [a] -> [a] * @param {Function} fn The function to apply. * @param {Number} idx The index. * @param {Array|Arguments} list An array-like object whose value * at the supplied index will be replaced. * @return {Array} A copy of the supplied array-like object with * the element at index `idx` replaced with the value * returned by applying `fn` to the existing element. * @see R.update * @example * * R.adjust(R.add(10), 1, [1, 2, 3]); //=> [1, 12, 3] * R.adjust(R.add(10))(1)([1, 2, 3]); //=> [1, 12, 3] * @symb R.adjust(f, -1, [a, b]) = [a, f(b)] * @symb R.adjust(f, 0, [a, b]) = [f(a), b] */ var adjust = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_1__["default"])(function adjust(fn, idx, list) { if (idx >= list.length || idx < -list.length) { return list; } var start = idx < 0 ? list.length : 0; var _idx = start + idx; var _list = Object(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])(list); _list[_idx] = fn(list[_idx]); return _list; }); /* harmony default export */ __webpack_exports__["default"] = (adjust); /***/ }), /***/ "./node_modules/ramda/es/all.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/all.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xall__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xall */ "./node_modules/ramda/es/internal/_xall.js"); /** * Returns `true` if all elements of the list match the predicate, `false` if * there are any that don't. * * Dispatches to the `all` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> Boolean * @param {Function} fn The predicate function. * @param {Array} list The array to consider. * @return {Boolean} `true` if the predicate is satisfied by every element, `false` * otherwise. * @see R.any, R.none, R.transduce * @example * * var equals3 = R.equals(3); * R.all(equals3)([3, 3, 3, 3]); //=> true * R.all(equals3)([3, 3, 1, 3]); //=> false */ var all = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['all'], _internal_xall__WEBPACK_IMPORTED_MODULE_2__["default"], function all(fn, list) { var idx = 0; while (idx < list.length) { if (!fn(list[idx])) { return false; } idx += 1; } return true; })); /* harmony default export */ __webpack_exports__["default"] = (all); /***/ }), /***/ "./node_modules/ramda/es/allPass.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/allPass.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./max */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _pluck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pluck */ "./node_modules/ramda/es/pluck.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /** * Takes a list of predicates and returns a predicate that returns true for a * given list of arguments if every one of the provided predicates is satisfied * by those arguments. * * The function returned is a curried function whose arity matches that of the * highest-arity predicate. * * @func * @memberOf R * @since v0.9.0 * @category Logic * @sig [(*... -> Boolean)] -> (*... -> Boolean) * @param {Array} predicates An array of predicates to check * @return {Function} The combined predicate * @see R.anyPass * @example * * var isQueen = R.propEq('rank', 'Q'); * var isSpade = R.propEq('suit', '♠︎'); * var isQueenOfSpades = R.allPass([isQueen, isSpade]); * * isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false * isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true */ var allPass = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function allPass(preds) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_reduce__WEBPACK_IMPORTED_MODULE_4__["default"])(_max__WEBPACK_IMPORTED_MODULE_2__["default"], 0, Object(_pluck__WEBPACK_IMPORTED_MODULE_3__["default"])('length', preds)), function () { var idx = 0; var len = preds.length; while (idx < len) { if (!preds[idx].apply(this, arguments)) { return false; } idx += 1; } return true; }); }); /* harmony default export */ __webpack_exports__["default"] = (allPass); /***/ }), /***/ "./node_modules/ramda/es/always.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/always.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Returns a function that always returns the given value. Note that for * non-primitives the value returned is a reference to the original value. * * This function is known as `const`, `constant`, or `K` (for K combinator) in * other languages and libraries. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig a -> (* -> a) * @param {*} val The value to wrap in a function * @return {Function} A Function :: * -> val. * @example * * var t = R.always('Tee'); * t(); //=> 'Tee' */ var always = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function always(val) { return function () { return val; }; }); /* harmony default export */ __webpack_exports__["default"] = (always); /***/ }), /***/ "./node_modules/ramda/es/and.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/and.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if both arguments are `true`; `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig a -> b -> a | b * @param {Any} a * @param {Any} b * @return {Any} the first argument if it is falsy, otherwise the second argument. * @see R.both * @example * * R.and(true, true); //=> true * R.and(true, false); //=> false * R.and(false, true); //=> false * R.and(false, false); //=> false */ var and = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function and(a, b) { return a && b; }); /* harmony default export */ __webpack_exports__["default"] = (and); /***/ }), /***/ "./node_modules/ramda/es/any.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/any.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xany__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xany */ "./node_modules/ramda/es/internal/_xany.js"); /** * Returns `true` if at least one of elements of the list match the predicate, * `false` otherwise. * * Dispatches to the `any` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> Boolean * @param {Function} fn The predicate function. * @param {Array} list The array to consider. * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false` * otherwise. * @see R.all, R.none, R.transduce * @example * * var lessThan0 = R.flip(R.lt)(0); * var lessThan2 = R.flip(R.lt)(2); * R.any(lessThan0)([1, 2]); //=> false * R.any(lessThan2)([1, 2]); //=> true */ var any = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['any'], _internal_xany__WEBPACK_IMPORTED_MODULE_2__["default"], function any(fn, list) { var idx = 0; while (idx < list.length) { if (fn(list[idx])) { return true; } idx += 1; } return false; })); /* harmony default export */ __webpack_exports__["default"] = (any); /***/ }), /***/ "./node_modules/ramda/es/anyPass.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/anyPass.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./max */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _pluck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pluck */ "./node_modules/ramda/es/pluck.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /** * Takes a list of predicates and returns a predicate that returns true for a * given list of arguments if at least one of the provided predicates is * satisfied by those arguments. * * The function returned is a curried function whose arity matches that of the * highest-arity predicate. * * @func * @memberOf R * @since v0.9.0 * @category Logic * @sig [(*... -> Boolean)] -> (*... -> Boolean) * @param {Array} predicates An array of predicates to check * @return {Function} The combined predicate * @see R.allPass * @example * * var isClub = R.propEq('suit', '♣'); * var isSpade = R.propEq('suit', '♠'); * var isBlackCard = R.anyPass([isClub, isSpade]); * * isBlackCard({rank: '10', suit: '♣'}); //=> true * isBlackCard({rank: 'Q', suit: '♠'}); //=> true * isBlackCard({rank: 'Q', suit: '♦'}); //=> false */ var anyPass = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function anyPass(preds) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_reduce__WEBPACK_IMPORTED_MODULE_4__["default"])(_max__WEBPACK_IMPORTED_MODULE_2__["default"], 0, Object(_pluck__WEBPACK_IMPORTED_MODULE_3__["default"])('length', preds)), function () { var idx = 0; var len = preds.length; while (idx < len) { if (preds[idx].apply(this, arguments)) { return true; } idx += 1; } return false; }); }); /* harmony default export */ __webpack_exports__["default"] = (anyPass); /***/ }), /***/ "./node_modules/ramda/es/ap.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/ap.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /** * ap applies a list of functions to a list of values. * * Dispatches to the `ap` method of the second argument, if present. Also * treats curried functions as applicatives. * * @func * @memberOf R * @since v0.3.0 * @category Function * @sig [a -> b] -> [a] -> [b] * @sig Apply f => f (a -> b) -> f a -> f b * @sig (a -> b -> c) -> (a -> b) -> (a -> c) * @param {*} applyF * @param {*} applyX * @return {*} * @example * * R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6] * R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> ["tasty pizza", "tasty salad", "PIZZA", "SALAD"] * * // R.ap can also be used as S combinator * // when only two functions are passed * R.ap(R.concat, R.toUpper)('Ramda') //=> 'RamdaRAMDA' * @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)] */ var ap = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function ap(applyF, applyX) { return typeof applyX['fantasy-land/ap'] === 'function' ? applyX['fantasy-land/ap'](applyF) : typeof applyF.ap === 'function' ? applyF.ap(applyX) : typeof applyF === 'function' ? function (x) { return applyF(x)(applyX(x)); } : // else Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_2__["default"])(function (acc, f) { return Object(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])(acc, Object(_map__WEBPACK_IMPORTED_MODULE_3__["default"])(f, applyX)); }, [], applyF); }); /* harmony default export */ __webpack_exports__["default"] = (ap); /***/ }), /***/ "./node_modules/ramda/es/aperture.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/aperture.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_aperture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_aperture */ "./node_modules/ramda/es/internal/_aperture.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xaperture__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xaperture */ "./node_modules/ramda/es/internal/_xaperture.js"); /** * Returns a new list, composed of n-tuples of consecutive elements. If `n` is * greater than the length of the list, an empty list is returned. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig Number -> [a] -> [[a]] * @param {Number} n The size of the tuples to create * @param {Array} list The list to split into `n`-length tuples * @return {Array} The resulting list of `n`-length tuples * @see R.transduce * @example * * R.aperture(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [2, 3], [3, 4], [4, 5]] * R.aperture(3, [1, 2, 3, 4, 5]); //=> [[1, 2, 3], [2, 3, 4], [3, 4, 5]] * R.aperture(7, [1, 2, 3, 4, 5]); //=> [] */ var aperture = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_2__["default"])([], _internal_xaperture__WEBPACK_IMPORTED_MODULE_3__["default"], _internal_aperture__WEBPACK_IMPORTED_MODULE_0__["default"])); /* harmony default export */ __webpack_exports__["default"] = (aperture); /***/ }), /***/ "./node_modules/ramda/es/append.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/append.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a new list containing the contents of the given list, followed by * the given element. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> [a] * @param {*} el The element to add to the end of the new list. * @param {Array} list The list of elements to add a new item to. * list. * @return {Array} A new list containing the elements of the old list followed by `el`. * @see R.prepend * @example * * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests'] * R.append('tests', []); //=> ['tests'] * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']] */ var append = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function append(el, list) { return Object(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])(list, [el]); }); /* harmony default export */ __webpack_exports__["default"] = (append); /***/ }), /***/ "./node_modules/ramda/es/apply.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/apply.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Applies function `fn` to the argument list `args`. This is useful for * creating a fixed-arity function from a variadic function. `fn` should be a * bound function if context is significant. * * @func * @memberOf R * @since v0.7.0 * @category Function * @sig (*... -> a) -> [*] -> a * @param {Function} fn The function which will be called with `args` * @param {Array} args The arguments to call `fn` with * @return {*} result The result, equivalent to `fn(...args)` * @see R.call, R.unapply * @example * * var nums = [1, 2, 3, -99, 42, 6, 7]; * R.apply(Math.max, nums); //=> 42 * @symb R.apply(f, [a, b, c]) = f(a, b, c) */ var apply = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function apply(fn, args) { return fn.apply(this, args); }); /* harmony default export */ __webpack_exports__["default"] = (apply); /***/ }), /***/ "./node_modules/ramda/es/applySpec.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/applySpec.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _apply__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./apply */ "./node_modules/ramda/es/apply.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./max */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _pluck__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pluck */ "./node_modules/ramda/es/pluck.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./values */ "./node_modules/ramda/es/values.js"); /** * Given a spec object recursively mapping properties to functions, creates a * function producing an object of the same structure, by mapping each property * to the result of calling its associated function with the supplied arguments. * * @func * @memberOf R * @since v0.20.0 * @category Function * @sig {k: ((a, b, ..., m) -> v)} -> ((a, b, ..., m) -> {k: v}) * @param {Object} spec an object recursively mapping properties to functions for * producing the values for these properties. * @return {Function} A function that returns an object of the same structure * as `spec', with each property set to the value returned by calling its * associated function with the supplied arguments. * @see R.converge, R.juxt * @example * * var getMetrics = R.applySpec({ * sum: R.add, * nested: { mul: R.multiply } * }); * getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } } * @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } } */ var applySpec = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function applySpec(spec) { spec = Object(_map__WEBPACK_IMPORTED_MODULE_3__["default"])(function (v) { return typeof v == 'function' ? v : applySpec(v); }, spec); return Object(_curryN__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_reduce__WEBPACK_IMPORTED_MODULE_6__["default"])(_max__WEBPACK_IMPORTED_MODULE_4__["default"], 0, Object(_pluck__WEBPACK_IMPORTED_MODULE_5__["default"])('length', Object(_values__WEBPACK_IMPORTED_MODULE_7__["default"])(spec))), function () { var args = arguments; return Object(_map__WEBPACK_IMPORTED_MODULE_3__["default"])(function (f) { return Object(_apply__WEBPACK_IMPORTED_MODULE_1__["default"])(f, args); }, spec); }); }); /* harmony default export */ __webpack_exports__["default"] = (applySpec); /***/ }), /***/ "./node_modules/ramda/es/applyTo.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/applyTo.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Takes a value and applies a function to it. * * This function is also known as the `thrush` combinator. * * @func * @memberOf R * @since v0.25.0 * @category Function * @sig a -> (a -> b) -> b * @param {*} x The value * @param {Function} f The function to apply * @return {*} The result of applying `f` to `x` * @example * * var t42 = R.applyTo(42); * t42(R.identity); //=> 42 * t42(R.add(1)); //=> 43 */ var applyTo = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function applyTo(x, f) { return f(x); }); /* harmony default export */ __webpack_exports__["default"] = (applyTo); /***/ }), /***/ "./node_modules/ramda/es/ascend.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/ascend.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Makes an ascending comparator function out of a function that returns a value * that can be compared with `<` and `>`. * * @func * @memberOf R * @since v0.23.0 * @category Function * @sig Ord b => (a -> b) -> a -> a -> Number * @param {Function} fn A function of arity one that returns a value that can be compared * @param {*} a The first item to be compared. * @param {*} b The second item to be compared. * @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0` * @see R.descend * @example * * var byAge = R.ascend(R.prop('age')); * var people = [ * // ... * ]; * var peopleByYoungestFirst = R.sort(byAge, people); */ var ascend = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function ascend(fn, a, b) { var aa = fn(a); var bb = fn(b); return aa < bb ? -1 : aa > bb ? 1 : 0; }); /* harmony default export */ __webpack_exports__["default"] = (ascend); /***/ }), /***/ "./node_modules/ramda/es/assoc.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/assoc.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Makes a shallow clone of an object, setting or overriding the specified * property with the given value. Note that this copies and flattens prototype * properties onto the new object as well. All non-primitive properties are * copied by reference. * * @func * @memberOf R * @since v0.8.0 * @category Object * @sig String -> a -> {k: v} -> {k: v} * @param {String} prop The property name to set * @param {*} val The new value * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original except for the changed property. * @see R.dissoc * @example * * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3} */ var assoc = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function assoc(prop, val, obj) { var result = {}; for (var p in obj) { result[p] = obj[p]; } result[prop] = val; return result; }); /* harmony default export */ __webpack_exports__["default"] = (assoc); /***/ }), /***/ "./node_modules/ramda/es/assocPath.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/assocPath.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _internal_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _internal_isInteger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isInteger */ "./node_modules/ramda/es/internal/_isInteger.js"); /* harmony import */ var _assoc__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./assoc */ "./node_modules/ramda/es/assoc.js"); /* harmony import */ var _isNil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./isNil */ "./node_modules/ramda/es/isNil.js"); /** * Makes a shallow clone of an object, setting or overriding the nodes required * to create the given path, and placing the specific value at the tail end of * that path. Note that this copies and flattens prototype properties onto the * new object as well. All non-primitive properties are copied by reference. * * @func * @memberOf R * @since v0.8.0 * @category Object * @typedefn Idx = String | Int * @sig [Idx] -> a -> {a} -> {a} * @param {Array} path the path to set * @param {*} val The new value * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original except along the specified path. * @see R.dissocPath * @example * * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} * * // Any missing or non-object keys in path will be overridden * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}} */ var assocPath = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function assocPath(path, val, obj) { if (path.length === 0) { return val; } var idx = path[0]; if (path.length > 1) { var nextObj = !Object(_isNil__WEBPACK_IMPORTED_MODULE_5__["default"])(obj) && Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(idx, obj) ? obj[idx] : Object(_internal_isInteger__WEBPACK_IMPORTED_MODULE_3__["default"])(path[1]) ? [] : {}; val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); } if (Object(_internal_isInteger__WEBPACK_IMPORTED_MODULE_3__["default"])(idx) && Object(_internal_isArray__WEBPACK_IMPORTED_MODULE_2__["default"])(obj)) { var arr = [].concat(obj); arr[idx] = val; return arr; } else { return Object(_assoc__WEBPACK_IMPORTED_MODULE_4__["default"])(idx, val, obj); } }); /* harmony default export */ __webpack_exports__["default"] = (assocPath); /***/ }), /***/ "./node_modules/ramda/es/binary.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/binary.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _nAry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nAry */ "./node_modules/ramda/es/nAry.js"); /** * Wraps a function of any arity (including nullary) in a function that accepts * exactly 2 parameters. Any extraneous parameters will not be passed to the * supplied function. * * @func * @memberOf R * @since v0.2.0 * @category Function * @sig (* -> c) -> (a, b -> c) * @param {Function} fn The function to wrap. * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of * arity 2. * @see R.nAry, R.unary * @example * * var takesThreeArgs = function(a, b, c) { * return [a, b, c]; * }; * takesThreeArgs.length; //=> 3 * takesThreeArgs(1, 2, 3); //=> [1, 2, 3] * * var takesTwoArgs = R.binary(takesThreeArgs); * takesTwoArgs.length; //=> 2 * // Only 2 arguments are passed to the wrapped function * takesTwoArgs(1, 2, 3); //=> [1, 2, undefined] * @symb R.binary(f)(a, b, c) = f(a, b) */ var binary = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function binary(fn) { return Object(_nAry__WEBPACK_IMPORTED_MODULE_1__["default"])(2, fn); }); /* harmony default export */ __webpack_exports__["default"] = (binary); /***/ }), /***/ "./node_modules/ramda/es/bind.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/bind.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a function that is bound to a context. * Note: `R.bind` does not provide the additional argument-binding capabilities of * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). * * @func * @memberOf R * @since v0.6.0 * @category Function * @category Object * @sig (* -> *) -> {*} -> (* -> *) * @param {Function} fn The function to bind to context * @param {Object} thisObj The context to bind `fn` to * @return {Function} A function that will execute in the context of `thisObj`. * @see R.partial * @example * * var log = R.bind(console.log, console); * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3} * // logs {a: 2} * @symb R.bind(f, o)(a, b) = f.call(o, a, b) */ var bind = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function bind(fn, thisObj) { return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(fn.length, function () { return fn.apply(thisObj, arguments); }); }); /* harmony default export */ __webpack_exports__["default"] = (bind); /***/ }), /***/ "./node_modules/ramda/es/both.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/both.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isFunction */ "./node_modules/ramda/es/internal/_isFunction.js"); /* harmony import */ var _and__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./and */ "./node_modules/ramda/es/and.js"); /* harmony import */ var _lift__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lift */ "./node_modules/ramda/es/lift.js"); /** * A function which calls the two provided functions and returns the `&&` * of the results. * It returns the result of the first function if it is false-y and the result * of the second function otherwise. Note that this is short-circuited, * meaning that the second function will not be invoked if the first returns a * false-y value. * * In addition to functions, `R.both` also accepts any fantasy-land compatible * applicative functor. * * @func * @memberOf R * @since v0.12.0 * @category Logic * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) * @param {Function} f A predicate * @param {Function} g Another predicate * @return {Function} a function that applies its arguments to `f` and `g` and `&&`s their outputs together. * @see R.and * @example * * var gt10 = R.gt(R.__, 10) * var lt20 = R.lt(R.__, 20) * var f = R.both(gt10, lt20); * f(15); //=> true * f(30); //=> false */ var both = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function both(f, g) { return Object(_internal_isFunction__WEBPACK_IMPORTED_MODULE_1__["default"])(f) ? function _both() { return f.apply(this, arguments) && g.apply(this, arguments); } : Object(_lift__WEBPACK_IMPORTED_MODULE_3__["default"])(_and__WEBPACK_IMPORTED_MODULE_2__["default"])(f, g); }); /* harmony default export */ __webpack_exports__["default"] = (both); /***/ }), /***/ "./node_modules/ramda/es/call.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/call.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curry */ "./node_modules/ramda/es/curry.js"); /** * Returns the result of calling its first argument with the remaining * arguments. This is occasionally useful as a converging function for * [`R.converge`](#converge): the first branch can produce a function while the * remaining branches produce values to be passed to that function as its * arguments. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig (*... -> a),*... -> a * @param {Function} fn The function to apply to the remaining arguments. * @param {...*} args Any number of positional arguments. * @return {*} * @see R.apply * @example * * R.call(R.add, 1, 2); //=> 3 * * var indentN = R.pipe(R.repeat(' '), * R.join(''), * R.replace(/^(?!$)/gm)); * * var format = R.converge(R.call, [ * R.pipe(R.prop('indent'), indentN), * R.prop('value') * ]); * * format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n' * @symb R.call(f, a, b) = f(a, b) */ var call = /*#__PURE__*/Object(_curry__WEBPACK_IMPORTED_MODULE_0__["default"])(function call(fn) { return fn.apply(this, Array.prototype.slice.call(arguments, 1)); }); /* harmony default export */ __webpack_exports__["default"] = (call); /***/ }), /***/ "./node_modules/ramda/es/chain.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/chain.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_makeFlat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_makeFlat */ "./node_modules/ramda/es/internal/_makeFlat.js"); /* harmony import */ var _internal_xchain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xchain */ "./node_modules/ramda/es/internal/_xchain.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /** * `chain` maps a function over a list and concatenates the results. `chain` * is also known as `flatMap` in some libraries * * Dispatches to the `chain` method of the second argument, if present, * according to the [FantasyLand Chain spec](https://github.com/fantasyland/fantasy-land#chain). * * @func * @memberOf R * @since v0.3.0 * @category List * @sig Chain m => (a -> m b) -> m a -> m b * @param {Function} fn The function to map with * @param {Array} list The list to map over * @return {Array} The result of flat-mapping `list` with `fn` * @example * * var duplicate = n => [n, n]; * R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3] * * R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1] */ var chain = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['fantasy-land/chain', 'chain'], _internal_xchain__WEBPACK_IMPORTED_MODULE_3__["default"], function chain(fn, monad) { if (typeof monad === 'function') { return function (x) { return fn(monad(x))(x); }; } return Object(_internal_makeFlat__WEBPACK_IMPORTED_MODULE_2__["default"])(false)(Object(_map__WEBPACK_IMPORTED_MODULE_4__["default"])(fn, monad)); })); /* harmony default export */ __webpack_exports__["default"] = (chain); /***/ }), /***/ "./node_modules/ramda/es/clamp.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/clamp.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Restricts a number to be within a range. * * Also works for other ordered types such as Strings and Dates. * * @func * @memberOf R * @since v0.20.0 * @category Relation * @sig Ord a => a -> a -> a -> a * @param {Number} minimum The lower limit of the clamp (inclusive) * @param {Number} maximum The upper limit of the clamp (inclusive) * @param {Number} value Value to be clamped * @return {Number} Returns `minimum` when `val < minimum`, `maximum` when `val > maximum`, returns `val` otherwise * @example * * R.clamp(1, 10, -5) // => 1 * R.clamp(1, 10, 15) // => 10 * R.clamp(1, 10, 4) // => 4 */ var clamp = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function clamp(min, max, value) { if (min > max) { throw new Error('min must not be greater than max in clamp(min, max, value)'); } return value < min ? min : value > max ? max : value; }); /* harmony default export */ __webpack_exports__["default"] = (clamp); /***/ }), /***/ "./node_modules/ramda/es/clone.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/clone.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_clone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_clone */ "./node_modules/ramda/es/internal/_clone.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Creates a deep copy of the value which may contain (nested) `Array`s and * `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are * assigned by reference rather than copied * * Dispatches to a `clone` method if present. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {*} -> {*} * @param {*} value The object or array to clone * @return {*} A deeply cloned copy of `val` * @example * * var objects = [{}, {}, {}]; * var objectsClone = R.clone(objects); * objects === objectsClone; //=> false * objects[0] === objectsClone[0]; //=> false */ var clone = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])(function clone(value) { return value != null && typeof value.clone === 'function' ? value.clone() : Object(_internal_clone__WEBPACK_IMPORTED_MODULE_0__["default"])(value, [], [], true); }); /* harmony default export */ __webpack_exports__["default"] = (clone); /***/ }), /***/ "./node_modules/ramda/es/comparator.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/comparator.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Makes a comparator function out of a function that reports whether the first * element is less than the second. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((a, b) -> Boolean) -> ((a, b) -> Number) * @param {Function} pred A predicate function of arity two which will return `true` if the first argument * is less than the second, `false` otherwise * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0` * @example * * var byAge = R.comparator((a, b) => a.age < b.age); * var people = [ * // ... * ]; * var peopleByIncreasingAge = R.sort(byAge, people); */ var comparator = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function comparator(pred) { return function (a, b) { return pred(a, b) ? -1 : pred(b, a) ? 1 : 0; }; }); /* harmony default export */ __webpack_exports__["default"] = (comparator); /***/ }), /***/ "./node_modules/ramda/es/complement.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/complement.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lift */ "./node_modules/ramda/es/lift.js"); /* harmony import */ var _not__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./not */ "./node_modules/ramda/es/not.js"); /** * Takes a function `f` and returns a function `g` such that if called with the same arguments * when `f` returns a "truthy" value, `g` returns `false` and when `f` returns a "falsy" value `g` returns `true`. * * `R.complement` may be applied to any functor * * @func * @memberOf R * @since v0.12.0 * @category Logic * @sig (*... -> *) -> (*... -> Boolean) * @param {Function} f * @return {Function} * @see R.not * @example * * var isNotNil = R.complement(R.isNil); * isNil(null); //=> true * isNotNil(null); //=> false * isNil(7); //=> false * isNotNil(7); //=> true */ var complement = /*#__PURE__*/Object(_lift__WEBPACK_IMPORTED_MODULE_0__["default"])(_not__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (complement); /***/ }), /***/ "./node_modules/ramda/es/compose.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/compose.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return compose; }); /* harmony import */ var _pipe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pipe */ "./node_modules/ramda/es/pipe.js"); /* harmony import */ var _reverse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reverse */ "./node_modules/ramda/es/reverse.js"); /** * Performs right-to-left function composition. The rightmost function may have * any arity; the remaining functions must be unary. * * **Note:** The result of compose is not automatically curried. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z) * @param {...Function} ...functions The functions to compose * @return {Function} * @see R.pipe * @example * * var classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName * var yellGreeting = R.compose(R.toUpper, classyGreeting); * yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND" * * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7 * * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b))) */ function compose() { if (arguments.length === 0) { throw new Error('compose requires at least one argument'); } return _pipe__WEBPACK_IMPORTED_MODULE_0__["default"].apply(this, Object(_reverse__WEBPACK_IMPORTED_MODULE_1__["default"])(arguments)); } /***/ }), /***/ "./node_modules/ramda/es/composeK.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/composeK.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return composeK; }); /* harmony import */ var _chain__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chain */ "./node_modules/ramda/es/chain.js"); /* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compose */ "./node_modules/ramda/es/compose.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /** * Returns the right-to-left Kleisli composition of the provided functions, * each of which must return a value of a type supported by [`chain`](#chain). * * `R.composeK(h, g, f)` is equivalent to `R.compose(R.chain(h), R.chain(g), f)`. * * @func * @memberOf R * @since v0.16.0 * @category Function * @sig Chain m => ((y -> m z), (x -> m y), ..., (a -> m b)) -> (a -> m z) * @param {...Function} ...functions The functions to compose * @return {Function} * @see R.pipeK * @example * * // get :: String -> Object -> Maybe * * var get = R.curry((propName, obj) => Maybe(obj[propName])) * * // getStateCode :: Maybe String -> Maybe String * var getStateCode = R.composeK( * R.compose(Maybe.of, R.toUpper), * get('state'), * get('address'), * get('user'), * ); * getStateCode({"user":{"address":{"state":"ny"}}}); //=> Maybe.Just("NY") * getStateCode({}); //=> Maybe.Nothing() * @symb R.composeK(f, g, h)(a) = R.chain(f, R.chain(g, h(a))) */ function composeK() { if (arguments.length === 0) { throw new Error('composeK requires at least one argument'); } var init = Array.prototype.slice.call(arguments); var last = init.pop(); return Object(_compose__WEBPACK_IMPORTED_MODULE_1__["default"])(_compose__WEBPACK_IMPORTED_MODULE_1__["default"].apply(this, Object(_map__WEBPACK_IMPORTED_MODULE_2__["default"])(_chain__WEBPACK_IMPORTED_MODULE_0__["default"], init)), last); } /***/ }), /***/ "./node_modules/ramda/es/composeP.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/composeP.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return composeP; }); /* harmony import */ var _pipeP__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pipeP */ "./node_modules/ramda/es/pipeP.js"); /* harmony import */ var _reverse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reverse */ "./node_modules/ramda/es/reverse.js"); /** * Performs right-to-left composition of one or more Promise-returning * functions. The rightmost function may have any arity; the remaining * functions must be unary. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((y -> Promise z), (x -> Promise y), ..., (a -> Promise b)) -> (a -> Promise z) * @param {...Function} functions The functions to compose * @return {Function} * @see R.pipeP * @example * * var db = { * users: { * JOE: { * name: 'Joe', * followers: ['STEVE', 'SUZY'] * } * } * } * * // We'll pretend to do a db lookup which returns a promise * var lookupUser = (userId) => Promise.resolve(db.users[userId]) * var lookupFollowers = (user) => Promise.resolve(user.followers) * lookupUser('JOE').then(lookupFollowers) * * // followersForUser :: String -> Promise [UserId] * var followersForUser = R.composeP(lookupFollowers, lookupUser); * followersForUser('JOE').then(followers => console.log('Followers:', followers)) * // Followers: ["STEVE","SUZY"] */ function composeP() { if (arguments.length === 0) { throw new Error('composeP requires at least one argument'); } return _pipeP__WEBPACK_IMPORTED_MODULE_0__["default"].apply(this, Object(_reverse__WEBPACK_IMPORTED_MODULE_1__["default"])(arguments)); } /***/ }), /***/ "./node_modules/ramda/es/concat.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/concat.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _internal_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isFunction */ "./node_modules/ramda/es/internal/_isFunction.js"); /* harmony import */ var _internal_isString__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isString */ "./node_modules/ramda/es/internal/_isString.js"); /* harmony import */ var _toString__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./toString */ "./node_modules/ramda/es/toString.js"); /** * Returns the result of concatenating the given lists or strings. * * Note: `R.concat` expects both arguments to be of the same type, * unlike the native `Array.prototype.concat` method. It will throw * an error if you `concat` an Array with a non-Array value. * * Dispatches to the `concat` method of the first argument, if present. * Can also concatenate two members of a [fantasy-land * compatible semigroup](https://github.com/fantasyland/fantasy-land#semigroup). * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] -> [a] * @sig String -> String -> String * @param {Array|String} firstList The first list * @param {Array|String} secondList The second list * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of * `secondList`. * * @example * * R.concat('ABC', 'DEF'); // 'ABCDEF' * R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] * R.concat([], []); //=> [] */ var concat = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function concat(a, b) { if (Object(_internal_isArray__WEBPACK_IMPORTED_MODULE_1__["default"])(a)) { if (Object(_internal_isArray__WEBPACK_IMPORTED_MODULE_1__["default"])(b)) { return a.concat(b); } throw new TypeError(Object(_toString__WEBPACK_IMPORTED_MODULE_4__["default"])(b) + ' is not an array'); } if (Object(_internal_isString__WEBPACK_IMPORTED_MODULE_3__["default"])(a)) { if (Object(_internal_isString__WEBPACK_IMPORTED_MODULE_3__["default"])(b)) { return a + b; } throw new TypeError(Object(_toString__WEBPACK_IMPORTED_MODULE_4__["default"])(b) + ' is not a string'); } if (a != null && Object(_internal_isFunction__WEBPACK_IMPORTED_MODULE_2__["default"])(a['fantasy-land/concat'])) { return a['fantasy-land/concat'](b); } if (a != null && Object(_internal_isFunction__WEBPACK_IMPORTED_MODULE_2__["default"])(a.concat)) { return a.concat(b); } throw new TypeError(Object(_toString__WEBPACK_IMPORTED_MODULE_4__["default"])(a) + ' does not have a method named "concat" or "fantasy-land/concat"'); }); /* harmony default export */ __webpack_exports__["default"] = (concat); /***/ }), /***/ "./node_modules/ramda/es/cond.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/cond.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./max */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /** * Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic. * `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments * to `fn` are applied to each of the predicates in turn until one returns a * "truthy" value, at which point `fn` returns the result of applying its * arguments to the corresponding transformer. If none of the predicates * matches, `fn` returns undefined. * * @func * @memberOf R * @since v0.6.0 * @category Logic * @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *) * @param {Array} pairs A list of [predicate, transformer] * @return {Function} * @example * * var fn = R.cond([ * [R.equals(0), R.always('water freezes at 0°C')], * [R.equals(100), R.always('water boils at 100°C')], * [R.T, temp => 'nothing special happens at ' + temp + '°C'] * ]); * fn(0); //=> 'water freezes at 0°C' * fn(50); //=> 'nothing special happens at 50°C' * fn(100); //=> 'water boils at 100°C' */ var cond = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])(function cond(pairs) { var arity = Object(_reduce__WEBPACK_IMPORTED_MODULE_4__["default"])(_max__WEBPACK_IMPORTED_MODULE_3__["default"], 0, Object(_map__WEBPACK_IMPORTED_MODULE_2__["default"])(function (pair) { return pair[0].length; }, pairs)); return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(arity, function () { var idx = 0; while (idx < pairs.length) { if (pairs[idx][0].apply(this, arguments)) { return pairs[idx][1].apply(this, arguments); } idx += 1; } }); }); /* harmony default export */ __webpack_exports__["default"] = (cond); /***/ }), /***/ "./node_modules/ramda/es/construct.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/construct.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _constructN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructN */ "./node_modules/ramda/es/constructN.js"); /** * Wraps a constructor function inside a curried function that can be called * with the same arguments and returns the same type. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (* -> {*}) -> (* -> {*}) * @param {Function} fn The constructor function to wrap. * @return {Function} A wrapped, curried constructor function. * @see R.invoker * @example * * // Constructor function * function Animal(kind) { * this.kind = kind; * }; * Animal.prototype.sighting = function() { * return "It's a " + this.kind + "!"; * } * * var AnimalConstructor = R.construct(Animal) * * // Notice we no longer need the 'new' keyword: * AnimalConstructor('Pig'); //=> {"kind": "Pig", "sighting": function (){...}}; * * var animalTypes = ["Lion", "Tiger", "Bear"]; * var animalSighting = R.invoker(0, 'sighting'); * var sightNewAnimal = R.compose(animalSighting, AnimalConstructor); * R.map(sightNewAnimal, animalTypes); //=> ["It's a Lion!", "It's a Tiger!", "It's a Bear!"] */ var construct = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function construct(Fn) { return Object(_constructN__WEBPACK_IMPORTED_MODULE_1__["default"])(Fn.length, Fn); }); /* harmony default export */ __webpack_exports__["default"] = (construct); /***/ }), /***/ "./node_modules/ramda/es/constructN.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/constructN.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _curry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curry */ "./node_modules/ramda/es/curry.js"); /* harmony import */ var _nAry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nAry */ "./node_modules/ramda/es/nAry.js"); /** * Wraps a constructor function inside a curried function that can be called * with the same arguments and returns the same type. The arity of the function * returned is specified to allow using variadic constructor functions. * * @func * @memberOf R * @since v0.4.0 * @category Function * @sig Number -> (* -> {*}) -> (* -> {*}) * @param {Number} n The arity of the constructor function. * @param {Function} Fn The constructor function to wrap. * @return {Function} A wrapped, curried constructor function. * @example * * // Variadic Constructor function * function Salad() { * this.ingredients = arguments; * } * * Salad.prototype.recipe = function() { * var instructions = R.map(ingredient => 'Add a dollop of ' + ingredient, this.ingredients); * return R.join('\n', instructions); * }; * * var ThreeLayerSalad = R.constructN(3, Salad); * * // Notice we no longer need the 'new' keyword, and the constructor is curried for 3 arguments. * var salad = ThreeLayerSalad('Mayonnaise')('Potato Chips')('Ketchup'); * * console.log(salad.recipe()); * // Add a dollop of Mayonnaise * // Add a dollop of Potato Chips * // Add a dollop of Ketchup */ var constructN = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function constructN(n, Fn) { if (n > 10) { throw new Error('Constructor with greater than ten arguments'); } if (n === 0) { return function () { return new Fn(); }; } return Object(_curry__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_nAry__WEBPACK_IMPORTED_MODULE_2__["default"])(n, function ($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) { switch (arguments.length) { case 1: return new Fn($0); case 2: return new Fn($0, $1); case 3: return new Fn($0, $1, $2); case 4: return new Fn($0, $1, $2, $3); case 5: return new Fn($0, $1, $2, $3, $4); case 6: return new Fn($0, $1, $2, $3, $4, $5); case 7: return new Fn($0, $1, $2, $3, $4, $5, $6); case 8: return new Fn($0, $1, $2, $3, $4, $5, $6, $7); case 9: return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8); case 10: return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8, $9); } })); }); /* harmony default export */ __webpack_exports__["default"] = (constructN); /***/ }), /***/ "./node_modules/ramda/es/contains.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/contains.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_contains */ "./node_modules/ramda/es/internal/_contains.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the specified value is equal, in [`R.equals`](#equals) * terms, to at least one element of the given list; `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> Boolean * @param {Object} a The item to compare against. * @param {Array} list The array to consider. * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise. * @see R.any * @example * * R.contains(3, [1, 2, 3]); //=> true * R.contains(4, [1, 2, 3]); //=> false * R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true * R.contains([42], [[42]]); //=> true */ var contains = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(_internal_contains__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (contains); /***/ }), /***/ "./node_modules/ramda/es/converge.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/converge.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_map */ "./node_modules/ramda/es/internal/_map.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./max */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _pluck__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pluck */ "./node_modules/ramda/es/pluck.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /** * Accepts a converging function and a list of branching functions and returns * a new function. When invoked, this new function is applied to some * arguments, each branching function is applied to those same arguments. The * results of each branching function are passed as arguments to the converging * function to produce the return value. * * @func * @memberOf R * @since v0.4.2 * @category Function * @sig ((x1, x2, ...) -> z) -> [((a, b, ...) -> x1), ((a, b, ...) -> x2), ...] -> (a -> b -> ... -> z) * @param {Function} after A function. `after` will be invoked with the return values of * `fn1` and `fn2` as its arguments. * @param {Array} functions A list of functions. * @return {Function} A new function. * @see R.useWith * @example * * var average = R.converge(R.divide, [R.sum, R.length]) * average([1, 2, 3, 4, 5, 6, 7]) //=> 4 * * var strangeConcat = R.converge(R.concat, [R.toUpper, R.toLower]) * strangeConcat("Yodel") //=> "YODELyodel" * * @symb R.converge(f, [g, h])(a, b) = f(g(a, b), h(a, b)) */ var converge = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function converge(after, fns) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_reduce__WEBPACK_IMPORTED_MODULE_5__["default"])(_max__WEBPACK_IMPORTED_MODULE_3__["default"], 0, Object(_pluck__WEBPACK_IMPORTED_MODULE_4__["default"])('length', fns)), function () { var args = arguments; var context = this; return after.apply(context, Object(_internal_map__WEBPACK_IMPORTED_MODULE_1__["default"])(function (fn) { return fn.apply(context, args); }, fns)); }); }); /* harmony default export */ __webpack_exports__["default"] = (converge); /***/ }), /***/ "./node_modules/ramda/es/countBy.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/countBy.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _reduceBy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduceBy */ "./node_modules/ramda/es/reduceBy.js"); /** * Counts the elements of a list according to how many match each value of a * key generated by the supplied function. Returns an object mapping the keys * produced by `fn` to the number of occurrences in the list. Note that all * keys are coerced to strings because of how JavaScript objects work. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig (a -> String) -> [a] -> {*} * @param {Function} fn The function used to map values to keys. * @param {Array} list The list to count elements from. * @return {Object} An object mapping keys to number of occurrences in the list. * @example * * var numbers = [1.0, 1.1, 1.2, 2.0, 3.0, 2.2]; * R.countBy(Math.floor)(numbers); //=> {'1': 3, '2': 2, '3': 1} * * var letters = ['a', 'b', 'A', 'a', 'B', 'c']; * R.countBy(R.toLower)(letters); //=> {'a': 3, 'b': 2, 'c': 1} */ var countBy = /*#__PURE__*/Object(_reduceBy__WEBPACK_IMPORTED_MODULE_0__["default"])(function (acc, elem) { return acc + 1; }, 0); /* harmony default export */ __webpack_exports__["default"] = (countBy); /***/ }), /***/ "./node_modules/ramda/es/curry.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/curry.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Returns a curried equivalent of the provided function. The curried function * has two unusual capabilities. First, its arguments needn't be provided one * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the * following are equivalent: * * - `g(1)(2)(3)` * - `g(1)(2, 3)` * - `g(1, 2)(3)` * - `g(1, 2, 3)` * * Secondly, the special placeholder value [`R.__`](#__) may be used to specify * "gaps", allowing partial application of any combination of arguments, * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), * the following are equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (* -> a) -> (* -> a) * @param {Function} fn The function to curry. * @return {Function} A new, curried function. * @see R.curryN * @example * * var addFourNumbers = (a, b, c, d) => a + b + c + d; * * var curriedAddFourNumbers = R.curry(addFourNumbers); * var f = curriedAddFourNumbers(1, 2); * var g = f(3); * g(4); //=> 10 */ var curry = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function curry(fn) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(fn.length, fn); }); /* harmony default export */ __webpack_exports__["default"] = (curry); /***/ }), /***/ "./node_modules/ramda/es/curryN.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/curryN.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_curryN__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_curryN */ "./node_modules/ramda/es/internal/_curryN.js"); /** * Returns a curried equivalent of the provided function, with the specified * arity. The curried function has two unusual capabilities. First, its * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the * following are equivalent: * * - `g(1)(2)(3)` * - `g(1)(2, 3)` * - `g(1, 2)(3)` * - `g(1, 2, 3)` * * Secondly, the special placeholder value [`R.__`](#__) may be used to specify * "gaps", allowing partial application of any combination of arguments, * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), * the following are equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * @func * @memberOf R * @since v0.5.0 * @category Function * @sig Number -> (* -> a) -> (* -> a) * @param {Number} length The arity for the returned function. * @param {Function} fn The function to curry. * @return {Function} A new, curried function. * @see R.curry * @example * * var sumArgs = (...args) => R.sum(args); * * var curriedAddFourNumbers = R.curryN(4, sumArgs); * var f = curriedAddFourNumbers(1, 2); * var g = f(3); * g(4); //=> 10 */ var curryN = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_2__["default"])(function curryN(length, fn) { if (length === 1) { return Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])(fn); } return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(length, Object(_internal_curryN__WEBPACK_IMPORTED_MODULE_3__["default"])(length, [], fn)); }); /* harmony default export */ __webpack_exports__["default"] = (curryN); /***/ }), /***/ "./node_modules/ramda/es/dec.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/dec.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _add__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add */ "./node_modules/ramda/es/add.js"); /** * Decrements its argument. * * @func * @memberOf R * @since v0.9.0 * @category Math * @sig Number -> Number * @param {Number} n * @return {Number} n - 1 * @see R.inc * @example * * R.dec(42); //=> 41 */ var dec = /*#__PURE__*/Object(_add__WEBPACK_IMPORTED_MODULE_0__["default"])(-1); /* harmony default export */ __webpack_exports__["default"] = (dec); /***/ }), /***/ "./node_modules/ramda/es/defaultTo.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/defaultTo.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns the second argument if it is not `null`, `undefined` or `NaN`; * otherwise the first argument is returned. * * @func * @memberOf R * @since v0.10.0 * @category Logic * @sig a -> b -> a | b * @param {a} default The default value. * @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`. * @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value * @example * * var defaultTo42 = R.defaultTo(42); * * defaultTo42(null); //=> 42 * defaultTo42(undefined); //=> 42 * defaultTo42('Ramda'); //=> 'Ramda' * // parseInt('string') results in NaN * defaultTo42(parseInt('string')); //=> 42 */ var defaultTo = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function defaultTo(d, v) { return v == null || v !== v ? d : v; }); /* harmony default export */ __webpack_exports__["default"] = (defaultTo); /***/ }), /***/ "./node_modules/ramda/es/descend.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/descend.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Makes a descending comparator function out of a function that returns a value * that can be compared with `<` and `>`. * * @func * @memberOf R * @since v0.23.0 * @category Function * @sig Ord b => (a -> b) -> a -> a -> Number * @param {Function} fn A function of arity one that returns a value that can be compared * @param {*} a The first item to be compared. * @param {*} b The second item to be compared. * @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0` * @see R.ascend * @example * * var byAge = R.descend(R.prop('age')); * var people = [ * // ... * ]; * var peopleByOldestFirst = R.sort(byAge, people); */ var descend = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function descend(fn, a, b) { var aa = fn(a); var bb = fn(b); return aa > bb ? -1 : aa < bb ? 1 : 0; }); /* harmony default export */ __webpack_exports__["default"] = (descend); /***/ }), /***/ "./node_modules/ramda/es/difference.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/difference.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_contains */ "./node_modules/ramda/es/internal/_contains.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Finds the set (i.e. no duplicates) of all elements in the first list not * contained in the second list. Objects and Arrays are compared in terms of * value equality, not reference equality. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` that are not in `list2`. * @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without * @example * * R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2] * R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5] * R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}] */ var difference = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function difference(first, second) { var out = []; var idx = 0; var firstLen = first.length; while (idx < firstLen) { if (!Object(_internal_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(first[idx], second) && !Object(_internal_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(first[idx], out)) { out[out.length] = first[idx]; } idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (difference); /***/ }), /***/ "./node_modules/ramda/es/differenceWith.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/differenceWith.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_containsWith__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_containsWith */ "./node_modules/ramda/es/internal/_containsWith.js"); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Finds the set (i.e. no duplicates) of all elements in the first list not * contained in the second list. Duplication is determined according to the * value returned by applying the supplied predicate to two list elements. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` that are not in `list2`. * @see R.difference, R.symmetricDifference, R.symmetricDifferenceWith * @example * * var cmp = (x, y) => x.a === y.a; * var l1 = [{a: 1}, {a: 2}, {a: 3}]; * var l2 = [{a: 3}, {a: 4}]; * R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}] */ var differenceWith = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_1__["default"])(function differenceWith(pred, first, second) { var out = []; var idx = 0; var firstLen = first.length; while (idx < firstLen) { if (!Object(_internal_containsWith__WEBPACK_IMPORTED_MODULE_0__["default"])(pred, first[idx], second) && !Object(_internal_containsWith__WEBPACK_IMPORTED_MODULE_0__["default"])(pred, first[idx], out)) { out.push(first[idx]); } idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (differenceWith); /***/ }), /***/ "./node_modules/ramda/es/dissoc.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/dissoc.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a new object that does not contain a `prop` property. * * @func * @memberOf R * @since v0.10.0 * @category Object * @sig String -> {k: v} -> {k: v} * @param {String} prop The name of the property to dissociate * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original but without the specified property * @see R.assoc * @example * * R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3} */ var dissoc = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function dissoc(prop, obj) { var result = {}; for (var p in obj) { result[p] = obj[p]; } delete result[prop]; return result; }); /* harmony default export */ __webpack_exports__["default"] = (dissoc); /***/ }), /***/ "./node_modules/ramda/es/dissocPath.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/dissocPath.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isInteger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isInteger */ "./node_modules/ramda/es/internal/_isInteger.js"); /* harmony import */ var _assoc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./assoc */ "./node_modules/ramda/es/assoc.js"); /* harmony import */ var _dissoc__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dissoc */ "./node_modules/ramda/es/dissoc.js"); /* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./remove */ "./node_modules/ramda/es/remove.js"); /* harmony import */ var _update__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./update */ "./node_modules/ramda/es/update.js"); /** * Makes a shallow clone of an object, omitting the property at the given path. * Note that this copies and flattens prototype properties onto the new object * as well. All non-primitive properties are copied by reference. * * @func * @memberOf R * @since v0.11.0 * @category Object * @typedefn Idx = String | Int * @sig [Idx] -> {k: v} -> {k: v} * @param {Array} path The path to the value to omit * @param {Object} obj The object to clone * @return {Object} A new object without the property at path * @see R.assocPath * @example * * R.dissocPath(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}} */ var dissocPath = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function dissocPath(path, obj) { switch (path.length) { case 0: return obj; case 1: return Object(_internal_isInteger__WEBPACK_IMPORTED_MODULE_1__["default"])(path[0]) ? Object(_remove__WEBPACK_IMPORTED_MODULE_4__["default"])(path[0], 1, obj) : Object(_dissoc__WEBPACK_IMPORTED_MODULE_3__["default"])(path[0], obj); default: var head = path[0]; var tail = Array.prototype.slice.call(path, 1); if (obj[head] == null) { return obj; } else if (Object(_internal_isInteger__WEBPACK_IMPORTED_MODULE_1__["default"])(path[0])) { return Object(_update__WEBPACK_IMPORTED_MODULE_5__["default"])(head, dissocPath(tail, obj[head]), obj); } else { return Object(_assoc__WEBPACK_IMPORTED_MODULE_2__["default"])(head, dissocPath(tail, obj[head]), obj); } } }); /* harmony default export */ __webpack_exports__["default"] = (dissocPath); /***/ }), /***/ "./node_modules/ramda/es/divide.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/divide.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Divides two numbers. Equivalent to `a / b`. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a The first value. * @param {Number} b The second value. * @return {Number} The result of `a / b`. * @see R.multiply * @example * * R.divide(71, 100); //=> 0.71 * * var half = R.divide(R.__, 2); * half(42); //=> 21 * * var reciprocal = R.divide(1); * reciprocal(4); //=> 0.25 */ var divide = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function divide(a, b) { return a / b; }); /* harmony default export */ __webpack_exports__["default"] = (divide); /***/ }), /***/ "./node_modules/ramda/es/drop.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/drop.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xdrop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdrop */ "./node_modules/ramda/es/internal/_xdrop.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns all but the first `n` elements of the given list, string, or * transducer/transformer (or object with a `drop` method). * * Dispatches to the `drop` method of the second argument, if present. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n * @param {*} list * @return {*} A copy of list without the first `n` elements * @see R.take, R.transduce, R.dropLast, R.dropWhile * @example * * R.drop(1, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] * R.drop(2, ['foo', 'bar', 'baz']); //=> ['baz'] * R.drop(3, ['foo', 'bar', 'baz']); //=> [] * R.drop(4, ['foo', 'bar', 'baz']); //=> [] * R.drop(3, 'ramda'); //=> 'da' */ var drop = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['drop'], _internal_xdrop__WEBPACK_IMPORTED_MODULE_2__["default"], function drop(n, xs) { return Object(_slice__WEBPACK_IMPORTED_MODULE_3__["default"])(Math.max(0, n), Infinity, xs); })); /* harmony default export */ __webpack_exports__["default"] = (drop); /***/ }), /***/ "./node_modules/ramda/es/dropLast.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/dropLast.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_dropLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dropLast */ "./node_modules/ramda/es/internal/_dropLast.js"); /* harmony import */ var _internal_xdropLast__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xdropLast */ "./node_modules/ramda/es/internal/_xdropLast.js"); /** * Returns a list containing all but the last `n` elements of the given `list`. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n The number of elements of `list` to skip. * @param {Array} list The list of elements to consider. * @return {Array} A copy of the list with only the first `list.length - n` elements * @see R.takeLast, R.drop, R.dropWhile, R.dropLastWhile * @example * * R.dropLast(1, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] * R.dropLast(2, ['foo', 'bar', 'baz']); //=> ['foo'] * R.dropLast(3, ['foo', 'bar', 'baz']); //=> [] * R.dropLast(4, ['foo', 'bar', 'baz']); //=> [] * R.dropLast(3, 'ramda'); //=> 'ra' */ var dropLast = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xdropLast__WEBPACK_IMPORTED_MODULE_3__["default"], _internal_dropLast__WEBPACK_IMPORTED_MODULE_2__["default"])); /* harmony default export */ __webpack_exports__["default"] = (dropLast); /***/ }), /***/ "./node_modules/ramda/es/dropLastWhile.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/dropLastWhile.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_dropLastWhile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dropLastWhile */ "./node_modules/ramda/es/internal/_dropLastWhile.js"); /* harmony import */ var _internal_xdropLastWhile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xdropLastWhile */ "./node_modules/ramda/es/internal/_xdropLastWhile.js"); /** * Returns a new list excluding all the tailing elements of a given list which * satisfy the supplied predicate function. It passes each value from the right * to the supplied predicate function, skipping elements until the predicate * function returns a `falsy` value. The predicate function is applied to one argument: * *(value)*. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} predicate The function to be called on each element * @param {Array} xs The collection to iterate over. * @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`. * @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile * @example * * var lteThree = x => x <= 3; * * R.dropLastWhile(lteThree, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3, 4] * * R.dropLastWhile(x => x !== 'd' , 'Ramda'); //=> 'Ramd' */ var dropLastWhile = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xdropLastWhile__WEBPACK_IMPORTED_MODULE_3__["default"], _internal_dropLastWhile__WEBPACK_IMPORTED_MODULE_2__["default"])); /* harmony default export */ __webpack_exports__["default"] = (dropLastWhile); /***/ }), /***/ "./node_modules/ramda/es/dropRepeats.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/dropRepeats.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xdropRepeatsWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdropRepeatsWith */ "./node_modules/ramda/es/internal/_xdropRepeatsWith.js"); /* harmony import */ var _dropRepeatsWith__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dropRepeatsWith */ "./node_modules/ramda/es/dropRepeatsWith.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /** * Returns a new list without any consecutively repeating elements. * [`R.equals`](#equals) is used to determine equality. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig [a] -> [a] * @param {Array} list The array to consider. * @return {Array} `list` without repeating elements. * @see R.transduce * @example * * R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2] */ var dropRepeats = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], /*#__PURE__*/Object(_internal_xdropRepeatsWith__WEBPACK_IMPORTED_MODULE_2__["default"])(_equals__WEBPACK_IMPORTED_MODULE_4__["default"]), /*#__PURE__*/Object(_dropRepeatsWith__WEBPACK_IMPORTED_MODULE_3__["default"])(_equals__WEBPACK_IMPORTED_MODULE_4__["default"]))); /* harmony default export */ __webpack_exports__["default"] = (dropRepeats); /***/ }), /***/ "./node_modules/ramda/es/dropRepeatsWith.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/dropRepeatsWith.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xdropRepeatsWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdropRepeatsWith */ "./node_modules/ramda/es/internal/_xdropRepeatsWith.js"); /* harmony import */ var _last__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./last */ "./node_modules/ramda/es/last.js"); /** * Returns a new list without any consecutively repeating elements. Equality is * determined by applying the supplied predicate to each pair of consecutive elements. The * first element in a series of equal elements will be preserved. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig ((a, a) -> Boolean) -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list The array to consider. * @return {Array} `list` without repeating elements. * @see R.transduce * @example * * var l = [1, -1, 1, 3, 4, -4, -4, -5, 5, 3, 3]; * R.dropRepeatsWith(R.eqBy(Math.abs), l); //=> [1, 3, 4, -5, 3] */ var dropRepeatsWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xdropRepeatsWith__WEBPACK_IMPORTED_MODULE_2__["default"], function dropRepeatsWith(pred, list) { var result = []; var idx = 1; var len = list.length; if (len !== 0) { result[0] = list[0]; while (idx < len) { if (!pred(Object(_last__WEBPACK_IMPORTED_MODULE_3__["default"])(result), list[idx])) { result[result.length] = list[idx]; } idx += 1; } } return result; })); /* harmony default export */ __webpack_exports__["default"] = (dropRepeatsWith); /***/ }), /***/ "./node_modules/ramda/es/dropWhile.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/dropWhile.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xdropWhile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdropWhile */ "./node_modules/ramda/es/internal/_xdropWhile.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns a new list excluding the leading elements of a given list which * satisfy the supplied predicate function. It passes each value to the supplied * predicate function, skipping elements while the predicate function returns * `true`. The predicate function is applied to one argument: *(value)*. * * Dispatches to the `dropWhile` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.9.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} fn The function called per iteration. * @param {Array} xs The collection to iterate over. * @return {Array} A new array. * @see R.takeWhile, R.transduce, R.addIndex * @example * * var lteTwo = x => x <= 2; * * R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1] * * R.dropWhile(x => x !== 'd' , 'Ramda'); //=> 'da' */ var dropWhile = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['dropWhile'], _internal_xdropWhile__WEBPACK_IMPORTED_MODULE_2__["default"], function dropWhile(pred, xs) { var idx = 0; var len = xs.length; while (idx < len && pred(xs[idx])) { idx += 1; } return Object(_slice__WEBPACK_IMPORTED_MODULE_3__["default"])(idx, Infinity, xs); })); /* harmony default export */ __webpack_exports__["default"] = (dropWhile); /***/ }), /***/ "./node_modules/ramda/es/either.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/either.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isFunction */ "./node_modules/ramda/es/internal/_isFunction.js"); /* harmony import */ var _lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lift */ "./node_modules/ramda/es/lift.js"); /* harmony import */ var _or__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./or */ "./node_modules/ramda/es/or.js"); /** * A function wrapping calls to the two functions in an `||` operation, * returning the result of the first function if it is truth-y and the result * of the second function otherwise. Note that this is short-circuited, * meaning that the second function will not be invoked if the first returns a * truth-y value. * * In addition to functions, `R.either` also accepts any fantasy-land compatible * applicative functor. * * @func * @memberOf R * @since v0.12.0 * @category Logic * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) * @param {Function} f a predicate * @param {Function} g another predicate * @return {Function} a function that applies its arguments to `f` and `g` and `||`s their outputs together. * @see R.or * @example * * var gt10 = x => x > 10; * var even = x => x % 2 === 0; * var f = R.either(gt10, even); * f(101); //=> true * f(8); //=> true */ var either = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function either(f, g) { return Object(_internal_isFunction__WEBPACK_IMPORTED_MODULE_1__["default"])(f) ? function _either() { return f.apply(this, arguments) || g.apply(this, arguments); } : Object(_lift__WEBPACK_IMPORTED_MODULE_2__["default"])(_or__WEBPACK_IMPORTED_MODULE_3__["default"])(f, g); }); /* harmony default export */ __webpack_exports__["default"] = (either); /***/ }), /***/ "./node_modules/ramda/es/empty.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/empty.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_isArguments__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArguments */ "./node_modules/ramda/es/internal/_isArguments.js"); /* harmony import */ var _internal_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _internal_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isObject */ "./node_modules/ramda/es/internal/_isObject.js"); /* harmony import */ var _internal_isString__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_isString */ "./node_modules/ramda/es/internal/_isString.js"); /** * Returns the empty value of its argument's type. Ramda defines the empty * value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other * types are supported if they define `.empty`, * `.prototype.empty` or implement the * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid). * * Dispatches to the `empty` method of the first argument, if present. * * @func * @memberOf R * @since v0.3.0 * @category Function * @sig a -> a * @param {*} x * @return {*} * @example * * R.empty(Just(42)); //=> Nothing() * R.empty([1, 2, 3]); //=> [] * R.empty('unicorns'); //=> '' * R.empty({x: 1, y: 2}); //=> {} */ var empty = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function empty(x) { return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : Object(_internal_isArray__WEBPACK_IMPORTED_MODULE_2__["default"])(x) ? [] : Object(_internal_isString__WEBPACK_IMPORTED_MODULE_4__["default"])(x) ? '' : Object(_internal_isObject__WEBPACK_IMPORTED_MODULE_3__["default"])(x) ? {} : Object(_internal_isArguments__WEBPACK_IMPORTED_MODULE_1__["default"])(x) ? function () { return arguments; }() : // else void 0; }); /* harmony default export */ __webpack_exports__["default"] = (empty); /***/ }), /***/ "./node_modules/ramda/es/endsWith.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/endsWith.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./takeLast */ "./node_modules/ramda/es/takeLast.js"); /** * Checks if a list ends with the provided values * * @func * @memberOf R * @since v0.24.0 * @category List * @sig [a] -> Boolean * @sig String -> Boolean * @param {*} suffix * @param {*} list * @return {Boolean} * @example * * R.endsWith('c', 'abc') //=> true * R.endsWith('b', 'abc') //=> false * R.endsWith(['c'], ['a', 'b', 'c']) //=> true * R.endsWith(['b'], ['a', 'b', 'c']) //=> false */ var endsWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function (suffix, list) { return Object(_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_takeLast__WEBPACK_IMPORTED_MODULE_2__["default"])(suffix.length, list), suffix); }); /* harmony default export */ __webpack_exports__["default"] = (endsWith); /***/ }), /***/ "./node_modules/ramda/es/eqBy.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/eqBy.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /** * Takes a function and two values in its domain and returns `true` if the * values map to the same value in the codomain; `false` otherwise. * * @func * @memberOf R * @since v0.18.0 * @category Relation * @sig (a -> b) -> a -> a -> Boolean * @param {Function} f * @param {*} x * @param {*} y * @return {Boolean} * @example * * R.eqBy(Math.abs, 5, -5); //=> true */ var eqBy = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function eqBy(f, x, y) { return Object(_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(f(x), f(y)); }); /* harmony default export */ __webpack_exports__["default"] = (eqBy); /***/ }), /***/ "./node_modules/ramda/es/eqProps.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/eqProps.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /** * Reports whether two objects have the same value, in [`R.equals`](#equals) * terms, for the specified property. Useful as a curried predicate. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig k -> {k: v} -> {k: v} -> Boolean * @param {String} prop The name of the property to compare * @param {Object} obj1 * @param {Object} obj2 * @return {Boolean} * * @example * * var o1 = { a: 1, b: 2, c: 3, d: 4 }; * var o2 = { a: 10, b: 20, c: 3, d: 40 }; * R.eqProps('a', o1, o2); //=> false * R.eqProps('c', o1, o2); //=> true */ var eqProps = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function eqProps(prop, obj1, obj2) { return Object(_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(obj1[prop], obj2[prop]); }); /* harmony default export */ __webpack_exports__["default"] = (eqProps); /***/ }), /***/ "./node_modules/ramda/es/equals.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/equals.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_equals */ "./node_modules/ramda/es/internal/_equals.js"); /** * Returns `true` if its arguments are equivalent, `false` otherwise. Handles * cyclical data structures. * * Dispatches symmetrically to the `equals` methods of both arguments, if * present. * * @func * @memberOf R * @since v0.15.0 * @category Relation * @sig a -> b -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @example * * R.equals(1, 1); //=> true * R.equals(1, '1'); //=> false * R.equals([1, 2, 3], [1, 2, 3]); //=> true * * var a = {}; a.v = a; * var b = {}; b.v = b; * R.equals(a, b); //=> true */ var equals = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function equals(a, b) { return Object(_internal_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(a, b, [], []); }); /* harmony default export */ __webpack_exports__["default"] = (equals); /***/ }), /***/ "./node_modules/ramda/es/evolve.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/evolve.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new object by recursively evolving a shallow copy of `object`, * according to the `transformation` functions. All non-primitive properties * are copied by reference. * * A `transformation` function will not be invoked if its corresponding key * does not exist in the evolved object. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig {k: (v -> v)} -> {k: v} -> {k: v} * @param {Object} transformations The object specifying transformation functions to apply * to the object. * @param {Object} object The object to be transformed. * @return {Object} The transformed object. * @example * * var tomato = {firstName: ' Tomato ', data: {elapsed: 100, remaining: 1400}, id:123}; * var transformations = { * firstName: R.trim, * lastName: R.trim, // Will not get invoked. * data: {elapsed: R.add(1), remaining: R.add(-1)} * }; * R.evolve(transformations, tomato); //=> {firstName: 'Tomato', data: {elapsed: 101, remaining: 1399}, id:123} */ var evolve = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function evolve(transformations, object) { var result = {}; var transformation, key, type; for (key in object) { transformation = transformations[key]; type = typeof transformation; result[key] = type === 'function' ? transformation(object[key]) : transformation && type === 'object' ? evolve(transformation, object[key]) : object[key]; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (evolve); /***/ }), /***/ "./node_modules/ramda/es/filter.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/filter.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_filter */ "./node_modules/ramda/es/internal/_filter.js"); /* harmony import */ var _internal_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isObject */ "./node_modules/ramda/es/internal/_isObject.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _internal_xfilter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internal/_xfilter */ "./node_modules/ramda/es/internal/_xfilter.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * Takes a predicate and a `Filterable`, and returns a new filterable of the * same type containing the members of the given filterable which satisfy the * given predicate. Filterable objects include plain objects or any object * that has a filter method such as `Array`. * * Dispatches to the `filter` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Filterable f => (a -> Boolean) -> f a -> f a * @param {Function} pred * @param {Array} filterable * @return {Array} Filterable * @see R.reject, R.transduce, R.addIndex * @example * * var isEven = n => n % 2 === 0; * * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4] * * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} */ var filter = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['filter'], _internal_xfilter__WEBPACK_IMPORTED_MODULE_5__["default"], function (pred, filterable) { return Object(_internal_isObject__WEBPACK_IMPORTED_MODULE_3__["default"])(filterable) ? Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_4__["default"])(function (acc, key) { if (pred(filterable[key])) { acc[key] = filterable[key]; } return acc; }, {}, Object(_keys__WEBPACK_IMPORTED_MODULE_6__["default"])(filterable)) : // else Object(_internal_filter__WEBPACK_IMPORTED_MODULE_2__["default"])(pred, filterable); })); /* harmony default export */ __webpack_exports__["default"] = (filter); /***/ }), /***/ "./node_modules/ramda/es/find.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/find.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xfind__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfind */ "./node_modules/ramda/es/internal/_xfind.js"); /** * Returns the first element of the list which matches the predicate, or * `undefined` if no element matches. * * Dispatches to the `find` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> a | undefined * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Object} The element found, or `undefined`. * @see R.transduce * @example * * var xs = [{a: 1}, {a: 2}, {a: 3}]; * R.find(R.propEq('a', 2))(xs); //=> {a: 2} * R.find(R.propEq('a', 4))(xs); //=> undefined */ var find = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['find'], _internal_xfind__WEBPACK_IMPORTED_MODULE_2__["default"], function find(fn, list) { var idx = 0; var len = list.length; while (idx < len) { if (fn(list[idx])) { return list[idx]; } idx += 1; } })); /* harmony default export */ __webpack_exports__["default"] = (find); /***/ }), /***/ "./node_modules/ramda/es/findIndex.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/findIndex.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xfindIndex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfindIndex */ "./node_modules/ramda/es/internal/_xfindIndex.js"); /** * Returns the index of the first element of the list which matches the * predicate, or `-1` if no element matches. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> Boolean) -> [a] -> Number * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Number} The index of the element found, or `-1`. * @see R.transduce * @example * * var xs = [{a: 1}, {a: 2}, {a: 3}]; * R.findIndex(R.propEq('a', 2))(xs); //=> 1 * R.findIndex(R.propEq('a', 4))(xs); //=> -1 */ var findIndex = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xfindIndex__WEBPACK_IMPORTED_MODULE_2__["default"], function findIndex(fn, list) { var idx = 0; var len = list.length; while (idx < len) { if (fn(list[idx])) { return idx; } idx += 1; } return -1; })); /* harmony default export */ __webpack_exports__["default"] = (findIndex); /***/ }), /***/ "./node_modules/ramda/es/findLast.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/findLast.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xfindLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfindLast */ "./node_modules/ramda/es/internal/_xfindLast.js"); /** * Returns the last element of the list which matches the predicate, or * `undefined` if no element matches. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> Boolean) -> [a] -> a | undefined * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Object} The element found, or `undefined`. * @see R.transduce * @example * * var xs = [{a: 1, b: 0}, {a:1, b: 1}]; * R.findLast(R.propEq('a', 1))(xs); //=> {a: 1, b: 1} * R.findLast(R.propEq('a', 4))(xs); //=> undefined */ var findLast = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xfindLast__WEBPACK_IMPORTED_MODULE_2__["default"], function findLast(fn, list) { var idx = list.length - 1; while (idx >= 0) { if (fn(list[idx])) { return list[idx]; } idx -= 1; } })); /* harmony default export */ __webpack_exports__["default"] = (findLast); /***/ }), /***/ "./node_modules/ramda/es/findLastIndex.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/findLastIndex.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xfindLastIndex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfindLastIndex */ "./node_modules/ramda/es/internal/_xfindLastIndex.js"); /** * Returns the index of the last element of the list which matches the * predicate, or `-1` if no element matches. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> Boolean) -> [a] -> Number * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Number} The index of the element found, or `-1`. * @see R.transduce * @example * * var xs = [{a: 1, b: 0}, {a:1, b: 1}]; * R.findLastIndex(R.propEq('a', 1))(xs); //=> 1 * R.findLastIndex(R.propEq('a', 4))(xs); //=> -1 */ var findLastIndex = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xfindLastIndex__WEBPACK_IMPORTED_MODULE_2__["default"], function findLastIndex(fn, list) { var idx = list.length - 1; while (idx >= 0) { if (fn(list[idx])) { return idx; } idx -= 1; } return -1; })); /* harmony default export */ __webpack_exports__["default"] = (findLastIndex); /***/ }), /***/ "./node_modules/ramda/es/flatten.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/flatten.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_makeFlat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_makeFlat */ "./node_modules/ramda/es/internal/_makeFlat.js"); /** * Returns a new list by pulling every item out of it (and all its sub-arrays) * and putting them in a new array, depth-first. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [b] * @param {Array} list The array to consider. * @return {Array} The flattened list. * @see R.unnest * @example * * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]); * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] */ var flatten = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_makeFlat__WEBPACK_IMPORTED_MODULE_1__["default"])(true)); /* harmony default export */ __webpack_exports__["default"] = (flatten); /***/ }), /***/ "./node_modules/ramda/es/flip.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/flip.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Returns a new function much like the supplied one, except that the first two * arguments' order is reversed. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z) * @param {Function} fn The function to invoke with its first two parameters reversed. * @return {*} The result of invoking `fn` with its first two parameters' order reversed. * @example * * var mergeThree = (a, b, c) => [].concat(a, b, c); * * mergeThree(1, 2, 3); //=> [1, 2, 3] * * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3] * @symb R.flip(f)(a, b, c) = f(b, a, c) */ var flip = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function flip(fn) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(fn.length, function (a, b) { var args = Array.prototype.slice.call(arguments, 0); args[0] = b; args[1] = a; return fn.apply(this, args); }); }); /* harmony default export */ __webpack_exports__["default"] = (flip); /***/ }), /***/ "./node_modules/ramda/es/forEach.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/forEach.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Iterate over an input `list`, calling a provided function `fn` for each * element in the list. * * `fn` receives one argument: *(value)*. * * Note: `R.forEach` does not skip deleted or unassigned indices (sparse * arrays), unlike the native `Array.prototype.forEach` method. For more * details on this behavior, see: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description * * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns * the original array. In some libraries this function is named `each`. * * Dispatches to the `forEach` method of the second argument, if present. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> *) -> [a] -> [a] * @param {Function} fn The function to invoke. Receives one argument, `value`. * @param {Array} list The list to iterate over. * @return {Array} The original list. * @see R.addIndex * @example * * var printXPlusFive = x => console.log(x + 5); * R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3] * // logs 6 * // logs 7 * // logs 8 * @symb R.forEach(f, [a, b, c]) = [a, b, c] */ var forEach = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__["default"])('forEach', function forEach(fn, list) { var len = list.length; var idx = 0; while (idx < len) { fn(list[idx]); idx += 1; } return list; })); /* harmony default export */ __webpack_exports__["default"] = (forEach); /***/ }), /***/ "./node_modules/ramda/es/forEachObjIndexed.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/forEachObjIndexed.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * Iterate over an input `object`, calling a provided function `fn` for each * key and value in the object. * * `fn` receives three argument: *(value, key, obj)*. * * @func * @memberOf R * @since v0.23.0 * @category Object * @sig ((a, String, StrMap a) -> Any) -> StrMap a -> StrMap a * @param {Function} fn The function to invoke. Receives three argument, `value`, `key`, `obj`. * @param {Object} obj The object to iterate over. * @return {Object} The original object. * @example * * var printKeyConcatValue = (value, key) => console.log(key + ':' + value); * R.forEachObjIndexed(printKeyConcatValue, {x: 1, y: 2}); //=> {x: 1, y: 2} * // logs x:1 * // logs y:2 * @symb R.forEachObjIndexed(f, {x: a, y: b}) = {x: a, y: b} */ var forEachObjIndexed = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function forEachObjIndexed(fn, obj) { var keyList = Object(_keys__WEBPACK_IMPORTED_MODULE_1__["default"])(obj); var idx = 0; while (idx < keyList.length) { var key = keyList[idx]; fn(obj[key], key, obj); idx += 1; } return obj; }); /* harmony default export */ __webpack_exports__["default"] = (forEachObjIndexed); /***/ }), /***/ "./node_modules/ramda/es/fromPairs.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/fromPairs.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Creates a new object from a list key-value pairs. If a key appears in * multiple pairs, the rightmost pair is included in the object. * * @func * @memberOf R * @since v0.3.0 * @category List * @sig [[k,v]] -> {k: v} * @param {Array} pairs An array of two-element arrays that will be the keys and values of the output object. * @return {Object} The object made by pairing up `keys` and `values`. * @see R.toPairs, R.pair * @example * * R.fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3} */ var fromPairs = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function fromPairs(pairs) { var result = {}; var idx = 0; while (idx < pairs.length) { result[pairs[idx][0]] = pairs[idx][1]; idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (fromPairs); /***/ }), /***/ "./node_modules/ramda/es/groupBy.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/groupBy.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduceBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reduceBy */ "./node_modules/ramda/es/reduceBy.js"); /** * Splits a list into sub-lists stored in an object, based on the result of * calling a String-returning function on each element, and grouping the * results according to values returned. * * Dispatches to the `groupBy` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> String) -> [a] -> {String: [a]} * @param {Function} fn Function :: a -> String * @param {Array} list The array to group * @return {Object} An object with the output of `fn` for keys, mapped to arrays of elements * that produced that key when passed to `fn`. * @see R.transduce * @example * * var byGrade = R.groupBy(function(student) { * var score = student.score; * return score < 65 ? 'F' : * score < 70 ? 'D' : * score < 80 ? 'C' : * score < 90 ? 'B' : 'A'; * }); * var students = [{name: 'Abby', score: 84}, * {name: 'Eddy', score: 58}, * // ... * {name: 'Jack', score: 69}]; * byGrade(students); * // { * // 'A': [{name: 'Dianne', score: 99}], * // 'B': [{name: 'Abby', score: 84}] * // // ..., * // 'F': [{name: 'Eddy', score: 58}] * // } */ var groupBy = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__["default"])('groupBy', /*#__PURE__*/Object(_reduceBy__WEBPACK_IMPORTED_MODULE_2__["default"])(function (acc, item) { if (acc == null) { acc = []; } acc.push(item); return acc; }, null))); /* harmony default export */ __webpack_exports__["default"] = (groupBy); /***/ }), /***/ "./node_modules/ramda/es/groupWith.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/groupWith.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Takes a list and returns a list of lists where each sublist's elements are * all satisfied pairwise comparison according to the provided function. * Only adjacent elements are passed to the comparison function. * * @func * @memberOf R * @since v0.21.0 * @category List * @sig ((a, a) → Boolean) → [a] → [[a]] * @param {Function} fn Function for determining whether two given (adjacent) * elements should be in the same group * @param {Array} list The array to group. Also accepts a string, which will be * treated as a list of characters. * @return {List} A list that contains sublists of elements, * whose concatenations are equal to the original list. * @example * * R.groupWith(R.equals, [0, 1, 1, 2, 3, 5, 8, 13, 21]) * //=> [[0], [1, 1], [2], [3], [5], [8], [13], [21]] * * R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21]) * //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]] * * R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21]) * //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]] * * R.groupWith(R.eqBy(isVowel), 'aestiou') * //=> ['ae', 'st', 'iou'] */ var groupWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function (fn, list) { var res = []; var idx = 0; var len = list.length; while (idx < len) { var nextidx = idx + 1; while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) { nextidx += 1; } res.push(list.slice(idx, nextidx)); idx = nextidx; } return res; }); /* harmony default export */ __webpack_exports__["default"] = (groupWith); /***/ }), /***/ "./node_modules/ramda/es/gt.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/gt.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the first argument is greater than the second; `false` * otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @see R.lt * @example * * R.gt(2, 1); //=> true * R.gt(2, 2); //=> false * R.gt(2, 3); //=> false * R.gt('a', 'z'); //=> false * R.gt('z', 'a'); //=> true */ var gt = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function gt(a, b) { return a > b; }); /* harmony default export */ __webpack_exports__["default"] = (gt); /***/ }), /***/ "./node_modules/ramda/es/gte.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/gte.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the first argument is greater than or equal to the second; * `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {Number} a * @param {Number} b * @return {Boolean} * @see R.lte * @example * * R.gte(2, 1); //=> true * R.gte(2, 2); //=> true * R.gte(2, 3); //=> false * R.gte('a', 'z'); //=> false * R.gte('z', 'a'); //=> true */ var gte = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function gte(a, b) { return a >= b; }); /* harmony default export */ __webpack_exports__["default"] = (gte); /***/ }), /***/ "./node_modules/ramda/es/has.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/has.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /** * Returns whether or not an object has an own property with the specified name * * @func * @memberOf R * @since v0.7.0 * @category Object * @sig s -> {s: x} -> Boolean * @param {String} prop The name of the property to check for. * @param {Object} obj The object to query. * @return {Boolean} Whether the property exists. * @example * * var hasName = R.has('name'); * hasName({name: 'alice'}); //=> true * hasName({name: 'bob'}); //=> true * hasName({}); //=> false * * var point = {x: 0, y: 0}; * var pointHas = R.has(R.__, point); * pointHas('x'); //=> true * pointHas('y'); //=> true * pointHas('z'); //=> false */ var has = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (has); /***/ }), /***/ "./node_modules/ramda/es/hasIn.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/hasIn.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns whether or not an object or its prototype chain has a property with * the specified name * * @func * @memberOf R * @since v0.7.0 * @category Object * @sig s -> {s: x} -> Boolean * @param {String} prop The name of the property to check for. * @param {Object} obj The object to query. * @return {Boolean} Whether the property exists. * @example * * function Rectangle(width, height) { * this.width = width; * this.height = height; * } * Rectangle.prototype.area = function() { * return this.width * this.height; * }; * * var square = new Rectangle(2, 2); * R.hasIn('width', square); //=> true * R.hasIn('area', square); //=> true */ var hasIn = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function hasIn(prop, obj) { return prop in obj; }); /* harmony default export */ __webpack_exports__["default"] = (hasIn); /***/ }), /***/ "./node_modules/ramda/es/head.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/head.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _nth__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nth */ "./node_modules/ramda/es/nth.js"); /** * Returns the first element of the given list or string. In some libraries * this function is named `first`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> a | Undefined * @sig String -> String * @param {Array|String} list * @return {*} * @see R.tail, R.init, R.last * @example * * R.head(['fi', 'fo', 'fum']); //=> 'fi' * R.head([]); //=> undefined * * R.head('abc'); //=> 'a' * R.head(''); //=> '' */ var head = /*#__PURE__*/Object(_nth__WEBPACK_IMPORTED_MODULE_0__["default"])(0); /* harmony default export */ __webpack_exports__["default"] = (head); /***/ }), /***/ "./node_modules/ramda/es/identical.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/identical.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns true if its arguments are identical, false otherwise. Values are * identical if they reference the same memory. `NaN` is identical to `NaN`; * `0` and `-0` are not identical. * * @func * @memberOf R * @since v0.15.0 * @category Relation * @sig a -> a -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @example * * var o = {}; * R.identical(o, o); //=> true * R.identical(1, 1); //=> true * R.identical(1, '1'); //=> false * R.identical([], []); //=> false * R.identical(0, -0); //=> false * R.identical(NaN, NaN); //=> true */ var identical = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function identical(a, b) { // SameValue algorithm if (a === b) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return a !== 0 || 1 / a === 1 / b; } else { // Step 6.a: NaN == NaN return a !== a && b !== b; } }); /* harmony default export */ __webpack_exports__["default"] = (identical); /***/ }), /***/ "./node_modules/ramda/es/identity.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/identity.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_identity */ "./node_modules/ramda/es/internal/_identity.js"); /** * A function that does nothing but return the parameter supplied to it. Good * as a default or placeholder function. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig a -> a * @param {*} x The value to return. * @return {*} The input value, `x`. * @example * * R.identity(1); //=> 1 * * var obj = {}; * R.identity(obj) === obj; //=> true * @symb R.identity(a) = a */ var identity = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(_internal_identity__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (identity); /***/ }), /***/ "./node_modules/ramda/es/ifElse.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/ifElse.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Creates a function that will process either the `onTrue` or the `onFalse` * function depending upon the result of the `condition` predicate. * * @func * @memberOf R * @since v0.8.0 * @category Logic * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *) * @param {Function} condition A predicate function * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value. * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value. * @return {Function} A new unary function that will process either the `onTrue` or the `onFalse` * function depending upon the result of the `condition` predicate. * @see R.unless, R.when * @example * * var incCount = R.ifElse( * R.has('count'), * R.over(R.lensProp('count'), R.inc), * R.assoc('count', 1) * ); * incCount({}); //=> { count: 1 } * incCount({ count: 1 }); //=> { count: 2 } */ var ifElse = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function ifElse(condition, onTrue, onFalse) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() { return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments); }); }); /* harmony default export */ __webpack_exports__["default"] = (ifElse); /***/ }), /***/ "./node_modules/ramda/es/inc.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/inc.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _add__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add */ "./node_modules/ramda/es/add.js"); /** * Increments its argument. * * @func * @memberOf R * @since v0.9.0 * @category Math * @sig Number -> Number * @param {Number} n * @return {Number} n + 1 * @see R.dec * @example * * R.inc(42); //=> 43 */ var inc = /*#__PURE__*/Object(_add__WEBPACK_IMPORTED_MODULE_0__["default"])(1); /* harmony default export */ __webpack_exports__["default"] = (inc); /***/ }), /***/ "./node_modules/ramda/es/index.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/index.js ***! \****************************************/ /*! exports provided: F, T, __, add, addIndex, adjust, all, allPass, always, and, any, anyPass, ap, aperture, append, apply, applySpec, applyTo, ascend, assoc, assocPath, binary, bind, both, call, chain, clamp, clone, comparator, complement, compose, composeK, composeP, concat, cond, construct, constructN, contains, converge, countBy, curry, curryN, dec, defaultTo, descend, difference, differenceWith, dissoc, dissocPath, divide, drop, dropLast, dropLastWhile, dropRepeats, dropRepeatsWith, dropWhile, either, empty, endsWith, eqBy, eqProps, equals, evolve, filter, find, findIndex, findLast, findLastIndex, flatten, flip, forEach, forEachObjIndexed, fromPairs, groupBy, groupWith, gt, gte, has, hasIn, head, identical, identity, ifElse, inc, indexBy, indexOf, init, innerJoin, insert, insertAll, intersection, intersperse, into, invert, invertObj, invoker, is, isEmpty, isNil, join, juxt, keys, keysIn, last, lastIndexOf, length, lens, lensIndex, lensPath, lensProp, lift, liftN, lt, lte, map, mapAccum, mapAccumRight, mapObjIndexed, match, mathMod, max, maxBy, mean, median, memoize, memoizeWith, merge, mergeAll, mergeDeepLeft, mergeDeepRight, mergeDeepWith, mergeDeepWithKey, mergeWith, mergeWithKey, min, minBy, modulo, multiply, nAry, negate, none, not, nth, nthArg, o, objOf, of, omit, once, or, over, pair, partial, partialRight, partition, path, pathEq, pathOr, pathSatisfies, pick, pickAll, pickBy, pipe, pipeK, pipeP, pluck, prepend, product, project, prop, propEq, propIs, propOr, propSatisfies, props, range, reduce, reduceBy, reduceRight, reduceWhile, reduced, reject, remove, repeat, replace, reverse, scan, sequence, set, slice, sort, sortBy, sortWith, split, splitAt, splitEvery, splitWhen, startsWith, subtract, sum, symmetricDifference, symmetricDifferenceWith, tail, take, takeLast, takeLastWhile, takeWhile, tap, test, times, toLower, toPairs, toPairsIn, toString, toUpper, transduce, transpose, traverse, trim, tryCatch, type, unapply, unary, uncurryN, unfold, union, unionWith, uniq, uniqBy, uniqWith, unless, unnest, until, update, useWith, values, valuesIn, view, when, where, whereEq, without, xprod, zip, zipObj, zipWith */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _F__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./F */ "./node_modules/ramda/es/F.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "F", function() { return _F__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _T__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./T */ "./node_modules/ramda/es/T.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "T", function() { return _T__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./__ */ "./node_modules/ramda/es/__.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "__", function() { return ___WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _add__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./add */ "./node_modules/ramda/es/add.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "add", function() { return _add__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _addIndex__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./addIndex */ "./node_modules/ramda/es/addIndex.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addIndex", function() { return _addIndex__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _adjust__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./adjust */ "./node_modules/ramda/es/adjust.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "adjust", function() { return _adjust__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _all__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./all */ "./node_modules/ramda/es/all.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "all", function() { return _all__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _allPass__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./allPass */ "./node_modules/ramda/es/allPass.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "allPass", function() { return _allPass__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _always__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./always */ "./node_modules/ramda/es/always.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "always", function() { return _always__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _and__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./and */ "./node_modules/ramda/es/and.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "and", function() { return _and__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _any__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./any */ "./node_modules/ramda/es/any.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "any", function() { return _any__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _anyPass__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./anyPass */ "./node_modules/ramda/es/anyPass.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "anyPass", function() { return _anyPass__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _ap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ap */ "./node_modules/ramda/es/ap.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ap", function() { return _ap__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _aperture__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./aperture */ "./node_modules/ramda/es/aperture.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "aperture", function() { return _aperture__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _append__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./append */ "./node_modules/ramda/es/append.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "append", function() { return _append__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _apply__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./apply */ "./node_modules/ramda/es/apply.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "apply", function() { return _apply__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _applySpec__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./applySpec */ "./node_modules/ramda/es/applySpec.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "applySpec", function() { return _applySpec__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony import */ var _applyTo__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./applyTo */ "./node_modules/ramda/es/applyTo.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "applyTo", function() { return _applyTo__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony import */ var _ascend__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./ascend */ "./node_modules/ramda/es/ascend.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ascend", function() { return _ascend__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony import */ var _assoc__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./assoc */ "./node_modules/ramda/es/assoc.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "assoc", function() { return _assoc__WEBPACK_IMPORTED_MODULE_19__["default"]; }); /* harmony import */ var _assocPath__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./assocPath */ "./node_modules/ramda/es/assocPath.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "assocPath", function() { return _assocPath__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /* harmony import */ var _binary__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./binary */ "./node_modules/ramda/es/binary.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "binary", function() { return _binary__WEBPACK_IMPORTED_MODULE_21__["default"]; }); /* harmony import */ var _bind__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./bind */ "./node_modules/ramda/es/bind.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bind", function() { return _bind__WEBPACK_IMPORTED_MODULE_22__["default"]; }); /* harmony import */ var _both__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./both */ "./node_modules/ramda/es/both.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "both", function() { return _both__WEBPACK_IMPORTED_MODULE_23__["default"]; }); /* harmony import */ var _call__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./call */ "./node_modules/ramda/es/call.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "call", function() { return _call__WEBPACK_IMPORTED_MODULE_24__["default"]; }); /* harmony import */ var _chain__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./chain */ "./node_modules/ramda/es/chain.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chain", function() { return _chain__WEBPACK_IMPORTED_MODULE_25__["default"]; }); /* harmony import */ var _clamp__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./clamp */ "./node_modules/ramda/es/clamp.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clamp", function() { return _clamp__WEBPACK_IMPORTED_MODULE_26__["default"]; }); /* harmony import */ var _clone__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./clone */ "./node_modules/ramda/es/clone.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return _clone__WEBPACK_IMPORTED_MODULE_27__["default"]; }); /* harmony import */ var _comparator__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./comparator */ "./node_modules/ramda/es/comparator.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "comparator", function() { return _comparator__WEBPACK_IMPORTED_MODULE_28__["default"]; }); /* harmony import */ var _complement__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./complement */ "./node_modules/ramda/es/complement.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "complement", function() { return _complement__WEBPACK_IMPORTED_MODULE_29__["default"]; }); /* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./compose */ "./node_modules/ramda/es/compose.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return _compose__WEBPACK_IMPORTED_MODULE_30__["default"]; }); /* harmony import */ var _composeK__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./composeK */ "./node_modules/ramda/es/composeK.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "composeK", function() { return _composeK__WEBPACK_IMPORTED_MODULE_31__["default"]; }); /* harmony import */ var _composeP__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./composeP */ "./node_modules/ramda/es/composeP.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "composeP", function() { return _composeP__WEBPACK_IMPORTED_MODULE_32__["default"]; }); /* harmony import */ var _concat__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./concat */ "./node_modules/ramda/es/concat.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _concat__WEBPACK_IMPORTED_MODULE_33__["default"]; }); /* harmony import */ var _cond__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./cond */ "./node_modules/ramda/es/cond.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cond", function() { return _cond__WEBPACK_IMPORTED_MODULE_34__["default"]; }); /* harmony import */ var _construct__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./construct */ "./node_modules/ramda/es/construct.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "construct", function() { return _construct__WEBPACK_IMPORTED_MODULE_35__["default"]; }); /* harmony import */ var _constructN__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./constructN */ "./node_modules/ramda/es/constructN.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "constructN", function() { return _constructN__WEBPACK_IMPORTED_MODULE_36__["default"]; }); /* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./contains */ "./node_modules/ramda/es/contains.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contains", function() { return _contains__WEBPACK_IMPORTED_MODULE_37__["default"]; }); /* harmony import */ var _converge__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./converge */ "./node_modules/ramda/es/converge.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "converge", function() { return _converge__WEBPACK_IMPORTED_MODULE_38__["default"]; }); /* harmony import */ var _countBy__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./countBy */ "./node_modules/ramda/es/countBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "countBy", function() { return _countBy__WEBPACK_IMPORTED_MODULE_39__["default"]; }); /* harmony import */ var _curry__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./curry */ "./node_modules/ramda/es/curry.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curry", function() { return _curry__WEBPACK_IMPORTED_MODULE_40__["default"]; }); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curryN", function() { return _curryN__WEBPACK_IMPORTED_MODULE_41__["default"]; }); /* harmony import */ var _dec__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./dec */ "./node_modules/ramda/es/dec.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dec", function() { return _dec__WEBPACK_IMPORTED_MODULE_42__["default"]; }); /* harmony import */ var _defaultTo__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./defaultTo */ "./node_modules/ramda/es/defaultTo.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultTo", function() { return _defaultTo__WEBPACK_IMPORTED_MODULE_43__["default"]; }); /* harmony import */ var _descend__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./descend */ "./node_modules/ramda/es/descend.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "descend", function() { return _descend__WEBPACK_IMPORTED_MODULE_44__["default"]; }); /* harmony import */ var _difference__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./difference */ "./node_modules/ramda/es/difference.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return _difference__WEBPACK_IMPORTED_MODULE_45__["default"]; }); /* harmony import */ var _differenceWith__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./differenceWith */ "./node_modules/ramda/es/differenceWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceWith", function() { return _differenceWith__WEBPACK_IMPORTED_MODULE_46__["default"]; }); /* harmony import */ var _dissoc__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./dissoc */ "./node_modules/ramda/es/dissoc.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dissoc", function() { return _dissoc__WEBPACK_IMPORTED_MODULE_47__["default"]; }); /* harmony import */ var _dissocPath__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./dissocPath */ "./node_modules/ramda/es/dissocPath.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dissocPath", function() { return _dissocPath__WEBPACK_IMPORTED_MODULE_48__["default"]; }); /* harmony import */ var _divide__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./divide */ "./node_modules/ramda/es/divide.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "divide", function() { return _divide__WEBPACK_IMPORTED_MODULE_49__["default"]; }); /* harmony import */ var _drop__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./drop */ "./node_modules/ramda/es/drop.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drop", function() { return _drop__WEBPACK_IMPORTED_MODULE_50__["default"]; }); /* harmony import */ var _dropLast__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./dropLast */ "./node_modules/ramda/es/dropLast.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropLast", function() { return _dropLast__WEBPACK_IMPORTED_MODULE_51__["default"]; }); /* harmony import */ var _dropLastWhile__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./dropLastWhile */ "./node_modules/ramda/es/dropLastWhile.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropLastWhile", function() { return _dropLastWhile__WEBPACK_IMPORTED_MODULE_52__["default"]; }); /* harmony import */ var _dropRepeats__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./dropRepeats */ "./node_modules/ramda/es/dropRepeats.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropRepeats", function() { return _dropRepeats__WEBPACK_IMPORTED_MODULE_53__["default"]; }); /* harmony import */ var _dropRepeatsWith__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./dropRepeatsWith */ "./node_modules/ramda/es/dropRepeatsWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropRepeatsWith", function() { return _dropRepeatsWith__WEBPACK_IMPORTED_MODULE_54__["default"]; }); /* harmony import */ var _dropWhile__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./dropWhile */ "./node_modules/ramda/es/dropWhile.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropWhile", function() { return _dropWhile__WEBPACK_IMPORTED_MODULE_55__["default"]; }); /* harmony import */ var _either__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./either */ "./node_modules/ramda/es/either.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "either", function() { return _either__WEBPACK_IMPORTED_MODULE_56__["default"]; }); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./empty */ "./node_modules/ramda/es/empty.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _empty__WEBPACK_IMPORTED_MODULE_57__["default"]; }); /* harmony import */ var _endsWith__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./endsWith */ "./node_modules/ramda/es/endsWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endsWith", function() { return _endsWith__WEBPACK_IMPORTED_MODULE_58__["default"]; }); /* harmony import */ var _eqBy__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./eqBy */ "./node_modules/ramda/es/eqBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eqBy", function() { return _eqBy__WEBPACK_IMPORTED_MODULE_59__["default"]; }); /* harmony import */ var _eqProps__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./eqProps */ "./node_modules/ramda/es/eqProps.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eqProps", function() { return _eqProps__WEBPACK_IMPORTED_MODULE_60__["default"]; }); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return _equals__WEBPACK_IMPORTED_MODULE_61__["default"]; }); /* harmony import */ var _evolve__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./evolve */ "./node_modules/ramda/es/evolve.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "evolve", function() { return _evolve__WEBPACK_IMPORTED_MODULE_62__["default"]; }); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./filter */ "./node_modules/ramda/es/filter.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _filter__WEBPACK_IMPORTED_MODULE_63__["default"]; }); /* harmony import */ var _find__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./find */ "./node_modules/ramda/es/find.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _find__WEBPACK_IMPORTED_MODULE_64__["default"]; }); /* harmony import */ var _findIndex__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./findIndex */ "./node_modules/ramda/es/findIndex.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _findIndex__WEBPACK_IMPORTED_MODULE_65__["default"]; }); /* harmony import */ var _findLast__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./findLast */ "./node_modules/ramda/es/findLast.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findLast", function() { return _findLast__WEBPACK_IMPORTED_MODULE_66__["default"]; }); /* harmony import */ var _findLastIndex__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./findLastIndex */ "./node_modules/ramda/es/findLastIndex.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findLastIndex", function() { return _findLastIndex__WEBPACK_IMPORTED_MODULE_67__["default"]; }); /* harmony import */ var _flatten__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./flatten */ "./node_modules/ramda/es/flatten.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatten", function() { return _flatten__WEBPACK_IMPORTED_MODULE_68__["default"]; }); /* harmony import */ var _flip__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./flip */ "./node_modules/ramda/es/flip.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flip", function() { return _flip__WEBPACK_IMPORTED_MODULE_69__["default"]; }); /* harmony import */ var _forEach__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./forEach */ "./node_modules/ramda/es/forEach.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return _forEach__WEBPACK_IMPORTED_MODULE_70__["default"]; }); /* harmony import */ var _forEachObjIndexed__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./forEachObjIndexed */ "./node_modules/ramda/es/forEachObjIndexed.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forEachObjIndexed", function() { return _forEachObjIndexed__WEBPACK_IMPORTED_MODULE_71__["default"]; }); /* harmony import */ var _fromPairs__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./fromPairs */ "./node_modules/ramda/es/fromPairs.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromPairs", function() { return _fromPairs__WEBPACK_IMPORTED_MODULE_72__["default"]; }); /* harmony import */ var _groupBy__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./groupBy */ "./node_modules/ramda/es/groupBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _groupBy__WEBPACK_IMPORTED_MODULE_73__["default"]; }); /* harmony import */ var _groupWith__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./groupWith */ "./node_modules/ramda/es/groupWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupWith", function() { return _groupWith__WEBPACK_IMPORTED_MODULE_74__["default"]; }); /* harmony import */ var _gt__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./gt */ "./node_modules/ramda/es/gt.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gt", function() { return _gt__WEBPACK_IMPORTED_MODULE_75__["default"]; }); /* harmony import */ var _gte__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./gte */ "./node_modules/ramda/es/gte.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gte", function() { return _gte__WEBPACK_IMPORTED_MODULE_76__["default"]; }); /* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./has */ "./node_modules/ramda/es/has.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "has", function() { return _has__WEBPACK_IMPORTED_MODULE_77__["default"]; }); /* harmony import */ var _hasIn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./hasIn */ "./node_modules/ramda/es/hasIn.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hasIn", function() { return _hasIn__WEBPACK_IMPORTED_MODULE_78__["default"]; }); /* harmony import */ var _head__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./head */ "./node_modules/ramda/es/head.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "head", function() { return _head__WEBPACK_IMPORTED_MODULE_79__["default"]; }); /* harmony import */ var _identical__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./identical */ "./node_modules/ramda/es/identical.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identical", function() { return _identical__WEBPACK_IMPORTED_MODULE_80__["default"]; }); /* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./identity */ "./node_modules/ramda/es/identity.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _identity__WEBPACK_IMPORTED_MODULE_81__["default"]; }); /* harmony import */ var _ifElse__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./ifElse */ "./node_modules/ramda/es/ifElse.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ifElse", function() { return _ifElse__WEBPACK_IMPORTED_MODULE_82__["default"]; }); /* harmony import */ var _inc__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./inc */ "./node_modules/ramda/es/inc.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "inc", function() { return _inc__WEBPACK_IMPORTED_MODULE_83__["default"]; }); /* harmony import */ var _indexBy__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./indexBy */ "./node_modules/ramda/es/indexBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indexBy", function() { return _indexBy__WEBPACK_IMPORTED_MODULE_84__["default"]; }); /* harmony import */ var _indexOf__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./indexOf */ "./node_modules/ramda/es/indexOf.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indexOf", function() { return _indexOf__WEBPACK_IMPORTED_MODULE_85__["default"]; }); /* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./init */ "./node_modules/ramda/es/init.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "init", function() { return _init__WEBPACK_IMPORTED_MODULE_86__["default"]; }); /* harmony import */ var _innerJoin__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./innerJoin */ "./node_modules/ramda/es/innerJoin.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "innerJoin", function() { return _innerJoin__WEBPACK_IMPORTED_MODULE_87__["default"]; }); /* harmony import */ var _insert__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./insert */ "./node_modules/ramda/es/insert.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "insert", function() { return _insert__WEBPACK_IMPORTED_MODULE_88__["default"]; }); /* harmony import */ var _insertAll__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./insertAll */ "./node_modules/ramda/es/insertAll.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "insertAll", function() { return _insertAll__WEBPACK_IMPORTED_MODULE_89__["default"]; }); /* harmony import */ var _intersection__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./intersection */ "./node_modules/ramda/es/intersection.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "intersection", function() { return _intersection__WEBPACK_IMPORTED_MODULE_90__["default"]; }); /* harmony import */ var _intersperse__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./intersperse */ "./node_modules/ramda/es/intersperse.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "intersperse", function() { return _intersperse__WEBPACK_IMPORTED_MODULE_91__["default"]; }); /* harmony import */ var _into__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./into */ "./node_modules/ramda/es/into.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "into", function() { return _into__WEBPACK_IMPORTED_MODULE_92__["default"]; }); /* harmony import */ var _invert__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ./invert */ "./node_modules/ramda/es/invert.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "invert", function() { return _invert__WEBPACK_IMPORTED_MODULE_93__["default"]; }); /* harmony import */ var _invertObj__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ./invertObj */ "./node_modules/ramda/es/invertObj.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "invertObj", function() { return _invertObj__WEBPACK_IMPORTED_MODULE_94__["default"]; }); /* harmony import */ var _invoker__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ./invoker */ "./node_modules/ramda/es/invoker.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "invoker", function() { return _invoker__WEBPACK_IMPORTED_MODULE_95__["default"]; }); /* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ./is */ "./node_modules/ramda/es/is.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "is", function() { return _is__WEBPACK_IMPORTED_MODULE_96__["default"]; }); /* harmony import */ var _isEmpty__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ./isEmpty */ "./node_modules/ramda/es/isEmpty.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _isEmpty__WEBPACK_IMPORTED_MODULE_97__["default"]; }); /* harmony import */ var _isNil__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./isNil */ "./node_modules/ramda/es/isNil.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isNil", function() { return _isNil__WEBPACK_IMPORTED_MODULE_98__["default"]; }); /* harmony import */ var _join__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ./join */ "./node_modules/ramda/es/join.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "join", function() { return _join__WEBPACK_IMPORTED_MODULE_99__["default"]; }); /* harmony import */ var _juxt__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ./juxt */ "./node_modules/ramda/es/juxt.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "juxt", function() { return _juxt__WEBPACK_IMPORTED_MODULE_100__["default"]; }); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return _keys__WEBPACK_IMPORTED_MODULE_101__["default"]; }); /* harmony import */ var _keysIn__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./keysIn */ "./node_modules/ramda/es/keysIn.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keysIn", function() { return _keysIn__WEBPACK_IMPORTED_MODULE_102__["default"]; }); /* harmony import */ var _last__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./last */ "./node_modules/ramda/es/last.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _last__WEBPACK_IMPORTED_MODULE_103__["default"]; }); /* harmony import */ var _lastIndexOf__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./lastIndexOf */ "./node_modules/ramda/es/lastIndexOf.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lastIndexOf", function() { return _lastIndexOf__WEBPACK_IMPORTED_MODULE_104__["default"]; }); /* harmony import */ var _length__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./length */ "./node_modules/ramda/es/length.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "length", function() { return _length__WEBPACK_IMPORTED_MODULE_105__["default"]; }); /* harmony import */ var _lens__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./lens */ "./node_modules/ramda/es/lens.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lens", function() { return _lens__WEBPACK_IMPORTED_MODULE_106__["default"]; }); /* harmony import */ var _lensIndex__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./lensIndex */ "./node_modules/ramda/es/lensIndex.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lensIndex", function() { return _lensIndex__WEBPACK_IMPORTED_MODULE_107__["default"]; }); /* harmony import */ var _lensPath__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./lensPath */ "./node_modules/ramda/es/lensPath.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lensPath", function() { return _lensPath__WEBPACK_IMPORTED_MODULE_108__["default"]; }); /* harmony import */ var _lensProp__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(/*! ./lensProp */ "./node_modules/ramda/es/lensProp.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lensProp", function() { return _lensProp__WEBPACK_IMPORTED_MODULE_109__["default"]; }); /* harmony import */ var _lift__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(/*! ./lift */ "./node_modules/ramda/es/lift.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lift", function() { return _lift__WEBPACK_IMPORTED_MODULE_110__["default"]; }); /* harmony import */ var _liftN__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(/*! ./liftN */ "./node_modules/ramda/es/liftN.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "liftN", function() { return _liftN__WEBPACK_IMPORTED_MODULE_111__["default"]; }); /* harmony import */ var _lt__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(/*! ./lt */ "./node_modules/ramda/es/lt.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lt", function() { return _lt__WEBPACK_IMPORTED_MODULE_112__["default"]; }); /* harmony import */ var _lte__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(/*! ./lte */ "./node_modules/ramda/es/lte.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lte", function() { return _lte__WEBPACK_IMPORTED_MODULE_113__["default"]; }); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _map__WEBPACK_IMPORTED_MODULE_114__["default"]; }); /* harmony import */ var _mapAccum__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ./mapAccum */ "./node_modules/ramda/es/mapAccum.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapAccum", function() { return _mapAccum__WEBPACK_IMPORTED_MODULE_115__["default"]; }); /* harmony import */ var _mapAccumRight__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! ./mapAccumRight */ "./node_modules/ramda/es/mapAccumRight.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapAccumRight", function() { return _mapAccumRight__WEBPACK_IMPORTED_MODULE_116__["default"]; }); /* harmony import */ var _mapObjIndexed__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(/*! ./mapObjIndexed */ "./node_modules/ramda/es/mapObjIndexed.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapObjIndexed", function() { return _mapObjIndexed__WEBPACK_IMPORTED_MODULE_117__["default"]; }); /* harmony import */ var _match__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./match */ "./node_modules/ramda/es/match.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "match", function() { return _match__WEBPACK_IMPORTED_MODULE_118__["default"]; }); /* harmony import */ var _mathMod__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ./mathMod */ "./node_modules/ramda/es/mathMod.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mathMod", function() { return _mathMod__WEBPACK_IMPORTED_MODULE_119__["default"]; }); /* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ./max */ "./node_modules/ramda/es/max.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _max__WEBPACK_IMPORTED_MODULE_120__["default"]; }); /* harmony import */ var _maxBy__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(/*! ./maxBy */ "./node_modules/ramda/es/maxBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maxBy", function() { return _maxBy__WEBPACK_IMPORTED_MODULE_121__["default"]; }); /* harmony import */ var _mean__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(/*! ./mean */ "./node_modules/ramda/es/mean.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mean", function() { return _mean__WEBPACK_IMPORTED_MODULE_122__["default"]; }); /* harmony import */ var _median__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(/*! ./median */ "./node_modules/ramda/es/median.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "median", function() { return _median__WEBPACK_IMPORTED_MODULE_123__["default"]; }); /* harmony import */ var _memoize__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(/*! ./memoize */ "./node_modules/ramda/es/memoize.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "memoize", function() { return _memoize__WEBPACK_IMPORTED_MODULE_124__["default"]; }); /* harmony import */ var _memoizeWith__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(/*! ./memoizeWith */ "./node_modules/ramda/es/memoizeWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "memoizeWith", function() { return _memoizeWith__WEBPACK_IMPORTED_MODULE_125__["default"]; }); /* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(/*! ./merge */ "./node_modules/ramda/es/merge.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _merge__WEBPACK_IMPORTED_MODULE_126__["default"]; }); /* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(/*! ./mergeAll */ "./node_modules/ramda/es/mergeAll.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _mergeAll__WEBPACK_IMPORTED_MODULE_127__["default"]; }); /* harmony import */ var _mergeDeepLeft__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(/*! ./mergeDeepLeft */ "./node_modules/ramda/es/mergeDeepLeft.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeDeepLeft", function() { return _mergeDeepLeft__WEBPACK_IMPORTED_MODULE_128__["default"]; }); /* harmony import */ var _mergeDeepRight__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(/*! ./mergeDeepRight */ "./node_modules/ramda/es/mergeDeepRight.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeDeepRight", function() { return _mergeDeepRight__WEBPACK_IMPORTED_MODULE_129__["default"]; }); /* harmony import */ var _mergeDeepWith__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(/*! ./mergeDeepWith */ "./node_modules/ramda/es/mergeDeepWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeDeepWith", function() { return _mergeDeepWith__WEBPACK_IMPORTED_MODULE_130__["default"]; }); /* harmony import */ var _mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(/*! ./mergeDeepWithKey */ "./node_modules/ramda/es/mergeDeepWithKey.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeDeepWithKey", function() { return _mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_131__["default"]; }); /* harmony import */ var _mergeWith__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(/*! ./mergeWith */ "./node_modules/ramda/es/mergeWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeWith", function() { return _mergeWith__WEBPACK_IMPORTED_MODULE_132__["default"]; }); /* harmony import */ var _mergeWithKey__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(/*! ./mergeWithKey */ "./node_modules/ramda/es/mergeWithKey.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeWithKey", function() { return _mergeWithKey__WEBPACK_IMPORTED_MODULE_133__["default"]; }); /* harmony import */ var _min__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(/*! ./min */ "./node_modules/ramda/es/min.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _min__WEBPACK_IMPORTED_MODULE_134__["default"]; }); /* harmony import */ var _minBy__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(/*! ./minBy */ "./node_modules/ramda/es/minBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minBy", function() { return _minBy__WEBPACK_IMPORTED_MODULE_135__["default"]; }); /* harmony import */ var _modulo__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(/*! ./modulo */ "./node_modules/ramda/es/modulo.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "modulo", function() { return _modulo__WEBPACK_IMPORTED_MODULE_136__["default"]; }); /* harmony import */ var _multiply__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(/*! ./multiply */ "./node_modules/ramda/es/multiply.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multiply", function() { return _multiply__WEBPACK_IMPORTED_MODULE_137__["default"]; }); /* harmony import */ var _nAry__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(/*! ./nAry */ "./node_modules/ramda/es/nAry.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nAry", function() { return _nAry__WEBPACK_IMPORTED_MODULE_138__["default"]; }); /* harmony import */ var _negate__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(/*! ./negate */ "./node_modules/ramda/es/negate.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "negate", function() { return _negate__WEBPACK_IMPORTED_MODULE_139__["default"]; }); /* harmony import */ var _none__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(/*! ./none */ "./node_modules/ramda/es/none.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "none", function() { return _none__WEBPACK_IMPORTED_MODULE_140__["default"]; }); /* harmony import */ var _not__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(/*! ./not */ "./node_modules/ramda/es/not.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "not", function() { return _not__WEBPACK_IMPORTED_MODULE_141__["default"]; }); /* harmony import */ var _nth__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(/*! ./nth */ "./node_modules/ramda/es/nth.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nth", function() { return _nth__WEBPACK_IMPORTED_MODULE_142__["default"]; }); /* harmony import */ var _nthArg__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(/*! ./nthArg */ "./node_modules/ramda/es/nthArg.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nthArg", function() { return _nthArg__WEBPACK_IMPORTED_MODULE_143__["default"]; }); /* harmony import */ var _o__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(/*! ./o */ "./node_modules/ramda/es/o.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "o", function() { return _o__WEBPACK_IMPORTED_MODULE_144__["default"]; }); /* harmony import */ var _objOf__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(/*! ./objOf */ "./node_modules/ramda/es/objOf.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "objOf", function() { return _objOf__WEBPACK_IMPORTED_MODULE_145__["default"]; }); /* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(/*! ./of */ "./node_modules/ramda/es/of.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _of__WEBPACK_IMPORTED_MODULE_146__["default"]; }); /* harmony import */ var _omit__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(/*! ./omit */ "./node_modules/ramda/es/omit.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "omit", function() { return _omit__WEBPACK_IMPORTED_MODULE_147__["default"]; }); /* harmony import */ var _once__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(/*! ./once */ "./node_modules/ramda/es/once.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "once", function() { return _once__WEBPACK_IMPORTED_MODULE_148__["default"]; }); /* harmony import */ var _or__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(/*! ./or */ "./node_modules/ramda/es/or.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "or", function() { return _or__WEBPACK_IMPORTED_MODULE_149__["default"]; }); /* harmony import */ var _over__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(/*! ./over */ "./node_modules/ramda/es/over.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "over", function() { return _over__WEBPACK_IMPORTED_MODULE_150__["default"]; }); /* harmony import */ var _pair__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(/*! ./pair */ "./node_modules/ramda/es/pair.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pair", function() { return _pair__WEBPACK_IMPORTED_MODULE_151__["default"]; }); /* harmony import */ var _partial__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(/*! ./partial */ "./node_modules/ramda/es/partial.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partial", function() { return _partial__WEBPACK_IMPORTED_MODULE_152__["default"]; }); /* harmony import */ var _partialRight__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(/*! ./partialRight */ "./node_modules/ramda/es/partialRight.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partialRight", function() { return _partialRight__WEBPACK_IMPORTED_MODULE_153__["default"]; }); /* harmony import */ var _partition__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(/*! ./partition */ "./node_modules/ramda/es/partition.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _partition__WEBPACK_IMPORTED_MODULE_154__["default"]; }); /* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__(/*! ./path */ "./node_modules/ramda/es/path.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path", function() { return _path__WEBPACK_IMPORTED_MODULE_155__["default"]; }); /* harmony import */ var _pathEq__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__(/*! ./pathEq */ "./node_modules/ramda/es/pathEq.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pathEq", function() { return _pathEq__WEBPACK_IMPORTED_MODULE_156__["default"]; }); /* harmony import */ var _pathOr__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__(/*! ./pathOr */ "./node_modules/ramda/es/pathOr.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pathOr", function() { return _pathOr__WEBPACK_IMPORTED_MODULE_157__["default"]; }); /* harmony import */ var _pathSatisfies__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(/*! ./pathSatisfies */ "./node_modules/ramda/es/pathSatisfies.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pathSatisfies", function() { return _pathSatisfies__WEBPACK_IMPORTED_MODULE_158__["default"]; }); /* harmony import */ var _pick__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(/*! ./pick */ "./node_modules/ramda/es/pick.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pick", function() { return _pick__WEBPACK_IMPORTED_MODULE_159__["default"]; }); /* harmony import */ var _pickAll__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(/*! ./pickAll */ "./node_modules/ramda/es/pickAll.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pickAll", function() { return _pickAll__WEBPACK_IMPORTED_MODULE_160__["default"]; }); /* harmony import */ var _pickBy__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__(/*! ./pickBy */ "./node_modules/ramda/es/pickBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pickBy", function() { return _pickBy__WEBPACK_IMPORTED_MODULE_161__["default"]; }); /* harmony import */ var _pipe__WEBPACK_IMPORTED_MODULE_162__ = __webpack_require__(/*! ./pipe */ "./node_modules/ramda/es/pipe.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _pipe__WEBPACK_IMPORTED_MODULE_162__["default"]; }); /* harmony import */ var _pipeK__WEBPACK_IMPORTED_MODULE_163__ = __webpack_require__(/*! ./pipeK */ "./node_modules/ramda/es/pipeK.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipeK", function() { return _pipeK__WEBPACK_IMPORTED_MODULE_163__["default"]; }); /* harmony import */ var _pipeP__WEBPACK_IMPORTED_MODULE_164__ = __webpack_require__(/*! ./pipeP */ "./node_modules/ramda/es/pipeP.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipeP", function() { return _pipeP__WEBPACK_IMPORTED_MODULE_164__["default"]; }); /* harmony import */ var _pluck__WEBPACK_IMPORTED_MODULE_165__ = __webpack_require__(/*! ./pluck */ "./node_modules/ramda/es/pluck.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _pluck__WEBPACK_IMPORTED_MODULE_165__["default"]; }); /* harmony import */ var _prepend__WEBPACK_IMPORTED_MODULE_166__ = __webpack_require__(/*! ./prepend */ "./node_modules/ramda/es/prepend.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prepend", function() { return _prepend__WEBPACK_IMPORTED_MODULE_166__["default"]; }); /* harmony import */ var _product__WEBPACK_IMPORTED_MODULE_167__ = __webpack_require__(/*! ./product */ "./node_modules/ramda/es/product.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "product", function() { return _product__WEBPACK_IMPORTED_MODULE_167__["default"]; }); /* harmony import */ var _project__WEBPACK_IMPORTED_MODULE_168__ = __webpack_require__(/*! ./project */ "./node_modules/ramda/es/project.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "project", function() { return _project__WEBPACK_IMPORTED_MODULE_168__["default"]; }); /* harmony import */ var _prop__WEBPACK_IMPORTED_MODULE_169__ = __webpack_require__(/*! ./prop */ "./node_modules/ramda/es/prop.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prop", function() { return _prop__WEBPACK_IMPORTED_MODULE_169__["default"]; }); /* harmony import */ var _propEq__WEBPACK_IMPORTED_MODULE_170__ = __webpack_require__(/*! ./propEq */ "./node_modules/ramda/es/propEq.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "propEq", function() { return _propEq__WEBPACK_IMPORTED_MODULE_170__["default"]; }); /* harmony import */ var _propIs__WEBPACK_IMPORTED_MODULE_171__ = __webpack_require__(/*! ./propIs */ "./node_modules/ramda/es/propIs.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "propIs", function() { return _propIs__WEBPACK_IMPORTED_MODULE_171__["default"]; }); /* harmony import */ var _propOr__WEBPACK_IMPORTED_MODULE_172__ = __webpack_require__(/*! ./propOr */ "./node_modules/ramda/es/propOr.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "propOr", function() { return _propOr__WEBPACK_IMPORTED_MODULE_172__["default"]; }); /* harmony import */ var _propSatisfies__WEBPACK_IMPORTED_MODULE_173__ = __webpack_require__(/*! ./propSatisfies */ "./node_modules/ramda/es/propSatisfies.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "propSatisfies", function() { return _propSatisfies__WEBPACK_IMPORTED_MODULE_173__["default"]; }); /* harmony import */ var _props__WEBPACK_IMPORTED_MODULE_174__ = __webpack_require__(/*! ./props */ "./node_modules/ramda/es/props.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "props", function() { return _props__WEBPACK_IMPORTED_MODULE_174__["default"]; }); /* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_175__ = __webpack_require__(/*! ./range */ "./node_modules/ramda/es/range.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _range__WEBPACK_IMPORTED_MODULE_175__["default"]; }); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_176__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _reduce__WEBPACK_IMPORTED_MODULE_176__["default"]; }); /* harmony import */ var _reduceBy__WEBPACK_IMPORTED_MODULE_177__ = __webpack_require__(/*! ./reduceBy */ "./node_modules/ramda/es/reduceBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduceBy", function() { return _reduceBy__WEBPACK_IMPORTED_MODULE_177__["default"]; }); /* harmony import */ var _reduceRight__WEBPACK_IMPORTED_MODULE_178__ = __webpack_require__(/*! ./reduceRight */ "./node_modules/ramda/es/reduceRight.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduceRight", function() { return _reduceRight__WEBPACK_IMPORTED_MODULE_178__["default"]; }); /* harmony import */ var _reduceWhile__WEBPACK_IMPORTED_MODULE_179__ = __webpack_require__(/*! ./reduceWhile */ "./node_modules/ramda/es/reduceWhile.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduceWhile", function() { return _reduceWhile__WEBPACK_IMPORTED_MODULE_179__["default"]; }); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_180__ = __webpack_require__(/*! ./reduced */ "./node_modules/ramda/es/reduced.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduced", function() { return _reduced__WEBPACK_IMPORTED_MODULE_180__["default"]; }); /* harmony import */ var _reject__WEBPACK_IMPORTED_MODULE_181__ = __webpack_require__(/*! ./reject */ "./node_modules/ramda/es/reject.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reject", function() { return _reject__WEBPACK_IMPORTED_MODULE_181__["default"]; }); /* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_182__ = __webpack_require__(/*! ./remove */ "./node_modules/ramda/es/remove.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "remove", function() { return _remove__WEBPACK_IMPORTED_MODULE_182__["default"]; }); /* harmony import */ var _repeat__WEBPACK_IMPORTED_MODULE_183__ = __webpack_require__(/*! ./repeat */ "./node_modules/ramda/es/repeat.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _repeat__WEBPACK_IMPORTED_MODULE_183__["default"]; }); /* harmony import */ var _replace__WEBPACK_IMPORTED_MODULE_184__ = __webpack_require__(/*! ./replace */ "./node_modules/ramda/es/replace.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "replace", function() { return _replace__WEBPACK_IMPORTED_MODULE_184__["default"]; }); /* harmony import */ var _reverse__WEBPACK_IMPORTED_MODULE_185__ = __webpack_require__(/*! ./reverse */ "./node_modules/ramda/es/reverse.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reverse", function() { return _reverse__WEBPACK_IMPORTED_MODULE_185__["default"]; }); /* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_186__ = __webpack_require__(/*! ./scan */ "./node_modules/ramda/es/scan.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _scan__WEBPACK_IMPORTED_MODULE_186__["default"]; }); /* harmony import */ var _sequence__WEBPACK_IMPORTED_MODULE_187__ = __webpack_require__(/*! ./sequence */ "./node_modules/ramda/es/sequence.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequence", function() { return _sequence__WEBPACK_IMPORTED_MODULE_187__["default"]; }); /* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_188__ = __webpack_require__(/*! ./set */ "./node_modules/ramda/es/set.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "set", function() { return _set__WEBPACK_IMPORTED_MODULE_188__["default"]; }); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_189__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return _slice__WEBPACK_IMPORTED_MODULE_189__["default"]; }); /* harmony import */ var _sort__WEBPACK_IMPORTED_MODULE_190__ = __webpack_require__(/*! ./sort */ "./node_modules/ramda/es/sort.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sort", function() { return _sort__WEBPACK_IMPORTED_MODULE_190__["default"]; }); /* harmony import */ var _sortBy__WEBPACK_IMPORTED_MODULE_191__ = __webpack_require__(/*! ./sortBy */ "./node_modules/ramda/es/sortBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sortBy", function() { return _sortBy__WEBPACK_IMPORTED_MODULE_191__["default"]; }); /* harmony import */ var _sortWith__WEBPACK_IMPORTED_MODULE_192__ = __webpack_require__(/*! ./sortWith */ "./node_modules/ramda/es/sortWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sortWith", function() { return _sortWith__WEBPACK_IMPORTED_MODULE_192__["default"]; }); /* harmony import */ var _split__WEBPACK_IMPORTED_MODULE_193__ = __webpack_require__(/*! ./split */ "./node_modules/ramda/es/split.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "split", function() { return _split__WEBPACK_IMPORTED_MODULE_193__["default"]; }); /* harmony import */ var _splitAt__WEBPACK_IMPORTED_MODULE_194__ = __webpack_require__(/*! ./splitAt */ "./node_modules/ramda/es/splitAt.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "splitAt", function() { return _splitAt__WEBPACK_IMPORTED_MODULE_194__["default"]; }); /* harmony import */ var _splitEvery__WEBPACK_IMPORTED_MODULE_195__ = __webpack_require__(/*! ./splitEvery */ "./node_modules/ramda/es/splitEvery.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "splitEvery", function() { return _splitEvery__WEBPACK_IMPORTED_MODULE_195__["default"]; }); /* harmony import */ var _splitWhen__WEBPACK_IMPORTED_MODULE_196__ = __webpack_require__(/*! ./splitWhen */ "./node_modules/ramda/es/splitWhen.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "splitWhen", function() { return _splitWhen__WEBPACK_IMPORTED_MODULE_196__["default"]; }); /* harmony import */ var _startsWith__WEBPACK_IMPORTED_MODULE_197__ = __webpack_require__(/*! ./startsWith */ "./node_modules/ramda/es/startsWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startsWith", function() { return _startsWith__WEBPACK_IMPORTED_MODULE_197__["default"]; }); /* harmony import */ var _subtract__WEBPACK_IMPORTED_MODULE_198__ = __webpack_require__(/*! ./subtract */ "./node_modules/ramda/es/subtract.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subtract", function() { return _subtract__WEBPACK_IMPORTED_MODULE_198__["default"]; }); /* harmony import */ var _sum__WEBPACK_IMPORTED_MODULE_199__ = __webpack_require__(/*! ./sum */ "./node_modules/ramda/es/sum.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return _sum__WEBPACK_IMPORTED_MODULE_199__["default"]; }); /* harmony import */ var _symmetricDifference__WEBPACK_IMPORTED_MODULE_200__ = __webpack_require__(/*! ./symmetricDifference */ "./node_modules/ramda/es/symmetricDifference.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symmetricDifference", function() { return _symmetricDifference__WEBPACK_IMPORTED_MODULE_200__["default"]; }); /* harmony import */ var _symmetricDifferenceWith__WEBPACK_IMPORTED_MODULE_201__ = __webpack_require__(/*! ./symmetricDifferenceWith */ "./node_modules/ramda/es/symmetricDifferenceWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symmetricDifferenceWith", function() { return _symmetricDifferenceWith__WEBPACK_IMPORTED_MODULE_201__["default"]; }); /* harmony import */ var _tail__WEBPACK_IMPORTED_MODULE_202__ = __webpack_require__(/*! ./tail */ "./node_modules/ramda/es/tail.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tail", function() { return _tail__WEBPACK_IMPORTED_MODULE_202__["default"]; }); /* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_203__ = __webpack_require__(/*! ./take */ "./node_modules/ramda/es/take.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _take__WEBPACK_IMPORTED_MODULE_203__["default"]; }); /* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_204__ = __webpack_require__(/*! ./takeLast */ "./node_modules/ramda/es/takeLast.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _takeLast__WEBPACK_IMPORTED_MODULE_204__["default"]; }); /* harmony import */ var _takeLastWhile__WEBPACK_IMPORTED_MODULE_205__ = __webpack_require__(/*! ./takeLastWhile */ "./node_modules/ramda/es/takeLastWhile.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLastWhile", function() { return _takeLastWhile__WEBPACK_IMPORTED_MODULE_205__["default"]; }); /* harmony import */ var _takeWhile__WEBPACK_IMPORTED_MODULE_206__ = __webpack_require__(/*! ./takeWhile */ "./node_modules/ramda/es/takeWhile.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _takeWhile__WEBPACK_IMPORTED_MODULE_206__["default"]; }); /* harmony import */ var _tap__WEBPACK_IMPORTED_MODULE_207__ = __webpack_require__(/*! ./tap */ "./node_modules/ramda/es/tap.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _tap__WEBPACK_IMPORTED_MODULE_207__["default"]; }); /* harmony import */ var _test__WEBPACK_IMPORTED_MODULE_208__ = __webpack_require__(/*! ./test */ "./node_modules/ramda/es/test.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "test", function() { return _test__WEBPACK_IMPORTED_MODULE_208__["default"]; }); /* harmony import */ var _times__WEBPACK_IMPORTED_MODULE_209__ = __webpack_require__(/*! ./times */ "./node_modules/ramda/es/times.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "times", function() { return _times__WEBPACK_IMPORTED_MODULE_209__["default"]; }); /* harmony import */ var _toLower__WEBPACK_IMPORTED_MODULE_210__ = __webpack_require__(/*! ./toLower */ "./node_modules/ramda/es/toLower.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toLower", function() { return _toLower__WEBPACK_IMPORTED_MODULE_210__["default"]; }); /* harmony import */ var _toPairs__WEBPACK_IMPORTED_MODULE_211__ = __webpack_require__(/*! ./toPairs */ "./node_modules/ramda/es/toPairs.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toPairs", function() { return _toPairs__WEBPACK_IMPORTED_MODULE_211__["default"]; }); /* harmony import */ var _toPairsIn__WEBPACK_IMPORTED_MODULE_212__ = __webpack_require__(/*! ./toPairsIn */ "./node_modules/ramda/es/toPairsIn.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toPairsIn", function() { return _toPairsIn__WEBPACK_IMPORTED_MODULE_212__["default"]; }); /* harmony import */ var _toString__WEBPACK_IMPORTED_MODULE_213__ = __webpack_require__(/*! ./toString */ "./node_modules/ramda/es/toString.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toString", function() { return _toString__WEBPACK_IMPORTED_MODULE_213__["default"]; }); /* harmony import */ var _toUpper__WEBPACK_IMPORTED_MODULE_214__ = __webpack_require__(/*! ./toUpper */ "./node_modules/ramda/es/toUpper.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toUpper", function() { return _toUpper__WEBPACK_IMPORTED_MODULE_214__["default"]; }); /* harmony import */ var _transduce__WEBPACK_IMPORTED_MODULE_215__ = __webpack_require__(/*! ./transduce */ "./node_modules/ramda/es/transduce.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transduce", function() { return _transduce__WEBPACK_IMPORTED_MODULE_215__["default"]; }); /* harmony import */ var _transpose__WEBPACK_IMPORTED_MODULE_216__ = __webpack_require__(/*! ./transpose */ "./node_modules/ramda/es/transpose.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return _transpose__WEBPACK_IMPORTED_MODULE_216__["default"]; }); /* harmony import */ var _traverse__WEBPACK_IMPORTED_MODULE_217__ = __webpack_require__(/*! ./traverse */ "./node_modules/ramda/es/traverse.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "traverse", function() { return _traverse__WEBPACK_IMPORTED_MODULE_217__["default"]; }); /* harmony import */ var _trim__WEBPACK_IMPORTED_MODULE_218__ = __webpack_require__(/*! ./trim */ "./node_modules/ramda/es/trim.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "trim", function() { return _trim__WEBPACK_IMPORTED_MODULE_218__["default"]; }); /* harmony import */ var _tryCatch__WEBPACK_IMPORTED_MODULE_219__ = __webpack_require__(/*! ./tryCatch */ "./node_modules/ramda/es/tryCatch.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tryCatch", function() { return _tryCatch__WEBPACK_IMPORTED_MODULE_219__["default"]; }); /* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_220__ = __webpack_require__(/*! ./type */ "./node_modules/ramda/es/type.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "type", function() { return _type__WEBPACK_IMPORTED_MODULE_220__["default"]; }); /* harmony import */ var _unapply__WEBPACK_IMPORTED_MODULE_221__ = __webpack_require__(/*! ./unapply */ "./node_modules/ramda/es/unapply.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unapply", function() { return _unapply__WEBPACK_IMPORTED_MODULE_221__["default"]; }); /* harmony import */ var _unary__WEBPACK_IMPORTED_MODULE_222__ = __webpack_require__(/*! ./unary */ "./node_modules/ramda/es/unary.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unary", function() { return _unary__WEBPACK_IMPORTED_MODULE_222__["default"]; }); /* harmony import */ var _uncurryN__WEBPACK_IMPORTED_MODULE_223__ = __webpack_require__(/*! ./uncurryN */ "./node_modules/ramda/es/uncurryN.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uncurryN", function() { return _uncurryN__WEBPACK_IMPORTED_MODULE_223__["default"]; }); /* harmony import */ var _unfold__WEBPACK_IMPORTED_MODULE_224__ = __webpack_require__(/*! ./unfold */ "./node_modules/ramda/es/unfold.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unfold", function() { return _unfold__WEBPACK_IMPORTED_MODULE_224__["default"]; }); /* harmony import */ var _union__WEBPACK_IMPORTED_MODULE_225__ = __webpack_require__(/*! ./union */ "./node_modules/ramda/es/union.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "union", function() { return _union__WEBPACK_IMPORTED_MODULE_225__["default"]; }); /* harmony import */ var _unionWith__WEBPACK_IMPORTED_MODULE_226__ = __webpack_require__(/*! ./unionWith */ "./node_modules/ramda/es/unionWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unionWith", function() { return _unionWith__WEBPACK_IMPORTED_MODULE_226__["default"]; }); /* harmony import */ var _uniq__WEBPACK_IMPORTED_MODULE_227__ = __webpack_require__(/*! ./uniq */ "./node_modules/ramda/es/uniq.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uniq", function() { return _uniq__WEBPACK_IMPORTED_MODULE_227__["default"]; }); /* harmony import */ var _uniqBy__WEBPACK_IMPORTED_MODULE_228__ = __webpack_require__(/*! ./uniqBy */ "./node_modules/ramda/es/uniqBy.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uniqBy", function() { return _uniqBy__WEBPACK_IMPORTED_MODULE_228__["default"]; }); /* harmony import */ var _uniqWith__WEBPACK_IMPORTED_MODULE_229__ = __webpack_require__(/*! ./uniqWith */ "./node_modules/ramda/es/uniqWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uniqWith", function() { return _uniqWith__WEBPACK_IMPORTED_MODULE_229__["default"]; }); /* harmony import */ var _unless__WEBPACK_IMPORTED_MODULE_230__ = __webpack_require__(/*! ./unless */ "./node_modules/ramda/es/unless.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unless", function() { return _unless__WEBPACK_IMPORTED_MODULE_230__["default"]; }); /* harmony import */ var _unnest__WEBPACK_IMPORTED_MODULE_231__ = __webpack_require__(/*! ./unnest */ "./node_modules/ramda/es/unnest.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unnest", function() { return _unnest__WEBPACK_IMPORTED_MODULE_231__["default"]; }); /* harmony import */ var _until__WEBPACK_IMPORTED_MODULE_232__ = __webpack_require__(/*! ./until */ "./node_modules/ramda/es/until.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "until", function() { return _until__WEBPACK_IMPORTED_MODULE_232__["default"]; }); /* harmony import */ var _update__WEBPACK_IMPORTED_MODULE_233__ = __webpack_require__(/*! ./update */ "./node_modules/ramda/es/update.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "update", function() { return _update__WEBPACK_IMPORTED_MODULE_233__["default"]; }); /* harmony import */ var _useWith__WEBPACK_IMPORTED_MODULE_234__ = __webpack_require__(/*! ./useWith */ "./node_modules/ramda/es/useWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useWith", function() { return _useWith__WEBPACK_IMPORTED_MODULE_234__["default"]; }); /* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_235__ = __webpack_require__(/*! ./values */ "./node_modules/ramda/es/values.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "values", function() { return _values__WEBPACK_IMPORTED_MODULE_235__["default"]; }); /* harmony import */ var _valuesIn__WEBPACK_IMPORTED_MODULE_236__ = __webpack_require__(/*! ./valuesIn */ "./node_modules/ramda/es/valuesIn.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "valuesIn", function() { return _valuesIn__WEBPACK_IMPORTED_MODULE_236__["default"]; }); /* harmony import */ var _view__WEBPACK_IMPORTED_MODULE_237__ = __webpack_require__(/*! ./view */ "./node_modules/ramda/es/view.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "view", function() { return _view__WEBPACK_IMPORTED_MODULE_237__["default"]; }); /* harmony import */ var _when__WEBPACK_IMPORTED_MODULE_238__ = __webpack_require__(/*! ./when */ "./node_modules/ramda/es/when.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "when", function() { return _when__WEBPACK_IMPORTED_MODULE_238__["default"]; }); /* harmony import */ var _where__WEBPACK_IMPORTED_MODULE_239__ = __webpack_require__(/*! ./where */ "./node_modules/ramda/es/where.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "where", function() { return _where__WEBPACK_IMPORTED_MODULE_239__["default"]; }); /* harmony import */ var _whereEq__WEBPACK_IMPORTED_MODULE_240__ = __webpack_require__(/*! ./whereEq */ "./node_modules/ramda/es/whereEq.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "whereEq", function() { return _whereEq__WEBPACK_IMPORTED_MODULE_240__["default"]; }); /* harmony import */ var _without__WEBPACK_IMPORTED_MODULE_241__ = __webpack_require__(/*! ./without */ "./node_modules/ramda/es/without.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "without", function() { return _without__WEBPACK_IMPORTED_MODULE_241__["default"]; }); /* harmony import */ var _xprod__WEBPACK_IMPORTED_MODULE_242__ = __webpack_require__(/*! ./xprod */ "./node_modules/ramda/es/xprod.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "xprod", function() { return _xprod__WEBPACK_IMPORTED_MODULE_242__["default"]; }); /* harmony import */ var _zip__WEBPACK_IMPORTED_MODULE_243__ = __webpack_require__(/*! ./zip */ "./node_modules/ramda/es/zip.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _zip__WEBPACK_IMPORTED_MODULE_243__["default"]; }); /* harmony import */ var _zipObj__WEBPACK_IMPORTED_MODULE_244__ = __webpack_require__(/*! ./zipObj */ "./node_modules/ramda/es/zipObj.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipObj", function() { return _zipObj__WEBPACK_IMPORTED_MODULE_244__["default"]; }); /* harmony import */ var _zipWith__WEBPACK_IMPORTED_MODULE_245__ = __webpack_require__(/*! ./zipWith */ "./node_modules/ramda/es/zipWith.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipWith", function() { return _zipWith__WEBPACK_IMPORTED_MODULE_245__["default"]; }); /***/ }), /***/ "./node_modules/ramda/es/indexBy.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/indexBy.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _reduceBy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduceBy */ "./node_modules/ramda/es/reduceBy.js"); /** * Given a function that generates a key, turns a list of objects into an * object indexing the objects by the given key. Note that if multiple * objects generate the same value for the indexing key only the last value * will be included in the generated object. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig (a -> String) -> [{k: v}] -> {k: {k: v}} * @param {Function} fn Function :: a -> String * @param {Array} array The array of objects to index * @return {Object} An object indexing each array element by the given property. * @example * * var list = [{id: 'xyz', title: 'A'}, {id: 'abc', title: 'B'}]; * R.indexBy(R.prop('id'), list); * //=> {abc: {id: 'abc', title: 'B'}, xyz: {id: 'xyz', title: 'A'}} */ var indexBy = /*#__PURE__*/Object(_reduceBy__WEBPACK_IMPORTED_MODULE_0__["default"])(function (acc, elem) { return elem; }, null); /* harmony default export */ __webpack_exports__["default"] = (indexBy); /***/ }), /***/ "./node_modules/ramda/es/indexOf.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/indexOf.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_indexOf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_indexOf */ "./node_modules/ramda/es/internal/_indexOf.js"); /* harmony import */ var _internal_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /** * Returns the position of the first occurrence of an item in an array, or -1 * if the item is not included in the array. [`R.equals`](#equals) is used to * determine equality. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> Number * @param {*} target The item to find. * @param {Array} xs The array to search in. * @return {Number} the index of the target, or -1 if the target is not found. * @see R.lastIndexOf * @example * * R.indexOf(3, [1,2,3,4]); //=> 2 * R.indexOf(10, [1,2,3,4]); //=> -1 */ var indexOf = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function indexOf(target, xs) { return typeof xs.indexOf === 'function' && !Object(_internal_isArray__WEBPACK_IMPORTED_MODULE_2__["default"])(xs) ? xs.indexOf(target) : Object(_internal_indexOf__WEBPACK_IMPORTED_MODULE_1__["default"])(xs, target, 0); }); /* harmony default export */ __webpack_exports__["default"] = (indexOf); /***/ }), /***/ "./node_modules/ramda/es/init.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/init.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns all but the last element of the given list or string. * * @func * @memberOf R * @since v0.9.0 * @category List * @sig [a] -> [a] * @sig String -> String * @param {*} list * @return {*} * @see R.last, R.head, R.tail * @example * * R.init([1, 2, 3]); //=> [1, 2] * R.init([1, 2]); //=> [1] * R.init([1]); //=> [] * R.init([]); //=> [] * * R.init('abc'); //=> 'ab' * R.init('ab'); //=> 'a' * R.init('a'); //=> '' * R.init(''); //=> '' */ var init = /*#__PURE__*/Object(_slice__WEBPACK_IMPORTED_MODULE_0__["default"])(0, -1); /* harmony default export */ __webpack_exports__["default"] = (init); /***/ }), /***/ "./node_modules/ramda/es/innerJoin.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/innerJoin.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_containsWith__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_containsWith */ "./node_modules/ramda/es/internal/_containsWith.js"); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_filter */ "./node_modules/ramda/es/internal/_filter.js"); /** * Takes a predicate `pred`, a list `xs`, and a list `ys`, and returns a list * `xs'` comprising each of the elements of `xs` which is equal to one or more * elements of `ys` according to `pred`. * * `pred` must be a binary function expecting an element from each list. * * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should * not be significant, but since `xs'` is ordered the implementation guarantees * that its values are in the same order as they appear in `xs`. Duplicates are * not removed, so `xs'` may contain duplicates if `xs` contains duplicates. * * @func * @memberOf R * @since v0.24.0 * @category Relation * @sig ((a, b) -> Boolean) -> [a] -> [b] -> [a] * @param {Function} pred * @param {Array} xs * @param {Array} ys * @return {Array} * @see R.intersection * @example * * R.innerJoin( * (record, id) => record.id === id, * [{id: 824, name: 'Richie Furay'}, * {id: 956, name: 'Dewey Martin'}, * {id: 313, name: 'Bruce Palmer'}, * {id: 456, name: 'Stephen Stills'}, * {id: 177, name: 'Neil Young'}], * [177, 456, 999] * ); * //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}] */ var innerJoin = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_1__["default"])(function innerJoin(pred, xs, ys) { return Object(_internal_filter__WEBPACK_IMPORTED_MODULE_2__["default"])(function (x) { return Object(_internal_containsWith__WEBPACK_IMPORTED_MODULE_0__["default"])(pred, x, ys); }, xs); }); /* harmony default export */ __webpack_exports__["default"] = (innerJoin); /***/ }), /***/ "./node_modules/ramda/es/insert.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/insert.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Inserts the supplied element into the list, at the specified `index`. _Note that * this is not destructive_: it returns a copy of the list with the changes. * No lists have been harmed in the application of this function. * * @func * @memberOf R * @since v0.2.2 * @category List * @sig Number -> a -> [a] -> [a] * @param {Number} index The position to insert the element * @param {*} elt The element to insert into the Array * @param {Array} list The list to insert into * @return {Array} A new Array with `elt` inserted at `index`. * @example * * R.insert(2, 'x', [1,2,3,4]); //=> [1,2,'x',3,4] */ var insert = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function insert(idx, elt, list) { idx = idx < list.length && idx >= 0 ? idx : list.length; var result = Array.prototype.slice.call(list, 0); result.splice(idx, 0, elt); return result; }); /* harmony default export */ __webpack_exports__["default"] = (insert); /***/ }), /***/ "./node_modules/ramda/es/insertAll.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/insertAll.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Inserts the sub-list into the list, at the specified `index`. _Note that this is not * destructive_: it returns a copy of the list with the changes. * No lists have been harmed in the application of this function. * * @func * @memberOf R * @since v0.9.0 * @category List * @sig Number -> [a] -> [a] -> [a] * @param {Number} index The position to insert the sub-list * @param {Array} elts The sub-list to insert into the Array * @param {Array} list The list to insert the sub-list into * @return {Array} A new Array with `elts` inserted starting at `index`. * @example * * R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4] */ var insertAll = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function insertAll(idx, elts, list) { idx = idx < list.length && idx >= 0 ? idx : list.length; return [].concat(Array.prototype.slice.call(list, 0, idx), elts, Array.prototype.slice.call(list, idx)); }); /* harmony default export */ __webpack_exports__["default"] = (insertAll); /***/ }), /***/ "./node_modules/ramda/es/internal/_Set.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/internal/_Set.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_contains */ "./node_modules/ramda/es/internal/_contains.js"); var _Set = /*#__PURE__*/function () { function _Set() { /* globals Set */ this._nativeSet = typeof Set === 'function' ? new Set() : null; this._items = {}; } // until we figure out why jsdoc chokes on this // @param item The item to add to the Set // @returns {boolean} true if the item did not exist prior, otherwise false // _Set.prototype.add = function (item) { return !hasOrAdd(item, true, this); }; // // @param item The item to check for existence in the Set // @returns {boolean} true if the item exists in the Set, otherwise false // _Set.prototype.has = function (item) { return hasOrAdd(item, false, this); }; // // Combines the logic for checking whether an item is a member of the set and // for adding a new item to the set. // // @param item The item to check or add to the Set instance. // @param shouldAdd If true, the item will be added to the set if it doesn't // already exist. // @param set The set instance to check or add to. // @return {boolean} true if the item already existed, otherwise false. // return _Set; }(); function hasOrAdd(item, shouldAdd, set) { var type = typeof item; var prevSize, newSize; switch (type) { case 'string': case 'number': // distinguish between +0 and -0 if (item === 0 && 1 / item === -Infinity) { if (set._items['-0']) { return true; } else { if (shouldAdd) { set._items['-0'] = true; } return false; } } // these types can all utilise the native Set if (set._nativeSet !== null) { if (shouldAdd) { prevSize = set._nativeSet.size; set._nativeSet.add(item); newSize = set._nativeSet.size; return newSize === prevSize; } else { return set._nativeSet.has(item); } } else { if (!(type in set._items)) { if (shouldAdd) { set._items[type] = {}; set._items[type][item] = true; } return false; } else if (item in set._items[type]) { return true; } else { if (shouldAdd) { set._items[type][item] = true; } return false; } } case 'boolean': // set._items['boolean'] holds a two element array // representing [ falseExists, trueExists ] if (type in set._items) { var bIdx = item ? 1 : 0; if (set._items[type][bIdx]) { return true; } else { if (shouldAdd) { set._items[type][bIdx] = true; } return false; } } else { if (shouldAdd) { set._items[type] = item ? [false, true] : [true, false]; } return false; } case 'function': // compare functions for reference equality if (set._nativeSet !== null) { if (shouldAdd) { prevSize = set._nativeSet.size; set._nativeSet.add(item); newSize = set._nativeSet.size; return newSize === prevSize; } else { return set._nativeSet.has(item); } } else { if (!(type in set._items)) { if (shouldAdd) { set._items[type] = [item]; } return false; } if (!Object(_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(item, set._items[type])) { if (shouldAdd) { set._items[type].push(item); } return false; } return true; } case 'undefined': if (set._items[type]) { return true; } else { if (shouldAdd) { set._items[type] = true; } return false; } case 'object': if (item === null) { if (!set._items['null']) { if (shouldAdd) { set._items['null'] = true; } return false; } return true; } /* falls through */ default: // reduce the search size of heterogeneous sets by creating buckets // for each type. type = Object.prototype.toString.call(item); if (!(type in set._items)) { if (shouldAdd) { set._items[type] = [item]; } return false; } // scan through all previously applied items if (!Object(_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(item, set._items[type])) { if (shouldAdd) { set._items[type].push(item); } return false; } return true; } } // A simple Set type that honours R.equals semantics /* harmony default export */ __webpack_exports__["default"] = (_Set); /***/ }), /***/ "./node_modules/ramda/es/internal/_aperture.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_aperture.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _aperture; }); function _aperture(n, list) { var idx = 0; var limit = list.length - (n - 1); var acc = new Array(limit >= 0 ? limit : 0); while (idx < limit) { acc[idx] = Array.prototype.slice.call(list, idx, idx + n); idx += 1; } return acc; } /***/ }), /***/ "./node_modules/ramda/es/internal/_arity.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_arity.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _arity; }); function _arity(n, fn) { /* eslint-disable no-unused-vars */ switch (n) { case 0: return function () { return fn.apply(this, arguments); }; case 1: return function (a0) { return fn.apply(this, arguments); }; case 2: return function (a0, a1) { return fn.apply(this, arguments); }; case 3: return function (a0, a1, a2) { return fn.apply(this, arguments); }; case 4: return function (a0, a1, a2, a3) { return fn.apply(this, arguments); }; case 5: return function (a0, a1, a2, a3, a4) { return fn.apply(this, arguments); }; case 6: return function (a0, a1, a2, a3, a4, a5) { return fn.apply(this, arguments); }; case 7: return function (a0, a1, a2, a3, a4, a5, a6) { return fn.apply(this, arguments); }; case 8: return function (a0, a1, a2, a3, a4, a5, a6, a7) { return fn.apply(this, arguments); }; case 9: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.apply(this, arguments); }; case 10: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.apply(this, arguments); }; default: throw new Error('First argument to _arity must be a non-negative integer no greater than ten'); } } /***/ }), /***/ "./node_modules/ramda/es/internal/_arrayFromIterator.js": /*!**************************************************************!*\ !*** ./node_modules/ramda/es/internal/_arrayFromIterator.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _arrayFromIterator; }); function _arrayFromIterator(iter) { var list = []; var next; while (!(next = iter.next()).done) { list.push(next.value); } return list; } /***/ }), /***/ "./node_modules/ramda/es/internal/_assign.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_assign.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _objectAssign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_objectAssign */ "./node_modules/ramda/es/internal/_objectAssign.js"); /* harmony default export */ __webpack_exports__["default"] = (typeof Object.assign === 'function' ? Object.assign : _objectAssign__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./node_modules/ramda/es/internal/_checkForMethod.js": /*!***********************************************************!*\ !*** ./node_modules/ramda/es/internal/_checkForMethod.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _checkForMethod; }); /* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /** * This checks whether a function has a [methodname] function. If it isn't an * array it will execute that function otherwise it will default to the ramda * implementation. * * @private * @param {Function} fn ramda implemtation * @param {String} methodname property to check for a custom implementation * @return {Object} Whatever the return value of the method is. */ function _checkForMethod(methodname, fn) { return function () { var length = arguments.length; if (length === 0) { return fn(); } var obj = arguments[length - 1]; return Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["default"])(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_clone.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_clone.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _clone; }); /* harmony import */ var _cloneRegExp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_cloneRegExp */ "./node_modules/ramda/es/internal/_cloneRegExp.js"); /* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../type */ "./node_modules/ramda/es/type.js"); /** * Copies an object. * * @private * @param {*} value The value to be copied * @param {Array} refFrom Array containing the source references * @param {Array} refTo Array containing the copied source references * @param {Boolean} deep Whether or not to perform deep cloning. * @return {*} The copied value. */ function _clone(value, refFrom, refTo, deep) { var copy = function copy(copiedValue) { var len = refFrom.length; var idx = 0; while (idx < len) { if (value === refFrom[idx]) { return refTo[idx]; } idx += 1; } refFrom[idx + 1] = value; refTo[idx + 1] = copiedValue; for (var key in value) { copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key]; } return copiedValue; }; switch (Object(_type__WEBPACK_IMPORTED_MODULE_1__["default"])(value)) { case 'Object': return copy({}); case 'Array': return copy([]); case 'Date': return new Date(value.valueOf()); case 'RegExp': return Object(_cloneRegExp__WEBPACK_IMPORTED_MODULE_0__["default"])(value); default: return value; } } /***/ }), /***/ "./node_modules/ramda/es/internal/_cloneRegExp.js": /*!********************************************************!*\ !*** ./node_modules/ramda/es/internal/_cloneRegExp.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _cloneRegExp; }); function _cloneRegExp(pattern) { return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : '')); } /***/ }), /***/ "./node_modules/ramda/es/internal/_complement.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_complement.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _complement; }); function _complement(f) { return function () { return !f.apply(this, arguments); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_concat.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_concat.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _concat; }); /** * Private `concat` function to merge two array-like objects. * * @private * @param {Array|Arguments} [set1=[]] An array-like object. * @param {Array|Arguments} [set2=[]] An array-like object. * @return {Array} A new, merged array. * @example * * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] */ function _concat(set1, set2) { set1 = set1 || []; set2 = set2 || []; var idx; var len1 = set1.length; var len2 = set2.length; var result = []; idx = 0; while (idx < len1) { result[result.length] = set1[idx]; idx += 1; } idx = 0; while (idx < len2) { result[result.length] = set2[idx]; idx += 1; } return result; } /***/ }), /***/ "./node_modules/ramda/es/internal/_contains.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_contains.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _contains; }); /* harmony import */ var _indexOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_indexOf */ "./node_modules/ramda/es/internal/_indexOf.js"); function _contains(a, list) { return Object(_indexOf__WEBPACK_IMPORTED_MODULE_0__["default"])(list, a, 0) >= 0; } /***/ }), /***/ "./node_modules/ramda/es/internal/_containsWith.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_containsWith.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _containsWith; }); function _containsWith(pred, x, list) { var idx = 0; var len = list.length; while (idx < len) { if (pred(x, list[idx])) { return true; } idx += 1; } return false; } /***/ }), /***/ "./node_modules/ramda/es/internal/_createPartialApplicator.js": /*!********************************************************************!*\ !*** ./node_modules/ramda/es/internal/_createPartialApplicator.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _createPartialApplicator; }); /* harmony import */ var _arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); function _createPartialApplicator(concat) { return Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (fn, args) { return Object(_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.max(0, fn.length - args.length), function () { return fn.apply(this, concat(args, arguments)); }); }); } /***/ }), /***/ "./node_modules/ramda/es/internal/_curry1.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_curry1.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _curry1; }); /* harmony import */ var _isPlaceholder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isPlaceholder */ "./node_modules/ramda/es/internal/_isPlaceholder.js"); /** * Optimized internal one-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry1(fn) { return function f1(a) { if (arguments.length === 0 || Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_0__["default"])(a)) { return f1; } else { return fn.apply(this, arguments); } }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_curry2.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_curry2.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _curry2; }); /* harmony import */ var _curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _isPlaceholder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isPlaceholder */ "./node_modules/ramda/es/internal/_isPlaceholder.js"); /** * Optimized internal two-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry2(fn) { return function f2(a, b) { switch (arguments.length) { case 0: return f2; case 1: return Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(a) ? f2 : Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_b) { return fn(a, _b); }); default: return Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(a) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(b) ? f2 : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(a) ? Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_a) { return fn(_a, b); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(b) ? Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_b) { return fn(a, _b); }) : fn(a, b); } }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_curry3.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_curry3.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _curry3; }); /* harmony import */ var _curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _isPlaceholder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isPlaceholder */ "./node_modules/ramda/es/internal/_isPlaceholder.js"); /** * Optimized internal three-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry3(fn) { return function f3(a, b, c) { switch (arguments.length) { case 0: return f3; case 1: return Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) ? f3 : Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_b, _c) { return fn(a, _b, _c); }); case 2: return Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(b) ? f3 : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) ? Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_a, _c) { return fn(_a, b, _c); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(b) ? Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_b, _c) { return fn(a, _b, _c); }) : Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_c) { return fn(a, b, _c); }); default: return Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(b) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(c) ? f3 : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(b) ? Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_a, _b) { return fn(_a, _b, c); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(c) ? Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_a, _c) { return fn(_a, b, _c); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(b) && Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(c) ? Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_b, _c) { return fn(a, _b, _c); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(a) ? Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_a) { return fn(_a, b, c); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(b) ? Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_b) { return fn(a, _b, c); }) : Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_2__["default"])(c) ? Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_c) { return fn(a, b, _c); }) : fn(a, b, c); } }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_curryN.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_curryN.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _curryN; }); /* harmony import */ var _arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _isPlaceholder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isPlaceholder */ "./node_modules/ramda/es/internal/_isPlaceholder.js"); /** * Internal curryN function. * * @private * @category Function * @param {Number} length The arity of the curried function. * @param {Array} received An array of arguments received thus far. * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curryN(length, received, fn) { return function () { var combined = []; var argsIdx = 0; var left = length; var combinedIdx = 0; while (combinedIdx < received.length || argsIdx < arguments.length) { var result; if (combinedIdx < received.length && (!Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(received[combinedIdx]) || argsIdx >= arguments.length)) { result = received[combinedIdx]; } else { result = arguments[argsIdx]; argsIdx += 1; } combined[combinedIdx] = result; if (!Object(_isPlaceholder__WEBPACK_IMPORTED_MODULE_1__["default"])(result)) { left -= 1; } combinedIdx += 1; } return left <= 0 ? fn.apply(this, combined) : Object(_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(left, _curryN(length, combined, fn)); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_dispatchable.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_dispatchable.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _dispatchable; }); /* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _isTransformer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isTransformer */ "./node_modules/ramda/es/internal/_isTransformer.js"); /** * Returns a function that dispatches with different strategies based on the * object in list position (last argument). If it is an array, executes [fn]. * Otherwise, if it has a function with one of the given method names, it will * execute that function (functor case). Otherwise, if it is a transformer, * uses transducer [xf] to return a new transformer (transducer case). * Otherwise, it will default to executing [fn]. * * @private * @param {Array} methodNames properties to check for a custom implementation * @param {Function} xf transducer to initialize if object is transformer * @param {Function} fn default ramda implementation * @return {Function} A function that dispatches on object in list position */ function _dispatchable(methodNames, xf, fn) { return function () { if (arguments.length === 0) { return fn(); } var args = Array.prototype.slice.call(arguments, 0); var obj = args.pop(); if (!Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["default"])(obj)) { var idx = 0; while (idx < methodNames.length) { if (typeof obj[methodNames[idx]] === 'function') { return obj[methodNames[idx]].apply(obj, args); } idx += 1; } if (Object(_isTransformer__WEBPACK_IMPORTED_MODULE_1__["default"])(obj)) { var transducer = xf.apply(null, args); return transducer(obj); } } return fn.apply(this, arguments); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_dropLast.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_dropLast.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return dropLast; }); /* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../take */ "./node_modules/ramda/es/take.js"); function dropLast(n, xs) { return Object(_take__WEBPACK_IMPORTED_MODULE_0__["default"])(n < xs.length ? xs.length - n : 0, xs); } /***/ }), /***/ "./node_modules/ramda/es/internal/_dropLastWhile.js": /*!**********************************************************!*\ !*** ./node_modules/ramda/es/internal/_dropLastWhile.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return dropLastWhile; }); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../slice */ "./node_modules/ramda/es/slice.js"); function dropLastWhile(pred, xs) { var idx = xs.length - 1; while (idx >= 0 && pred(xs[idx])) { idx -= 1; } return Object(_slice__WEBPACK_IMPORTED_MODULE_0__["default"])(0, idx + 1, xs); } /***/ }), /***/ "./node_modules/ramda/es/internal/_equals.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_equals.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _equals; }); /* harmony import */ var _arrayFromIterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arrayFromIterator */ "./node_modules/ramda/es/internal/_arrayFromIterator.js"); /* harmony import */ var _containsWith__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_containsWith */ "./node_modules/ramda/es/internal/_containsWith.js"); /* harmony import */ var _functionName__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_functionName */ "./node_modules/ramda/es/internal/_functionName.js"); /* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_has */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _identical__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../identical */ "./node_modules/ramda/es/identical.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../keys */ "./node_modules/ramda/es/keys.js"); /* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../type */ "./node_modules/ramda/es/type.js"); /** * private _uniqContentEquals function. * That function is checking equality of 2 iterator contents with 2 assumptions * - iterators lengths are the same * - iterators values are unique * * false-positive result will be returned for comparision of, e.g. * - [1,2,3] and [1,2,3,4] * - [1,1,1] and [1,2,3] * */ function _uniqContentEquals(aIterator, bIterator, stackA, stackB) { var a = Object(_arrayFromIterator__WEBPACK_IMPORTED_MODULE_0__["default"])(aIterator); var b = Object(_arrayFromIterator__WEBPACK_IMPORTED_MODULE_0__["default"])(bIterator); function eq(_a, _b) { return _equals(_a, _b, stackA.slice(), stackB.slice()); } // if *a* array contains any element that is not included in *b* return !Object(_containsWith__WEBPACK_IMPORTED_MODULE_1__["default"])(function (b, aItem) { return !Object(_containsWith__WEBPACK_IMPORTED_MODULE_1__["default"])(eq, aItem, b); }, b, a); } function _equals(a, b, stackA, stackB) { if (Object(_identical__WEBPACK_IMPORTED_MODULE_4__["default"])(a, b)) { return true; } var typeA = Object(_type__WEBPACK_IMPORTED_MODULE_6__["default"])(a); if (typeA !== Object(_type__WEBPACK_IMPORTED_MODULE_6__["default"])(b)) { return false; } if (a == null || b == null) { return false; } if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') { return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a); } if (typeof a.equals === 'function' || typeof b.equals === 'function') { return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a); } switch (typeA) { case 'Arguments': case 'Array': case 'Object': if (typeof a.constructor === 'function' && Object(_functionName__WEBPACK_IMPORTED_MODULE_2__["default"])(a.constructor) === 'Promise') { return a === b; } break; case 'Boolean': case 'Number': case 'String': if (!(typeof a === typeof b && Object(_identical__WEBPACK_IMPORTED_MODULE_4__["default"])(a.valueOf(), b.valueOf()))) { return false; } break; case 'Date': if (!Object(_identical__WEBPACK_IMPORTED_MODULE_4__["default"])(a.valueOf(), b.valueOf())) { return false; } break; case 'Error': return a.name === b.name && a.message === b.message; case 'RegExp': if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) { return false; } break; } var idx = stackA.length - 1; while (idx >= 0) { if (stackA[idx] === a) { return stackB[idx] === b; } idx -= 1; } switch (typeA) { case 'Map': if (a.size !== b.size) { return false; } return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b])); case 'Set': if (a.size !== b.size) { return false; } return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b])); case 'Arguments': case 'Array': case 'Object': case 'Boolean': case 'Number': case 'String': case 'Date': case 'Error': case 'RegExp': case 'Int8Array': case 'Uint8Array': case 'Uint8ClampedArray': case 'Int16Array': case 'Uint16Array': case 'Int32Array': case 'Uint32Array': case 'Float32Array': case 'Float64Array': case 'ArrayBuffer': break; default: // Values of other types are only equal if identical. return false; } var keysA = Object(_keys__WEBPACK_IMPORTED_MODULE_5__["default"])(a); if (keysA.length !== Object(_keys__WEBPACK_IMPORTED_MODULE_5__["default"])(b).length) { return false; } var extendedStackA = stackA.concat([a]); var extendedStackB = stackB.concat([b]); idx = keysA.length - 1; while (idx >= 0) { var key = keysA[idx]; if (!(Object(_has__WEBPACK_IMPORTED_MODULE_3__["default"])(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) { return false; } idx -= 1; } return true; } /***/ }), /***/ "./node_modules/ramda/es/internal/_filter.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_filter.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _filter; }); function _filter(fn, list) { var idx = 0; var len = list.length; var result = []; while (idx < len) { if (fn(list[idx])) { result[result.length] = list[idx]; } idx += 1; } return result; } /***/ }), /***/ "./node_modules/ramda/es/internal/_flatCat.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_flatCat.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _forceReduced__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_forceReduced */ "./node_modules/ramda/es/internal/_forceReduced.js"); /* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isArrayLike */ "./node_modules/ramda/es/internal/_isArrayLike.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var preservingReduced = function (xf) { return { '@@transducer/init': _xfBase__WEBPACK_IMPORTED_MODULE_3__["default"].init, '@@transducer/result': function (result) { return xf['@@transducer/result'](result); }, '@@transducer/step': function (result, input) { var ret = xf['@@transducer/step'](result, input); return ret['@@transducer/reduced'] ? Object(_forceReduced__WEBPACK_IMPORTED_MODULE_0__["default"])(ret) : ret; } }; }; var _flatCat = function _xcat(xf) { var rxf = preservingReduced(xf); return { '@@transducer/init': _xfBase__WEBPACK_IMPORTED_MODULE_3__["default"].init, '@@transducer/result': function (result) { return rxf['@@transducer/result'](result); }, '@@transducer/step': function (result, input) { return !Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_1__["default"])(input) ? Object(_reduce__WEBPACK_IMPORTED_MODULE_2__["default"])(rxf, result, [input]) : Object(_reduce__WEBPACK_IMPORTED_MODULE_2__["default"])(rxf, result, input); } }; }; /* harmony default export */ __webpack_exports__["default"] = (_flatCat); /***/ }), /***/ "./node_modules/ramda/es/internal/_forceReduced.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_forceReduced.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _forceReduced; }); function _forceReduced(x) { return { '@@transducer/value': x, '@@transducer/reduced': true }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_functionName.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_functionName.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _functionName; }); function _functionName(f) { // String(x => x) evaluates to "x => x", so the pattern may not match. var match = String(f).match(/^function (\w*)/); return match == null ? '' : match[1]; } /***/ }), /***/ "./node_modules/ramda/es/internal/_has.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/internal/_has.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _has; }); function _has(prop, obj) { return Object.prototype.hasOwnProperty.call(obj, prop); } /***/ }), /***/ "./node_modules/ramda/es/internal/_identity.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_identity.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _identity; }); function _identity(x) { return x; } /***/ }), /***/ "./node_modules/ramda/es/internal/_indexOf.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_indexOf.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _indexOf; }); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../equals */ "./node_modules/ramda/es/equals.js"); function _indexOf(list, a, idx) { var inf, item; // Array.prototype.indexOf doesn't exist below IE9 if (typeof list.indexOf === 'function') { switch (typeof a) { case 'number': if (a === 0) { // manually crawl the list to distinguish between +0 and -0 inf = 1 / a; while (idx < list.length) { item = list[idx]; if (item === 0 && 1 / item === inf) { return idx; } idx += 1; } return -1; } else if (a !== a) { // NaN while (idx < list.length) { item = list[idx]; if (typeof item === 'number' && item !== item) { return idx; } idx += 1; } return -1; } // non-zero numbers can utilise Set return list.indexOf(a, idx); // all these types can utilise Set case 'string': case 'boolean': case 'function': case 'undefined': return list.indexOf(a, idx); case 'object': if (a === null) { // null can utilise Set return list.indexOf(a, idx); } } } // anything else not covered above, defer to R.equals while (idx < list.length) { if (Object(_equals__WEBPACK_IMPORTED_MODULE_0__["default"])(list[idx], a)) { return idx; } idx += 1; } return -1; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isArguments.js": /*!********************************************************!*\ !*** ./node_modules/ramda/es/internal/_isArguments.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_has */ "./node_modules/ramda/es/internal/_has.js"); var toString = Object.prototype.toString; var _isArguments = function () { return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) { return toString.call(x) === '[object Arguments]'; } : function _isArguments(x) { return Object(_has__WEBPACK_IMPORTED_MODULE_0__["default"])('callee', x); }; }; /* harmony default export */ __webpack_exports__["default"] = (_isArguments); /***/ }), /***/ "./node_modules/ramda/es/internal/_isArray.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isArray.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Tests whether or not an object is an array. * * @private * @param {*} val The object to test. * @return {Boolean} `true` if `val` is an array, `false` otherwise. * @example * * _isArray([]); //=> true * _isArray(null); //=> false * _isArray({}); //=> false */ /* harmony default export */ __webpack_exports__["default"] = (Array.isArray || function _isArray(val) { return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]'; }); /***/ }), /***/ "./node_modules/ramda/es/internal/_isArrayLike.js": /*!********************************************************!*\ !*** ./node_modules/ramda/es/internal/_isArrayLike.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _isString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isString */ "./node_modules/ramda/es/internal/_isString.js"); /** * Tests whether or not an object is similar to an array. * * @private * @category Type * @category List * @sig * -> Boolean * @param {*} x The object to test. * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise. * @example * * _isArrayLike([]); //=> true * _isArrayLike(true); //=> false * _isArrayLike({}); //=> false * _isArrayLike({length: 10}); //=> false * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true */ var _isArrayLike = /*#__PURE__*/Object(_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function isArrayLike(x) { if (Object(_isArray__WEBPACK_IMPORTED_MODULE_1__["default"])(x)) { return true; } if (!x) { return false; } if (typeof x !== 'object') { return false; } if (Object(_isString__WEBPACK_IMPORTED_MODULE_2__["default"])(x)) { return false; } if (x.nodeType === 1) { return !!x.length; } if (x.length === 0) { return true; } if (x.length > 0) { return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1); } return false; }); /* harmony default export */ __webpack_exports__["default"] = (_isArrayLike); /***/ }), /***/ "./node_modules/ramda/es/internal/_isFunction.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_isFunction.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isFunction; }); function _isFunction(x) { return Object.prototype.toString.call(x) === '[object Function]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isInteger.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_isInteger.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Determine if the passed argument is an integer. * * @private * @param {*} n * @category Type * @return {Boolean} */ /* harmony default export */ __webpack_exports__["default"] = (Number.isInteger || function _isInteger(n) { return n << 0 === n; }); /***/ }), /***/ "./node_modules/ramda/es/internal/_isNumber.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isNumber.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isNumber; }); function _isNumber(x) { return Object.prototype.toString.call(x) === '[object Number]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isObject.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isObject.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isObject; }); function _isObject(x) { return Object.prototype.toString.call(x) === '[object Object]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isPlaceholder.js": /*!**********************************************************!*\ !*** ./node_modules/ramda/es/internal/_isPlaceholder.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isPlaceholder; }); function _isPlaceholder(a) { return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isRegExp.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isRegExp.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isRegExp; }); function _isRegExp(x) { return Object.prototype.toString.call(x) === '[object RegExp]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isString.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isString.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isString; }); function _isString(x) { return Object.prototype.toString.call(x) === '[object String]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isTransformer.js": /*!**********************************************************!*\ !*** ./node_modules/ramda/es/internal/_isTransformer.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isTransformer; }); function _isTransformer(obj) { return typeof obj['@@transducer/step'] === 'function'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_makeFlat.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_makeFlat.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _makeFlat; }); /* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArrayLike */ "./node_modules/ramda/es/internal/_isArrayLike.js"); /** * `_makeFlat` is a helper function that returns a one-level or fully recursive * function based on the flag passed in. * * @private */ function _makeFlat(recursive) { return function flatt(list) { var value, jlen, j; var result = []; var idx = 0; var ilen = list.length; while (idx < ilen) { if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_0__["default"])(list[idx])) { value = recursive ? flatt(list[idx]) : list[idx]; j = 0; jlen = value.length; while (j < jlen) { result[result.length] = value[j]; j += 1; } } else { result[result.length] = list[idx]; } idx += 1; } return result; }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_map.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/internal/_map.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _map; }); function _map(fn, functor) { var idx = 0; var len = functor.length; var result = Array(len); while (idx < len) { result[idx] = fn(functor[idx]); idx += 1; } return result; } /***/ }), /***/ "./node_modules/ramda/es/internal/_objectAssign.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_objectAssign.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectAssign; }); /* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_has */ "./node_modules/ramda/es/internal/_has.js"); // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign function _objectAssign(target) { if (target == null) { throw new TypeError('Cannot convert undefined or null to object'); } var output = Object(target); var idx = 1; var length = arguments.length; while (idx < length) { var source = arguments[idx]; if (source != null) { for (var nextKey in source) { if (Object(_has__WEBPACK_IMPORTED_MODULE_0__["default"])(nextKey, source)) { output[nextKey] = source[nextKey]; } } } idx += 1; } return output; } /***/ }), /***/ "./node_modules/ramda/es/internal/_of.js": /*!***********************************************!*\ !*** ./node_modules/ramda/es/internal/_of.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _of; }); function _of(x) { return [x]; } /***/ }), /***/ "./node_modules/ramda/es/internal/_pipe.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_pipe.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _pipe; }); function _pipe(f, g) { return function () { return g.call(this, f.apply(this, arguments)); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_pipeP.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_pipeP.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _pipeP; }); function _pipeP(f, g) { return function () { var ctx = this; return f.apply(ctx, arguments).then(function (x) { return g.call(ctx, x); }); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_quote.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_quote.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _quote; }); function _quote(s) { var escaped = s.replace(/\\/g, '\\\\').replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace .replace(/\f/g, '\\f').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t').replace(/\v/g, '\\v').replace(/\0/g, '\\0'); return '"' + escaped.replace(/"/g, '\\"') + '"'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_reduce.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_reduce.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _reduce; }); /* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArrayLike */ "./node_modules/ramda/es/internal/_isArrayLike.js"); /* harmony import */ var _xwrap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xwrap */ "./node_modules/ramda/es/internal/_xwrap.js"); /* harmony import */ var _bind__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../bind */ "./node_modules/ramda/es/bind.js"); function _arrayReduce(xf, acc, list) { var idx = 0; var len = list.length; while (idx < len) { acc = xf['@@transducer/step'](acc, list[idx]); if (acc && acc['@@transducer/reduced']) { acc = acc['@@transducer/value']; break; } idx += 1; } return xf['@@transducer/result'](acc); } function _iterableReduce(xf, acc, iter) { var step = iter.next(); while (!step.done) { acc = xf['@@transducer/step'](acc, step.value); if (acc && acc['@@transducer/reduced']) { acc = acc['@@transducer/value']; break; } step = iter.next(); } return xf['@@transducer/result'](acc); } function _methodReduce(xf, acc, obj, methodName) { return xf['@@transducer/result'](obj[methodName](Object(_bind__WEBPACK_IMPORTED_MODULE_2__["default"])(xf['@@transducer/step'], xf), acc)); } var symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator'; function _reduce(fn, acc, list) { if (typeof fn === 'function') { fn = Object(_xwrap__WEBPACK_IMPORTED_MODULE_1__["default"])(fn); } if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_0__["default"])(list)) { return _arrayReduce(fn, acc, list); } if (typeof list['fantasy-land/reduce'] === 'function') { return _methodReduce(fn, acc, list, 'fantasy-land/reduce'); } if (list[symIterator] != null) { return _iterableReduce(fn, acc, list[symIterator]()); } if (typeof list.next === 'function') { return _iterableReduce(fn, acc, list); } if (typeof list.reduce === 'function') { return _methodReduce(fn, acc, list, 'reduce'); } throw new TypeError('reduce: list must be array or iterable'); } /***/ }), /***/ "./node_modules/ramda/es/internal/_reduced.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_reduced.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _reduced; }); function _reduced(x) { return x && x['@@transducer/reduced'] ? x : { '@@transducer/value': x, '@@transducer/reduced': true }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_stepCat.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_stepCat.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _stepCat; }); /* harmony import */ var _assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_assign */ "./node_modules/ramda/es/internal/_assign.js"); /* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_identity */ "./node_modules/ramda/es/internal/_identity.js"); /* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isArrayLike */ "./node_modules/ramda/es/internal/_isArrayLike.js"); /* harmony import */ var _isTransformer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_isTransformer */ "./node_modules/ramda/es/internal/_isTransformer.js"); /* harmony import */ var _objOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../objOf */ "./node_modules/ramda/es/objOf.js"); var _stepCatArray = { '@@transducer/init': Array, '@@transducer/step': function (xs, x) { xs.push(x); return xs; }, '@@transducer/result': _identity__WEBPACK_IMPORTED_MODULE_1__["default"] }; var _stepCatString = { '@@transducer/init': String, '@@transducer/step': function (a, b) { return a + b; }, '@@transducer/result': _identity__WEBPACK_IMPORTED_MODULE_1__["default"] }; var _stepCatObject = { '@@transducer/init': Object, '@@transducer/step': function (result, input) { return Object(_assign__WEBPACK_IMPORTED_MODULE_0__["default"])(result, Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_2__["default"])(input) ? Object(_objOf__WEBPACK_IMPORTED_MODULE_4__["default"])(input[0], input[1]) : input); }, '@@transducer/result': _identity__WEBPACK_IMPORTED_MODULE_1__["default"] }; function _stepCat(obj) { if (Object(_isTransformer__WEBPACK_IMPORTED_MODULE_3__["default"])(obj)) { return obj; } if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_2__["default"])(obj)) { return _stepCatArray; } if (typeof obj === 'string') { return _stepCatString; } if (typeof obj === 'object') { return _stepCatObject; } throw new Error('Cannot create transformer for ' + obj); } /***/ }), /***/ "./node_modules/ramda/es/internal/_toISOString.js": /*!********************************************************!*\ !*** ./node_modules/ramda/es/internal/_toISOString.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Polyfill from . */ var pad = function pad(n) { return (n < 10 ? '0' : '') + n; }; var _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) { return d.toISOString(); } : function _toISOString(d) { return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z'; }; /* harmony default export */ __webpack_exports__["default"] = (_toISOString); /***/ }), /***/ "./node_modules/ramda/es/internal/_toString.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_toString.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _toString; }); /* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_contains */ "./node_modules/ramda/es/internal/_contains.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_map */ "./node_modules/ramda/es/internal/_map.js"); /* harmony import */ var _quote__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_quote */ "./node_modules/ramda/es/internal/_quote.js"); /* harmony import */ var _toISOString__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_toISOString */ "./node_modules/ramda/es/internal/_toISOString.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../keys */ "./node_modules/ramda/es/keys.js"); /* harmony import */ var _reject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../reject */ "./node_modules/ramda/es/reject.js"); function _toString(x, seen) { var recur = function recur(y) { var xs = seen.concat([x]); return Object(_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(y, xs) ? '' : _toString(y, xs); }; // mapPairs :: (Object, [String]) -> [String] var mapPairs = function (obj, keys) { return Object(_map__WEBPACK_IMPORTED_MODULE_1__["default"])(function (k) { return Object(_quote__WEBPACK_IMPORTED_MODULE_2__["default"])(k) + ': ' + recur(obj[k]); }, keys.slice().sort()); }; switch (Object.prototype.toString.call(x)) { case '[object Arguments]': return '(function() { return arguments; }(' + Object(_map__WEBPACK_IMPORTED_MODULE_1__["default"])(recur, x).join(', ') + '))'; case '[object Array]': return '[' + Object(_map__WEBPACK_IMPORTED_MODULE_1__["default"])(recur, x).concat(mapPairs(x, Object(_reject__WEBPACK_IMPORTED_MODULE_5__["default"])(function (k) { return (/^\d+$/.test(k) ); }, Object(_keys__WEBPACK_IMPORTED_MODULE_4__["default"])(x)))).join(', ') + ']'; case '[object Boolean]': return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString(); case '[object Date]': return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : Object(_quote__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_toISOString__WEBPACK_IMPORTED_MODULE_3__["default"])(x))) + ')'; case '[object Null]': return 'null'; case '[object Number]': return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10); case '[object String]': return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : Object(_quote__WEBPACK_IMPORTED_MODULE_2__["default"])(x); case '[object Undefined]': return 'undefined'; default: if (typeof x.toString === 'function') { var repr = x.toString(); if (repr !== '[object Object]') { return repr; } } return '{' + mapPairs(x, Object(_keys__WEBPACK_IMPORTED_MODULE_4__["default"])(x)).join(', ') + '}'; } } /***/ }), /***/ "./node_modules/ramda/es/internal/_xall.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_xall.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XAll = /*#__PURE__*/function () { function XAll(f, xf) { this.xf = xf; this.f = f; this.all = true; } XAll.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XAll.prototype['@@transducer/result'] = function (result) { if (this.all) { result = this.xf['@@transducer/step'](result, true); } return this.xf['@@transducer/result'](result); }; XAll.prototype['@@transducer/step'] = function (result, input) { if (!this.f(input)) { this.all = false; result = Object(_reduced__WEBPACK_IMPORTED_MODULE_1__["default"])(this.xf['@@transducer/step'](result, false)); } return result; }; return XAll; }(); var _xall = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xall(f, xf) { return new XAll(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xall); /***/ }), /***/ "./node_modules/ramda/es/internal/_xany.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_xany.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XAny = /*#__PURE__*/function () { function XAny(f, xf) { this.xf = xf; this.f = f; this.any = false; } XAny.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XAny.prototype['@@transducer/result'] = function (result) { if (!this.any) { result = this.xf['@@transducer/step'](result, false); } return this.xf['@@transducer/result'](result); }; XAny.prototype['@@transducer/step'] = function (result, input) { if (this.f(input)) { this.any = true; result = Object(_reduced__WEBPACK_IMPORTED_MODULE_1__["default"])(this.xf['@@transducer/step'](result, true)); } return result; }; return XAny; }(); var _xany = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xany(f, xf) { return new XAny(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xany); /***/ }), /***/ "./node_modules/ramda/es/internal/_xaperture.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xaperture.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XAperture = /*#__PURE__*/function () { function XAperture(n, xf) { this.xf = xf; this.pos = 0; this.full = false; this.acc = new Array(n); } XAperture.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XAperture.prototype['@@transducer/result'] = function (result) { this.acc = null; return this.xf['@@transducer/result'](result); }; XAperture.prototype['@@transducer/step'] = function (result, input) { this.store(input); return this.full ? this.xf['@@transducer/step'](result, this.getCopy()) : result; }; XAperture.prototype.store = function (input) { this.acc[this.pos] = input; this.pos += 1; if (this.pos === this.acc.length) { this.pos = 0; this.full = true; } }; XAperture.prototype.getCopy = function () { return Object(_concat__WEBPACK_IMPORTED_MODULE_0__["default"])(Array.prototype.slice.call(this.acc, this.pos), Array.prototype.slice.call(this.acc, 0, this.pos)); }; return XAperture; }(); var _xaperture = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function _xaperture(n, xf) { return new XAperture(n, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xaperture); /***/ }), /***/ "./node_modules/ramda/es/internal/_xchain.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_xchain.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _flatCat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_flatCat */ "./node_modules/ramda/es/internal/_flatCat.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../map */ "./node_modules/ramda/es/map.js"); var _xchain = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xchain(f, xf) { return Object(_map__WEBPACK_IMPORTED_MODULE_2__["default"])(f, Object(_flatCat__WEBPACK_IMPORTED_MODULE_1__["default"])(xf)); }); /* harmony default export */ __webpack_exports__["default"] = (_xchain); /***/ }), /***/ "./node_modules/ramda/es/internal/_xdrop.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdrop.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDrop = /*#__PURE__*/function () { function XDrop(n, xf) { this.xf = xf; this.n = n; } XDrop.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XDrop.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].result; XDrop.prototype['@@transducer/step'] = function (result, input) { if (this.n > 0) { this.n -= 1; return result; } return this.xf['@@transducer/step'](result, input); }; return XDrop; }(); var _xdrop = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xdrop(n, xf) { return new XDrop(n, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xdrop); /***/ }), /***/ "./node_modules/ramda/es/internal/_xdropLast.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdropLast.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDropLast = /*#__PURE__*/function () { function XDropLast(n, xf) { this.xf = xf; this.pos = 0; this.full = false; this.acc = new Array(n); } XDropLast.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XDropLast.prototype['@@transducer/result'] = function (result) { this.acc = null; return this.xf['@@transducer/result'](result); }; XDropLast.prototype['@@transducer/step'] = function (result, input) { if (this.full) { result = this.xf['@@transducer/step'](result, this.acc[this.pos]); } this.store(input); return result; }; XDropLast.prototype.store = function (input) { this.acc[this.pos] = input; this.pos += 1; if (this.pos === this.acc.length) { this.pos = 0; this.full = true; } }; return XDropLast; }(); var _xdropLast = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xdropLast(n, xf) { return new XDropLast(n, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xdropLast); /***/ }), /***/ "./node_modules/ramda/es/internal/_xdropLastWhile.js": /*!***********************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdropLastWhile.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDropLastWhile = /*#__PURE__*/function () { function XDropLastWhile(fn, xf) { this.f = fn; this.retained = []; this.xf = xf; } XDropLastWhile.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XDropLastWhile.prototype['@@transducer/result'] = function (result) { this.retained = null; return this.xf['@@transducer/result'](result); }; XDropLastWhile.prototype['@@transducer/step'] = function (result, input) { return this.f(input) ? this.retain(result, input) : this.flush(result, input); }; XDropLastWhile.prototype.flush = function (result, input) { result = Object(_reduce__WEBPACK_IMPORTED_MODULE_1__["default"])(this.xf['@@transducer/step'], result, this.retained); this.retained = []; return this.xf['@@transducer/step'](result, input); }; XDropLastWhile.prototype.retain = function (result, input) { this.retained.push(input); return result; }; return XDropLastWhile; }(); var _xdropLastWhile = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xdropLastWhile(fn, xf) { return new XDropLastWhile(fn, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xdropLastWhile); /***/ }), /***/ "./node_modules/ramda/es/internal/_xdropRepeatsWith.js": /*!*************************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdropRepeatsWith.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDropRepeatsWith = /*#__PURE__*/function () { function XDropRepeatsWith(pred, xf) { this.xf = xf; this.pred = pred; this.lastValue = undefined; this.seenFirstValue = false; } XDropRepeatsWith.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XDropRepeatsWith.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].result; XDropRepeatsWith.prototype['@@transducer/step'] = function (result, input) { var sameAsLast = false; if (!this.seenFirstValue) { this.seenFirstValue = true; } else if (this.pred(this.lastValue, input)) { sameAsLast = true; } this.lastValue = input; return sameAsLast ? result : this.xf['@@transducer/step'](result, input); }; return XDropRepeatsWith; }(); var _xdropRepeatsWith = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xdropRepeatsWith(pred, xf) { return new XDropRepeatsWith(pred, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xdropRepeatsWith); /***/ }), /***/ "./node_modules/ramda/es/internal/_xdropWhile.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdropWhile.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDropWhile = /*#__PURE__*/function () { function XDropWhile(f, xf) { this.xf = xf; this.f = f; } XDropWhile.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XDropWhile.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].result; XDropWhile.prototype['@@transducer/step'] = function (result, input) { if (this.f) { if (this.f(input)) { return result; } this.f = null; } return this.xf['@@transducer/step'](result, input); }; return XDropWhile; }(); var _xdropWhile = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xdropWhile(f, xf) { return new XDropWhile(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xdropWhile); /***/ }), /***/ "./node_modules/ramda/es/internal/_xfBase.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfBase.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = ({ init: function () { return this.xf['@@transducer/init'](); }, result: function (result) { return this.xf['@@transducer/result'](result); } }); /***/ }), /***/ "./node_modules/ramda/es/internal/_xfilter.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfilter.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFilter = /*#__PURE__*/function () { function XFilter(f, xf) { this.xf = xf; this.f = f; } XFilter.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XFilter.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].result; XFilter.prototype['@@transducer/step'] = function (result, input) { return this.f(input) ? this.xf['@@transducer/step'](result, input) : result; }; return XFilter; }(); var _xfilter = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xfilter(f, xf) { return new XFilter(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xfilter); /***/ }), /***/ "./node_modules/ramda/es/internal/_xfind.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfind.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFind = /*#__PURE__*/function () { function XFind(f, xf) { this.xf = xf; this.f = f; this.found = false; } XFind.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XFind.prototype['@@transducer/result'] = function (result) { if (!this.found) { result = this.xf['@@transducer/step'](result, void 0); } return this.xf['@@transducer/result'](result); }; XFind.prototype['@@transducer/step'] = function (result, input) { if (this.f(input)) { this.found = true; result = Object(_reduced__WEBPACK_IMPORTED_MODULE_1__["default"])(this.xf['@@transducer/step'](result, input)); } return result; }; return XFind; }(); var _xfind = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xfind(f, xf) { return new XFind(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xfind); /***/ }), /***/ "./node_modules/ramda/es/internal/_xfindIndex.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfindIndex.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFindIndex = /*#__PURE__*/function () { function XFindIndex(f, xf) { this.xf = xf; this.f = f; this.idx = -1; this.found = false; } XFindIndex.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XFindIndex.prototype['@@transducer/result'] = function (result) { if (!this.found) { result = this.xf['@@transducer/step'](result, -1); } return this.xf['@@transducer/result'](result); }; XFindIndex.prototype['@@transducer/step'] = function (result, input) { this.idx += 1; if (this.f(input)) { this.found = true; result = Object(_reduced__WEBPACK_IMPORTED_MODULE_1__["default"])(this.xf['@@transducer/step'](result, this.idx)); } return result; }; return XFindIndex; }(); var _xfindIndex = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xfindIndex(f, xf) { return new XFindIndex(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xfindIndex); /***/ }), /***/ "./node_modules/ramda/es/internal/_xfindLast.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfindLast.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFindLast = /*#__PURE__*/function () { function XFindLast(f, xf) { this.xf = xf; this.f = f; } XFindLast.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XFindLast.prototype['@@transducer/result'] = function (result) { return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.last)); }; XFindLast.prototype['@@transducer/step'] = function (result, input) { if (this.f(input)) { this.last = input; } return result; }; return XFindLast; }(); var _xfindLast = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xfindLast(f, xf) { return new XFindLast(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xfindLast); /***/ }), /***/ "./node_modules/ramda/es/internal/_xfindLastIndex.js": /*!***********************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfindLastIndex.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFindLastIndex = /*#__PURE__*/function () { function XFindLastIndex(f, xf) { this.xf = xf; this.f = f; this.idx = -1; this.lastIdx = -1; } XFindLastIndex.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XFindLastIndex.prototype['@@transducer/result'] = function (result) { return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.lastIdx)); }; XFindLastIndex.prototype['@@transducer/step'] = function (result, input) { this.idx += 1; if (this.f(input)) { this.lastIdx = this.idx; } return result; }; return XFindLastIndex; }(); var _xfindLastIndex = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xfindLastIndex(f, xf) { return new XFindLastIndex(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xfindLastIndex); /***/ }), /***/ "./node_modules/ramda/es/internal/_xmap.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_xmap.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XMap = /*#__PURE__*/function () { function XMap(f, xf) { this.xf = xf; this.f = f; } XMap.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XMap.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].result; XMap.prototype['@@transducer/step'] = function (result, input) { return this.xf['@@transducer/step'](result, this.f(input)); }; return XMap; }(); var _xmap = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xmap(f, xf) { return new XMap(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xmap); /***/ }), /***/ "./node_modules/ramda/es/internal/_xreduceBy.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xreduceBy.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curryN */ "./node_modules/ramda/es/internal/_curryN.js"); /* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_has */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XReduceBy = /*#__PURE__*/function () { function XReduceBy(valueFn, valueAcc, keyFn, xf) { this.valueFn = valueFn; this.valueAcc = valueAcc; this.keyFn = keyFn; this.xf = xf; this.inputs = {}; } XReduceBy.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XReduceBy.prototype['@@transducer/result'] = function (result) { var key; for (key in this.inputs) { if (Object(_has__WEBPACK_IMPORTED_MODULE_1__["default"])(key, this.inputs)) { result = this.xf['@@transducer/step'](result, this.inputs[key]); if (result['@@transducer/reduced']) { result = result['@@transducer/value']; break; } } } this.inputs = null; return this.xf['@@transducer/result'](result); }; XReduceBy.prototype['@@transducer/step'] = function (result, input) { var key = this.keyFn(input); this.inputs[key] = this.inputs[key] || [key, this.valueAcc]; this.inputs[key][1] = this.valueFn(this.inputs[key][1], input); return result; }; return XReduceBy; }(); var _xreduceBy = /*#__PURE__*/Object(_curryN__WEBPACK_IMPORTED_MODULE_0__["default"])(4, [], function _xreduceBy(valueFn, valueAcc, keyFn, xf) { return new XReduceBy(valueFn, valueAcc, keyFn, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xreduceBy); /***/ }), /***/ "./node_modules/ramda/es/internal/_xtake.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_xtake.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XTake = /*#__PURE__*/function () { function XTake(n, xf) { this.xf = xf; this.n = n; this.i = 0; } XTake.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XTake.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].result; XTake.prototype['@@transducer/step'] = function (result, input) { this.i += 1; var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input); return this.n >= 0 && this.i >= this.n ? Object(_reduced__WEBPACK_IMPORTED_MODULE_1__["default"])(ret) : ret; }; return XTake; }(); var _xtake = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xtake(n, xf) { return new XTake(n, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xtake); /***/ }), /***/ "./node_modules/ramda/es/internal/_xtakeWhile.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xtakeWhile.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XTakeWhile = /*#__PURE__*/function () { function XTakeWhile(f, xf) { this.xf = xf; this.f = f; } XTakeWhile.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].init; XTakeWhile.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_2__["default"].result; XTakeWhile.prototype['@@transducer/step'] = function (result, input) { return this.f(input) ? this.xf['@@transducer/step'](result, input) : Object(_reduced__WEBPACK_IMPORTED_MODULE_1__["default"])(result); }; return XTakeWhile; }(); var _xtakeWhile = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xtakeWhile(f, xf) { return new XTakeWhile(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xtakeWhile); /***/ }), /***/ "./node_modules/ramda/es/internal/_xtap.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_xtap.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _xfBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase */ "./node_modules/ramda/es/internal/_xfBase.js"); var XTap = /*#__PURE__*/function () { function XTap(f, xf) { this.xf = xf; this.f = f; } XTap.prototype['@@transducer/init'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].init; XTap.prototype['@@transducer/result'] = _xfBase__WEBPACK_IMPORTED_MODULE_1__["default"].result; XTap.prototype['@@transducer/step'] = function (result, input) { this.f(input); return this.xf['@@transducer/step'](result, input); }; return XTap; }(); var _xtap = /*#__PURE__*/Object(_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xtap(f, xf) { return new XTap(f, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xtap); /***/ }), /***/ "./node_modules/ramda/es/internal/_xwrap.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_xwrap.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _xwrap; }); var XWrap = /*#__PURE__*/function () { function XWrap(fn) { this.f = fn; } XWrap.prototype['@@transducer/init'] = function () { throw new Error('init not implemented on XWrap'); }; XWrap.prototype['@@transducer/result'] = function (acc) { return acc; }; XWrap.prototype['@@transducer/step'] = function (acc, x) { return this.f(acc, x); }; return XWrap; }(); function _xwrap(fn) { return new XWrap(fn); } /***/ }), /***/ "./node_modules/ramda/es/intersection.js": /*!***********************************************!*\ !*** ./node_modules/ramda/es/intersection.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_contains */ "./node_modules/ramda/es/internal/_contains.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_filter */ "./node_modules/ramda/es/internal/_filter.js"); /* harmony import */ var _flip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./flip */ "./node_modules/ramda/es/flip.js"); /* harmony import */ var _uniq__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./uniq */ "./node_modules/ramda/es/uniq.js"); /** * Combines two lists into a set (i.e. no duplicates) composed of those * elements common to both lists. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The list of elements found in both `list1` and `list2`. * @see R.innerJoin * @example * * R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3] */ var intersection = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function intersection(list1, list2) { var lookupList, filteredList; if (list1.length > list2.length) { lookupList = list1; filteredList = list2; } else { lookupList = list2; filteredList = list1; } return Object(_uniq__WEBPACK_IMPORTED_MODULE_4__["default"])(Object(_internal_filter__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_flip__WEBPACK_IMPORTED_MODULE_3__["default"])(_internal_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(lookupList), filteredList)); }); /* harmony default export */ __webpack_exports__["default"] = (intersection); /***/ }), /***/ "./node_modules/ramda/es/intersperse.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/intersperse.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new list with the separator interposed between elements. * * Dispatches to the `intersperse` method of the second argument, if present. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig a -> [a] -> [a] * @param {*} separator The element to add to the list. * @param {Array} list The list to be interposed. * @return {Array} The new list. * @example * * R.intersperse('n', ['ba', 'a', 'a']); //=> ['ba', 'n', 'a', 'n', 'a'] */ var intersperse = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__["default"])('intersperse', function intersperse(separator, list) { var out = []; var idx = 0; var length = list.length; while (idx < length) { if (idx === length - 1) { out.push(list[idx]); } else { out.push(list[idx], separator); } idx += 1; } return out; })); /* harmony default export */ __webpack_exports__["default"] = (intersperse); /***/ }), /***/ "./node_modules/ramda/es/into.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/into.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_clone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_clone */ "./node_modules/ramda/es/internal/_clone.js"); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_isTransformer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isTransformer */ "./node_modules/ramda/es/internal/_isTransformer.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _internal_stepCat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_stepCat */ "./node_modules/ramda/es/internal/_stepCat.js"); /** * Transforms the items of the list with the transducer and appends the * transformed items to the accumulator using an appropriate iterator function * based on the accumulator type. * * The accumulator can be an array, string, object or a transformer. Iterated * items will be appended to arrays and concatenated to strings. Objects will * be merged directly or 2-item arrays will be merged as key, value pairs. * * The accumulator can also be a transformer object that provides a 2-arity * reducing iterator function, step, 0-arity initial value function, init, and * 1-arity result extraction function result. The step function is used as the * iterator function in reduce. The result function is used to convert the * final accumulator into the return type and in most cases is R.identity. The * init function is used to provide the initial accumulator. * * The iteration is performed with [`R.reduce`](#reduce) after initializing the * transducer. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig a -> (b -> b) -> [c] -> a * @param {*} acc The initial accumulator value. * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @example * * var numbers = [1, 2, 3, 4]; * var transducer = R.compose(R.map(R.add(1)), R.take(2)); * * R.into([], transducer, numbers); //=> [2, 3] * * var intoArray = R.into([]); * intoArray(transducer, numbers); //=> [2, 3] */ var into = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_1__["default"])(function into(acc, xf, list) { return Object(_internal_isTransformer__WEBPACK_IMPORTED_MODULE_2__["default"])(acc) ? Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_3__["default"])(xf(acc), acc['@@transducer/init'](), list) : Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_3__["default"])(xf(Object(_internal_stepCat__WEBPACK_IMPORTED_MODULE_4__["default"])(acc)), Object(_internal_clone__WEBPACK_IMPORTED_MODULE_0__["default"])(acc, [], [], false), list); }); /* harmony default export */ __webpack_exports__["default"] = (into); /***/ }), /***/ "./node_modules/ramda/es/invert.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/invert.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * Same as [`R.invertObj`](#invertObj), however this accounts for objects with * duplicate values by putting the values into an array. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig {s: x} -> {x: [ s, ... ]} * @param {Object} obj The object or array to invert * @return {Object} out A new object with keys in an array. * @see R.invertObj * @example * * var raceResultsByFirstName = { * first: 'alice', * second: 'jake', * third: 'alice', * }; * R.invert(raceResultsByFirstName); * //=> { 'alice': ['first', 'third'], 'jake':['second'] } */ var invert = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function invert(obj) { var props = Object(_keys__WEBPACK_IMPORTED_MODULE_2__["default"])(obj); var len = props.length; var idx = 0; var out = {}; while (idx < len) { var key = props[idx]; var val = obj[key]; var list = Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(val, out) ? out[val] : out[val] = []; list[list.length] = key; idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (invert); /***/ }), /***/ "./node_modules/ramda/es/invertObj.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/invertObj.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * Returns a new object with the keys of the given object as values, and the * values of the given object, which are coerced to strings, as keys. Note * that the last key found is preferred when handling the same value. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig {s: x} -> {x: s} * @param {Object} obj The object or array to invert * @return {Object} out A new object * @see R.invert * @example * * var raceResults = { * first: 'alice', * second: 'jake' * }; * R.invertObj(raceResults); * //=> { 'alice': 'first', 'jake':'second' } * * // Alternatively: * var raceResults = ['alice', 'jake']; * R.invertObj(raceResults); * //=> { 'alice': '0', 'jake':'1' } */ var invertObj = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function invertObj(obj) { var props = Object(_keys__WEBPACK_IMPORTED_MODULE_1__["default"])(obj); var len = props.length; var idx = 0; var out = {}; while (idx < len) { var key = props[idx]; out[obj[key]] = key; idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (invertObj); /***/ }), /***/ "./node_modules/ramda/es/invoker.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/invoker.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isFunction */ "./node_modules/ramda/es/internal/_isFunction.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _toString__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toString */ "./node_modules/ramda/es/toString.js"); /** * Turns a named method with a specified arity into a function that can be * called directly supplied with arguments and a target object. * * The returned function is curried and accepts `arity + 1` parameters where * the final parameter is the target object. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig Number -> String -> (a -> b -> ... -> n -> Object -> *) * @param {Number} arity Number of arguments the returned function should take * before the target object. * @param {String} method Name of the method to call. * @return {Function} A new curried function. * @see R.construct * @example * * var sliceFrom = R.invoker(1, 'slice'); * sliceFrom(6, 'abcdefghijklm'); //=> 'ghijklm' * var sliceFrom6 = R.invoker(2, 'slice')(6); * sliceFrom6(8, 'abcdefghijklm'); //=> 'gh' * @symb R.invoker(0, 'method')(o) = o['method']() * @symb R.invoker(1, 'method')(a, o) = o['method'](a) * @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b) */ var invoker = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function invoker(arity, method) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_2__["default"])(arity + 1, function () { var target = arguments[arity]; if (target != null && Object(_internal_isFunction__WEBPACK_IMPORTED_MODULE_1__["default"])(target[method])) { return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity)); } throw new TypeError(Object(_toString__WEBPACK_IMPORTED_MODULE_3__["default"])(target) + ' does not have a method named "' + method + '"'); }); }); /* harmony default export */ __webpack_exports__["default"] = (invoker); /***/ }), /***/ "./node_modules/ramda/es/is.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/is.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * See if an object (`val`) is an instance of the supplied constructor. This * function will check up the inheritance chain, if any. * * @func * @memberOf R * @since v0.3.0 * @category Type * @sig (* -> {*}) -> a -> Boolean * @param {Object} ctor A constructor * @param {*} val The value to test * @return {Boolean} * @example * * R.is(Object, {}); //=> true * R.is(Number, 1); //=> true * R.is(Object, 1); //=> false * R.is(String, 's'); //=> true * R.is(String, new String('')); //=> true * R.is(Object, new String('')); //=> true * R.is(Object, 's'); //=> false * R.is(Number, {}); //=> false */ var is = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function is(Ctor, val) { return val != null && val.constructor === Ctor || val instanceof Ctor; }); /* harmony default export */ __webpack_exports__["default"] = (is); /***/ }), /***/ "./node_modules/ramda/es/isEmpty.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/isEmpty.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./empty */ "./node_modules/ramda/es/empty.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /** * Returns `true` if the given value is its type's empty value; `false` * otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig a -> Boolean * @param {*} x * @return {Boolean} * @see R.empty * @example * * R.isEmpty([1, 2, 3]); //=> false * R.isEmpty([]); //=> true * R.isEmpty(''); //=> true * R.isEmpty(null); //=> false * R.isEmpty({}); //=> true * R.isEmpty({length: 0}); //=> false */ var isEmpty = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function isEmpty(x) { return x != null && Object(_equals__WEBPACK_IMPORTED_MODULE_2__["default"])(x, Object(_empty__WEBPACK_IMPORTED_MODULE_1__["default"])(x)); }); /* harmony default export */ __webpack_exports__["default"] = (isEmpty); /***/ }), /***/ "./node_modules/ramda/es/isNil.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/isNil.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Checks if the input value is `null` or `undefined`. * * @func * @memberOf R * @since v0.9.0 * @category Type * @sig * -> Boolean * @param {*} x The value to test. * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`. * @example * * R.isNil(null); //=> true * R.isNil(undefined); //=> true * R.isNil(0); //=> false * R.isNil([]); //=> false */ var isNil = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function isNil(x) { return x == null; }); /* harmony default export */ __webpack_exports__["default"] = (isNil); /***/ }), /***/ "./node_modules/ramda/es/join.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/join.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _invoker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker */ "./node_modules/ramda/es/invoker.js"); /** * Returns a string made by inserting the `separator` between each element and * concatenating all the elements into a single string. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig String -> [a] -> String * @param {Number|String} separator The string used to separate the elements. * @param {Array} xs The elements to join into a string. * @return {String} str The string made by concatenating `xs` with `separator`. * @see R.split * @example * * var spacer = R.join(' '); * spacer(['a', 2, 3.4]); //=> 'a 2 3.4' * R.join('|', [1, 2, 3]); //=> '1|2|3' */ var join = /*#__PURE__*/Object(_invoker__WEBPACK_IMPORTED_MODULE_0__["default"])(1, 'join'); /* harmony default export */ __webpack_exports__["default"] = (join); /***/ }), /***/ "./node_modules/ramda/es/juxt.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/juxt.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _converge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./converge */ "./node_modules/ramda/es/converge.js"); /** * juxt applies a list of functions to a list of values. * * @func * @memberOf R * @since v0.19.0 * @category Function * @sig [(a, b, ..., m) -> n] -> ((a, b, ..., m) -> [n]) * @param {Array} fns An array of functions * @return {Function} A function that returns a list of values after applying each of the original `fns` to its parameters. * @see R.applySpec * @example * * var getRange = R.juxt([Math.min, Math.max]); * getRange(3, 4, 9, -3); //=> [-3, 9] * @symb R.juxt([f, g, h])(a, b) = [f(a, b), g(a, b), h(a, b)] */ var juxt = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function juxt(fns) { return Object(_converge__WEBPACK_IMPORTED_MODULE_1__["default"])(function () { return Array.prototype.slice.call(arguments, 0); }, fns); }); /* harmony default export */ __webpack_exports__["default"] = (juxt); /***/ }), /***/ "./node_modules/ramda/es/keys.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/keys.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _internal_isArguments__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArguments */ "./node_modules/ramda/es/internal/_isArguments.js"); // cover IE < 9 keys issues var hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString'); var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug var hasArgsEnumBug = /*#__PURE__*/function () { 'use strict'; return arguments.propertyIsEnumerable('length'); }(); var contains = function contains(list, item) { var idx = 0; while (idx < list.length) { if (list[idx] === item) { return true; } idx += 1; } return false; }; /** * Returns a list containing the names of all the enumerable own properties of * the supplied object. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {k: v} -> [k] * @param {Object} obj The object to extract properties from * @return {Array} An array of the object's own properties. * @see R.keysIn, R.values * @example * * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c'] */ var _keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? function keys(obj) { return Object(obj) !== obj ? [] : Object.keys(obj); } : function keys(obj) { if (Object(obj) !== obj) { return []; } var prop, nIdx; var ks = []; var checkArgsLength = hasArgsEnumBug && Object(_internal_isArguments__WEBPACK_IMPORTED_MODULE_2__["default"])(obj); for (prop in obj) { if (Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(prop, obj) && (!checkArgsLength || prop !== 'length')) { ks[ks.length] = prop; } } if (hasEnumBug) { nIdx = nonEnumerableProps.length - 1; while (nIdx >= 0) { prop = nonEnumerableProps[nIdx]; if (Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(prop, obj) && !contains(ks, prop)) { ks[ks.length] = prop; } nIdx -= 1; } } return ks; }; var keys = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(_keys); /* harmony default export */ __webpack_exports__["default"] = (keys); /***/ }), /***/ "./node_modules/ramda/es/keysIn.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/keysIn.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Returns a list containing the names of all the properties of the supplied * object, including prototype properties. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.2.0 * @category Object * @sig {k: v} -> [k] * @param {Object} obj The object to extract properties from * @return {Array} An array of the object's own and prototype properties. * @see R.keys, R.valuesIn * @example * * var F = function() { this.x = 'X'; }; * F.prototype.y = 'Y'; * var f = new F(); * R.keysIn(f); //=> ['x', 'y'] */ var keysIn = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function keysIn(obj) { var prop; var ks = []; for (prop in obj) { ks[ks.length] = prop; } return ks; }); /* harmony default export */ __webpack_exports__["default"] = (keysIn); /***/ }), /***/ "./node_modules/ramda/es/last.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/last.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _nth__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nth */ "./node_modules/ramda/es/nth.js"); /** * Returns the last element of the given list or string. * * @func * @memberOf R * @since v0.1.4 * @category List * @sig [a] -> a | Undefined * @sig String -> String * @param {*} list * @return {*} * @see R.init, R.head, R.tail * @example * * R.last(['fi', 'fo', 'fum']); //=> 'fum' * R.last([]); //=> undefined * * R.last('abc'); //=> 'c' * R.last(''); //=> '' */ var last = /*#__PURE__*/Object(_nth__WEBPACK_IMPORTED_MODULE_0__["default"])(-1); /* harmony default export */ __webpack_exports__["default"] = (last); /***/ }), /***/ "./node_modules/ramda/es/lastIndexOf.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/lastIndexOf.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArray */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /** * Returns the position of the last occurrence of an item in an array, or -1 if * the item is not included in the array. [`R.equals`](#equals) is used to * determine equality. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> Number * @param {*} target The item to find. * @param {Array} xs The array to search in. * @return {Number} the index of the target, or -1 if the target is not found. * @see R.indexOf * @example * * R.lastIndexOf(3, [-1,3,3,0,1,2,3,4]); //=> 6 * R.lastIndexOf(10, [1,2,3,4]); //=> -1 */ var lastIndexOf = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function lastIndexOf(target, xs) { if (typeof xs.lastIndexOf === 'function' && !Object(_internal_isArray__WEBPACK_IMPORTED_MODULE_1__["default"])(xs)) { return xs.lastIndexOf(target); } else { var idx = xs.length - 1; while (idx >= 0) { if (Object(_equals__WEBPACK_IMPORTED_MODULE_2__["default"])(xs[idx], target)) { return idx; } idx -= 1; } return -1; } }); /* harmony default export */ __webpack_exports__["default"] = (lastIndexOf); /***/ }), /***/ "./node_modules/ramda/es/length.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/length.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_isNumber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isNumber */ "./node_modules/ramda/es/internal/_isNumber.js"); /** * Returns the number of elements in the array by returning `list.length`. * * @func * @memberOf R * @since v0.3.0 * @category List * @sig [a] -> Number * @param {Array} list The array to inspect. * @return {Number} The length of the array. * @example * * R.length([]); //=> 0 * R.length([1, 2, 3]); //=> 3 */ var length = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function length(list) { return list != null && Object(_internal_isNumber__WEBPACK_IMPORTED_MODULE_1__["default"])(list.length) ? list.length : NaN; }); /* harmony default export */ __webpack_exports__["default"] = (length); /***/ }), /***/ "./node_modules/ramda/es/lens.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/lens.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /** * Returns a lens for the given getter and setter functions. The getter "gets" * the value of the focus; the setter "sets" the value of the focus. The setter * should not mutate the data structure. * * @func * @memberOf R * @since v0.8.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig (s -> a) -> ((a, s) -> s) -> Lens s a * @param {Function} getter * @param {Function} setter * @return {Lens} * @see R.view, R.set, R.over, R.lensIndex, R.lensProp * @example * * var xLens = R.lens(R.prop('x'), R.assoc('x')); * * R.view(xLens, {x: 1, y: 2}); //=> 1 * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} */ var lens = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function lens(getter, setter) { return function (toFunctorFn) { return function (target) { return Object(_map__WEBPACK_IMPORTED_MODULE_1__["default"])(function (focus) { return setter(focus, target); }, toFunctorFn(getter(target))); }; }; }); /* harmony default export */ __webpack_exports__["default"] = (lens); /***/ }), /***/ "./node_modules/ramda/es/lensIndex.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/lensIndex.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _lens__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lens */ "./node_modules/ramda/es/lens.js"); /* harmony import */ var _nth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nth */ "./node_modules/ramda/es/nth.js"); /* harmony import */ var _update__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./update */ "./node_modules/ramda/es/update.js"); /** * Returns a lens whose focus is the specified index. * * @func * @memberOf R * @since v0.14.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Number -> Lens s a * @param {Number} n * @return {Lens} * @see R.view, R.set, R.over * @example * * var headLens = R.lensIndex(0); * * R.view(headLens, ['a', 'b', 'c']); //=> 'a' * R.set(headLens, 'x', ['a', 'b', 'c']); //=> ['x', 'b', 'c'] * R.over(headLens, R.toUpper, ['a', 'b', 'c']); //=> ['A', 'b', 'c'] */ var lensIndex = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function lensIndex(n) { return Object(_lens__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_nth__WEBPACK_IMPORTED_MODULE_2__["default"])(n), Object(_update__WEBPACK_IMPORTED_MODULE_3__["default"])(n)); }); /* harmony default export */ __webpack_exports__["default"] = (lensIndex); /***/ }), /***/ "./node_modules/ramda/es/lensPath.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/lensPath.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _assocPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assocPath */ "./node_modules/ramda/es/assocPath.js"); /* harmony import */ var _lens__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lens */ "./node_modules/ramda/es/lens.js"); /* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./path */ "./node_modules/ramda/es/path.js"); /** * Returns a lens whose focus is the specified path. * * @func * @memberOf R * @since v0.19.0 * @category Object * @typedefn Idx = String | Int * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig [Idx] -> Lens s a * @param {Array} path The path to use. * @return {Lens} * @see R.view, R.set, R.over * @example * * var xHeadYLens = R.lensPath(['x', 0, 'y']); * * R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); * //=> 2 * R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); * //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]} * R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); * //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]} */ var lensPath = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function lensPath(p) { return Object(_lens__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_path__WEBPACK_IMPORTED_MODULE_3__["default"])(p), Object(_assocPath__WEBPACK_IMPORTED_MODULE_1__["default"])(p)); }); /* harmony default export */ __webpack_exports__["default"] = (lensPath); /***/ }), /***/ "./node_modules/ramda/es/lensProp.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/lensProp.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _assoc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assoc */ "./node_modules/ramda/es/assoc.js"); /* harmony import */ var _lens__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lens */ "./node_modules/ramda/es/lens.js"); /* harmony import */ var _prop__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./prop */ "./node_modules/ramda/es/prop.js"); /** * Returns a lens whose focus is the specified property. * * @func * @memberOf R * @since v0.14.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig String -> Lens s a * @param {String} k * @return {Lens} * @see R.view, R.set, R.over * @example * * var xLens = R.lensProp('x'); * * R.view(xLens, {x: 1, y: 2}); //=> 1 * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} */ var lensProp = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function lensProp(k) { return Object(_lens__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_prop__WEBPACK_IMPORTED_MODULE_3__["default"])(k), Object(_assoc__WEBPACK_IMPORTED_MODULE_1__["default"])(k)); }); /* harmony default export */ __webpack_exports__["default"] = (lensProp); /***/ }), /***/ "./node_modules/ramda/es/lift.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/lift.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _liftN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./liftN */ "./node_modules/ramda/es/liftN.js"); /** * "lifts" a function of arity > 1 so that it may "map over" a list, Function or other * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). * * @func * @memberOf R * @since v0.7.0 * @category Function * @sig (*... -> *) -> ([*]... -> [*]) * @param {Function} fn The function to lift into higher context * @return {Function} The lifted function. * @see R.liftN * @example * * var madd3 = R.lift((a, b, c) => a + b + c); * * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] * * var madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e); * * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24] */ var lift = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function lift(fn) { return Object(_liftN__WEBPACK_IMPORTED_MODULE_1__["default"])(fn.length, fn); }); /* harmony default export */ __webpack_exports__["default"] = (lift); /***/ }), /***/ "./node_modules/ramda/es/liftN.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/liftN.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _ap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ap */ "./node_modules/ramda/es/ap.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /** * "lifts" a function to be the specified arity, so that it may "map over" that * many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). * * @func * @memberOf R * @since v0.7.0 * @category Function * @sig Number -> (*... -> *) -> ([*]... -> [*]) * @param {Function} fn The function to lift into higher context * @return {Function} The lifted function. * @see R.lift, R.ap * @example * * var madd3 = R.liftN(3, (...args) => R.sum(args)); * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] */ var liftN = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function liftN(arity, fn) { var lifted = Object(_curryN__WEBPACK_IMPORTED_MODULE_3__["default"])(arity, fn); return Object(_curryN__WEBPACK_IMPORTED_MODULE_3__["default"])(arity, function () { return Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_1__["default"])(_ap__WEBPACK_IMPORTED_MODULE_2__["default"], Object(_map__WEBPACK_IMPORTED_MODULE_4__["default"])(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1)); }); }); /* harmony default export */ __webpack_exports__["default"] = (liftN); /***/ }), /***/ "./node_modules/ramda/es/lt.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/lt.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the first argument is less than the second; `false` * otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @see R.gt * @example * * R.lt(2, 1); //=> false * R.lt(2, 2); //=> false * R.lt(2, 3); //=> true * R.lt('a', 'z'); //=> true * R.lt('z', 'a'); //=> false */ var lt = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function lt(a, b) { return a < b; }); /* harmony default export */ __webpack_exports__["default"] = (lt); /***/ }), /***/ "./node_modules/ramda/es/lte.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/lte.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the first argument is less than or equal to the second; * `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {Number} a * @param {Number} b * @return {Boolean} * @see R.gte * @example * * R.lte(2, 1); //=> false * R.lte(2, 2); //=> true * R.lte(2, 3); //=> true * R.lte('a', 'z'); //=> true * R.lte('z', 'a'); //=> false */ var lte = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function lte(a, b) { return a <= b; }); /* harmony default export */ __webpack_exports__["default"] = (lte); /***/ }), /***/ "./node_modules/ramda/es/map.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/map.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_map */ "./node_modules/ramda/es/internal/_map.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _internal_xmap__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_xmap */ "./node_modules/ramda/es/internal/_xmap.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * Takes a function and * a [functor](https://github.com/fantasyland/fantasy-land#functor), * applies the function to each of the functor's values, and returns * a functor of the same shape. * * Ramda provides suitable `map` implementations for `Array` and `Object`, * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`. * * Dispatches to the `map` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * Also treats functions as functors and will compose them together. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Functor f => (a -> b) -> f a -> f b * @param {Function} fn The function to be called on every element of the input `list`. * @param {Array} list The list to be iterated over. * @return {Array} The new list. * @see R.transduce, R.addIndex * @example * * var double = x => x * 2; * * R.map(double, [1, 2, 3]); //=> [2, 4, 6] * * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6} * @symb R.map(f, [a, b]) = [f(a), f(b)] * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) } * @symb R.map(f, functor_o) = functor_o.map(f) */ var map = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['fantasy-land/map', 'map'], _internal_xmap__WEBPACK_IMPORTED_MODULE_4__["default"], function map(fn, functor) { switch (Object.prototype.toString.call(functor)) { case '[object Function]': return Object(_curryN__WEBPACK_IMPORTED_MODULE_5__["default"])(functor.length, function () { return fn.call(this, functor.apply(this, arguments)); }); case '[object Object]': return Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_3__["default"])(function (acc, key) { acc[key] = fn(functor[key]); return acc; }, {}, Object(_keys__WEBPACK_IMPORTED_MODULE_6__["default"])(functor)); default: return Object(_internal_map__WEBPACK_IMPORTED_MODULE_2__["default"])(fn, functor); } })); /* harmony default export */ __webpack_exports__["default"] = (map); /***/ }), /***/ "./node_modules/ramda/es/mapAccum.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/mapAccum.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * The `mapAccum` function behaves like a combination of map and reduce; it * applies a function to each element of a list, passing an accumulating * parameter from left to right, and returning a final value of this * accumulator together with the new list. * * The iterator function receives two arguments, *acc* and *value*, and should * return a tuple *[acc, value]*. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y]) * @param {Function} fn The function to be called on every element of the input `list`. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.addIndex, R.mapAccumRight * @example * * var digits = ['1', '2', '3', '4']; * var appender = (a, b) => [a + b, a + b]; * * R.mapAccum(appender, 0, digits); //=> ['01234', ['01', '012', '0123', '01234']] * @symb R.mapAccum(f, a, [b, c, d]) = [ * f(f(f(a, b)[0], c)[0], d)[0], * [ * f(a, b)[1], * f(f(a, b)[0], c)[1], * f(f(f(a, b)[0], c)[0], d)[1] * ] * ] */ var mapAccum = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function mapAccum(fn, acc, list) { var idx = 0; var len = list.length; var result = []; var tuple = [acc]; while (idx < len) { tuple = fn(tuple[0], list[idx]); result[idx] = tuple[1]; idx += 1; } return [tuple[0], result]; }); /* harmony default export */ __webpack_exports__["default"] = (mapAccum); /***/ }), /***/ "./node_modules/ramda/es/mapAccumRight.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/mapAccumRight.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * The `mapAccumRight` function behaves like a combination of map and reduce; it * applies a function to each element of a list, passing an accumulating * parameter from right to left, and returning a final value of this * accumulator together with the new list. * * Similar to [`mapAccum`](#mapAccum), except moves through the input list from * the right to the left. * * The iterator function receives two arguments, *value* and *acc*, and should * return a tuple *[value, acc]*. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig ((x, acc) -> (y, acc)) -> acc -> [x] -> ([y], acc) * @param {Function} fn The function to be called on every element of the input `list`. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.addIndex, R.mapAccum * @example * * var digits = ['1', '2', '3', '4']; * var append = (a, b) => [a + b, a + b]; * * R.mapAccumRight(append, 5, digits); //=> [['12345', '2345', '345', '45'], '12345'] * @symb R.mapAccumRight(f, a, [b, c, d]) = [ * [ * f(b, f(c, f(d, a)[0])[0])[1], * f(c, f(d, a)[0])[1], * f(d, a)[1], * ] * f(b, f(c, f(d, a)[0])[0])[0], * ] */ var mapAccumRight = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function mapAccumRight(fn, acc, list) { var idx = list.length - 1; var result = []; var tuple = [acc]; while (idx >= 0) { tuple = fn(list[idx], tuple[0]); result[idx] = tuple[1]; idx -= 1; } return [result, tuple[0]]; }); /* harmony default export */ __webpack_exports__["default"] = (mapAccumRight); /***/ }), /***/ "./node_modules/ramda/es/mapObjIndexed.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/mapObjIndexed.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * An Object-specific version of [`map`](#map). The function is applied to three * arguments: *(value, key, obj)*. If only the value is significant, use * [`map`](#map) instead. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig ((*, String, Object) -> *) -> Object -> Object * @param {Function} fn * @param {Object} obj * @return {Object} * @see R.map * @example * * var values = { x: 1, y: 2, z: 3 }; * var prependKeyAndDouble = (num, key, obj) => key + (num * 2); * * R.mapObjIndexed(prependKeyAndDouble, values); //=> { x: 'x2', y: 'y4', z: 'z6' } */ var mapObjIndexed = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function mapObjIndexed(fn, obj) { return Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_1__["default"])(function (acc, key) { acc[key] = fn(obj[key], key, obj); return acc; }, {}, Object(_keys__WEBPACK_IMPORTED_MODULE_2__["default"])(obj)); }); /* harmony default export */ __webpack_exports__["default"] = (mapObjIndexed); /***/ }), /***/ "./node_modules/ramda/es/match.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/match.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Tests a regular expression against a String. Note that this function will * return an empty array when there are no matches. This differs from * [`String.prototype.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match) * which returns `null` when there are no matches. * * @func * @memberOf R * @since v0.1.0 * @category String * @sig RegExp -> String -> [String | Undefined] * @param {RegExp} rx A regular expression. * @param {String} str The string to match against * @return {Array} The list of matches or empty array. * @see R.test * @example * * R.match(/([a-z]a)/g, 'bananas'); //=> ['ba', 'na', 'na'] * R.match(/a/, 'b'); //=> [] * R.match(/a/, null); //=> TypeError: null does not have a method named "match" */ var match = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function match(rx, str) { return str.match(rx) || []; }); /* harmony default export */ __webpack_exports__["default"] = (match); /***/ }), /***/ "./node_modules/ramda/es/mathMod.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/mathMod.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isInteger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isInteger */ "./node_modules/ramda/es/internal/_isInteger.js"); /** * `mathMod` behaves like the modulo operator should mathematically, unlike the * `%` operator (and by extension, [`R.modulo`](#modulo)). So while * `-17 % 5` is `-2`, `mathMod(-17, 5)` is `3`. `mathMod` requires Integer * arguments, and returns NaN when the modulus is zero or negative. * * @func * @memberOf R * @since v0.3.0 * @category Math * @sig Number -> Number -> Number * @param {Number} m The dividend. * @param {Number} p the modulus. * @return {Number} The result of `b mod a`. * @see R.modulo * @example * * R.mathMod(-17, 5); //=> 3 * R.mathMod(17, 5); //=> 2 * R.mathMod(17, -5); //=> NaN * R.mathMod(17, 0); //=> NaN * R.mathMod(17.2, 5); //=> NaN * R.mathMod(17, 5.3); //=> NaN * * var clock = R.mathMod(R.__, 12); * clock(15); //=> 3 * clock(24); //=> 0 * * var seventeenMod = R.mathMod(17); * seventeenMod(3); //=> 2 * seventeenMod(4); //=> 1 * seventeenMod(10); //=> 7 */ var mathMod = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function mathMod(m, p) { if (!Object(_internal_isInteger__WEBPACK_IMPORTED_MODULE_1__["default"])(m)) { return NaN; } if (!Object(_internal_isInteger__WEBPACK_IMPORTED_MODULE_1__["default"])(p) || p < 1) { return NaN; } return (m % p + p) % p; }); /* harmony default export */ __webpack_exports__["default"] = (mathMod); /***/ }), /***/ "./node_modules/ramda/es/max.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/max.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns the larger of its two arguments. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> a * @param {*} a * @param {*} b * @return {*} * @see R.maxBy, R.min * @example * * R.max(789, 123); //=> 789 * R.max('a', 'b'); //=> 'b' */ var max = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function max(a, b) { return b > a ? b : a; }); /* harmony default export */ __webpack_exports__["default"] = (max); /***/ }), /***/ "./node_modules/ramda/es/maxBy.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/maxBy.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Takes a function and two values, and returns whichever value produces the * larger result when passed to the provided function. * * @func * @memberOf R * @since v0.8.0 * @category Relation * @sig Ord b => (a -> b) -> a -> a -> a * @param {Function} f * @param {*} a * @param {*} b * @return {*} * @see R.max, R.minBy * @example * * // square :: Number -> Number * var square = n => n * n; * * R.maxBy(square, -3, 2); //=> -3 * * R.reduce(R.maxBy(square), 0, [3, -5, 4, 1, -2]); //=> -5 * R.reduce(R.maxBy(square), 0, []); //=> 0 */ var maxBy = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function maxBy(f, a, b) { return f(b) > f(a) ? b : a; }); /* harmony default export */ __webpack_exports__["default"] = (maxBy); /***/ }), /***/ "./node_modules/ramda/es/mean.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/mean.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _sum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sum */ "./node_modules/ramda/es/sum.js"); /** * Returns the mean of the given list of numbers. * * @func * @memberOf R * @since v0.14.0 * @category Math * @sig [Number] -> Number * @param {Array} list * @return {Number} * @see R.median * @example * * R.mean([2, 7, 9]); //=> 6 * R.mean([]); //=> NaN */ var mean = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function mean(list) { return Object(_sum__WEBPACK_IMPORTED_MODULE_1__["default"])(list) / list.length; }); /* harmony default export */ __webpack_exports__["default"] = (mean); /***/ }), /***/ "./node_modules/ramda/es/median.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/median.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _mean__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mean */ "./node_modules/ramda/es/mean.js"); /** * Returns the median of the given list of numbers. * * @func * @memberOf R * @since v0.14.0 * @category Math * @sig [Number] -> Number * @param {Array} list * @return {Number} * @see R.mean * @example * * R.median([2, 9, 7]); //=> 7 * R.median([7, 2, 10, 9]); //=> 8 * R.median([]); //=> NaN */ var median = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function median(list) { var len = list.length; if (len === 0) { return NaN; } var width = 2 - len % 2; var idx = (len - width) / 2; return Object(_mean__WEBPACK_IMPORTED_MODULE_1__["default"])(Array.prototype.slice.call(list, 0).sort(function (a, b) { return a < b ? -1 : a > b ? 1 : 0; }).slice(idx, idx + width)); }); /* harmony default export */ __webpack_exports__["default"] = (median); /***/ }), /***/ "./node_modules/ramda/es/memoize.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/memoize.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _memoizeWith__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./memoizeWith */ "./node_modules/ramda/es/memoizeWith.js"); /* harmony import */ var _toString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toString */ "./node_modules/ramda/es/toString.js"); /** * Creates a new function that, when invoked, caches the result of calling `fn` * for a given argument set and returns the result. Subsequent calls to the * memoized `fn` with the same argument set will not result in an additional * call to `fn`; instead, the cached result for that set of arguments will be * returned. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (*... -> a) -> (*... -> a) * @param {Function} fn The function to memoize. * @return {Function} Memoized version of `fn`. * @see R.memoizeWith * @deprecated since v0.25.0 * @example * * let count = 0; * const factorial = R.memoize(n => { * count += 1; * return R.product(R.range(1, n + 1)); * }); * factorial(5); //=> 120 * factorial(5); //=> 120 * factorial(5); //=> 120 * count; //=> 1 */ var memoize = /*#__PURE__*/Object(_memoizeWith__WEBPACK_IMPORTED_MODULE_0__["default"])(function () { return Object(_toString__WEBPACK_IMPORTED_MODULE_1__["default"])(arguments); }); /* harmony default export */ __webpack_exports__["default"] = (memoize); /***/ }), /***/ "./node_modules/ramda/es/memoizeWith.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/memoizeWith.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /** * A customisable version of [`R.memoize`](#memoize). `memoizeWith` takes an * additional function that will be applied to a given argument set and used to * create the cache key under which the results of the function to be memoized * will be stored. Care must be taken when implementing key generation to avoid * clashes that may overwrite previous entries erroneously. * * * @func * @memberOf R * @since v0.24.0 * @category Function * @sig (*... -> String) -> (*... -> a) -> (*... -> a) * @param {Function} fn The function to generate the cache key. * @param {Function} fn The function to memoize. * @return {Function} Memoized version of `fn`. * @see R.memoize * @example * * let count = 0; * const factorial = R.memoizeWith(R.identity, n => { * count += 1; * return R.product(R.range(1, n + 1)); * }); * factorial(5); //=> 120 * factorial(5); //=> 120 * factorial(5); //=> 120 * count; //=> 1 */ var memoizeWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function memoizeWith(mFn, fn) { var cache = {}; return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(fn.length, function () { var key = mFn.apply(this, arguments); if (!Object(_internal_has__WEBPACK_IMPORTED_MODULE_2__["default"])(key, cache)) { cache[key] = fn.apply(this, arguments); } return cache[key]; }); }); /* harmony default export */ __webpack_exports__["default"] = (memoizeWith); /***/ }), /***/ "./node_modules/ramda/es/merge.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/merge.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_assign */ "./node_modules/ramda/es/internal/_assign.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Create a new object with the own properties of the first object merged with * the own properties of the second object. If a key exists in both objects, * the value from the second object will be used. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {k: v} -> {k: v} -> {k: v} * @param {Object} l * @param {Object} r * @return {Object} * @see R.mergeDeepRight, R.mergeWith, R.mergeWithKey * @example * * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 }); * //=> { 'name': 'fred', 'age': 40 } * * var resetToDefault = R.merge(R.__, {x: 0}); * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2} * @symb R.merge({ x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: 5, z: 3 } */ var merge = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function merge(l, r) { return Object(_internal_assign__WEBPACK_IMPORTED_MODULE_0__["default"])({}, l, r); }); /* harmony default export */ __webpack_exports__["default"] = (merge); /***/ }), /***/ "./node_modules/ramda/es/mergeAll.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/mergeAll.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_assign */ "./node_modules/ramda/es/internal/_assign.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Merges a list of objects together into one object. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig [{k: v}] -> {k: v} * @param {Array} list An array of objects * @return {Object} A merged object. * @see R.reduce * @example * * R.mergeAll([{foo:1},{bar:2},{baz:3}]); //=> {foo:1,bar:2,baz:3} * R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2} * @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 } */ var mergeAll = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])(function mergeAll(list) { return _internal_assign__WEBPACK_IMPORTED_MODULE_0__["default"].apply(null, [{}].concat(list)); }); /* harmony default export */ __webpack_exports__["default"] = (mergeAll); /***/ }), /***/ "./node_modules/ramda/es/mergeDeepLeft.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/mergeDeepLeft.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeDeepWithKey */ "./node_modules/ramda/es/mergeDeepWithKey.js"); /** * Creates a new object with the own properties of the first object merged with * the own properties of the second object. If a key exists in both objects: * - and both values are objects, the two values will be recursively merged * - otherwise the value from the first object will be used. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig {a} -> {a} -> {a} * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.merge, R.mergeDeepRight, R.mergeDeepWith, R.mergeDeepWithKey * @example * * R.mergeDeepLeft({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, * { age: 40, contact: { email: 'baa@example.com' }}); * //=> { name: 'fred', age: 10, contact: { email: 'moo@example.com' }} */ var mergeDeepLeft = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeDeepLeft(lObj, rObj) { return Object(_mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_1__["default"])(function (k, lVal, rVal) { return lVal; }, lObj, rObj); }); /* harmony default export */ __webpack_exports__["default"] = (mergeDeepLeft); /***/ }), /***/ "./node_modules/ramda/es/mergeDeepRight.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/mergeDeepRight.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeDeepWithKey */ "./node_modules/ramda/es/mergeDeepWithKey.js"); /** * Creates a new object with the own properties of the first object merged with * the own properties of the second object. If a key exists in both objects: * - and both values are objects, the two values will be recursively merged * - otherwise the value from the second object will be used. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig {a} -> {a} -> {a} * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey * @example * * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, * { age: 40, contact: { email: 'baa@example.com' }}); * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }} */ var mergeDeepRight = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeDeepRight(lObj, rObj) { return Object(_mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_1__["default"])(function (k, lVal, rVal) { return rVal; }, lObj, rObj); }); /* harmony default export */ __webpack_exports__["default"] = (mergeDeepRight); /***/ }), /***/ "./node_modules/ramda/es/mergeDeepWith.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/mergeDeepWith.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeDeepWithKey */ "./node_modules/ramda/es/mergeDeepWithKey.js"); /** * Creates a new object with the own properties of the two provided objects. * If a key exists in both objects: * - and both associated values are also objects then the values will be * recursively merged. * - otherwise the provided function is applied to associated values using the * resulting value as the new value associated with the key. * If a key only exists in one object, the value will be associated with the key * of the resulting object. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig ((a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.mergeWith, R.mergeDeep, R.mergeDeepWithKey * @example * * R.mergeDeepWith(R.concat, * { a: true, c: { values: [10, 20] }}, * { b: true, c: { values: [15, 35] }}); * //=> { a: true, b: true, c: { values: [10, 20, 15, 35] }} */ var mergeDeepWith = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeDeepWith(fn, lObj, rObj) { return Object(_mergeDeepWithKey__WEBPACK_IMPORTED_MODULE_1__["default"])(function (k, lVal, rVal) { return fn(lVal, rVal); }, lObj, rObj); }); /* harmony default export */ __webpack_exports__["default"] = (mergeDeepWith); /***/ }), /***/ "./node_modules/ramda/es/mergeDeepWithKey.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/mergeDeepWithKey.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isObject */ "./node_modules/ramda/es/internal/_isObject.js"); /* harmony import */ var _mergeWithKey__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mergeWithKey */ "./node_modules/ramda/es/mergeWithKey.js"); /** * Creates a new object with the own properties of the two provided objects. * If a key exists in both objects: * - and both associated values are also objects then the values will be * recursively merged. * - otherwise the provided function is applied to the key and associated values * using the resulting value as the new value associated with the key. * If a key only exists in one object, the value will be associated with the key * of the resulting object. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.mergeWithKey, R.mergeDeep, R.mergeDeepWith * @example * * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r * R.mergeDeepWithKey(concatValues, * { a: true, c: { thing: 'foo', values: [10, 20] }}, * { b: true, c: { thing: 'bar', values: [15, 35] }}); * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }} */ var mergeDeepWithKey = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeDeepWithKey(fn, lObj, rObj) { return Object(_mergeWithKey__WEBPACK_IMPORTED_MODULE_2__["default"])(function (k, lVal, rVal) { if (Object(_internal_isObject__WEBPACK_IMPORTED_MODULE_1__["default"])(lVal) && Object(_internal_isObject__WEBPACK_IMPORTED_MODULE_1__["default"])(rVal)) { return mergeDeepWithKey(fn, lVal, rVal); } else { return fn(k, lVal, rVal); } }, lObj, rObj); }); /* harmony default export */ __webpack_exports__["default"] = (mergeDeepWithKey); /***/ }), /***/ "./node_modules/ramda/es/mergeWith.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/mergeWith.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _mergeWithKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeWithKey */ "./node_modules/ramda/es/mergeWithKey.js"); /** * Creates a new object with the own properties of the two provided objects. If * a key exists in both objects, the provided function is applied to the values * associated with the key in each object, with the result being used as the * value associated with the key in the returned object. * * @func * @memberOf R * @since v0.19.0 * @category Object * @sig ((a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} l * @param {Object} r * @return {Object} * @see R.mergeDeepWith, R.merge, R.mergeWithKey * @example * * R.mergeWith(R.concat, * { a: true, values: [10, 20] }, * { b: true, values: [15, 35] }); * //=> { a: true, b: true, values: [10, 20, 15, 35] } */ var mergeWith = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeWith(fn, l, r) { return Object(_mergeWithKey__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_, _l, _r) { return fn(_l, _r); }, l, r); }); /* harmony default export */ __webpack_exports__["default"] = (mergeWith); /***/ }), /***/ "./node_modules/ramda/es/mergeWithKey.js": /*!***********************************************!*\ !*** ./node_modules/ramda/es/mergeWithKey.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /** * Creates a new object with the own properties of the two provided objects. If * a key exists in both objects, the provided function is applied to the key * and the values associated with the key in each object, with the result being * used as the value associated with the key in the returned object. * * @func * @memberOf R * @since v0.19.0 * @category Object * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} l * @param {Object} r * @return {Object} * @see R.mergeDeepWithKey, R.merge, R.mergeWith * @example * * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r * R.mergeWithKey(concatValues, * { a: true, thing: 'foo', values: [10, 20] }, * { b: true, thing: 'bar', values: [15, 35] }); * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] } * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 } */ var mergeWithKey = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeWithKey(fn, l, r) { var result = {}; var k; for (k in l) { if (Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(k, l)) { result[k] = Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(k, r) ? fn(k, l[k], r[k]) : l[k]; } } for (k in r) { if (Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(k, r) && !Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(k, result)) { result[k] = r[k]; } } return result; }); /* harmony default export */ __webpack_exports__["default"] = (mergeWithKey); /***/ }), /***/ "./node_modules/ramda/es/min.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/min.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns the smaller of its two arguments. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> a * @param {*} a * @param {*} b * @return {*} * @see R.minBy, R.max * @example * * R.min(789, 123); //=> 123 * R.min('a', 'b'); //=> 'a' */ var min = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function min(a, b) { return b < a ? b : a; }); /* harmony default export */ __webpack_exports__["default"] = (min); /***/ }), /***/ "./node_modules/ramda/es/minBy.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/minBy.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Takes a function and two values, and returns whichever value produces the * smaller result when passed to the provided function. * * @func * @memberOf R * @since v0.8.0 * @category Relation * @sig Ord b => (a -> b) -> a -> a -> a * @param {Function} f * @param {*} a * @param {*} b * @return {*} * @see R.min, R.maxBy * @example * * // square :: Number -> Number * var square = n => n * n; * * R.minBy(square, -3, 2); //=> 2 * * R.reduce(R.minBy(square), Infinity, [3, -5, 4, 1, -2]); //=> 1 * R.reduce(R.minBy(square), Infinity, []); //=> Infinity */ var minBy = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function minBy(f, a, b) { return f(b) < f(a) ? b : a; }); /* harmony default export */ __webpack_exports__["default"] = (minBy); /***/ }), /***/ "./node_modules/ramda/es/modulo.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/modulo.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Divides the first parameter by the second and returns the remainder. Note * that this function preserves the JavaScript-style behavior for modulo. For * mathematical modulo see [`mathMod`](#mathMod). * * @func * @memberOf R * @since v0.1.1 * @category Math * @sig Number -> Number -> Number * @param {Number} a The value to the divide. * @param {Number} b The pseudo-modulus * @return {Number} The result of `b % a`. * @see R.mathMod * @example * * R.modulo(17, 3); //=> 2 * // JS behavior: * R.modulo(-17, 3); //=> -2 * R.modulo(17, -3); //=> 2 * * var isOdd = R.modulo(R.__, 2); * isOdd(42); //=> 0 * isOdd(21); //=> 1 */ var modulo = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function modulo(a, b) { return a % b; }); /* harmony default export */ __webpack_exports__["default"] = (modulo); /***/ }), /***/ "./node_modules/ramda/es/multiply.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/multiply.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Multiplies two numbers. Equivalent to `a * b` but curried. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a The first value. * @param {Number} b The second value. * @return {Number} The result of `a * b`. * @see R.divide * @example * * var double = R.multiply(2); * var triple = R.multiply(3); * double(3); //=> 6 * triple(4); //=> 12 * R.multiply(2, 5); //=> 10 */ var multiply = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function multiply(a, b) { return a * b; }); /* harmony default export */ __webpack_exports__["default"] = (multiply); /***/ }), /***/ "./node_modules/ramda/es/nAry.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/nAry.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Wraps a function of any arity (including nullary) in a function that accepts * exactly `n` parameters. Any extraneous parameters will not be passed to the * supplied function. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig Number -> (* -> a) -> (* -> a) * @param {Number} n The desired arity of the new function. * @param {Function} fn The function to wrap. * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of * arity `n`. * @see R.binary, R.unary * @example * * var takesTwoArgs = (a, b) => [a, b]; * * takesTwoArgs.length; //=> 2 * takesTwoArgs(1, 2); //=> [1, 2] * * var takesOneArg = R.nAry(1, takesTwoArgs); * takesOneArg.length; //=> 1 * // Only `n` arguments are passed to the wrapped function * takesOneArg(1, 2); //=> [1, undefined] * @symb R.nAry(0, f)(a, b) = f() * @symb R.nAry(1, f)(a, b) = f(a) * @symb R.nAry(2, f)(a, b) = f(a, b) */ var nAry = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function nAry(n, fn) { switch (n) { case 0: return function () { return fn.call(this); }; case 1: return function (a0) { return fn.call(this, a0); }; case 2: return function (a0, a1) { return fn.call(this, a0, a1); }; case 3: return function (a0, a1, a2) { return fn.call(this, a0, a1, a2); }; case 4: return function (a0, a1, a2, a3) { return fn.call(this, a0, a1, a2, a3); }; case 5: return function (a0, a1, a2, a3, a4) { return fn.call(this, a0, a1, a2, a3, a4); }; case 6: return function (a0, a1, a2, a3, a4, a5) { return fn.call(this, a0, a1, a2, a3, a4, a5); }; case 7: return function (a0, a1, a2, a3, a4, a5, a6) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6); }; case 8: return function (a0, a1, a2, a3, a4, a5, a6, a7) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7); }; case 9: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8); }; case 10: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }; default: throw new Error('First argument to nAry must be a non-negative integer no greater than ten'); } }); /* harmony default export */ __webpack_exports__["default"] = (nAry); /***/ }), /***/ "./node_modules/ramda/es/negate.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/negate.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Negates its argument. * * @func * @memberOf R * @since v0.9.0 * @category Math * @sig Number -> Number * @param {Number} n * @return {Number} * @example * * R.negate(42); //=> -42 */ var negate = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function negate(n) { return -n; }); /* harmony default export */ __webpack_exports__["default"] = (negate); /***/ }), /***/ "./node_modules/ramda/es/none.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/none.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_complement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_complement */ "./node_modules/ramda/es/internal/_complement.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xany__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xany */ "./node_modules/ramda/es/internal/_xany.js"); /* harmony import */ var _any__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./any */ "./node_modules/ramda/es/any.js"); /** * Returns `true` if no elements of the list match the predicate, `false` * otherwise. * * Dispatches to the `any` method of the second argument, if present. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig (a -> Boolean) -> [a] -> Boolean * @param {Function} fn The predicate function. * @param {Array} list The array to consider. * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise. * @see R.all, R.any * @example * * var isEven = n => n % 2 === 0; * var isOdd = n => n % 2 === 1; * * R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true * R.none(isOdd, [1, 3, 5, 7, 8, 11]); //=> false */ var none = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_complement__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_2__["default"])(['any'], _internal_xany__WEBPACK_IMPORTED_MODULE_3__["default"], _any__WEBPACK_IMPORTED_MODULE_4__["default"]))); /* harmony default export */ __webpack_exports__["default"] = (none); /***/ }), /***/ "./node_modules/ramda/es/not.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/not.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * A function that returns the `!` of its argument. It will return `true` when * passed false-y value, and `false` when passed a truth-y one. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig * -> Boolean * @param {*} a any value * @return {Boolean} the logical inverse of passed argument. * @see R.complement * @example * * R.not(true); //=> false * R.not(false); //=> true * R.not(0); //=> true * R.not(1); //=> false */ var not = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function not(a) { return !a; }); /* harmony default export */ __webpack_exports__["default"] = (not); /***/ }), /***/ "./node_modules/ramda/es/nth.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/nth.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isString */ "./node_modules/ramda/es/internal/_isString.js"); /** * Returns the nth element of the given list or string. If n is negative the * element at index length + n is returned. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> [a] -> a | Undefined * @sig Number -> String -> String * @param {Number} offset * @param {*} list * @return {*} * @example * * var list = ['foo', 'bar', 'baz', 'quux']; * R.nth(1, list); //=> 'bar' * R.nth(-1, list); //=> 'quux' * R.nth(-99, list); //=> undefined * * R.nth(2, 'abc'); //=> 'c' * R.nth(3, 'abc'); //=> '' * @symb R.nth(-1, [a, b, c]) = c * @symb R.nth(0, [a, b, c]) = a * @symb R.nth(1, [a, b, c]) = b */ var nth = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function nth(offset, list) { var idx = offset < 0 ? list.length + offset : offset; return Object(_internal_isString__WEBPACK_IMPORTED_MODULE_1__["default"])(list) ? list.charAt(idx) : list[idx]; }); /* harmony default export */ __webpack_exports__["default"] = (nth); /***/ }), /***/ "./node_modules/ramda/es/nthArg.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/nthArg.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _nth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nth */ "./node_modules/ramda/es/nth.js"); /** * Returns a function which returns its nth argument. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig Number -> *... -> * * @param {Number} n * @return {Function} * @example * * R.nthArg(1)('a', 'b', 'c'); //=> 'b' * R.nthArg(-1)('a', 'b', 'c'); //=> 'c' * @symb R.nthArg(-1)(a, b, c) = c * @symb R.nthArg(0)(a, b, c) = a * @symb R.nthArg(1)(a, b, c) = b */ var nthArg = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function nthArg(n) { var arity = n < 0 ? 1 : n + 1; return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(arity, function () { return Object(_nth__WEBPACK_IMPORTED_MODULE_2__["default"])(n, arguments); }); }); /* harmony default export */ __webpack_exports__["default"] = (nthArg); /***/ }), /***/ "./node_modules/ramda/es/o.js": /*!************************************!*\ !*** ./node_modules/ramda/es/o.js ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * `o` is a curried composition function that returns a unary function. * Like [`compose`](#compose), `o` performs right-to-left function composition. * Unlike [`compose`](#compose), the rightmost function passed to `o` will be * invoked with only one argument. * * @func * @memberOf R * @since v0.24.0 * @category Function * @sig (b -> c) -> (a -> b) -> a -> c * @param {Function} f * @param {Function} g * @return {Function} * @see R.compose, R.pipe * @example * * var classyGreeting = name => "The name's " + name.last + ", " + name.first + " " + name.last * var yellGreeting = R.o(R.toUpper, classyGreeting); * yellGreeting({first: 'James', last: 'Bond'}); //=> "THE NAME'S BOND, JAMES BOND" * * R.o(R.multiply(10), R.add(10))(-4) //=> 60 * * @symb R.o(f, g, x) = f(g(x)) */ var o = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function o(f, g, x) { return f(g(x)); }); /* harmony default export */ __webpack_exports__["default"] = (o); /***/ }), /***/ "./node_modules/ramda/es/objOf.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/objOf.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates an object containing a single key:value pair. * * @func * @memberOf R * @since v0.18.0 * @category Object * @sig String -> a -> {String:a} * @param {String} key * @param {*} val * @return {Object} * @see R.pair * @example * * var matchPhrases = R.compose( * R.objOf('must'), * R.map(R.objOf('match_phrase')) * ); * matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]} */ var objOf = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function objOf(key, val) { var obj = {}; obj[key] = val; return obj; }); /* harmony default export */ __webpack_exports__["default"] = (objOf); /***/ }), /***/ "./node_modules/ramda/es/of.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/of.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_of */ "./node_modules/ramda/es/internal/_of.js"); /** * Returns a singleton array containing the value provided. * * Note this `of` is different from the ES6 `of`; See * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of * * @func * @memberOf R * @since v0.3.0 * @category Function * @sig a -> [a] * @param {*} x any value * @return {Array} An array wrapping `x`. * @example * * R.of(null); //=> [null] * R.of([42]); //=> [[42]] */ var of = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(_internal_of__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (of); /***/ }), /***/ "./node_modules/ramda/es/omit.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/omit.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a partial copy of an object omitting the keys specified. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [String] -> {String: *} -> {String: *} * @param {Array} names an array of String property names to omit from the new object * @param {Object} obj The object to copy from * @return {Object} A new object with properties from `names` not on it. * @see R.pick * @example * * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3} */ var omit = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function omit(names, obj) { var result = {}; var index = {}; var idx = 0; var len = names.length; while (idx < len) { index[names[idx]] = 1; idx += 1; } for (var prop in obj) { if (!index.hasOwnProperty(prop)) { result[prop] = obj[prop]; } } return result; }); /* harmony default export */ __webpack_exports__["default"] = (omit); /***/ }), /***/ "./node_modules/ramda/es/once.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/once.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Accepts a function `fn` and returns a function that guards invocation of * `fn` such that `fn` can only ever be called once, no matter how many times * the returned function is invoked. The first value calculated is returned in * subsequent invocations. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (a... -> b) -> (a... -> b) * @param {Function} fn The function to wrap in a call-only-once wrapper. * @return {Function} The wrapped function. * @example * * var addOneOnce = R.once(x => x + 1); * addOneOnce(10); //=> 11 * addOneOnce(addOneOnce(50)); //=> 11 */ var once = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])(function once(fn) { var called = false; var result; return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(fn.length, function () { if (called) { return result; } called = true; result = fn.apply(this, arguments); return result; }); }); /* harmony default export */ __webpack_exports__["default"] = (once); /***/ }), /***/ "./node_modules/ramda/es/or.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/or.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if one or both of its arguments are `true`. Returns `false` * if both arguments are `false`. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig a -> b -> a | b * @param {Any} a * @param {Any} b * @return {Any} the first argument if truthy, otherwise the second argument. * @see R.either * @example * * R.or(true, true); //=> true * R.or(true, false); //=> true * R.or(false, true); //=> true * R.or(false, false); //=> false */ var or = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function or(a, b) { return a || b; }); /* harmony default export */ __webpack_exports__["default"] = (or); /***/ }), /***/ "./node_modules/ramda/es/over.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/over.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); // `Identity` is a functor that holds a single value, where `map` simply // transforms the held value with the provided function. var Identity = function (x) { return { value: x, map: function (f) { return Identity(f(x)); } }; }; /** * Returns the result of "setting" the portion of the given data structure * focused by the given lens to the result of applying the given function to * the focused value. * * @func * @memberOf R * @since v0.16.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Lens s a -> (a -> a) -> s -> s * @param {Lens} lens * @param {*} v * @param {*} x * @return {*} * @see R.prop, R.lensIndex, R.lensProp * @example * * var headLens = R.lensIndex(0); * * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz'] */ var over = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function over(lens, f, x) { // The value returned by the getter function is first transformed with `f`, // then set as the value of an `Identity`. This is then mapped over with the // setter function of the lens. return lens(function (y) { return Identity(f(y)); })(x).value; }); /* harmony default export */ __webpack_exports__["default"] = (over); /***/ }), /***/ "./node_modules/ramda/es/pair.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/pair.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Takes two arguments, `fst` and `snd`, and returns `[fst, snd]`. * * @func * @memberOf R * @since v0.18.0 * @category List * @sig a -> b -> (a,b) * @param {*} fst * @param {*} snd * @return {Array} * @see R.objOf, R.of * @example * * R.pair('foo', 'bar'); //=> ['foo', 'bar'] */ var pair = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function pair(fst, snd) { return [fst, snd]; }); /* harmony default export */ __webpack_exports__["default"] = (pair); /***/ }), /***/ "./node_modules/ramda/es/partial.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/partial.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_createPartialApplicator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_createPartialApplicator */ "./node_modules/ramda/es/internal/_createPartialApplicator.js"); /** * Takes a function `f` and a list of arguments, and returns a function `g`. * When applied, `g` returns the result of applying `f` to the arguments * provided initially followed by the arguments provided to `g`. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x) * @param {Function} f * @param {Array} args * @return {Function} * @see R.partialRight * @example * * var multiply2 = (a, b) => a * b; * var double = R.partial(multiply2, [2]); * double(2); //=> 4 * * var greet = (salutation, title, firstName, lastName) => * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; * * var sayHello = R.partial(greet, ['Hello']); * var sayHelloToMs = R.partial(sayHello, ['Ms.']); * sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!' * @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d) */ var partial = /*#__PURE__*/Object(_internal_createPartialApplicator__WEBPACK_IMPORTED_MODULE_1__["default"])(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (partial); /***/ }), /***/ "./node_modules/ramda/es/partialRight.js": /*!***********************************************!*\ !*** ./node_modules/ramda/es/partialRight.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_createPartialApplicator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_createPartialApplicator */ "./node_modules/ramda/es/internal/_createPartialApplicator.js"); /* harmony import */ var _flip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flip */ "./node_modules/ramda/es/flip.js"); /** * Takes a function `f` and a list of arguments, and returns a function `g`. * When applied, `g` returns the result of applying `f` to the arguments * provided to `g` followed by the arguments provided initially. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x) * @param {Function} f * @param {Array} args * @return {Function} * @see R.partial * @example * * var greet = (salutation, title, firstName, lastName) => * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; * * var greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']); * * greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!' * @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b) */ var partialRight = /*#__PURE__*/Object(_internal_createPartialApplicator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_flip__WEBPACK_IMPORTED_MODULE_2__["default"])(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])); /* harmony default export */ __webpack_exports__["default"] = (partialRight); /***/ }), /***/ "./node_modules/ramda/es/partition.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/partition.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./filter */ "./node_modules/ramda/es/filter.js"); /* harmony import */ var _juxt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./juxt */ "./node_modules/ramda/es/juxt.js"); /* harmony import */ var _reject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reject */ "./node_modules/ramda/es/reject.js"); /** * Takes a predicate and a list or other `Filterable` object and returns the * pair of filterable objects of the same type of elements which do and do not * satisfy, the predicate, respectively. Filterable objects include plain objects or any object * that has a filter method such as `Array`. * * @func * @memberOf R * @since v0.1.4 * @category List * @sig Filterable f => (a -> Boolean) -> f a -> [f a, f a] * @param {Function} pred A predicate to determine which side the element belongs to. * @param {Array} filterable the list (or other filterable) to partition. * @return {Array} An array, containing first the subset of elements that satisfy the * predicate, and second the subset of elements that do not satisfy. * @see R.filter, R.reject * @example * * R.partition(R.contains('s'), ['sss', 'ttt', 'foo', 'bars']); * // => [ [ 'sss', 'bars' ], [ 'ttt', 'foo' ] ] * * R.partition(R.contains('s'), { a: 'sss', b: 'ttt', foo: 'bars' }); * // => [ { a: 'sss', foo: 'bars' }, { b: 'ttt' } ] */ var partition = /*#__PURE__*/Object(_juxt__WEBPACK_IMPORTED_MODULE_1__["default"])([_filter__WEBPACK_IMPORTED_MODULE_0__["default"], _reject__WEBPACK_IMPORTED_MODULE_2__["default"]]); /* harmony default export */ __webpack_exports__["default"] = (partition); /***/ }), /***/ "./node_modules/ramda/es/path.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/path.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Retrieve the value at a given path. * * @func * @memberOf R * @since v0.2.0 * @category Object * @typedefn Idx = String | Int * @sig [Idx] -> {a} -> a | Undefined * @param {Array} path The path to use. * @param {Object} obj The object to retrieve the nested property from. * @return {*} The data at `path`. * @see R.prop * @example * * R.path(['a', 'b'], {a: {b: 2}}); //=> 2 * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined */ var path = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function path(paths, obj) { var val = obj; var idx = 0; while (idx < paths.length) { if (val == null) { return; } val = val[paths[idx]]; idx += 1; } return val; }); /* harmony default export */ __webpack_exports__["default"] = (path); /***/ }), /***/ "./node_modules/ramda/es/pathEq.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/pathEq.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./path */ "./node_modules/ramda/es/path.js"); /** * Determines whether a nested path on an object has a specific value, in * [`R.equals`](#equals) terms. Most likely used to filter a list. * * @func * @memberOf R * @since v0.7.0 * @category Relation * @typedefn Idx = String | Int * @sig [Idx] -> a -> {a} -> Boolean * @param {Array} path The path of the nested property to use * @param {*} val The value to compare the nested property with * @param {Object} obj The object to check the nested property in * @return {Boolean} `true` if the value equals the nested object property, * `false` otherwise. * @example * * var user1 = { address: { zipCode: 90210 } }; * var user2 = { address: { zipCode: 55555 } }; * var user3 = { name: 'Bob' }; * var users = [ user1, user2, user3 ]; * var isFamous = R.pathEq(['address', 'zipCode'], 90210); * R.filter(isFamous, users); //=> [ user1 ] */ var pathEq = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function pathEq(_path, val, obj) { return Object(_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_path__WEBPACK_IMPORTED_MODULE_2__["default"])(_path, obj), val); }); /* harmony default export */ __webpack_exports__["default"] = (pathEq); /***/ }), /***/ "./node_modules/ramda/es/pathOr.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/pathOr.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _defaultTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultTo */ "./node_modules/ramda/es/defaultTo.js"); /* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./path */ "./node_modules/ramda/es/path.js"); /** * If the given, non-null object has a value at the given path, returns the * value at that path. Otherwise returns the provided default value. * * @func * @memberOf R * @since v0.18.0 * @category Object * @typedefn Idx = String | Int * @sig a -> [Idx] -> {a} -> a * @param {*} d The default value. * @param {Array} p The path to use. * @param {Object} obj The object to retrieve the nested property from. * @return {*} The data at `path` of the supplied object or the default value. * @example * * R.pathOr('N/A', ['a', 'b'], {a: {b: 2}}); //=> 2 * R.pathOr('N/A', ['a', 'b'], {c: {b: 2}}); //=> "N/A" */ var pathOr = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function pathOr(d, p, obj) { return Object(_defaultTo__WEBPACK_IMPORTED_MODULE_1__["default"])(d, Object(_path__WEBPACK_IMPORTED_MODULE_2__["default"])(p, obj)); }); /* harmony default export */ __webpack_exports__["default"] = (pathOr); /***/ }), /***/ "./node_modules/ramda/es/pathSatisfies.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/pathSatisfies.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path */ "./node_modules/ramda/es/path.js"); /** * Returns `true` if the specified object property at given path satisfies the * given predicate; `false` otherwise. * * @func * @memberOf R * @since v0.19.0 * @category Logic * @typedefn Idx = String | Int * @sig (a -> Boolean) -> [Idx] -> {a} -> Boolean * @param {Function} pred * @param {Array} propPath * @param {*} obj * @return {Boolean} * @see R.propSatisfies, R.path * @example * * R.pathSatisfies(y => y > 0, ['x', 'y'], {x: {y: 2}}); //=> true */ var pathSatisfies = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function pathSatisfies(pred, propPath, obj) { return propPath.length > 0 && pred(Object(_path__WEBPACK_IMPORTED_MODULE_1__["default"])(propPath, obj)); }); /* harmony default export */ __webpack_exports__["default"] = (pathSatisfies); /***/ }), /***/ "./node_modules/ramda/es/pick.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/pick.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a partial copy of an object containing only the keys specified. If * the key does not exist, the property is ignored. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [k] -> {k: v} -> {k: v} * @param {Array} names an array of String property names to copy onto a new object * @param {Object} obj The object to copy from * @return {Object} A new object with only properties from `names` on it. * @see R.omit, R.props * @example * * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1} */ var pick = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function pick(names, obj) { var result = {}; var idx = 0; while (idx < names.length) { if (names[idx] in obj) { result[names[idx]] = obj[names[idx]]; } idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (pick); /***/ }), /***/ "./node_modules/ramda/es/pickAll.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/pickAll.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Similar to `pick` except that this one includes a `key: undefined` pair for * properties that don't exist. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [k] -> {k: v} -> {k: v} * @param {Array} names an array of String property names to copy onto a new object * @param {Object} obj The object to copy from * @return {Object} A new object with only properties from `names` on it. * @see R.pick * @example * * R.pickAll(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} * R.pickAll(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined} */ var pickAll = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function pickAll(names, obj) { var result = {}; var idx = 0; var len = names.length; while (idx < len) { var name = names[idx]; result[name] = obj[name]; idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (pickAll); /***/ }), /***/ "./node_modules/ramda/es/pickBy.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/pickBy.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a partial copy of an object containing only the keys that satisfy * the supplied predicate. * * @func * @memberOf R * @since v0.8.0 * @category Object * @sig ((v, k) -> Boolean) -> {k: v} -> {k: v} * @param {Function} pred A predicate to determine whether or not a key * should be included on the output object. * @param {Object} obj The object to copy from * @return {Object} A new object with only properties that satisfy `pred` * on it. * @see R.pick, R.filter * @example * * var isUpperCase = (val, key) => key.toUpperCase() === key; * R.pickBy(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4} */ var pickBy = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function pickBy(test, obj) { var result = {}; for (var prop in obj) { if (test(obj[prop], prop, obj)) { result[prop] = obj[prop]; } } return result; }); /* harmony default export */ __webpack_exports__["default"] = (pickBy); /***/ }), /***/ "./node_modules/ramda/es/pipe.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/pipe.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pipe; }); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_pipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_pipe */ "./node_modules/ramda/es/internal/_pipe.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /* harmony import */ var _tail__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tail */ "./node_modules/ramda/es/tail.js"); /** * Performs left-to-right function composition. The leftmost function may have * any arity; the remaining functions must be unary. * * In some libraries this function is named `sequence`. * * **Note:** The result of pipe is not automatically curried. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z) * @param {...Function} functions * @return {Function} * @see R.compose * @example * * var f = R.pipe(Math.pow, R.negate, R.inc); * * f(3, 4); // -(3^4) + 1 * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b))) */ function pipe() { if (arguments.length === 0) { throw new Error('pipe requires at least one argument'); } return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments[0].length, Object(_reduce__WEBPACK_IMPORTED_MODULE_2__["default"])(_internal_pipe__WEBPACK_IMPORTED_MODULE_1__["default"], arguments[0], Object(_tail__WEBPACK_IMPORTED_MODULE_3__["default"])(arguments))); } /***/ }), /***/ "./node_modules/ramda/es/pipeK.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/pipeK.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pipeK; }); /* harmony import */ var _composeK__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./composeK */ "./node_modules/ramda/es/composeK.js"); /* harmony import */ var _reverse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reverse */ "./node_modules/ramda/es/reverse.js"); /** * Returns the left-to-right Kleisli composition of the provided functions, * each of which must return a value of a type supported by [`chain`](#chain). * * `R.pipeK(f, g, h)` is equivalent to `R.pipe(f, R.chain(g), R.chain(h))`. * * @func * @memberOf R * @since v0.16.0 * @category Function * @sig Chain m => ((a -> m b), (b -> m c), ..., (y -> m z)) -> (a -> m z) * @param {...Function} * @return {Function} * @see R.composeK * @example * * // parseJson :: String -> Maybe * * // get :: String -> Object -> Maybe * * * // getStateCode :: Maybe String -> Maybe String * var getStateCode = R.pipeK( * parseJson, * get('user'), * get('address'), * get('state'), * R.compose(Maybe.of, R.toUpper) * ); * * getStateCode('{"user":{"address":{"state":"ny"}}}'); * //=> Just('NY') * getStateCode('[Invalid JSON]'); * //=> Nothing() * @symb R.pipeK(f, g, h)(a) = R.chain(h, R.chain(g, f(a))) */ function pipeK() { if (arguments.length === 0) { throw new Error('pipeK requires at least one argument'); } return _composeK__WEBPACK_IMPORTED_MODULE_0__["default"].apply(this, Object(_reverse__WEBPACK_IMPORTED_MODULE_1__["default"])(arguments)); } /***/ }), /***/ "./node_modules/ramda/es/pipeP.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/pipeP.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pipeP; }); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_pipeP__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_pipeP */ "./node_modules/ramda/es/internal/_pipeP.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /* harmony import */ var _tail__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tail */ "./node_modules/ramda/es/tail.js"); /** * Performs left-to-right composition of one or more Promise-returning * functions. The leftmost function may have any arity; the remaining functions * must be unary. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((a -> Promise b), (b -> Promise c), ..., (y -> Promise z)) -> (a -> Promise z) * @param {...Function} functions * @return {Function} * @see R.composeP * @example * * // followersForUser :: String -> Promise [User] * var followersForUser = R.pipeP(db.getUserById, db.getFollowers); */ function pipeP() { if (arguments.length === 0) { throw new Error('pipeP requires at least one argument'); } return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments[0].length, Object(_reduce__WEBPACK_IMPORTED_MODULE_2__["default"])(_internal_pipeP__WEBPACK_IMPORTED_MODULE_1__["default"], arguments[0], Object(_tail__WEBPACK_IMPORTED_MODULE_3__["default"])(arguments))); } /***/ }), /***/ "./node_modules/ramda/es/pluck.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/pluck.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _prop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./prop */ "./node_modules/ramda/es/prop.js"); /** * Returns a new list by plucking the same named property off all objects in * the list supplied. * * `pluck` will work on * any [functor](https://github.com/fantasyland/fantasy-land#functor) in * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Functor f => k -> f {k: v} -> f v * @param {Number|String} key The key name to pluck off of each object. * @param {Array} f The array or functor to consider. * @return {Array} The list of values for the given key. * @see R.props * @example * * R.pluck('a')([{a: 1}, {a: 2}]); //=> [1, 2] * R.pluck(0)([[1, 2], [3, 4]]); //=> [1, 3] * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5} * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5] * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5] */ var pluck = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function pluck(p, list) { return Object(_map__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_prop__WEBPACK_IMPORTED_MODULE_2__["default"])(p), list); }); /* harmony default export */ __webpack_exports__["default"] = (pluck); /***/ }), /***/ "./node_modules/ramda/es/prepend.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/prepend.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a new list with the given element at the front, followed by the * contents of the list. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> [a] * @param {*} el The item to add to the head of the output list. * @param {Array} list The array to add to the tail of the output list. * @return {Array} A new array. * @see R.append * @example * * R.prepend('fee', ['fi', 'fo', 'fum']); //=> ['fee', 'fi', 'fo', 'fum'] */ var prepend = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function prepend(el, list) { return Object(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])([el], list); }); /* harmony default export */ __webpack_exports__["default"] = (prepend); /***/ }), /***/ "./node_modules/ramda/es/product.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/product.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _multiply__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multiply */ "./node_modules/ramda/es/multiply.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /** * Multiplies together all the elements of a list. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig [Number] -> Number * @param {Array} list An array of numbers * @return {Number} The product of all the numbers in the list. * @see R.reduce * @example * * R.product([2,4,6,8,100,1]); //=> 38400 */ var product = /*#__PURE__*/Object(_reduce__WEBPACK_IMPORTED_MODULE_1__["default"])(_multiply__WEBPACK_IMPORTED_MODULE_0__["default"], 1); /* harmony default export */ __webpack_exports__["default"] = (product); /***/ }), /***/ "./node_modules/ramda/es/project.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/project.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_map */ "./node_modules/ramda/es/internal/_map.js"); /* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity */ "./node_modules/ramda/es/identity.js"); /* harmony import */ var _pickAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pickAll */ "./node_modules/ramda/es/pickAll.js"); /* harmony import */ var _useWith__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useWith */ "./node_modules/ramda/es/useWith.js"); /** * Reasonable analog to SQL `select` statement. * * @func * @memberOf R * @since v0.1.0 * @category Object * @category Relation * @sig [k] -> [{k: v}] -> [{k: v}] * @param {Array} props The property names to project * @param {Array} objs The objects to query * @return {Array} An array of objects with just the `props` properties. * @example * * var abby = {name: 'Abby', age: 7, hair: 'blond', grade: 2}; * var fred = {name: 'Fred', age: 12, hair: 'brown', grade: 7}; * var kids = [abby, fred]; * R.project(['name', 'grade'], kids); //=> [{name: 'Abby', grade: 2}, {name: 'Fred', grade: 7}] */ var project = /*#__PURE__*/Object(_useWith__WEBPACK_IMPORTED_MODULE_3__["default"])(_internal_map__WEBPACK_IMPORTED_MODULE_0__["default"], [_pickAll__WEBPACK_IMPORTED_MODULE_2__["default"], _identity__WEBPACK_IMPORTED_MODULE_1__["default"]]); // passing `identity` gives correct arity /* harmony default export */ __webpack_exports__["default"] = (project); /***/ }), /***/ "./node_modules/ramda/es/prop.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/prop.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path */ "./node_modules/ramda/es/path.js"); /** * Returns a function that when supplied an object returns the indicated * property of that object, if it exists. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig s -> {s: a} -> a | Undefined * @param {String} p The property name * @param {Object} obj The object to query * @return {*} The value at `obj.p`. * @see R.path * @example * * R.prop('x', {x: 100}); //=> 100 * R.prop('x', {}); //=> undefined */ var prop = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function prop(p, obj) { return Object(_path__WEBPACK_IMPORTED_MODULE_1__["default"])([p], obj); }); /* harmony default export */ __webpack_exports__["default"] = (prop); /***/ }), /***/ "./node_modules/ramda/es/propEq.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/propEq.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /** * Returns `true` if the specified object property is equal, in * [`R.equals`](#equals) terms, to the given value; `false` otherwise. * You can test multiple properties with [`R.where`](#where). * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig String -> a -> Object -> Boolean * @param {String} name * @param {*} val * @param {*} obj * @return {Boolean} * @see R.whereEq, R.propSatisfies, R.equals * @example * * var abby = {name: 'Abby', age: 7, hair: 'blond'}; * var fred = {name: 'Fred', age: 12, hair: 'brown'}; * var rusty = {name: 'Rusty', age: 10, hair: 'brown'}; * var alois = {name: 'Alois', age: 15, disposition: 'surly'}; * var kids = [abby, fred, rusty, alois]; * var hasBrownHair = R.propEq('hair', 'brown'); * R.filter(hasBrownHair, kids); //=> [fred, rusty] */ var propEq = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function propEq(name, val, obj) { return Object(_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(val, obj[name]); }); /* harmony default export */ __webpack_exports__["default"] = (propEq); /***/ }), /***/ "./node_modules/ramda/es/propIs.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/propIs.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is */ "./node_modules/ramda/es/is.js"); /** * Returns `true` if the specified object property is of the given type; * `false` otherwise. * * @func * @memberOf R * @since v0.16.0 * @category Type * @sig Type -> String -> Object -> Boolean * @param {Function} type * @param {String} name * @param {*} obj * @return {Boolean} * @see R.is, R.propSatisfies * @example * * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true * R.propIs(Number, 'x', {x: 'foo'}); //=> false * R.propIs(Number, 'x', {}); //=> false */ var propIs = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function propIs(type, name, obj) { return Object(_is__WEBPACK_IMPORTED_MODULE_1__["default"])(type, obj[name]); }); /* harmony default export */ __webpack_exports__["default"] = (propIs); /***/ }), /***/ "./node_modules/ramda/es/propOr.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/propOr.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /** * If the given, non-null object has an own property with the specified name, * returns the value of that property. Otherwise returns the provided default * value. * * @func * @memberOf R * @since v0.6.0 * @category Object * @sig a -> String -> Object -> a * @param {*} val The default value. * @param {String} p The name of the property to return. * @param {Object} obj The object to query. * @return {*} The value of given property of the supplied object or the default value. * @example * * var alice = { * name: 'ALICE', * age: 101 * }; * var favorite = R.prop('favoriteLibrary'); * var favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary'); * * favorite(alice); //=> undefined * favoriteWithDefault(alice); //=> 'Ramda' */ var propOr = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function propOr(val, p, obj) { return obj != null && Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(p, obj) ? obj[p] : val; }); /* harmony default export */ __webpack_exports__["default"] = (propOr); /***/ }), /***/ "./node_modules/ramda/es/propSatisfies.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/propSatisfies.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Returns `true` if the specified object property satisfies the given * predicate; `false` otherwise. You can test multiple properties with * [`R.where`](#where). * * @func * @memberOf R * @since v0.16.0 * @category Logic * @sig (a -> Boolean) -> String -> {String: a} -> Boolean * @param {Function} pred * @param {String} name * @param {*} obj * @return {Boolean} * @see R.where, R.propEq, R.propIs * @example * * R.propSatisfies(x => x > 0, 'x', {x: 1, y: 2}); //=> true */ var propSatisfies = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function propSatisfies(pred, name, obj) { return pred(obj[name]); }); /* harmony default export */ __webpack_exports__["default"] = (propSatisfies); /***/ }), /***/ "./node_modules/ramda/es/props.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/props.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Acts as multiple `prop`: array of keys in, array of values out. Preserves * order. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [k] -> {k: v} -> [v] * @param {Array} ps The property names to fetch * @param {Object} obj The object to query * @return {Array} The corresponding values or partially applied function. * @example * * R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2] * R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2] * * var fullName = R.compose(R.join(' '), R.props(['first', 'last'])); * fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth' */ var props = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function props(ps, obj) { var len = ps.length; var out = []; var idx = 0; while (idx < len) { out[idx] = obj[ps[idx]]; idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (props); /***/ }), /***/ "./node_modules/ramda/es/range.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/range.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isNumber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isNumber */ "./node_modules/ramda/es/internal/_isNumber.js"); /** * Returns a list of numbers from `from` (inclusive) to `to` (exclusive). * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> Number -> [Number] * @param {Number} from The first number in the list. * @param {Number} to One more than the last number in the list. * @return {Array} The list of numbers in tthe set `[a, b)`. * @example * * R.range(1, 5); //=> [1, 2, 3, 4] * R.range(50, 53); //=> [50, 51, 52] */ var range = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function range(from, to) { if (!(Object(_internal_isNumber__WEBPACK_IMPORTED_MODULE_1__["default"])(from) && Object(_internal_isNumber__WEBPACK_IMPORTED_MODULE_1__["default"])(to))) { throw new TypeError('Both arguments to range must be numbers'); } var result = []; var n = from; while (n < to) { result.push(n); n += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (range); /***/ }), /***/ "./node_modules/ramda/es/reduce.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/reduce.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /** * Returns a single item by iterating through the list, successively calling * the iterator function and passing it an accumulator value and the current * value from the array, and then passing the result to the next call. * * The iterator function receives two values: *(acc, value)*. It may use * [`R.reduced`](#reduced) to shortcut the iteration. * * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function * is *(value, acc)*. * * Note: `R.reduce` does not skip deleted or unassigned indices (sparse * arrays), unlike the native `Array.prototype.reduce` method. For more details * on this behavior, see: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description * * Dispatches to the `reduce` method of the third argument, if present. When * doing so, it is up to the user to handle the [`R.reduced`](#reduced) * shortcuting, as this is not implemented by `reduce`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig ((a, b) -> a) -> a -> [b] -> a * @param {Function} fn The iterator function. Receives two values, the accumulator and the * current element from the array. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduced, R.addIndex, R.reduceRight * @example * * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10 * // - -10 * // / \ / \ * // - 4 -6 4 * // / \ / \ * // - 3 ==> -3 3 * // / \ / \ * // - 2 -1 2 * // / \ / \ * // 0 1 0 1 * * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d) */ var reduce = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(_internal_reduce__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (reduce); /***/ }), /***/ "./node_modules/ramda/es/reduceBy.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/reduceBy.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curryN__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curryN */ "./node_modules/ramda/es/internal/_curryN.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _internal_xreduceBy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_xreduceBy */ "./node_modules/ramda/es/internal/_xreduceBy.js"); /** * Groups the elements of the list according to the result of calling * the String-returning function `keyFn` on each element and reduces the elements * of each group to a single value via the reducer function `valueFn`. * * This function is basically a more general [`groupBy`](#groupBy) function. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.20.0 * @category List * @sig ((a, b) -> a) -> a -> (b -> String) -> [b] -> {String: a} * @param {Function} valueFn The function that reduces the elements of each group to a single * value. Receives two values, accumulator for a particular group and the current element. * @param {*} acc The (initial) accumulator value for each group. * @param {Function} keyFn The function that maps the list's element into a key. * @param {Array} list The array to group. * @return {Object} An object with the output of `keyFn` for keys, mapped to the output of * `valueFn` for elements which produced that key when passed to `keyFn`. * @see R.groupBy, R.reduce * @example * * var reduceToNamesBy = R.reduceBy((acc, student) => acc.concat(student.name), []); * var namesByGrade = reduceToNamesBy(function(student) { * var score = student.score; * return score < 65 ? 'F' : * score < 70 ? 'D' : * score < 80 ? 'C' : * score < 90 ? 'B' : 'A'; * }); * var students = [{name: 'Lucy', score: 92}, * {name: 'Drew', score: 85}, * // ... * {name: 'Bart', score: 62}]; * namesByGrade(students); * // { * // 'A': ['Lucy'], * // 'B': ['Drew'] * // // ..., * // 'F': ['Bart'] * // } */ var reduceBy = /*#__PURE__*/Object(_internal_curryN__WEBPACK_IMPORTED_MODULE_0__["default"])(4, [], /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xreduceBy__WEBPACK_IMPORTED_MODULE_4__["default"], function reduceBy(valueFn, valueAcc, keyFn, list) { return Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_3__["default"])(function (acc, elt) { var key = keyFn(elt); acc[key] = valueFn(Object(_internal_has__WEBPACK_IMPORTED_MODULE_2__["default"])(key, acc) ? acc[key] : valueAcc, elt); return acc; }, {}, list); })); /* harmony default export */ __webpack_exports__["default"] = (reduceBy); /***/ }), /***/ "./node_modules/ramda/es/reduceRight.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/reduceRight.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Returns a single item by iterating through the list, successively calling * the iterator function and passing it an accumulator value and the current * value from the array, and then passing the result to the next call. * * Similar to [`reduce`](#reduce), except moves through the input list from the * right to the left. * * The iterator function receives two values: *(value, acc)*, while the arguments' * order of `reduce`'s iterator function is *(acc, value)*. * * Note: `R.reduceRight` does not skip deleted or unassigned indices (sparse * arrays), unlike the native `Array.prototype.reduceRight` method. For more details * on this behavior, see: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description * * @func * @memberOf R * @since v0.1.0 * @category List * @sig ((a, b) -> b) -> b -> [a] -> b * @param {Function} fn The iterator function. Receives two values, the current element from the array * and the accumulator. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduce, R.addIndex * @example * * R.reduceRight(R.subtract, 0, [1, 2, 3, 4]) // => (1 - (2 - (3 - (4 - 0)))) = -2 * // - -2 * // / \ / \ * // 1 - 1 3 * // / \ / \ * // 2 - ==> 2 -1 * // / \ / \ * // 3 - 3 4 * // / \ / \ * // 4 0 4 0 * * @symb R.reduceRight(f, a, [b, c, d]) = f(b, f(c, f(d, a))) */ var reduceRight = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function reduceRight(fn, acc, list) { var idx = list.length - 1; while (idx >= 0) { acc = fn(list[idx], acc); idx -= 1; } return acc; }); /* harmony default export */ __webpack_exports__["default"] = (reduceRight); /***/ }), /***/ "./node_modules/ramda/es/reduceWhile.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/reduceWhile.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curryN__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curryN */ "./node_modules/ramda/es/internal/_curryN.js"); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _internal_reduced__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /** * Like [`reduce`](#reduce), `reduceWhile` returns a single item by iterating * through the list, successively calling the iterator function. `reduceWhile` * also takes a predicate that is evaluated before each step. If the predicate * returns `false`, it "short-circuits" the iteration and returns the current * value of the accumulator. * * @func * @memberOf R * @since v0.22.0 * @category List * @sig ((a, b) -> Boolean) -> ((a, b) -> a) -> a -> [b] -> a * @param {Function} pred The predicate. It is passed the accumulator and the * current element. * @param {Function} fn The iterator function. Receives two values, the * accumulator and the current element. * @param {*} a The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduce, R.reduced * @example * * var isOdd = (acc, x) => x % 2 === 1; * var xs = [1, 3, 5, 60, 777, 800]; * R.reduceWhile(isOdd, R.add, 0, xs); //=> 9 * * var ys = [2, 4, 6] * R.reduceWhile(isOdd, R.add, 111, ys); //=> 111 */ var reduceWhile = /*#__PURE__*/Object(_internal_curryN__WEBPACK_IMPORTED_MODULE_0__["default"])(4, [], function _reduceWhile(pred, fn, a, list) { return Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_1__["default"])(function (acc, x) { return pred(acc, x) ? fn(acc, x) : Object(_internal_reduced__WEBPACK_IMPORTED_MODULE_2__["default"])(acc); }, a, list); }); /* harmony default export */ __webpack_exports__["default"] = (reduceWhile); /***/ }), /***/ "./node_modules/ramda/es/reduced.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/reduced.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_reduced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduced */ "./node_modules/ramda/es/internal/_reduced.js"); /** * Returns a value wrapped to indicate that it is the final value of the reduce * and transduce functions. The returned value should be considered a black * box: the internal structure is not guaranteed to be stable. * * Note: this optimization is unavailable to functions not explicitly listed * above. For instance, it is not currently supported by * [`reduceRight`](#reduceRight). * * @func * @memberOf R * @since v0.15.0 * @category List * @sig a -> * * @param {*} x The final value of the reduce. * @return {*} The wrapped value. * @see R.reduce, R.transduce * @example * * R.reduce( * (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item), * [], * [1, 2, 3, 4, 5]) // [1, 2, 3] */ var reduced = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(_internal_reduced__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (reduced); /***/ }), /***/ "./node_modules/ramda/es/reject.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/reject.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_complement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_complement */ "./node_modules/ramda/es/internal/_complement.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filter */ "./node_modules/ramda/es/filter.js"); /** * The complement of [`filter`](#filter). * * Acts as a transducer if a transformer is given in list position. Filterable * objects include plain objects or any object that has a filter method such * as `Array`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Filterable f => (a -> Boolean) -> f a -> f a * @param {Function} pred * @param {Array} filterable * @return {Array} * @see R.filter, R.transduce, R.addIndex * @example * * var isOdd = (n) => n % 2 === 1; * * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4] * * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} */ var reject = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function reject(pred, filterable) { return Object(_filter__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_internal_complement__WEBPACK_IMPORTED_MODULE_0__["default"])(pred), filterable); }); /* harmony default export */ __webpack_exports__["default"] = (reject); /***/ }), /***/ "./node_modules/ramda/es/remove.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/remove.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Removes the sub-list of `list` starting at index `start` and containing * `count` elements. _Note that this is not destructive_: it returns a copy of * the list with the changes. * No lists have been harmed in the application of this function. * * @func * @memberOf R * @since v0.2.2 * @category List * @sig Number -> Number -> [a] -> [a] * @param {Number} start The position to start removing elements * @param {Number} count The number of elements to remove * @param {Array} list The list to remove from * @return {Array} A new Array with `count` elements from `start` removed. * @example * * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8] */ var remove = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function remove(start, count, list) { var result = Array.prototype.slice.call(list, 0); result.splice(start, count); return result; }); /* harmony default export */ __webpack_exports__["default"] = (remove); /***/ }), /***/ "./node_modules/ramda/es/repeat.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/repeat.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _always__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./always */ "./node_modules/ramda/es/always.js"); /* harmony import */ var _times__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./times */ "./node_modules/ramda/es/times.js"); /** * Returns a fixed list of size `n` containing a specified identical value. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig a -> n -> [a] * @param {*} value The value to repeat. * @param {Number} n The desired size of the output list. * @return {Array} A new array containing `n` `value`s. * @see R.times * @example * * R.repeat('hi', 5); //=> ['hi', 'hi', 'hi', 'hi', 'hi'] * * var obj = {}; * var repeatedObjs = R.repeat(obj, 5); //=> [{}, {}, {}, {}, {}] * repeatedObjs[0] === repeatedObjs[1]; //=> true * @symb R.repeat(a, 0) = [] * @symb R.repeat(a, 1) = [a] * @symb R.repeat(a, 2) = [a, a] */ var repeat = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function repeat(value, n) { return Object(_times__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_always__WEBPACK_IMPORTED_MODULE_1__["default"])(value), n); }); /* harmony default export */ __webpack_exports__["default"] = (repeat); /***/ }), /***/ "./node_modules/ramda/es/replace.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/replace.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Replace a substring or regex match in a string with a replacement. * * @func * @memberOf R * @since v0.7.0 * @category String * @sig RegExp|String -> String -> String -> String * @param {RegExp|String} pattern A regular expression or a substring to match. * @param {String} replacement The string to replace the matches with. * @param {String} str The String to do the search and replacement in. * @return {String} The result. * @example * * R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo' * R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo' * * // Use the "g" (global) flag to replace all occurrences: * R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar' */ var replace = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function replace(regex, replacement, str) { return str.replace(regex, replacement); }); /* harmony default export */ __webpack_exports__["default"] = (replace); /***/ }), /***/ "./node_modules/ramda/es/reverse.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/reverse.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_isString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isString */ "./node_modules/ramda/es/internal/_isString.js"); /** * Returns a new list or string with the elements or characters in reverse * order. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] * @sig String -> String * @param {Array|String} list * @return {Array|String} * @example * * R.reverse([1, 2, 3]); //=> [3, 2, 1] * R.reverse([1, 2]); //=> [2, 1] * R.reverse([1]); //=> [1] * R.reverse([]); //=> [] * * R.reverse('abc'); //=> 'cba' * R.reverse('ab'); //=> 'ba' * R.reverse('a'); //=> 'a' * R.reverse(''); //=> '' */ var reverse = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function reverse(list) { return Object(_internal_isString__WEBPACK_IMPORTED_MODULE_1__["default"])(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse(); }); /* harmony default export */ __webpack_exports__["default"] = (reverse); /***/ }), /***/ "./node_modules/ramda/es/scan.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/scan.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Scan is similar to [`reduce`](#reduce), but returns a list of successively * reduced values from the left * * @func * @memberOf R * @since v0.10.0 * @category List * @sig ((a, b) -> a) -> a -> [b] -> [a] * @param {Function} fn The iterator function. Receives two values, the accumulator and the * current element from the array * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {Array} A list of all intermediately reduced values. * @see R.reduce * @example * * var numbers = [1, 2, 3, 4]; * var factorials = R.scan(R.multiply, 1, numbers); //=> [1, 1, 2, 6, 24] * @symb R.scan(f, a, [b, c]) = [a, f(a, b), f(f(a, b), c)] */ var scan = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function scan(fn, acc, list) { var idx = 0; var len = list.length; var result = [acc]; while (idx < len) { acc = fn(acc, list[idx]); result[idx + 1] = acc; idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (scan); /***/ }), /***/ "./node_modules/ramda/es/sequence.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/sequence.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _ap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ap */ "./node_modules/ramda/es/ap.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _prepend__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./prepend */ "./node_modules/ramda/es/prepend.js"); /* harmony import */ var _reduceRight__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduceRight */ "./node_modules/ramda/es/reduceRight.js"); /** * Transforms a [Traversable](https://github.com/fantasyland/fantasy-land#traversable) * of [Applicative](https://github.com/fantasyland/fantasy-land#applicative) into an * Applicative of Traversable. * * Dispatches to the `sequence` method of the second argument, if present. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig (Applicative f, Traversable t) => (a -> f a) -> t (f a) -> f (t a) * @param {Function} of * @param {*} traversable * @return {*} * @see R.traverse * @example * * R.sequence(Maybe.of, [Just(1), Just(2), Just(3)]); //=> Just([1, 2, 3]) * R.sequence(Maybe.of, [Just(1), Just(2), Nothing()]); //=> Nothing() * * R.sequence(R.of, Just([1, 2, 3])); //=> [Just(1), Just(2), Just(3)] * R.sequence(R.of, Nothing()); //=> [Nothing()] */ var sequence = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function sequence(of, traversable) { return typeof traversable.sequence === 'function' ? traversable.sequence(of) : Object(_reduceRight__WEBPACK_IMPORTED_MODULE_4__["default"])(function (x, acc) { return Object(_ap__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_map__WEBPACK_IMPORTED_MODULE_2__["default"])(_prepend__WEBPACK_IMPORTED_MODULE_3__["default"], x), acc); }, of([]), traversable); }); /* harmony default export */ __webpack_exports__["default"] = (sequence); /***/ }), /***/ "./node_modules/ramda/es/set.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/set.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _always__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./always */ "./node_modules/ramda/es/always.js"); /* harmony import */ var _over__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./over */ "./node_modules/ramda/es/over.js"); /** * Returns the result of "setting" the portion of the given data structure * focused by the given lens to the given value. * * @func * @memberOf R * @since v0.16.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Lens s a -> a -> s -> s * @param {Lens} lens * @param {*} v * @param {*} x * @return {*} * @see R.prop, R.lensIndex, R.lensProp * @example * * var xLens = R.lensProp('x'); * * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} * R.set(xLens, 8, {x: 1, y: 2}); //=> {x: 8, y: 2} */ var set = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function set(lens, v, x) { return Object(_over__WEBPACK_IMPORTED_MODULE_2__["default"])(lens, Object(_always__WEBPACK_IMPORTED_MODULE_1__["default"])(v), x); }); /* harmony default export */ __webpack_exports__["default"] = (set); /***/ }), /***/ "./node_modules/ramda/es/slice.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/slice.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Returns the elements of the given list or string (or object with a `slice` * method) from `fromIndex` (inclusive) to `toIndex` (exclusive). * * Dispatches to the `slice` method of the third argument, if present. * * @func * @memberOf R * @since v0.1.4 * @category List * @sig Number -> Number -> [a] -> [a] * @sig Number -> Number -> String -> String * @param {Number} fromIndex The start index (inclusive). * @param {Number} toIndex The end index (exclusive). * @param {*} list * @return {*} * @example * * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd'] * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c'] * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] * R.slice(0, 3, 'ramda'); //=> 'ram' */ var slice = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__["default"])('slice', function slice(fromIndex, toIndex, list) { return Array.prototype.slice.call(list, fromIndex, toIndex); })); /* harmony default export */ __webpack_exports__["default"] = (slice); /***/ }), /***/ "./node_modules/ramda/es/sort.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/sort.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a copy of the list, sorted according to the comparator function, * which should accept two values at a time and return a negative number if the * first value is smaller, a positive number if it's larger, and zero if they * are equal. Please note that this is a **copy** of the list. It does not * modify the original. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig ((a, a) -> Number) -> [a] -> [a] * @param {Function} comparator A sorting function :: a -> b -> Int * @param {Array} list The list to sort * @return {Array} a new array with its elements sorted by the comparator function. * @example * * var diff = function(a, b) { return a - b; }; * R.sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7] */ var sort = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function sort(comparator, list) { return Array.prototype.slice.call(list, 0).sort(comparator); }); /* harmony default export */ __webpack_exports__["default"] = (sort); /***/ }), /***/ "./node_modules/ramda/es/sortBy.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/sortBy.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Sorts the list according to the supplied function. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord b => (a -> b) -> [a] -> [a] * @param {Function} fn * @param {Array} list The list to sort. * @return {Array} A new list sorted by the keys generated by `fn`. * @example * * var sortByFirstItem = R.sortBy(R.prop(0)); * var sortByNameCaseInsensitive = R.sortBy(R.compose(R.toLower, R.prop('name'))); * var pairs = [[-1, 1], [-2, 2], [-3, 3]]; * sortByFirstItem(pairs); //=> [[-3, 3], [-2, 2], [-1, 1]] * var alice = { * name: 'ALICE', * age: 101 * }; * var bob = { * name: 'Bob', * age: -10 * }; * var clara = { * name: 'clara', * age: 314.159 * }; * var people = [clara, bob, alice]; * sortByNameCaseInsensitive(people); //=> [alice, bob, clara] */ var sortBy = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function sortBy(fn, list) { return Array.prototype.slice.call(list, 0).sort(function (a, b) { var aa = fn(a); var bb = fn(b); return aa < bb ? -1 : aa > bb ? 1 : 0; }); }); /* harmony default export */ __webpack_exports__["default"] = (sortBy); /***/ }), /***/ "./node_modules/ramda/es/sortWith.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/sortWith.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Sorts a list according to a list of comparators. * * @func * @memberOf R * @since v0.23.0 * @category Relation * @sig [(a, a) -> Number] -> [a] -> [a] * @param {Array} functions A list of comparator functions. * @param {Array} list The list to sort. * @return {Array} A new list sorted according to the comarator functions. * @example * * var alice = { * name: 'alice', * age: 40 * }; * var bob = { * name: 'bob', * age: 30 * }; * var clara = { * name: 'clara', * age: 40 * }; * var people = [clara, bob, alice]; * var ageNameSort = R.sortWith([ * R.descend(R.prop('age')), * R.ascend(R.prop('name')) * ]); * ageNameSort(people); //=> [alice, clara, bob] */ var sortWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function sortWith(fns, list) { return Array.prototype.slice.call(list, 0).sort(function (a, b) { var result = 0; var i = 0; while (result === 0 && i < fns.length) { result = fns[i](a, b); i += 1; } return result; }); }); /* harmony default export */ __webpack_exports__["default"] = (sortWith); /***/ }), /***/ "./node_modules/ramda/es/split.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/split.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _invoker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker */ "./node_modules/ramda/es/invoker.js"); /** * Splits a string into an array of strings based on the given * separator. * * @func * @memberOf R * @since v0.1.0 * @category String * @sig (String | RegExp) -> String -> [String] * @param {String|RegExp} sep The pattern. * @param {String} str The string to separate into an array. * @return {Array} The array of strings from `str` separated by `str`. * @see R.join * @example * * var pathComponents = R.split('/'); * R.tail(pathComponents('/usr/local/bin/node')); //=> ['usr', 'local', 'bin', 'node'] * * R.split('.', 'a.b.c.xyz.d'); //=> ['a', 'b', 'c', 'xyz', 'd'] */ var split = /*#__PURE__*/Object(_invoker__WEBPACK_IMPORTED_MODULE_0__["default"])(1, 'split'); /* harmony default export */ __webpack_exports__["default"] = (split); /***/ }), /***/ "./node_modules/ramda/es/splitAt.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/splitAt.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _length__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./length */ "./node_modules/ramda/es/length.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Splits a given list or string at a given index. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig Number -> [a] -> [[a], [a]] * @sig Number -> String -> [String, String] * @param {Number} index The index where the array/string is split. * @param {Array|String} array The array/string to be split. * @return {Array} * @example * * R.splitAt(1, [1, 2, 3]); //=> [[1], [2, 3]] * R.splitAt(5, 'hello world'); //=> ['hello', ' world'] * R.splitAt(-1, 'foobar'); //=> ['fooba', 'r'] */ var splitAt = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function splitAt(index, array) { return [Object(_slice__WEBPACK_IMPORTED_MODULE_2__["default"])(0, index, array), Object(_slice__WEBPACK_IMPORTED_MODULE_2__["default"])(index, Object(_length__WEBPACK_IMPORTED_MODULE_1__["default"])(array), array)]; }); /* harmony default export */ __webpack_exports__["default"] = (splitAt); /***/ }), /***/ "./node_modules/ramda/es/splitEvery.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/splitEvery.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Splits a collection into slices of the specified length. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig Number -> [a] -> [[a]] * @sig Number -> String -> [String] * @param {Number} n * @param {Array} list * @return {Array} * @example * * R.splitEvery(3, [1, 2, 3, 4, 5, 6, 7]); //=> [[1, 2, 3], [4, 5, 6], [7]] * R.splitEvery(3, 'foobarbaz'); //=> ['foo', 'bar', 'baz'] */ var splitEvery = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function splitEvery(n, list) { if (n <= 0) { throw new Error('First argument to splitEvery must be a positive integer'); } var result = []; var idx = 0; while (idx < list.length) { result.push(Object(_slice__WEBPACK_IMPORTED_MODULE_1__["default"])(idx, idx += n, list)); } return result; }); /* harmony default export */ __webpack_exports__["default"] = (splitEvery); /***/ }), /***/ "./node_modules/ramda/es/splitWhen.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/splitWhen.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Takes a list and a predicate and returns a pair of lists with the following properties: * * - the result of concatenating the two output lists is equivalent to the input list; * - none of the elements of the first output list satisfies the predicate; and * - if the second output list is non-empty, its first element satisfies the predicate. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig (a -> Boolean) -> [a] -> [[a], [a]] * @param {Function} pred The predicate that determines where the array is split. * @param {Array} list The array to be split. * @return {Array} * @example * * R.splitWhen(R.equals(2), [1, 2, 3, 1, 2, 3]); //=> [[1], [2, 3, 1, 2, 3]] */ var splitWhen = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function splitWhen(pred, list) { var idx = 0; var len = list.length; var prefix = []; while (idx < len && !pred(list[idx])) { prefix.push(list[idx]); idx += 1; } return [prefix, Array.prototype.slice.call(list, idx)]; }); /* harmony default export */ __webpack_exports__["default"] = (splitWhen); /***/ }), /***/ "./node_modules/ramda/es/startsWith.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/startsWith.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./take */ "./node_modules/ramda/es/take.js"); /** * Checks if a list starts with the provided values * * @func * @memberOf R * @since v0.24.0 * @category List * @sig [a] -> Boolean * @sig String -> Boolean * @param {*} prefix * @param {*} list * @return {Boolean} * @example * * R.startsWith('a', 'abc') //=> true * R.startsWith('b', 'abc') //=> false * R.startsWith(['a'], ['a', 'b', 'c']) //=> true * R.startsWith(['b'], ['a', 'b', 'c']) //=> false */ var startsWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prefix, list) { return Object(_equals__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_take__WEBPACK_IMPORTED_MODULE_2__["default"])(prefix.length, list), prefix); }); /* harmony default export */ __webpack_exports__["default"] = (startsWith); /***/ }), /***/ "./node_modules/ramda/es/subtract.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/subtract.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Subtracts its second argument from its first argument. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a The first value. * @param {Number} b The second value. * @return {Number} The result of `a - b`. * @see R.add * @example * * R.subtract(10, 8); //=> 2 * * var minus5 = R.subtract(R.__, 5); * minus5(17); //=> 12 * * var complementaryAngle = R.subtract(90); * complementaryAngle(30); //=> 60 * complementaryAngle(72); //=> 18 */ var subtract = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function subtract(a, b) { return Number(a) - Number(b); }); /* harmony default export */ __webpack_exports__["default"] = (subtract); /***/ }), /***/ "./node_modules/ramda/es/sum.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/sum.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _add__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add */ "./node_modules/ramda/es/add.js"); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reduce */ "./node_modules/ramda/es/reduce.js"); /** * Adds together all the elements of a list. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig [Number] -> Number * @param {Array} list An array of numbers * @return {Number} The sum of all the numbers in the list. * @see R.reduce * @example * * R.sum([2,4,6,8,100,1]); //=> 121 */ var sum = /*#__PURE__*/Object(_reduce__WEBPACK_IMPORTED_MODULE_1__["default"])(_add__WEBPACK_IMPORTED_MODULE_0__["default"], 0); /* harmony default export */ __webpack_exports__["default"] = (sum); /***/ }), /***/ "./node_modules/ramda/es/symmetricDifference.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/symmetricDifference.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./concat */ "./node_modules/ramda/es/concat.js"); /* harmony import */ var _difference__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./difference */ "./node_modules/ramda/es/difference.js"); /** * Finds the set (i.e. no duplicates) of all elements contained in the first or * second list, but not both. * * @func * @memberOf R * @since v0.19.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` or `list2`, but not both. * @see R.symmetricDifferenceWith, R.difference, R.differenceWith * @example * * R.symmetricDifference([1,2,3,4], [7,6,5,4,3]); //=> [1,2,7,6,5] * R.symmetricDifference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5,1,2] */ var symmetricDifference = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function symmetricDifference(list1, list2) { return Object(_concat__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_difference__WEBPACK_IMPORTED_MODULE_2__["default"])(list1, list2), Object(_difference__WEBPACK_IMPORTED_MODULE_2__["default"])(list2, list1)); }); /* harmony default export */ __webpack_exports__["default"] = (symmetricDifference); /***/ }), /***/ "./node_modules/ramda/es/symmetricDifferenceWith.js": /*!**********************************************************!*\ !*** ./node_modules/ramda/es/symmetricDifferenceWith.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./concat */ "./node_modules/ramda/es/concat.js"); /* harmony import */ var _differenceWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./differenceWith */ "./node_modules/ramda/es/differenceWith.js"); /** * Finds the set (i.e. no duplicates) of all elements contained in the first or * second list, but not both. Duplication is determined according to the value * returned by applying the supplied predicate to two list elements. * * @func * @memberOf R * @since v0.19.0 * @category Relation * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` or `list2`, but not both. * @see R.symmetricDifference, R.difference, R.differenceWith * @example * * var eqA = R.eqBy(R.prop('a')); * var l1 = [{a: 1}, {a: 2}, {a: 3}, {a: 4}]; * var l2 = [{a: 3}, {a: 4}, {a: 5}, {a: 6}]; * R.symmetricDifferenceWith(eqA, l1, l2); //=> [{a: 1}, {a: 2}, {a: 5}, {a: 6}] */ var symmetricDifferenceWith = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function symmetricDifferenceWith(pred, list1, list2) { return Object(_concat__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_differenceWith__WEBPACK_IMPORTED_MODULE_2__["default"])(pred, list1, list2), Object(_differenceWith__WEBPACK_IMPORTED_MODULE_2__["default"])(pred, list2, list1)); }); /* harmony default export */ __webpack_exports__["default"] = (symmetricDifferenceWith); /***/ }), /***/ "./node_modules/ramda/es/tail.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/tail.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns all but the first element of the given list or string (or object * with a `tail` method). * * Dispatches to the `slice` method of the first argument, if present. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] * @sig String -> String * @param {*} list * @return {*} * @see R.head, R.init, R.last * @example * * R.tail([1, 2, 3]); //=> [2, 3] * R.tail([1, 2]); //=> [2] * R.tail([1]); //=> [] * R.tail([]); //=> [] * * R.tail('abc'); //=> 'bc' * R.tail('ab'); //=> 'b' * R.tail('a'); //=> '' * R.tail(''); //=> '' */ var tail = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_internal_checkForMethod__WEBPACK_IMPORTED_MODULE_0__["default"])('tail', /*#__PURE__*/Object(_slice__WEBPACK_IMPORTED_MODULE_2__["default"])(1, Infinity))); /* harmony default export */ __webpack_exports__["default"] = (tail); /***/ }), /***/ "./node_modules/ramda/es/take.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/take.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xtake__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xtake */ "./node_modules/ramda/es/internal/_xtake.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns the first `n` elements of the given list, string, or * transducer/transformer (or object with a `take` method). * * Dispatches to the `take` method of the second argument, if present. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n * @param {*} list * @return {*} * @see R.drop * @example * * R.take(1, ['foo', 'bar', 'baz']); //=> ['foo'] * R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] * R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.take(3, 'ramda'); //=> 'ram' * * var personnel = [ * 'Dave Brubeck', * 'Paul Desmond', * 'Eugene Wright', * 'Joe Morello', * 'Gerry Mulligan', * 'Bob Bates', * 'Joe Dodge', * 'Ron Crotty' * ]; * * var takeFive = R.take(5); * takeFive(personnel); * //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan'] * @symb R.take(-1, [a, b]) = [a, b] * @symb R.take(0, [a, b]) = [] * @symb R.take(1, [a, b]) = [a] * @symb R.take(2, [a, b]) = [a, b] */ var take = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['take'], _internal_xtake__WEBPACK_IMPORTED_MODULE_2__["default"], function take(n, xs) { return Object(_slice__WEBPACK_IMPORTED_MODULE_3__["default"])(0, n < 0 ? Infinity : n, xs); })); /* harmony default export */ __webpack_exports__["default"] = (take); /***/ }), /***/ "./node_modules/ramda/es/takeLast.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/takeLast.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _drop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./drop */ "./node_modules/ramda/es/drop.js"); /** * Returns a new list containing the last `n` elements of the given list. * If `n > list.length`, returns a list of `list.length` elements. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n The number of elements to return. * @param {Array} xs The collection to consider. * @return {Array} * @see R.dropLast * @example * * R.takeLast(1, ['foo', 'bar', 'baz']); //=> ['baz'] * R.takeLast(2, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] * R.takeLast(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.takeLast(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.takeLast(3, 'ramda'); //=> 'mda' */ var takeLast = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function takeLast(n, xs) { return Object(_drop__WEBPACK_IMPORTED_MODULE_1__["default"])(n >= 0 ? xs.length - n : 0, xs); }); /* harmony default export */ __webpack_exports__["default"] = (takeLast); /***/ }), /***/ "./node_modules/ramda/es/takeLastWhile.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/takeLastWhile.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns a new list containing the last `n` elements of a given list, passing * each value to the supplied predicate function, and terminating when the * predicate function returns `false`. Excludes the element that caused the * predicate function to fail. The predicate function is passed one argument: * *(value)*. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} fn The function called per iteration. * @param {Array} xs The collection to iterate over. * @return {Array} A new array. * @see R.dropLastWhile, R.addIndex * @example * * var isNotOne = x => x !== 1; * * R.takeLastWhile(isNotOne, [1, 2, 3, 4]); //=> [2, 3, 4] * * R.takeLastWhile(x => x !== 'R' , 'Ramda'); //=> 'amda' */ var takeLastWhile = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function takeLastWhile(fn, xs) { var idx = xs.length - 1; while (idx >= 0 && fn(xs[idx])) { idx -= 1; } return Object(_slice__WEBPACK_IMPORTED_MODULE_1__["default"])(idx + 1, Infinity, xs); }); /* harmony default export */ __webpack_exports__["default"] = (takeLastWhile); /***/ }), /***/ "./node_modules/ramda/es/takeWhile.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/takeWhile.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xtakeWhile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xtakeWhile */ "./node_modules/ramda/es/internal/_xtakeWhile.js"); /* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice */ "./node_modules/ramda/es/slice.js"); /** * Returns a new list containing the first `n` elements of a given list, * passing each value to the supplied predicate function, and terminating when * the predicate function returns `false`. Excludes the element that caused the * predicate function to fail. The predicate function is passed one argument: * *(value)*. * * Dispatches to the `takeWhile` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} fn The function called per iteration. * @param {Array} xs The collection to iterate over. * @return {Array} A new array. * @see R.dropWhile, R.transduce, R.addIndex * @example * * var isNotFour = x => x !== 4; * * R.takeWhile(isNotFour, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3] * * R.takeWhile(x => x !== 'd' , 'Ramda'); //=> 'Ram' */ var takeWhile = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])(['takeWhile'], _internal_xtakeWhile__WEBPACK_IMPORTED_MODULE_2__["default"], function takeWhile(fn, xs) { var idx = 0; var len = xs.length; while (idx < len && fn(xs[idx])) { idx += 1; } return Object(_slice__WEBPACK_IMPORTED_MODULE_3__["default"])(0, idx, xs); })); /* harmony default export */ __webpack_exports__["default"] = (takeWhile); /***/ }), /***/ "./node_modules/ramda/es/tap.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/tap.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xtap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xtap */ "./node_modules/ramda/es/internal/_xtap.js"); /** * Runs the given function with the supplied object, then returns the object. * * Acts as a transducer if a transformer is given as second parameter. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (a -> *) -> a -> a * @param {Function} fn The function to call with `x`. The return value of `fn` will be thrown away. * @param {*} x * @return {*} `x`. * @example * * var sayX = x => console.log('x is ' + x); * R.tap(sayX, 100); //=> 100 * // logs 'x is 100' * @symb R.tap(f, a) = a */ var tap = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/Object(_internal_dispatchable__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xtap__WEBPACK_IMPORTED_MODULE_2__["default"], function tap(fn, x) { fn(x); return x; })); /* harmony default export */ __webpack_exports__["default"] = (tap); /***/ }), /***/ "./node_modules/ramda/es/test.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/test.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_cloneRegExp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_cloneRegExp */ "./node_modules/ramda/es/internal/_cloneRegExp.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isRegExp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isRegExp */ "./node_modules/ramda/es/internal/_isRegExp.js"); /* harmony import */ var _toString__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toString */ "./node_modules/ramda/es/toString.js"); /** * Determines whether a given string matches a given regular expression. * * @func * @memberOf R * @since v0.12.0 * @category String * @sig RegExp -> String -> Boolean * @param {RegExp} pattern * @param {String} str * @return {Boolean} * @see R.match * @example * * R.test(/^x/, 'xyz'); //=> true * R.test(/^y/, 'xyz'); //=> false */ var test = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function test(pattern, str) { if (!Object(_internal_isRegExp__WEBPACK_IMPORTED_MODULE_2__["default"])(pattern)) { throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + Object(_toString__WEBPACK_IMPORTED_MODULE_3__["default"])(pattern)); } return Object(_internal_cloneRegExp__WEBPACK_IMPORTED_MODULE_0__["default"])(pattern).test(str); }); /* harmony default export */ __webpack_exports__["default"] = (test); /***/ }), /***/ "./node_modules/ramda/es/times.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/times.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Calls an input function `n` times, returning an array containing the results * of those function calls. * * `fn` is passed one argument: The current value of `n`, which begins at `0` * and is gradually incremented to `n - 1`. * * @func * @memberOf R * @since v0.2.3 * @category List * @sig (Number -> a) -> Number -> [a] * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`. * @param {Number} n A value between `0` and `n - 1`. Increments after each function call. * @return {Array} An array containing the return values of all calls to `fn`. * @see R.repeat * @example * * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4] * @symb R.times(f, 0) = [] * @symb R.times(f, 1) = [f(0)] * @symb R.times(f, 2) = [f(0), f(1)] */ var times = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function times(fn, n) { var len = Number(n); var idx = 0; var list; if (len < 0 || isNaN(len)) { throw new RangeError('n must be a non-negative number'); } list = new Array(len); while (idx < len) { list[idx] = fn(idx); idx += 1; } return list; }); /* harmony default export */ __webpack_exports__["default"] = (times); /***/ }), /***/ "./node_modules/ramda/es/toLower.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/toLower.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _invoker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker */ "./node_modules/ramda/es/invoker.js"); /** * The lower case version of a string. * * @func * @memberOf R * @since v0.9.0 * @category String * @sig String -> String * @param {String} str The string to lower case. * @return {String} The lower case version of `str`. * @see R.toUpper * @example * * R.toLower('XYZ'); //=> 'xyz' */ var toLower = /*#__PURE__*/Object(_invoker__WEBPACK_IMPORTED_MODULE_0__["default"])(0, 'toLowerCase'); /* harmony default export */ __webpack_exports__["default"] = (toLower); /***/ }), /***/ "./node_modules/ramda/es/toPairs.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/toPairs.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /** * Converts an object into an array of key, value arrays. Only the object's * own properties are used. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.4.0 * @category Object * @sig {String: *} -> [[String,*]] * @param {Object} obj The object to extract from * @return {Array} An array of key, value arrays from the object's own properties. * @see R.fromPairs * @example * * R.toPairs({a: 1, b: 2, c: 3}); //=> [['a', 1], ['b', 2], ['c', 3]] */ var toPairs = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function toPairs(obj) { var pairs = []; for (var prop in obj) { if (Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(prop, obj)) { pairs[pairs.length] = [prop, obj[prop]]; } } return pairs; }); /* harmony default export */ __webpack_exports__["default"] = (toPairs); /***/ }), /***/ "./node_modules/ramda/es/toPairsIn.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/toPairsIn.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Converts an object into an array of key, value arrays. The object's own * properties and prototype properties are used. Note that the order of the * output array is not guaranteed to be consistent across different JS * platforms. * * @func * @memberOf R * @since v0.4.0 * @category Object * @sig {String: *} -> [[String,*]] * @param {Object} obj The object to extract from * @return {Array} An array of key, value arrays from the object's own * and prototype properties. * @example * * var F = function() { this.x = 'X'; }; * F.prototype.y = 'Y'; * var f = new F(); * R.toPairsIn(f); //=> [['x','X'], ['y','Y']] */ var toPairsIn = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function toPairsIn(obj) { var pairs = []; for (var prop in obj) { pairs[pairs.length] = [prop, obj[prop]]; } return pairs; }); /* harmony default export */ __webpack_exports__["default"] = (toPairsIn); /***/ }), /***/ "./node_modules/ramda/es/toString.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/toString.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_toString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_toString */ "./node_modules/ramda/es/internal/_toString.js"); /** * Returns the string representation of the given value. `eval`'ing the output * should result in a value equivalent to the input value. Many of the built-in * `toString` methods do not satisfy this requirement. * * If the given value is an `[object Object]` with a `toString` method other * than `Object.prototype.toString`, this method is invoked with no arguments * to produce the return value. This means user-defined constructor functions * can provide a suitable `toString` method. For example: * * function Point(x, y) { * this.x = x; * this.y = y; * } * * Point.prototype.toString = function() { * return 'new Point(' + this.x + ', ' + this.y + ')'; * }; * * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)' * * @func * @memberOf R * @since v0.14.0 * @category String * @sig * -> String * @param {*} val * @return {String} * @example * * R.toString(42); //=> '42' * R.toString('abc'); //=> '"abc"' * R.toString([1, 2, 3]); //=> '[1, 2, 3]' * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{"bar": 2, "baz": 3, "foo": 1}' * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date("2001-02-03T04:05:06.000Z")' */ var toString = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function toString(val) { return Object(_internal_toString__WEBPACK_IMPORTED_MODULE_1__["default"])(val, []); }); /* harmony default export */ __webpack_exports__["default"] = (toString); /***/ }), /***/ "./node_modules/ramda/es/toUpper.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/toUpper.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _invoker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker */ "./node_modules/ramda/es/invoker.js"); /** * The upper case version of a string. * * @func * @memberOf R * @since v0.9.0 * @category String * @sig String -> String * @param {String} str The string to upper case. * @return {String} The upper case version of `str`. * @see R.toLower * @example * * R.toUpper('abc'); //=> 'ABC' */ var toUpper = /*#__PURE__*/Object(_invoker__WEBPACK_IMPORTED_MODULE_0__["default"])(0, 'toUpperCase'); /* harmony default export */ __webpack_exports__["default"] = (toUpper); /***/ }), /***/ "./node_modules/ramda/es/transduce.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/transduce.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_reduce */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _internal_xwrap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_xwrap */ "./node_modules/ramda/es/internal/_xwrap.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Initializes a transducer using supplied iterator function. Returns a single * item by iterating through the list, successively calling the transformed * iterator function and passing it an accumulator value and the current value * from the array, and then passing the result to the next call. * * The iterator function receives two values: *(acc, value)*. It will be * wrapped as a transformer to initialize the transducer. A transformer can be * passed directly in place of an iterator function. In both cases, iteration * may be stopped early with the [`R.reduced`](#reduced) function. * * A transducer is a function that accepts a transformer and returns a * transformer and can be composed directly. * * A transformer is an an object that provides a 2-arity reducing iterator * function, step, 0-arity initial value function, init, and 1-arity result * extraction function, result. The step function is used as the iterator * function in reduce. The result function is used to convert the final * accumulator into the return type and in most cases is * [`R.identity`](#identity). The init function can be used to provide an * initial accumulator, but is ignored by transduce. * * The iteration is performed with [`R.reduce`](#reduce) after initializing the transducer. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig (c -> c) -> ((a, b) -> a) -> a -> [b] -> a * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. * @param {Function} fn The iterator function. Receives two values, the accumulator and the * current element from the array. Wrapped as transformer, if necessary, and used to * initialize the transducer * @param {*} acc The initial accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduce, R.reduced, R.into * @example * * var numbers = [1, 2, 3, 4]; * var transducer = R.compose(R.map(R.add(1)), R.take(2)); * R.transduce(transducer, R.flip(R.append), [], numbers); //=> [2, 3] * * var isOdd = (x) => x % 2 === 1; * var firstOddTransducer = R.compose(R.filter(isOdd), R.take(1)); * R.transduce(firstOddTransducer, R.flip(R.append), [], R.range(0, 100)); //=> [1] */ var transduce = /*#__PURE__*/Object(_curryN__WEBPACK_IMPORTED_MODULE_2__["default"])(4, function transduce(xf, fn, acc, list) { return Object(_internal_reduce__WEBPACK_IMPORTED_MODULE_0__["default"])(xf(typeof fn === 'function' ? Object(_internal_xwrap__WEBPACK_IMPORTED_MODULE_1__["default"])(fn) : fn), acc, list); }); /* harmony default export */ __webpack_exports__["default"] = (transduce); /***/ }), /***/ "./node_modules/ramda/es/transpose.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/transpose.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Transposes the rows and columns of a 2D list. * When passed a list of `n` lists of length `x`, * returns a list of `x` lists of length `n`. * * * @func * @memberOf R * @since v0.19.0 * @category List * @sig [[a]] -> [[a]] * @param {Array} list A 2D list * @return {Array} A 2D list * @example * * R.transpose([[1, 'a'], [2, 'b'], [3, 'c']]) //=> [[1, 2, 3], ['a', 'b', 'c']] * R.transpose([[1, 2, 3], ['a', 'b', 'c']]) //=> [[1, 'a'], [2, 'b'], [3, 'c']] * * // If some of the rows are shorter than the following rows, their elements are skipped: * R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]] * @symb R.transpose([[a], [b], [c]]) = [a, b, c] * @symb R.transpose([[a, b], [c, d]]) = [[a, c], [b, d]] * @symb R.transpose([[a, b], [c]]) = [[a, c], [b]] */ var transpose = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function transpose(outerlist) { var i = 0; var result = []; while (i < outerlist.length) { var innerlist = outerlist[i]; var j = 0; while (j < innerlist.length) { if (typeof result[j] === 'undefined') { result[j] = []; } result[j].push(innerlist[j]); j += 1; } i += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (transpose); /***/ }), /***/ "./node_modules/ramda/es/traverse.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/traverse.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _sequence__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sequence */ "./node_modules/ramda/es/sequence.js"); /** * Maps an [Applicative](https://github.com/fantasyland/fantasy-land#applicative)-returning * function over a [Traversable](https://github.com/fantasyland/fantasy-land#traversable), * then uses [`sequence`](#sequence) to transform the resulting Traversable of Applicative * into an Applicative of Traversable. * * Dispatches to the `traverse` method of the third argument, if present. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig (Applicative f, Traversable t) => (a -> f a) -> (a -> f b) -> t a -> f (t b) * @param {Function} of * @param {Function} f * @param {*} traversable * @return {*} * @see R.sequence * @example * * // Returns `Nothing` if the given divisor is `0` * safeDiv = n => d => d === 0 ? Nothing() : Just(n / d) * * R.traverse(Maybe.of, safeDiv(10), [2, 4, 5]); //=> Just([5, 2.5, 2]) * R.traverse(Maybe.of, safeDiv(10), [2, 0, 5]); //=> Nothing */ var traverse = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function traverse(of, f, traversable) { return typeof traversable['fantasy-land/traverse'] === 'function' ? traversable['fantasy-land/traverse'](f, of) : Object(_sequence__WEBPACK_IMPORTED_MODULE_2__["default"])(of, Object(_map__WEBPACK_IMPORTED_MODULE_1__["default"])(f, traversable)); }); /* harmony default export */ __webpack_exports__["default"] = (traverse); /***/ }), /***/ "./node_modules/ramda/es/trim.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/trim.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + '\u2029\uFEFF'; var zeroWidth = '\u200b'; var hasProtoTrim = typeof String.prototype.trim === 'function'; /** * Removes (strips) whitespace from both ends of the string. * * @func * @memberOf R * @since v0.6.0 * @category String * @sig String -> String * @param {String} str The string to trim. * @return {String} Trimmed version of `str`. * @example * * R.trim(' xyz '); //=> 'xyz' * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z'] */ var _trim = !hasProtoTrim || /*#__PURE__*/ws.trim() || ! /*#__PURE__*/zeroWidth.trim() ? function trim(str) { var beginRx = new RegExp('^[' + ws + '][' + ws + ']*'); var endRx = new RegExp('[' + ws + '][' + ws + ']*$'); return str.replace(beginRx, '').replace(endRx, ''); } : function trim(str) { return str.trim(); }; var trim = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(_trim); /* harmony default export */ __webpack_exports__["default"] = (trim); /***/ }), /***/ "./node_modules/ramda/es/tryCatch.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/tryCatch.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * `tryCatch` takes two functions, a `tryer` and a `catcher`. The returned * function evaluates the `tryer`; if it does not throw, it simply returns the * result. If the `tryer` *does* throw, the returned function evaluates the * `catcher` function and returns its result. Note that for effective * composition with this function, both the `tryer` and `catcher` functions * must return the same type of results. * * @func * @memberOf R * @since v0.20.0 * @category Function * @sig (...x -> a) -> ((e, ...x) -> a) -> (...x -> a) * @param {Function} tryer The function that may throw. * @param {Function} catcher The function that will be evaluated if `tryer` throws. * @return {Function} A new function that will catch exceptions and send then to the catcher. * @example * * R.tryCatch(R.prop('x'), R.F)({x: true}); //=> true * R.tryCatch(R.prop('x'), R.F)(null); //=> false */ var tryCatch = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_2__["default"])(function _tryCatch(tryer, catcher) { return Object(_internal_arity__WEBPACK_IMPORTED_MODULE_0__["default"])(tryer.length, function () { try { return tryer.apply(this, arguments); } catch (e) { return catcher.apply(this, Object(_internal_concat__WEBPACK_IMPORTED_MODULE_1__["default"])([e], arguments)); } }); }); /* harmony default export */ __webpack_exports__["default"] = (tryCatch); /***/ }), /***/ "./node_modules/ramda/es/type.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/type.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Gives a single-word string description of the (native) type of a value, * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not * attempt to distinguish user Object types any further, reporting them all as * 'Object'. * * @func * @memberOf R * @since v0.8.0 * @category Type * @sig (* -> {*}) -> String * @param {*} val The value to test * @return {String} * @example * * R.type({}); //=> "Object" * R.type(1); //=> "Number" * R.type(false); //=> "Boolean" * R.type('s'); //=> "String" * R.type(null); //=> "Null" * R.type([]); //=> "Array" * R.type(/[A-z]/); //=> "RegExp" * R.type(() => {}); //=> "Function" * R.type(undefined); //=> "Undefined" */ var type = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function type(val) { return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1); }); /* harmony default export */ __webpack_exports__["default"] = (type); /***/ }), /***/ "./node_modules/ramda/es/unapply.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/unapply.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Takes a function `fn`, which takes a single array argument, and returns a * function which: * * - takes any number of positional arguments; * - passes these arguments to `fn` as an array; and * - returns the result. * * In other words, `R.unapply` derives a variadic function from a function which * takes an array. `R.unapply` is the inverse of [`R.apply`](#apply). * * @func * @memberOf R * @since v0.8.0 * @category Function * @sig ([*...] -> a) -> (*... -> a) * @param {Function} fn * @return {Function} * @see R.apply * @example * * R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]' * @symb R.unapply(f)(a, b) = f([a, b]) */ var unapply = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function unapply(fn) { return function () { return fn(Array.prototype.slice.call(arguments, 0)); }; }); /* harmony default export */ __webpack_exports__["default"] = (unapply); /***/ }), /***/ "./node_modules/ramda/es/unary.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/unary.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _nAry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nAry */ "./node_modules/ramda/es/nAry.js"); /** * Wraps a function of any arity (including nullary) in a function that accepts * exactly 1 parameter. Any extraneous parameters will not be passed to the * supplied function. * * @func * @memberOf R * @since v0.2.0 * @category Function * @sig (* -> b) -> (a -> b) * @param {Function} fn The function to wrap. * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of * arity 1. * @see R.binary, R.nAry * @example * * var takesTwoArgs = function(a, b) { * return [a, b]; * }; * takesTwoArgs.length; //=> 2 * takesTwoArgs(1, 2); //=> [1, 2] * * var takesOneArg = R.unary(takesTwoArgs); * takesOneArg.length; //=> 1 * // Only 1 argument is passed to the wrapped function * takesOneArg(1, 2); //=> [1, undefined] * @symb R.unary(f)(a, b, c) = f(a) */ var unary = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function unary(fn) { return Object(_nAry__WEBPACK_IMPORTED_MODULE_1__["default"])(1, fn); }); /* harmony default export */ __webpack_exports__["default"] = (unary); /***/ }), /***/ "./node_modules/ramda/es/uncurryN.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/uncurryN.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Returns a function of arity `n` from a (manually) curried function. * * @func * @memberOf R * @since v0.14.0 * @category Function * @sig Number -> (a -> b) -> (a -> c) * @param {Number} length The arity for the returned function. * @param {Function} fn The function to uncurry. * @return {Function} A new function. * @see R.curry * @example * * var addFour = a => b => c => d => a + b + c + d; * * var uncurriedAddFour = R.uncurryN(4, addFour); * uncurriedAddFour(1, 2, 3, 4); //=> 10 */ var uncurryN = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function uncurryN(depth, fn) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(depth, function () { var currentDepth = 1; var value = fn; var idx = 0; var endIdx; while (currentDepth <= depth && typeof value === 'function') { endIdx = currentDepth === depth ? arguments.length : idx + value.length; value = value.apply(this, Array.prototype.slice.call(arguments, idx, endIdx)); currentDepth += 1; idx = endIdx; } return value; }); }); /* harmony default export */ __webpack_exports__["default"] = (uncurryN); /***/ }), /***/ "./node_modules/ramda/es/unfold.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/unfold.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Builds a list from a seed value. Accepts an iterator function, which returns * either false to stop iteration or an array of length 2 containing the value * to add to the resulting list and the seed to be used in the next call to the * iterator function. * * The iterator function receives one argument: *(seed)*. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig (a -> [b]) -> * -> [b] * @param {Function} fn The iterator function. receives one argument, `seed`, and returns * either false to quit iteration or an array of length two to proceed. The element * at index 0 of this array will be added to the resulting array, and the element * at index 1 will be passed to the next call to `fn`. * @param {*} seed The seed value. * @return {Array} The final list. * @example * * var f = n => n > 50 ? false : [-n, n + 10]; * R.unfold(f, 10); //=> [-10, -20, -30, -40, -50] * @symb R.unfold(f, x) = [f(x)[0], f(f(x)[1])[0], f(f(f(x)[1])[1])[0], ...] */ var unfold = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function unfold(fn, seed) { var pair = fn(seed); var result = []; while (pair && pair.length) { result[result.length] = pair[0]; pair = fn(pair[1]); } return result; }); /* harmony default export */ __webpack_exports__["default"] = (unfold); /***/ }), /***/ "./node_modules/ramda/es/union.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/union.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./compose */ "./node_modules/ramda/es/compose.js"); /* harmony import */ var _uniq__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./uniq */ "./node_modules/ramda/es/uniq.js"); /** * Combines two lists into a set (i.e. no duplicates) composed of the elements * of each list. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} as The first list. * @param {Array} bs The second list. * @return {Array} The first and second lists concatenated, with * duplicates removed. * @example * * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4] */ var union = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_compose__WEBPACK_IMPORTED_MODULE_2__["default"])(_uniq__WEBPACK_IMPORTED_MODULE_3__["default"], _internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])); /* harmony default export */ __webpack_exports__["default"] = (union); /***/ }), /***/ "./node_modules/ramda/es/unionWith.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/unionWith.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _uniqWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./uniqWith */ "./node_modules/ramda/es/uniqWith.js"); /** * Combines two lists into a set (i.e. no duplicates) composed of the elements * of each list. Duplication is determined according to the value returned by * applying the supplied predicate to two list elements. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig ((a, a) -> Boolean) -> [*] -> [*] -> [*] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The first and second lists concatenated, with * duplicates removed. * @see R.union * @example * * var l1 = [{a: 1}, {a: 2}]; * var l2 = [{a: 1}, {a: 4}]; * R.unionWith(R.eqBy(R.prop('a')), l1, l2); //=> [{a: 1}, {a: 2}, {a: 4}] */ var unionWith = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_1__["default"])(function unionWith(pred, list1, list2) { return Object(_uniqWith__WEBPACK_IMPORTED_MODULE_2__["default"])(pred, Object(_internal_concat__WEBPACK_IMPORTED_MODULE_0__["default"])(list1, list2)); }); /* harmony default export */ __webpack_exports__["default"] = (unionWith); /***/ }), /***/ "./node_modules/ramda/es/uniq.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/uniq.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity */ "./node_modules/ramda/es/identity.js"); /* harmony import */ var _uniqBy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uniqBy */ "./node_modules/ramda/es/uniqBy.js"); /** * Returns a new list containing only one copy of each element in the original * list. [`R.equals`](#equals) is used to determine equality. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] * @param {Array} list The array to consider. * @return {Array} The list of unique items. * @example * * R.uniq([1, 1, 2, 1]); //=> [1, 2] * R.uniq([1, '1']); //=> [1, '1'] * R.uniq([[42], [42]]); //=> [[42]] */ var uniq = /*#__PURE__*/Object(_uniqBy__WEBPACK_IMPORTED_MODULE_1__["default"])(_identity__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (uniq); /***/ }), /***/ "./node_modules/ramda/es/uniqBy.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/uniqBy.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_Set__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_Set */ "./node_modules/ramda/es/internal/_Set.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a new list containing only one copy of each element in the original * list, based upon the value returned by applying the supplied function to * each list element. Prefers the first item if the supplied function produces * the same value on two items. [`R.equals`](#equals) is used for comparison. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig (a -> b) -> [a] -> [a] * @param {Function} fn A function used to produce a value to use during comparisons. * @param {Array} list The array to consider. * @return {Array} The list of unique items. * @example * * R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10] */ var uniqBy = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function uniqBy(fn, list) { var set = new _internal_Set__WEBPACK_IMPORTED_MODULE_0__["default"](); var result = []; var idx = 0; var appliedItem, item; while (idx < list.length) { item = list[idx]; appliedItem = fn(item); if (set.add(appliedItem)) { result.push(item); } idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (uniqBy); /***/ }), /***/ "./node_modules/ramda/es/uniqWith.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/uniqWith.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_containsWith__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_containsWith */ "./node_modules/ramda/es/internal/_containsWith.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a new list containing only one copy of each element in the original * list, based upon the value returned by applying the supplied predicate to * two list elements. Prefers the first item if two items compare equal based * on the predicate. * * @func * @memberOf R * @since v0.2.0 * @category List * @sig ((a, a) -> Boolean) -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list The array to consider. * @return {Array} The list of unique items. * @example * * var strEq = R.eqBy(String); * R.uniqWith(strEq)([1, '1', 2, 1]); //=> [1, 2] * R.uniqWith(strEq)([{}, {}]); //=> [{}] * R.uniqWith(strEq)([1, '1', 1]); //=> [1] * R.uniqWith(strEq)(['1', 1, 1]); //=> ['1'] */ var uniqWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function uniqWith(pred, list) { var idx = 0; var len = list.length; var result = []; var item; while (idx < len) { item = list[idx]; if (!Object(_internal_containsWith__WEBPACK_IMPORTED_MODULE_0__["default"])(pred, item, result)) { result[result.length] = item; } idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (uniqWith); /***/ }), /***/ "./node_modules/ramda/es/unless.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/unless.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Tests the final argument by passing it to the given predicate function. If * the predicate is not satisfied, the function will return the result of * calling the `whenFalseFn` function with the same argument. If the predicate * is satisfied, the argument is returned as is. * * @func * @memberOf R * @since v0.18.0 * @category Logic * @sig (a -> Boolean) -> (a -> a) -> a -> a * @param {Function} pred A predicate function * @param {Function} whenFalseFn A function to invoke when the `pred` evaluates * to a falsy value. * @param {*} x An object to test with the `pred` function and * pass to `whenFalseFn` if necessary. * @return {*} Either `x` or the result of applying `x` to `whenFalseFn`. * @see R.ifElse, R.when * @example * * let safeInc = R.unless(R.isNil, R.inc); * safeInc(null); //=> null * safeInc(1); //=> 2 */ var unless = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function unless(pred, whenFalseFn, x) { return pred(x) ? x : whenFalseFn(x); }); /* harmony default export */ __webpack_exports__["default"] = (unless); /***/ }), /***/ "./node_modules/ramda/es/unnest.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/unnest.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_identity */ "./node_modules/ramda/es/internal/_identity.js"); /* harmony import */ var _chain__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chain */ "./node_modules/ramda/es/chain.js"); /** * Shorthand for `R.chain(R.identity)`, which removes one level of nesting from * any [Chain](https://github.com/fantasyland/fantasy-land#chain). * * @func * @memberOf R * @since v0.3.0 * @category List * @sig Chain c => c (c a) -> c a * @param {*} list * @return {*} * @see R.flatten, R.chain * @example * * R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]] * R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6] */ var unnest = /*#__PURE__*/Object(_chain__WEBPACK_IMPORTED_MODULE_1__["default"])(_internal_identity__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (unnest); /***/ }), /***/ "./node_modules/ramda/es/until.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/until.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Takes a predicate, a transformation function, and an initial value, * and returns a value of the same type as the initial value. * It does so by applying the transformation until the predicate is satisfied, * at which point it returns the satisfactory value. * * @func * @memberOf R * @since v0.20.0 * @category Logic * @sig (a -> Boolean) -> (a -> a) -> a -> a * @param {Function} pred A predicate function * @param {Function} fn The iterator function * @param {*} init Initial value * @return {*} Final value that satisfies predicate * @example * * R.until(R.gt(R.__, 100), R.multiply(2))(1) // => 128 */ var until = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function until(pred, fn, init) { var val = init; while (!pred(val)) { val = fn(val); } return val; }); /* harmony default export */ __webpack_exports__["default"] = (until); /***/ }), /***/ "./node_modules/ramda/es/update.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/update.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _adjust__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./adjust */ "./node_modules/ramda/es/adjust.js"); /* harmony import */ var _always__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./always */ "./node_modules/ramda/es/always.js"); /** * Returns a new copy of the array with the element at the provided index * replaced with the given value. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig Number -> a -> [a] -> [a] * @param {Number} idx The index to update. * @param {*} x The value to exist at the given index of the returned array. * @param {Array|Arguments} list The source array-like object to be updated. * @return {Array} A copy of `list` with the value at index `idx` replaced with `x`. * @see R.adjust * @example * * R.update(1, 11, [0, 1, 2]); //=> [0, 11, 2] * R.update(1)(11)([0, 1, 2]); //=> [0, 11, 2] * @symb R.update(-1, a, [b, c]) = [b, a] * @symb R.update(0, a, [b, c]) = [a, c] * @symb R.update(1, a, [b, c]) = [b, a] */ var update = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function update(idx, x, list) { return Object(_adjust__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_always__WEBPACK_IMPORTED_MODULE_2__["default"])(x), idx, list); }); /* harmony default export */ __webpack_exports__["default"] = (update); /***/ }), /***/ "./node_modules/ramda/es/useWith.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/useWith.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _curryN__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN */ "./node_modules/ramda/es/curryN.js"); /** * Accepts a function `fn` and a list of transformer functions and returns a * new curried function. When the new function is invoked, it calls the * function `fn` with parameters consisting of the result of calling each * supplied handler on successive arguments to the new function. * * If more arguments are passed to the returned function than transformer * functions, those arguments are passed directly to `fn` as additional * parameters. If you expect additional arguments that don't need to be * transformed, although you can ignore them, it's best to pass an identity * function so that the new function reports the correct arity. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((x1, x2, ...) -> z) -> [(a -> x1), (b -> x2), ...] -> (a -> b -> ... -> z) * @param {Function} fn The function to wrap. * @param {Array} transformers A list of transformer functions * @return {Function} The wrapped function. * @see R.converge * @example * * R.useWith(Math.pow, [R.identity, R.identity])(3, 4); //=> 81 * R.useWith(Math.pow, [R.identity, R.identity])(3)(4); //=> 81 * R.useWith(Math.pow, [R.dec, R.inc])(3, 4); //=> 32 * R.useWith(Math.pow, [R.dec, R.inc])(3)(4); //=> 32 * @symb R.useWith(f, [g, h])(a, b) = f(g(a), h(b)) */ var useWith = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function useWith(fn, transformers) { return Object(_curryN__WEBPACK_IMPORTED_MODULE_1__["default"])(transformers.length, function () { var args = []; var idx = 0; while (idx < transformers.length) { args.push(transformers[idx].call(this, arguments[idx])); idx += 1; } return fn.apply(this, args.concat(Array.prototype.slice.call(arguments, transformers.length))); }); }); /* harmony default export */ __webpack_exports__["default"] = (useWith); /***/ }), /***/ "./node_modules/ramda/es/values.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/values.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys */ "./node_modules/ramda/es/keys.js"); /** * Returns a list of all the enumerable own properties of the supplied object. * Note that the order of the output array is not guaranteed across different * JS platforms. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {k: v} -> [v] * @param {Object} obj The object to extract values from * @return {Array} An array of the values of the object's own properties. * @see R.valuesIn, R.keys * @example * * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3] */ var values = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function values(obj) { var props = Object(_keys__WEBPACK_IMPORTED_MODULE_1__["default"])(obj); var len = props.length; var vals = []; var idx = 0; while (idx < len) { vals[idx] = obj[props[idx]]; idx += 1; } return vals; }); /* harmony default export */ __webpack_exports__["default"] = (values); /***/ }), /***/ "./node_modules/ramda/es/valuesIn.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/valuesIn.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Returns a list of all the properties, including prototype properties, of the * supplied object. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.2.0 * @category Object * @sig {k: v} -> [v] * @param {Object} obj The object to extract values from * @return {Array} An array of the values of the object's own and prototype properties. * @see R.values, R.keysIn * @example * * var F = function() { this.x = 'X'; }; * F.prototype.y = 'Y'; * var f = new F(); * R.valuesIn(f); //=> ['X', 'Y'] */ var valuesIn = /*#__PURE__*/Object(_internal_curry1__WEBPACK_IMPORTED_MODULE_0__["default"])(function valuesIn(obj) { var prop; var vs = []; for (prop in obj) { vs[vs.length] = obj[prop]; } return vs; }); /* harmony default export */ __webpack_exports__["default"] = (valuesIn); /***/ }), /***/ "./node_modules/ramda/es/view.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/view.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); // `Const` is a functor that effectively ignores the function given to `map`. var Const = function (x) { return { value: x, 'fantasy-land/map': function () { return this; } }; }; /** * Returns a "view" of the given data structure, determined by the given lens. * The lens's focus determines which portion of the data structure is visible. * * @func * @memberOf R * @since v0.16.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Lens s a -> s -> a * @param {Lens} lens * @param {*} x * @return {*} * @see R.prop, R.lensIndex, R.lensProp * @example * * var xLens = R.lensProp('x'); * * R.view(xLens, {x: 1, y: 2}); //=> 1 * R.view(xLens, {x: 4, y: 2}); //=> 4 */ var view = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function view(lens, x) { // Using `Const` effectively ignores the setter function of the `lens`, // leaving the value returned by the getter function unmodified. return lens(Const)(x).value; }); /* harmony default export */ __webpack_exports__["default"] = (view); /***/ }), /***/ "./node_modules/ramda/es/when.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/when.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Tests the final argument by passing it to the given predicate function. If * the predicate is satisfied, the function will return the result of calling * the `whenTrueFn` function with the same argument. If the predicate is not * satisfied, the argument is returned as is. * * @func * @memberOf R * @since v0.18.0 * @category Logic * @sig (a -> Boolean) -> (a -> a) -> a -> a * @param {Function} pred A predicate function * @param {Function} whenTrueFn A function to invoke when the `condition` * evaluates to a truthy value. * @param {*} x An object to test with the `pred` function and * pass to `whenTrueFn` if necessary. * @return {*} Either `x` or the result of applying `x` to `whenTrueFn`. * @see R.ifElse, R.unless * @example * * // truncate :: String -> String * var truncate = R.when( * R.propSatisfies(R.gt(R.__, 10), 'length'), * R.pipe(R.take(10), R.append('…'), R.join('')) * ); * truncate('12345'); //=> '12345' * truncate('0123456789ABC'); //=> '0123456789…' */ var when = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function when(pred, whenTrueFn, x) { return pred(x) ? whenTrueFn(x) : x; }); /* harmony default export */ __webpack_exports__["default"] = (when); /***/ }), /***/ "./node_modules/ramda/es/where.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/where.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_has__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/es/internal/_has.js"); /** * Takes a spec object and a test object; returns true if the test satisfies * the spec. Each of the spec's own properties must be a predicate function. * Each predicate is applied to the value of the corresponding property of the * test object. `where` returns true if all the predicates return true, false * otherwise. * * `where` is well suited to declaratively expressing constraints for other * functions such as [`filter`](#filter) and [`find`](#find). * * @func * @memberOf R * @since v0.1.1 * @category Object * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean * @param {Object} spec * @param {Object} testObj * @return {Boolean} * @see R.propSatisfies, R.whereEq * @example * * // pred :: Object -> Boolean * var pred = R.where({ * a: R.equals('foo'), * b: R.complement(R.equals('bar')), * x: R.gt(R.__, 10), * y: R.lt(R.__, 20) * }); * * pred({a: 'foo', b: 'xxx', x: 11, y: 19}); //=> true * pred({a: 'xxx', b: 'xxx', x: 11, y: 19}); //=> false * pred({a: 'foo', b: 'bar', x: 11, y: 19}); //=> false * pred({a: 'foo', b: 'xxx', x: 10, y: 19}); //=> false * pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> false */ var where = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function where(spec, testObj) { for (var prop in spec) { if (Object(_internal_has__WEBPACK_IMPORTED_MODULE_1__["default"])(prop, spec) && !spec[prop](testObj[prop])) { return false; } } return true; }); /* harmony default export */ __webpack_exports__["default"] = (where); /***/ }), /***/ "./node_modules/ramda/es/whereEq.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/whereEq.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _equals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals */ "./node_modules/ramda/es/equals.js"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _where__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./where */ "./node_modules/ramda/es/where.js"); /** * Takes a spec object and a test object; returns true if the test satisfies * the spec, false otherwise. An object satisfies the spec if, for each of the * spec's own properties, accessing that property of the object gives the same * value (in [`R.equals`](#equals) terms) as accessing that property of the * spec. * * `whereEq` is a specialization of [`where`](#where). * * @func * @memberOf R * @since v0.14.0 * @category Object * @sig {String: *} -> {String: *} -> Boolean * @param {Object} spec * @param {Object} testObj * @return {Boolean} * @see R.propEq, R.where * @example * * // pred :: Object -> Boolean * var pred = R.whereEq({a: 1, b: 2}); * * pred({a: 1}); //=> false * pred({a: 1, b: 2}); //=> true * pred({a: 1, b: 2, c: 3}); //=> true * pred({a: 1, b: 1}); //=> false */ var whereEq = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function whereEq(spec, testObj) { return Object(_where__WEBPACK_IMPORTED_MODULE_3__["default"])(Object(_map__WEBPACK_IMPORTED_MODULE_2__["default"])(_equals__WEBPACK_IMPORTED_MODULE_1__["default"], spec), testObj); }); /* harmony default export */ __webpack_exports__["default"] = (whereEq); /***/ }), /***/ "./node_modules/ramda/es/without.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/without.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_contains */ "./node_modules/ramda/es/internal/_contains.js"); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _flip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flip */ "./node_modules/ramda/es/flip.js"); /* harmony import */ var _reject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reject */ "./node_modules/ramda/es/reject.js"); /** * Returns a new list without values in the first argument. * [`R.equals`](#equals) is used to determine equality. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig [a] -> [a] -> [a] * @param {Array} list1 The values to be removed from `list2`. * @param {Array} list2 The array to remove values from. * @return {Array} The new array without values in `list1`. * @see R.transduce, R.difference * @example * * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4] */ var without = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_1__["default"])(function (xs, list) { return Object(_reject__WEBPACK_IMPORTED_MODULE_3__["default"])(Object(_flip__WEBPACK_IMPORTED_MODULE_2__["default"])(_internal_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(xs), list); }); /* harmony default export */ __webpack_exports__["default"] = (without); /***/ }), /***/ "./node_modules/ramda/es/xprod.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/xprod.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new list out of the two supplied by creating each possible pair * from the lists. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [b] -> [[a,b]] * @param {Array} as The first list. * @param {Array} bs The second list. * @return {Array} The list made by combining each possible pair from * `as` and `bs` into pairs (`[a, b]`). * @example * * R.xprod([1, 2], ['a', 'b']); //=> [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] * @symb R.xprod([a, b], [c, d]) = [[a, c], [a, d], [b, c], [b, d]] */ var xprod = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function xprod(a, b) { // = xprodWith(prepend); (takes about 3 times as long...) var idx = 0; var ilen = a.length; var j; var jlen = b.length; var result = []; while (idx < ilen) { j = 0; while (j < jlen) { result[result.length] = [a[idx], b[j]]; j += 1; } idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (xprod); /***/ }), /***/ "./node_modules/ramda/es/zip.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/zip.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new list out of the two supplied by pairing up equally-positioned * items from both lists. The returned list is truncated to the length of the * shorter of the two input lists. * Note: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [b] -> [[a,b]] * @param {Array} list1 The first array to consider. * @param {Array} list2 The second array to consider. * @return {Array} The list made by pairing up same-indexed elements of `list1` and `list2`. * @example * * R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']] * @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]] */ var zip = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function zip(a, b) { var rv = []; var idx = 0; var len = Math.min(a.length, b.length); while (idx < len) { rv[idx] = [a[idx], b[idx]]; idx += 1; } return rv; }); /* harmony default export */ __webpack_exports__["default"] = (zip); /***/ }), /***/ "./node_modules/ramda/es/zipObj.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/zipObj.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new object out of a list of keys and a list of values. * Key/value pairing is truncated to the length of the shorter of the two lists. * Note: `zipObj` is equivalent to `pipe(zip, fromPairs)`. * * @func * @memberOf R * @since v0.3.0 * @category List * @sig [String] -> [*] -> {String: *} * @param {Array} keys The array that will be properties on the output object. * @param {Array} values The list of values on the output object. * @return {Object} The object made by pairing up same-indexed elements of `keys` and `values`. * @example * * R.zipObj(['a', 'b', 'c'], [1, 2, 3]); //=> {a: 1, b: 2, c: 3} */ var zipObj = /*#__PURE__*/Object(_internal_curry2__WEBPACK_IMPORTED_MODULE_0__["default"])(function zipObj(keys, values) { var idx = 0; var len = Math.min(keys.length, values.length); var out = {}; while (idx < len) { out[keys[idx]] = values[idx]; idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (zipObj); /***/ }), /***/ "./node_modules/ramda/es/zipWith.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/zipWith.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Creates a new list out of the two supplied by applying the function to each * equally-positioned pair in the lists. The returned list is truncated to the * length of the shorter of the two input lists. * * @function * @memberOf R * @since v0.1.0 * @category List * @sig ((a, b) -> c) -> [a] -> [b] -> [c] * @param {Function} fn The function used to combine the two elements into one value. * @param {Array} list1 The first array to consider. * @param {Array} list2 The second array to consider. * @return {Array} The list made by combining same-indexed elements of `list1` and `list2` * using `fn`. * @example * * var f = (x, y) => { * // ... * }; * R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']); * //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')] * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)] */ var zipWith = /*#__PURE__*/Object(_internal_curry3__WEBPACK_IMPORTED_MODULE_0__["default"])(function zipWith(fn, a, b) { var rv = []; var idx = 0; var len = Math.min(a.length, b.length); while (idx < len) { rv[idx] = fn(a[idx], b[idx]); idx += 1; } return rv; }); /* harmony default export */ __webpack_exports__["default"] = (zipWith); /***/ }), /***/ "./node_modules/rc-align/es/Align.js": /*!*******************************************!*\ !*** ./node_modules/rc-align/es/Align.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var dom_align__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dom-align */ "./node_modules/dom-align/dist-web/index.js"); /* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ "./node_modules/rc-util/es/Dom/addEventListener.js"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util */ "./node_modules/rc-align/es/util.js"); /* harmony import */ var _hooks_useBuffer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useBuffer */ "./node_modules/rc-align/es/hooks/useBuffer.js"); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } /** * Removed props: * - childrenProps */ function getElement(func) { if (typeof func !== 'function') return null; return func(); } function getPoint(point) { if (_typeof(point) !== 'object' || !point) return null; return point; } var Align = function Align(_ref, ref) { var children = _ref.children, disabled = _ref.disabled, target = _ref.target, align = _ref.align, onAlign = _ref.onAlign, monitorWindowResize = _ref.monitorWindowResize, _ref$monitorBufferTim = _ref.monitorBufferTime, monitorBufferTime = _ref$monitorBufferTim === void 0 ? 0 : _ref$monitorBufferTim; var cacheRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef({}); var nodeRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef(); var childNode = react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.only(children); // ===================== Align ====================== // We save the props here to avoid closure makes props ood var forceAlignPropsRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef({}); forceAlignPropsRef.current.disabled = disabled; forceAlignPropsRef.current.target = target; forceAlignPropsRef.current.onAlign = onAlign; var _useBuffer = Object(_hooks_useBuffer__WEBPACK_IMPORTED_MODULE_5__["default"])(function () { var _forceAlignPropsRef$c = forceAlignPropsRef.current, latestDisabled = _forceAlignPropsRef$c.disabled, latestTarget = _forceAlignPropsRef$c.target; if (!latestDisabled && latestTarget) { var source = nodeRef.current; var result; var element = getElement(latestTarget); var point = getPoint(latestTarget); cacheRef.current.element = element; cacheRef.current.point = point; // IE lose focus after element realign // We should record activeElement and restore later var _document = document, activeElement = _document.activeElement; if (element) { result = Object(dom_align__WEBPACK_IMPORTED_MODULE_2__["alignElement"])(source, element, align); } else if (point) { result = Object(dom_align__WEBPACK_IMPORTED_MODULE_2__["alignPoint"])(source, point, align); } Object(_util__WEBPACK_IMPORTED_MODULE_4__["restoreFocus"])(activeElement, source); if (onAlign) { onAlign(source, result); } return true; } return false; }, monitorBufferTime), _useBuffer2 = _slicedToArray(_useBuffer, 2), _forceAlign = _useBuffer2[0], cancelForceAlign = _useBuffer2[1]; // ===================== Effect ===================== // Listen for target updated var resizeMonitor = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef({ cancel: function cancel() {} }); // Listen for source updated var sourceResizeMonitor = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef({ cancel: function cancel() {} }); react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () { var element = getElement(target); var point = getPoint(target); if (nodeRef.current !== sourceResizeMonitor.current.element) { sourceResizeMonitor.current.cancel(); sourceResizeMonitor.current.element = nodeRef.current; sourceResizeMonitor.current.cancel = Object(_util__WEBPACK_IMPORTED_MODULE_4__["monitorResize"])(nodeRef.current, _forceAlign); } if (cacheRef.current.element !== element || !Object(_util__WEBPACK_IMPORTED_MODULE_4__["isSamePoint"])(cacheRef.current.point, point)) { _forceAlign(); // Add resize observer if (resizeMonitor.current.element !== element) { resizeMonitor.current.cancel(); resizeMonitor.current.element = element; resizeMonitor.current.cancel = Object(_util__WEBPACK_IMPORTED_MODULE_4__["monitorResize"])(element, _forceAlign); } } }); // Listen for disabled change react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () { if (!disabled) { _forceAlign(); } else { cancelForceAlign(); } }, [disabled]); // Listen for window resize var winResizeRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef(null); react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () { if (monitorWindowResize) { if (!winResizeRef.current) { winResizeRef.current = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_3__["default"])(window, 'resize', _forceAlign); } } else if (winResizeRef.current) { winResizeRef.current.remove(); winResizeRef.current = null; } }, [monitorWindowResize]); // Clear all if unmount react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () { return function () { resizeMonitor.current.cancel(); sourceResizeMonitor.current.cancel(); if (winResizeRef.current) winResizeRef.current.remove(); cancelForceAlign(); }; }, []); // ====================== Ref ======================= react__WEBPACK_IMPORTED_MODULE_0___default.a.useImperativeHandle(ref, function () { return { forceAlign: function forceAlign() { return _forceAlign(true); } }; }); // ===================== Render ===================== if (react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(childNode)) { childNode = react__WEBPACK_IMPORTED_MODULE_0___default.a.cloneElement(childNode, { ref: Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_1__["composeRef"])(childNode.ref, nodeRef) }); } return childNode; }; var RefAlign = react__WEBPACK_IMPORTED_MODULE_0___default.a.forwardRef(Align); RefAlign.displayName = 'Align'; /* harmony default export */ __webpack_exports__["default"] = (RefAlign); /***/ }), /***/ "./node_modules/rc-align/es/hooks/useBuffer.js": /*!*****************************************************!*\ !*** ./node_modules/rc-align/es/hooks/useBuffer.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony default export */ __webpack_exports__["default"] = (function (callback, buffer) { var calledRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef(false); var timeoutRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef(null); function cancelTrigger() { window.clearTimeout(timeoutRef.current); } function trigger(force) { if (!calledRef.current || force === true) { if (callback() === false) { // Not delay since callback cancelled self return; } calledRef.current = true; cancelTrigger(); timeoutRef.current = window.setTimeout(function () { calledRef.current = false; }, buffer); } else { cancelTrigger(); timeoutRef.current = window.setTimeout(function () { calledRef.current = false; trigger(); }, buffer); } } return [trigger, function () { calledRef.current = false; cancelTrigger(); }]; }); /***/ }), /***/ "./node_modules/rc-align/es/index.js": /*!*******************************************!*\ !*** ./node_modules/rc-align/es/index.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Align */ "./node_modules/rc-align/es/Align.js"); // export this package's api /* harmony default export */ __webpack_exports__["default"] = (_Align__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./node_modules/rc-align/es/util.js": /*!******************************************!*\ !*** ./node_modules/rc-align/es/util.js ***! \******************************************/ /*! exports provided: isSamePoint, restoreFocus, monitorResize */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSamePoint", function() { return isSamePoint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "restoreFocus", function() { return restoreFocus; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monitorResize", function() { return monitorResize; }); /* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! resize-observer-polyfill */ "./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js"); /* harmony import */ var rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/Dom/contains */ "./node_modules/rc-util/es/Dom/contains.js"); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function isSamePoint(prev, next) { if (prev === next) return true; if (!prev || !next) return false; if ('pageX' in next && 'pageY' in next) { return prev.pageX === next.pageX && prev.pageY === next.pageY; } if ('clientX' in next && 'clientY' in next) { return prev.clientX === next.clientX && prev.clientY === next.clientY; } return false; } function restoreFocus(activeElement, container) { // Focus back if is in the container if (activeElement !== document.activeElement && Object(rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_1__["default"])(container, activeElement)) { activeElement.focus(); } } function monitorResize(element, callback) { var prevWidth = null; var prevHeight = null; function onResize(_ref) { var _ref2 = _slicedToArray(_ref, 1), target = _ref2[0].target; var _target$getBoundingCl = target.getBoundingClientRect(), width = _target$getBoundingCl.width, height = _target$getBoundingCl.height; var fixedWidth = Math.floor(width); var fixedHeight = Math.floor(height); if (prevWidth !== fixedWidth || prevHeight !== fixedHeight) { callback({ width: fixedWidth, height: fixedHeight }); } prevWidth = fixedWidth; prevHeight = fixedHeight; } var resizeObserver = new resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_0__["default"](onResize); if (element) { resizeObserver.observe(element); } return function () { resizeObserver.disconnect(); }; } /***/ }), /***/ "./node_modules/rc-animate/es/CSSMotion.js": /*!*************************************************!*\ !*** ./node_modules/rc-animate/es/CSSMotion.js ***! \*************************************************/ /*! exports provided: MotionPropTypes, genCSSMotion, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MotionPropTypes", function() { return MotionPropTypes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genCSSMotion", function() { return genCSSMotion; }); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ "./node_modules/babel-runtime/helpers/classCallCheck.js"); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ "./node_modules/babel-runtime/helpers/createClass.js"); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js"); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ "./node_modules/babel-runtime/helpers/inherits.js"); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-lifecycles-compat */ "./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js"); /* harmony import */ var rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-util/es/Dom/findDOMNode */ "./node_modules/rc-util/es/Dom/findDOMNode.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! raf */ "./node_modules/raf/index.js"); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./util/motion */ "./node_modules/rc-animate/es/util/motion.js"); /* eslint-disable react/default-props-match-prop-types, react/no-multi-comp */ var STATUS_NONE = 'none'; var STATUS_APPEAR = 'appear'; var STATUS_ENTER = 'enter'; var STATUS_LEAVE = 'leave'; var MotionPropTypes = { eventProps: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.object, // Internal usage. Only pass by CSSMotionList visible: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, children: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, motionName: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.object]), motionAppear: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, motionEnter: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, motionLeave: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, motionLeaveImmediately: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, // Trigger leave motion immediately removeOnLeave: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, leavedClassName: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, onAppearStart: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onAppearActive: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onAppearEnd: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onEnterStart: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onEnterActive: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onEnterEnd: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onLeaveStart: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onLeaveActive: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, onLeaveEnd: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func }; /** * `transitionSupport` is used for none transition test case. * Default we use browser transition event support check. */ function genCSSMotion(config) { var transitionSupport = config; var forwardRef = !!react__WEBPACK_IMPORTED_MODULE_6___default.a.forwardRef; if (typeof config === 'object') { transitionSupport = config.transitionSupport; forwardRef = 'forwardRef' in config ? config.forwardRef : forwardRef; } function isSupportTransition(props) { return !!(props.motionName && transitionSupport); } var CSSMotion = function (_React$Component) { babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(CSSMotion, _React$Component); function CSSMotion() { babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, CSSMotion); var _this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (CSSMotion.__proto__ || Object.getPrototypeOf(CSSMotion)).call(this)); _this.onDomUpdate = function () { var _this$state = _this.state, status = _this$state.status, newStatus = _this$state.newStatus; var _this$props = _this.props, onAppearStart = _this$props.onAppearStart, onEnterStart = _this$props.onEnterStart, onLeaveStart = _this$props.onLeaveStart, onAppearActive = _this$props.onAppearActive, onEnterActive = _this$props.onEnterActive, onLeaveActive = _this$props.onLeaveActive, motionAppear = _this$props.motionAppear, motionEnter = _this$props.motionEnter, motionLeave = _this$props.motionLeave; if (!isSupportTransition(_this.props)) { return; } // Event injection var $ele = _this.getElement(); if (_this.$cacheEle !== $ele) { _this.removeEventListener(_this.$cacheEle); _this.addEventListener($ele); _this.$cacheEle = $ele; } // Init status if (newStatus && status === STATUS_APPEAR && motionAppear) { _this.updateStatus(onAppearStart, null, null, function () { _this.updateActiveStatus(onAppearActive, STATUS_APPEAR); }); } else if (newStatus && status === STATUS_ENTER && motionEnter) { _this.updateStatus(onEnterStart, null, null, function () { _this.updateActiveStatus(onEnterActive, STATUS_ENTER); }); } else if (newStatus && status === STATUS_LEAVE && motionLeave) { _this.updateStatus(onLeaveStart, null, null, function () { _this.updateActiveStatus(onLeaveActive, STATUS_LEAVE); }); } }; _this.onMotionEnd = function (event) { var _this$state2 = _this.state, status = _this$state2.status, statusActive = _this$state2.statusActive; var _this$props2 = _this.props, onAppearEnd = _this$props2.onAppearEnd, onEnterEnd = _this$props2.onEnterEnd, onLeaveEnd = _this$props2.onLeaveEnd; if (status === STATUS_APPEAR && statusActive) { _this.updateStatus(onAppearEnd, { status: STATUS_NONE }, event); } else if (status === STATUS_ENTER && statusActive) { _this.updateStatus(onEnterEnd, { status: STATUS_NONE }, event); } else if (status === STATUS_LEAVE && statusActive) { _this.updateStatus(onLeaveEnd, { status: STATUS_NONE }, event); } }; _this.setNodeRef = function (node) { var internalRef = _this.props.internalRef; _this.node = node; if (typeof internalRef === 'function') { internalRef(node); } else if (internalRef && 'current' in internalRef) { internalRef.current = node; } }; _this.getElement = function () { return Object(rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_9__["default"])(_this.node || _this); }; _this.addEventListener = function ($ele) { if (!$ele) return; $ele.addEventListener(_util_motion__WEBPACK_IMPORTED_MODULE_12__["transitionEndName"], _this.onMotionEnd); $ele.addEventListener(_util_motion__WEBPACK_IMPORTED_MODULE_12__["animationEndName"], _this.onMotionEnd); }; _this.removeEventListener = function ($ele) { if (!$ele) return; $ele.removeEventListener(_util_motion__WEBPACK_IMPORTED_MODULE_12__["transitionEndName"], _this.onMotionEnd); $ele.removeEventListener(_util_motion__WEBPACK_IMPORTED_MODULE_12__["animationEndName"], _this.onMotionEnd); }; _this.updateStatus = function (styleFunc, additionalState, event, callback) { var statusStyle = styleFunc ? styleFunc(_this.getElement(), event) : null; if (statusStyle === false || _this._destroyed) return; var nextStep = void 0; if (callback) { nextStep = function nextStep() { _this.nextFrame(callback); }; } _this.setState(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({ statusStyle: typeof statusStyle === 'object' ? statusStyle : null, newStatus: false }, additionalState), nextStep); // Trigger before next frame & after `componentDidMount` }; _this.updateActiveStatus = function (styleFunc, currentStatus) { // `setState` use `postMessage` to trigger at the end of frame. // Let's use requestAnimationFrame to update new state in next frame. _this.nextFrame(function () { var status = _this.state.status; if (status !== currentStatus) return; _this.updateStatus(styleFunc, { statusActive: true }); }); }; _this.nextFrame = function (func) { _this.cancelNextFrame(); _this.raf = raf__WEBPACK_IMPORTED_MODULE_11___default()(func); }; _this.cancelNextFrame = function () { if (_this.raf) { raf__WEBPACK_IMPORTED_MODULE_11___default.a.cancel(_this.raf); _this.raf = null; } }; _this.state = { status: STATUS_NONE, statusActive: false, newStatus: false, statusStyle: null }; _this.$cacheEle = null; _this.node = null; _this.raf = null; return _this; } babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(CSSMotion, [{ key: 'componentDidMount', value: function componentDidMount() { this.onDomUpdate(); } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { this.onDomUpdate(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this._destroyed = true; this.removeEventListener(this.$cacheEle); this.cancelNextFrame(); } }, { key: 'render', value: function render() { var _classNames; var _state = this.state, status = _state.status, statusActive = _state.statusActive, statusStyle = _state.statusStyle; var _props = this.props, children = _props.children, motionName = _props.motionName, visible = _props.visible, removeOnLeave = _props.removeOnLeave, leavedClassName = _props.leavedClassName, eventProps = _props.eventProps; if (!children) return null; if (status === STATUS_NONE || !isSupportTransition(this.props)) { if (visible) { return children(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, eventProps), this.setNodeRef); } else if (!removeOnLeave) { return children(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, eventProps, { className: leavedClassName }), this.setNodeRef); } return null; } return children(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, eventProps, { className: classnames__WEBPACK_IMPORTED_MODULE_10___default()((_classNames = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, Object(_util_motion__WEBPACK_IMPORTED_MODULE_12__["getTransitionName"])(motionName, status), status !== STATUS_NONE), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, Object(_util_motion__WEBPACK_IMPORTED_MODULE_12__["getTransitionName"])(motionName, status + '-active'), status !== STATUS_NONE && statusActive), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, motionName, typeof motionName === 'string'), _classNames)), style: statusStyle }), this.setNodeRef); } }], [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(props, _ref) { var prevProps = _ref.prevProps, prevStatus = _ref.status; if (!isSupportTransition(props)) return {}; var visible = props.visible, motionAppear = props.motionAppear, motionEnter = props.motionEnter, motionLeave = props.motionLeave, motionLeaveImmediately = props.motionLeaveImmediately; var newState = { prevProps: props }; // Clean up status if prop set to false if (prevStatus === STATUS_APPEAR && !motionAppear || prevStatus === STATUS_ENTER && !motionEnter || prevStatus === STATUS_LEAVE && !motionLeave) { newState.status = STATUS_NONE; newState.statusActive = false; newState.newStatus = false; } // Appear if (!prevProps && visible && motionAppear) { newState.status = STATUS_APPEAR; newState.statusActive = false; newState.newStatus = true; } // Enter if (prevProps && !prevProps.visible && visible && motionEnter) { newState.status = STATUS_ENTER; newState.statusActive = false; newState.newStatus = true; } // Leave if (prevProps && prevProps.visible && !visible && motionLeave || !prevProps && motionLeaveImmediately && !visible && motionLeave) { newState.status = STATUS_LEAVE; newState.statusActive = false; newState.newStatus = true; } return newState; } }]); return CSSMotion; }(react__WEBPACK_IMPORTED_MODULE_6___default.a.Component); CSSMotion.propTypes = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, MotionPropTypes, { internalRef: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func]) }); CSSMotion.defaultProps = { visible: true, motionEnter: true, motionAppear: true, motionLeave: true, removeOnLeave: true }; Object(react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_8__["polyfill"])(CSSMotion); if (!forwardRef) { return CSSMotion; } return react__WEBPACK_IMPORTED_MODULE_6___default.a.forwardRef(function (props, ref) { return react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(CSSMotion, babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({ internalRef: ref }, props)); }); } /* harmony default export */ __webpack_exports__["default"] = (genCSSMotion(_util_motion__WEBPACK_IMPORTED_MODULE_12__["supportTransition"])); /***/ }), /***/ "./node_modules/rc-animate/es/util/motion.js": /*!***************************************************!*\ !*** ./node_modules/rc-animate/es/util/motion.js ***! \***************************************************/ /*! exports provided: getVendorPrefixes, getVendorPrefixedEventName, animationEndName, transitionEndName, supportTransition, getTransitionName */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getVendorPrefixes", function() { return getVendorPrefixes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getVendorPrefixedEventName", function() { return getVendorPrefixedEventName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationEndName", function() { return animationEndName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transitionEndName", function() { return transitionEndName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportTransition", function() { return supportTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTransitionName", function() { return getTransitionName; }); var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); // ================= Transition ================= // Event wrapper. Copy from react source code function makePrefixMap(styleProp, eventName) { var prefixes = {}; prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); prefixes['Webkit' + styleProp] = 'webkit' + eventName; prefixes['Moz' + styleProp] = 'moz' + eventName; prefixes['ms' + styleProp] = 'MS' + eventName; prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); return prefixes; } function getVendorPrefixes(domSupport, win) { var prefixes = { animationend: makePrefixMap('Animation', 'AnimationEnd'), transitionend: makePrefixMap('Transition', 'TransitionEnd') }; if (domSupport) { if (!('AnimationEvent' in win)) { delete prefixes.animationend.animation; } if (!('TransitionEvent' in win)) { delete prefixes.transitionend.transition; } } return prefixes; } var vendorPrefixes = getVendorPrefixes(canUseDOM, typeof window !== 'undefined' ? window : {}); var style = {}; if (canUseDOM) { style = document.createElement('div').style; } var prefixedEventNames = {}; function getVendorPrefixedEventName(eventName) { if (prefixedEventNames[eventName]) { return prefixedEventNames[eventName]; } var prefixMap = vendorPrefixes[eventName]; if (prefixMap) { var stylePropList = Object.keys(prefixMap); var len = stylePropList.length; for (var i = 0; i < len; i += 1) { var styleProp = stylePropList[i]; if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) { prefixedEventNames[eventName] = prefixMap[styleProp]; return prefixedEventNames[eventName]; } } } return ''; } var animationEndName = getVendorPrefixedEventName('animationend'); var transitionEndName = getVendorPrefixedEventName('transitionend'); var supportTransition = !!(animationEndName && transitionEndName); function getTransitionName(transitionName, transitionType) { if (!transitionName) return null; if (typeof transitionName === 'object') { var type = transitionType.replace(/-\w/g, function (match) { return match[1].toUpperCase(); }); return transitionName[type]; } return transitionName + '-' + transitionType; } /***/ }), /***/ "./node_modules/rc-slider/assets/index.css": /*!*************************************************!*\ !*** ./node_modules/rc-slider/assets/index.css ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var api = __webpack_require__(/*! ../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); var content = __webpack_require__(/*! !../../css-loader/dist/cjs.js!./index.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/rc-slider/assets/index.css"); content = content.__esModule ? content.default : content; if (typeof content === 'string') { content = [[module.i, content, '']]; } var options = {}; options.insert = function insertAtTop(element) { document.head.insertBefore(element, document.head.firstElementChild); }; options.singleton = false; var update = api(content, options); var exported = content.locals ? content.locals : {}; module.exports = exported; /***/ }), /***/ "./node_modules/rc-slider/es/Handle.js": /*!*********************************************!*\ !*** ./node_modules/rc-slider/es/Handle.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ "./node_modules/babel-runtime/helpers/objectWithoutProperties.js"); /* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ "./node_modules/babel-runtime/helpers/classCallCheck.js"); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ "./node_modules/babel-runtime/helpers/createClass.js"); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js"); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ "./node_modules/babel-runtime/helpers/inherits.js"); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ "./node_modules/rc-util/es/Dom/addEventListener.js"); var Handle = function (_React$Component) { babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(Handle, _React$Component); function Handle() { var _ref; var _temp, _this, _ret; babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, Handle); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_ref = Handle.__proto__ || Object.getPrototypeOf(Handle)).call.apply(_ref, [this].concat(args))), _this), _this.state = { clickFocused: false }, _this.setHandleRef = function (node) { _this.handle = node; }, _this.handleMouseUp = function () { if (document.activeElement === _this.handle) { _this.setClickFocus(true); } }, _this.handleMouseDown = function () { // fix https://github.com/ant-design/ant-design/issues/15324 _this.focus(); }, _this.handleBlur = function () { _this.setClickFocus(false); }, _this.handleKeyDown = function () { _this.setClickFocus(false); }, _temp), babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(_this, _ret); } babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(Handle, [{ key: 'componentDidMount', value: function componentDidMount() { // mouseup won't trigger if mouse moved out of handle, // so we listen on document here. this.onMouseUpListener = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__["default"])(document, 'mouseup', this.handleMouseUp); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.onMouseUpListener) { this.onMouseUpListener.remove(); } } }, { key: 'setClickFocus', value: function setClickFocus(focused) { this.setState({ clickFocused: focused }); } }, { key: 'clickFocus', value: function clickFocus() { this.setClickFocus(true); this.focus(); } }, { key: 'focus', value: function focus() { this.handle.focus(); } }, { key: 'blur', value: function blur() { this.handle.blur(); } }, { key: 'render', value: function render() { var _ref2, _ref3; var _props = this.props, prefixCls = _props.prefixCls, vertical = _props.vertical, reverse = _props.reverse, offset = _props.offset, style = _props.style, disabled = _props.disabled, min = _props.min, max = _props.max, value = _props.value, tabIndex = _props.tabIndex, ariaLabel = _props.ariaLabel, ariaLabelledBy = _props.ariaLabelledBy, ariaValueTextFormatter = _props.ariaValueTextFormatter, restProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default()(_props, ['prefixCls', 'vertical', 'reverse', 'offset', 'style', 'disabled', 'min', 'max', 'value', 'tabIndex', 'ariaLabel', 'ariaLabelledBy', 'ariaValueTextFormatter']); var className = classnames__WEBPACK_IMPORTED_MODULE_9___default()(this.props.className, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, prefixCls + '-handle-click-focused', this.state.clickFocused)); var positionStyle = vertical ? (_ref2 = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, reverse ? 'top' : 'bottom', offset + '%'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, reverse ? 'bottom' : 'top', 'auto'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, 'transform', 'translateY(+50%)'), _ref2) : (_ref3 = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref3, reverse ? 'right' : 'left', offset + '%'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref3, reverse ? 'left' : 'right', 'auto'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref3, 'transform', 'translateX(' + (reverse ? '+' : '-') + '50%)'), _ref3); var elStyle = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, style, positionStyle); var _tabIndex = tabIndex || 0; if (disabled || tabIndex === null) { _tabIndex = null; } var ariaValueText = void 0; if (ariaValueTextFormatter) { ariaValueText = ariaValueTextFormatter(value); } return react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement('div', babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({ ref: this.setHandleRef, tabIndex: _tabIndex }, restProps, { className: className, style: elStyle, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, onMouseDown: this.handleMouseDown // aria attribute , role: 'slider', 'aria-valuemin': min, 'aria-valuemax': max, 'aria-valuenow': value, 'aria-disabled': !!disabled, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-valuetext': ariaValueText })); } }]); return Handle; }(react__WEBPACK_IMPORTED_MODULE_7___default.a.Component); /* harmony default export */ __webpack_exports__["default"] = (Handle); Handle.propTypes = { prefixCls: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, className: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, vertical: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, offset: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, style: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.object, disabled: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, min: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, max: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, value: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, reverse: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, ariaLabel: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, ariaLabelledBy: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, ariaValueTextFormatter: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.func }; /***/ }), /***/ "./node_modules/rc-slider/es/Range.js": /*!********************************************!*\ !*** ./node_modules/rc-slider/es/Range.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ "./node_modules/babel-runtime/helpers/toConsumableArray.js"); /* harmony import */ var babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ "./node_modules/babel-runtime/helpers/classCallCheck.js"); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ "./node_modules/babel-runtime/helpers/createClass.js"); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js"); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ "./node_modules/babel-runtime/helpers/inherits.js"); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var shallowequal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! shallowequal */ "./node_modules/shallowequal/index.js"); /* harmony import */ var shallowequal__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(shallowequal__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _common_Track__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./common/Track */ "./node_modules/rc-slider/es/common/Track.js"); /* harmony import */ var _common_createSlider__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./common/createSlider */ "./node_modules/rc-slider/es/common/createSlider.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utils */ "./node_modules/rc-slider/es/utils.js"); /* eslint-disable react/prop-types */ var _trimAlignValue = function _trimAlignValue(_ref) { var value = _ref.value, handle = _ref.handle, bounds = _ref.bounds, props = _ref.props; var allowCross = props.allowCross, pushable = props.pushable; var thershold = Number(pushable); var valInRange = _utils__WEBPACK_IMPORTED_MODULE_13__["ensureValueInRange"](value, props); var valNotConflict = valInRange; if (!allowCross && handle != null && bounds !== undefined) { if (handle > 0 && valInRange <= bounds[handle - 1] + thershold) { valNotConflict = bounds[handle - 1] + thershold; } if (handle < bounds.length - 1 && valInRange >= bounds[handle + 1] - thershold) { valNotConflict = bounds[handle + 1] - thershold; } } return _utils__WEBPACK_IMPORTED_MODULE_13__["ensureValuePrecision"](valNotConflict, props); }; var Range = function (_React$Component) { babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(Range, _React$Component); function Range(props) { babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, Range); var _this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (Range.__proto__ || Object.getPrototypeOf(Range)).call(this, props)); _this.onEnd = function (force) { var handle = _this.state.handle; _this.removeDocumentEvents(); if (handle !== null || force) { _this.props.onAfterChange(_this.getValue()); } _this.setState({ handle: null }); }; var count = props.count, min = props.min, max = props.max; var initialValue = Array.apply(undefined, babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(Array(count + 1))).map(function () { return min; }); var defaultValue = 'defaultValue' in props ? props.defaultValue : initialValue; var value = props.value !== undefined ? props.value : defaultValue; var bounds = value.map(function (v, i) { return _trimAlignValue({ value: v, handle: i, props: props }); }); var recent = bounds[0] === max ? 0 : bounds.length - 1; _this.state = { handle: null, recent: recent, bounds: bounds }; return _this; } babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(Range, [{ key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { var _this2 = this; if (!('value' in this.props || 'min' in this.props || 'max' in this.props)) { return; } if (this.props.min === prevProps.min && this.props.max === prevProps.max && shallowequal__WEBPACK_IMPORTED_MODULE_10___default()(this.props.value, prevProps.value)) { return; } var _props = this.props, onChange = _props.onChange, value = _props.value; var currentValue = value || prevState.bounds; if (currentValue.some(function (v) { return _utils__WEBPACK_IMPORTED_MODULE_13__["isValueOutOfRange"](v, _this2.props); })) { var newValues = currentValue.map(function (v) { return _utils__WEBPACK_IMPORTED_MODULE_13__["ensureValueInRange"](v, _this2.props); }); onChange(newValues); } } }, { key: 'onChange', value: function onChange(state) { var props = this.props; var isNotControlled = !('value' in props); if (isNotControlled) { this.setState(state); } else { var controlledState = {}; ['handle', 'recent'].forEach(function (item) { if (state[item] !== undefined) { controlledState[item] = state[item]; } }); if (Object.keys(controlledState).length) { this.setState(controlledState); } } var data = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, this.state, state); var changedValue = data.bounds; props.onChange(changedValue); } }, { key: 'onStart', value: function onStart(position) { var props = this.props; var state = this.state; var bounds = this.getValue(); props.onBeforeChange(bounds); var value = this.calcValueByPos(position); this.startValue = value; this.startPosition = position; var closestBound = this.getClosestBound(value); this.prevMovedHandleIndex = this.getBoundNeedMoving(value, closestBound); this.setState({ handle: this.prevMovedHandleIndex, recent: this.prevMovedHandleIndex }); var prevValue = bounds[this.prevMovedHandleIndex]; if (value === prevValue) return; var nextBounds = [].concat(babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(state.bounds)); nextBounds[this.prevMovedHandleIndex] = value; this.onChange({ bounds: nextBounds }); } }, { key: 'onMove', value: function onMove(e, position) { _utils__WEBPACK_IMPORTED_MODULE_13__["pauseEvent"](e); var state = this.state; var value = this.calcValueByPos(position); var oldValue = state.bounds[state.handle]; if (value === oldValue) return; this.moveTo(value); } }, { key: 'onKeyboard', value: function onKeyboard(e) { var _props2 = this.props, reverse = _props2.reverse, vertical = _props2.vertical; var valueMutator = _utils__WEBPACK_IMPORTED_MODULE_13__["getKeyboardValueMutator"](e, vertical, reverse); if (valueMutator) { _utils__WEBPACK_IMPORTED_MODULE_13__["pauseEvent"](e); var state = this.state, props = this.props; var bounds = state.bounds, handle = state.handle; var oldValue = bounds[handle === null ? state.recent : handle]; var mutatedValue = valueMutator(oldValue, props); var value = _trimAlignValue({ value: mutatedValue, handle: handle, bounds: state.bounds, props: props }); if (value === oldValue) return; var isFromKeyboardEvent = true; this.moveTo(value, isFromKeyboardEvent); } } }, { key: 'getValue', value: function getValue() { return this.state.bounds; } }, { key: 'getClosestBound', value: function getClosestBound(value) { var bounds = this.state.bounds; var closestBound = 0; for (var i = 1; i < bounds.length - 1; ++i) { if (value >= bounds[i]) { closestBound = i; } } if (Math.abs(bounds[closestBound + 1] - value) < Math.abs(bounds[closestBound] - value)) { closestBound += 1; } return closestBound; } }, { key: 'getBoundNeedMoving', value: function getBoundNeedMoving(value, closestBound) { var _state = this.state, bounds = _state.bounds, recent = _state.recent; var boundNeedMoving = closestBound; var isAtTheSamePoint = bounds[closestBound + 1] === bounds[closestBound]; if (isAtTheSamePoint && bounds[recent] === bounds[closestBound]) { boundNeedMoving = recent; } if (isAtTheSamePoint && value !== bounds[closestBound + 1]) { boundNeedMoving = value < bounds[closestBound + 1] ? closestBound : closestBound + 1; } return boundNeedMoving; } }, { key: 'getLowerBound', value: function getLowerBound() { return this.state.bounds[0]; } }, { key: 'getUpperBound', value: function getUpperBound() { var bounds = this.state.bounds; return bounds[bounds.length - 1]; } /** * Returns an array of possible slider points, taking into account both * `marks` and `step`. The result is cached. */ }, { key: 'getPoints', value: function getPoints() { var _props3 = this.props, marks = _props3.marks, step = _props3.step, min = _props3.min, max = _props3.max; var cache = this._getPointsCache; if (!cache || cache.marks !== marks || cache.step !== step) { var pointsObject = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, marks); if (step !== null) { for (var point = min; point <= max; point += step) { pointsObject[point] = point; } } var points = Object.keys(pointsObject).map(parseFloat); points.sort(function (a, b) { return a - b; }); this._getPointsCache = { marks: marks, step: step, points: points }; } return this._getPointsCache.points; } }, { key: 'moveTo', value: function moveTo(value, isFromKeyboardEvent) { var _this3 = this; var state = this.state, props = this.props; var nextBounds = [].concat(babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(state.bounds)); var handle = state.handle === null ? state.recent : state.handle; nextBounds[handle] = value; var nextHandle = handle; if (props.pushable !== false) { this.pushSurroundingHandles(nextBounds, nextHandle); } else if (props.allowCross) { nextBounds.sort(function (a, b) { return a - b; }); nextHandle = nextBounds.indexOf(value); } this.onChange({ recent: nextHandle, handle: nextHandle, bounds: nextBounds }); if (isFromKeyboardEvent) { // known problem: because setState is async, // so trigger focus will invoke handler's onEnd and another handler's onStart too early, // cause onBeforeChange and onAfterChange receive wrong value. // here use setState callback to hack,but not elegant this.props.onAfterChange(nextBounds); this.setState({}, function () { _this3.handlesRefs[nextHandle].focus(); }); this.onEnd(); } } }, { key: 'pushSurroundingHandles', value: function pushSurroundingHandles(bounds, handle) { var value = bounds[handle]; var threshold = this.props.pushable; threshold = Number(threshold); var direction = 0; if (bounds[handle + 1] - value < threshold) { direction = +1; // push to right } if (value - bounds[handle - 1] < threshold) { direction = -1; // push to left } if (direction === 0) { return; } var nextHandle = handle + direction; var diffToNext = direction * (bounds[nextHandle] - value); if (!this.pushHandle(bounds, nextHandle, direction, threshold - diffToNext)) { // revert to original value if pushing is impossible bounds[handle] = bounds[nextHandle] - direction * threshold; } } }, { key: 'pushHandle', value: function pushHandle(bounds, handle, direction, amount) { var originalValue = bounds[handle]; var currentValue = bounds[handle]; while (direction * (currentValue - originalValue) < amount) { if (!this.pushHandleOnePoint(bounds, handle, direction)) { // can't push handle enough to create the needed `amount` gap, so we // revert its position to the original value bounds[handle] = originalValue; return false; } currentValue = bounds[handle]; } // the handle was pushed enough to create the needed `amount` gap return true; } }, { key: 'pushHandleOnePoint', value: function pushHandleOnePoint(bounds, handle, direction) { var points = this.getPoints(); var pointIndex = points.indexOf(bounds[handle]); var nextPointIndex = pointIndex + direction; if (nextPointIndex >= points.length || nextPointIndex < 0) { // reached the minimum or maximum available point, can't push anymore return false; } var nextHandle = handle + direction; var nextValue = points[nextPointIndex]; var threshold = this.props.pushable; var diffToNext = direction * (bounds[nextHandle] - nextValue); if (!this.pushHandle(bounds, nextHandle, direction, threshold - diffToNext)) { // couldn't push next handle, so we won't push this one either return false; } // push the handle bounds[handle] = nextValue; return true; } }, { key: 'trimAlignValue', value: function trimAlignValue(value) { var _state2 = this.state, handle = _state2.handle, bounds = _state2.bounds; return _trimAlignValue({ value: value, handle: handle, bounds: bounds, props: this.props }); } }, { key: 'render', value: function render() { var _this4 = this; var _state3 = this.state, handle = _state3.handle, bounds = _state3.bounds; var _props4 = this.props, prefixCls = _props4.prefixCls, vertical = _props4.vertical, included = _props4.included, disabled = _props4.disabled, min = _props4.min, max = _props4.max, reverse = _props4.reverse, handleGenerator = _props4.handle, trackStyle = _props4.trackStyle, handleStyle = _props4.handleStyle, tabIndex = _props4.tabIndex, ariaLabelGroupForHandles = _props4.ariaLabelGroupForHandles, ariaLabelledByGroupForHandles = _props4.ariaLabelledByGroupForHandles, ariaValueTextFormatterGroupForHandles = _props4.ariaValueTextFormatterGroupForHandles; var offsets = bounds.map(function (v) { return _this4.calcOffset(v); }); var handleClassName = prefixCls + '-handle'; var handles = bounds.map(function (v, i) { var _classNames; var _tabIndex = tabIndex[i] || 0; if (disabled || tabIndex[i] === null) { _tabIndex = null; } return handleGenerator({ className: classnames__WEBPACK_IMPORTED_MODULE_9___default()((_classNames = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, handleClassName, true), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, handleClassName + '-' + (i + 1), true), _classNames)), prefixCls: prefixCls, vertical: vertical, offset: offsets[i], value: v, dragging: handle === i, index: i, tabIndex: _tabIndex, min: min, max: max, reverse: reverse, disabled: disabled, style: handleStyle[i], ref: function ref(h) { return _this4.saveHandle(i, h); }, ariaLabel: ariaLabelGroupForHandles[i], ariaLabelledBy: ariaLabelledByGroupForHandles[i], ariaValueTextFormatter: ariaValueTextFormatterGroupForHandles[i] }); }); var tracks = bounds.slice(0, -1).map(function (_, index) { var _classNames2; var i = index + 1; var trackClassName = classnames__WEBPACK_IMPORTED_MODULE_9___default()((_classNames2 = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, prefixCls + '-track', true), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, prefixCls + '-track-' + i, true), _classNames2)); return react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_common_Track__WEBPACK_IMPORTED_MODULE_11__["default"], { className: trackClassName, vertical: vertical, reverse: reverse, included: included, offset: offsets[i - 1], length: offsets[i] - offsets[i - 1], style: trackStyle[index], key: i }); }); return { tracks: tracks, handles: handles }; } }], [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(props, state) { if ('value' in props || 'min' in props || 'max' in props) { var value = props.value || state.bounds; var nextBounds = value.map(function (v, i) { return _trimAlignValue({ value: v, handle: i, bounds: state.bounds, props: props }); }); if (nextBounds.length === state.bounds.length && nextBounds.every(function (v, i) { return v === state.bounds[i]; })) { return null; } return babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, state, { bounds: nextBounds }); } return null; } }]); return Range; }(react__WEBPACK_IMPORTED_MODULE_7___default.a.Component); Range.displayName = 'Range'; Range.propTypes = { autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number), value: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number), count: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, pushable: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number]), allowCross: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, disabled: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, reverse: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number), min: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, max: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number, ariaLabelGroupForHandles: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string), ariaLabelledByGroupForHandles: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string), ariaValueTextFormatterGroupForHandles: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.func) }; Range.defaultProps = { count: 1, allowCross: true, pushable: false, tabIndex: [], ariaLabelGroupForHandles: [], ariaLabelledByGroupForHandles: [], ariaValueTextFormatterGroupForHandles: [] }; /* harmony default export */ __webpack_exports__["default"] = (Object(_common_createSlider__WEBPACK_IMPORTED_MODULE_12__["default"])(Range)); /***/ }), /***/ "./node_modules/rc-slider/es/Slider.js": /*!*********************************************!*\ !*** ./node_modules/rc-slider/es/Slider.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ "./node_modules/babel-runtime/helpers/classCallCheck.js"); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ "./node_modules/babel-runtime/helpers/createClass.js"); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js"); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ "./node_modules/babel-runtime/helpers/inherits.js"); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _common_Track__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./common/Track */ "./node_modules/rc-slider/es/common/Track.js"); /* harmony import */ var _common_createSlider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./common/createSlider */ "./node_modules/rc-slider/es/common/createSlider.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils */ "./node_modules/rc-slider/es/utils.js"); /* eslint-disable react/prop-types */ var Slider = function (_React$Component) { babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(Slider, _React$Component); function Slider(props) { babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Slider); var _this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, props)); _this.onEnd = function (force) { var dragging = _this.state.dragging; _this.removeDocumentEvents(); if (dragging || force) { _this.props.onAfterChange(_this.getValue()); } _this.setState({ dragging: false }); }; var defaultValue = props.defaultValue !== undefined ? props.defaultValue : props.min; var value = props.value !== undefined ? props.value : defaultValue; _this.state = { value: _this.trimAlignValue(value), dragging: false }; warning__WEBPACK_IMPORTED_MODULE_7___default()(!('minimumTrackStyle' in props), 'minimumTrackStyle will be deprecated, please use trackStyle instead.'); warning__WEBPACK_IMPORTED_MODULE_7___default()(!('maximumTrackStyle' in props), 'maximumTrackStyle will be deprecated, please use railStyle instead.'); return _this; } babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Slider, [{ key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { if (!('value' in this.props || 'min' in this.props || 'max' in this.props)) { return; } var _props = this.props, value = _props.value, onChange = _props.onChange; var theValue = value !== undefined ? value : prevState.value; var nextValue = this.trimAlignValue(theValue, this.props); if (nextValue !== prevState.value) { // eslint-disable-next-line this.setState({ value: nextValue }); if (_utils__WEBPACK_IMPORTED_MODULE_10__["isValueOutOfRange"](theValue, this.props)) { onChange(nextValue); } } } }, { key: 'onChange', value: function onChange(state) { var props = this.props; var isNotControlled = !('value' in props); var nextState = state.value > this.props.max ? babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { value: this.props.max }) : state; if (isNotControlled) { this.setState(nextState); } var changedValue = nextState.value; props.onChange(changedValue); } }, { key: 'onStart', value: function onStart(position) { this.setState({ dragging: true }); var props = this.props; var prevValue = this.getValue(); props.onBeforeChange(prevValue); var value = this.calcValueByPos(position); this.startValue = value; this.startPosition = position; if (value === prevValue) return; this.prevMovedHandleIndex = 0; this.onChange({ value: value }); } }, { key: 'onMove', value: function onMove(e, position) { _utils__WEBPACK_IMPORTED_MODULE_10__["pauseEvent"](e); var oldValue = this.state.value; var value = this.calcValueByPos(position); if (value === oldValue) return; this.onChange({ value: value }); } }, { key: 'onKeyboard', value: function onKeyboard(e) { var _props2 = this.props, reverse = _props2.reverse, vertical = _props2.vertical; var valueMutator = _utils__WEBPACK_IMPORTED_MODULE_10__["getKeyboardValueMutator"](e, vertical, reverse); if (valueMutator) { _utils__WEBPACK_IMPORTED_MODULE_10__["pauseEvent"](e); var state = this.state; var oldValue = state.value; var mutatedValue = valueMutator(oldValue, this.props); var value = this.trimAlignValue(mutatedValue); if (value === oldValue) return; this.onChange({ value: value }); this.props.onAfterChange(value); this.onEnd(); } } }, { key: 'getValue', value: function getValue() { return this.state.value; } }, { key: 'getLowerBound', value: function getLowerBound() { return this.props.min; } }, { key: 'getUpperBound', value: function getUpperBound() { return this.state.value; } }, { key: 'trimAlignValue', value: function trimAlignValue(v) { var nextProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (v === null) { return null; } var mergedProps = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, this.props, nextProps); var val = _utils__WEBPACK_IMPORTED_MODULE_10__["ensureValueInRange"](v, mergedProps); return _utils__WEBPACK_IMPORTED_MODULE_10__["ensureValuePrecision"](val, mergedProps); } }, { key: 'render', value: function render() { var _this2 = this; var _props3 = this.props, prefixCls = _props3.prefixCls, vertical = _props3.vertical, included = _props3.included, disabled = _props3.disabled, minimumTrackStyle = _props3.minimumTrackStyle, trackStyle = _props3.trackStyle, handleStyle = _props3.handleStyle, tabIndex = _props3.tabIndex, ariaLabelForHandle = _props3.ariaLabelForHandle, ariaLabelledByForHandle = _props3.ariaLabelledByForHandle, ariaValueTextFormatterForHandle = _props3.ariaValueTextFormatterForHandle, min = _props3.min, max = _props3.max, startPoint = _props3.startPoint, reverse = _props3.reverse, handleGenerator = _props3.handle; var _state = this.state, value = _state.value, dragging = _state.dragging; var offset = this.calcOffset(value); var handle = handleGenerator({ className: prefixCls + '-handle', prefixCls: prefixCls, vertical: vertical, offset: offset, value: value, dragging: dragging, disabled: disabled, min: min, max: max, reverse: reverse, index: 0, tabIndex: tabIndex, ariaLabel: ariaLabelForHandle, ariaLabelledBy: ariaLabelledByForHandle, ariaValueTextFormatter: ariaValueTextFormatterForHandle, style: handleStyle[0] || handleStyle, ref: function ref(h) { return _this2.saveHandle(0, h); } }); var trackOffset = startPoint !== undefined ? this.calcOffset(startPoint) : 0; var _trackStyle = trackStyle[0] || trackStyle; var track = react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_common_Track__WEBPACK_IMPORTED_MODULE_8__["default"], { className: prefixCls + '-track', vertical: vertical, included: included, offset: trackOffset, reverse: reverse, length: offset - trackOffset, style: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, minimumTrackStyle, _trackStyle) }); return { tracks: track, handles: handle }; } }]); return Slider; }(react__WEBPACK_IMPORTED_MODULE_5___default.a.Component); Slider.propTypes = { defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number, value: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number, disabled: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool, autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool, tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number, reverse: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool, min: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number, max: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number, startPoint: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number, ariaLabelForHandle: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.string, ariaLabelledByForHandle: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.string, ariaValueTextFormatterForHandle: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.func }; /* harmony default export */ __webpack_exports__["default"] = (Object(_common_createSlider__WEBPACK_IMPORTED_MODULE_9__["default"])(Slider)); /***/ }), /***/ "./node_modules/rc-slider/es/common/Marks.js": /*!***************************************************!*\ !*** ./node_modules/rc-slider/es/common/Marks.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); var Marks = function Marks(_ref) { var className = _ref.className, vertical = _ref.vertical, reverse = _ref.reverse, marks = _ref.marks, included = _ref.included, upperBound = _ref.upperBound, lowerBound = _ref.lowerBound, max = _ref.max, min = _ref.min, onClickLabel = _ref.onClickLabel; var marksKeys = Object.keys(marks); var range = max - min; var elements = marksKeys.map(parseFloat).sort(function (a, b) { return a - b; }).map(function (point) { var _classNames; var markPoint = marks[point]; var markPointIsObject = typeof markPoint === 'object' && !react__WEBPACK_IMPORTED_MODULE_2___default.a.isValidElement(markPoint); var markLabel = markPointIsObject ? markPoint.label : markPoint; if (!markLabel && markLabel !== 0) { return null; } var isActive = !included && point === upperBound || included && point <= upperBound && point >= lowerBound; var markClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()((_classNames = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, className + '-text', true), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, className + '-text-active', isActive), _classNames)); var bottomStyle = babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({ marginBottom: '-50%' }, reverse ? 'top' : 'bottom', (point - min) / range * 100 + '%'); var leftStyle = babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({ transform: 'translateX(-50%)', msTransform: 'translateX(-50%)' }, reverse ? 'right' : 'left', reverse ? (point - min / 4) / range * 100 + '%' : (point - min) / range * 100 + '%'); var style = vertical ? bottomStyle : leftStyle; var markStyle = markPointIsObject ? babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, style, markPoint.style) : style; return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( 'span', { className: markClassName, style: markStyle, key: point, onMouseDown: function onMouseDown(e) { return onClickLabel(e, point); }, onTouchStart: function onTouchStart(e) { return onClickLabel(e, point); } }, markLabel ); }); return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( 'div', { className: className }, elements ); }; Marks.propTypes = { className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string, vertical: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool, reverse: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool, marks: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, included: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool, upperBound: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, lowerBound: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, max: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, min: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, onClickLabel: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func }; /* harmony default export */ __webpack_exports__["default"] = (Marks); /***/ }), /***/ "./node_modules/rc-slider/es/common/Steps.js": /*!***************************************************!*\ !*** ./node_modules/rc-slider/es/common/Steps.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_5__); var calcPoints = function calcPoints(vertical, marks, dots, step, min, max) { warning__WEBPACK_IMPORTED_MODULE_5___default()(dots ? step > 0 : true, '`Slider[step]` should be a positive number in order to make Slider[dots] work.'); var points = Object.keys(marks).map(parseFloat).sort(function (a, b) { return a - b; }); if (dots && step) { for (var i = min; i <= max; i += step) { if (points.indexOf(i) === -1) { points.push(i); } } } return points; }; var Steps = function Steps(_ref) { var prefixCls = _ref.prefixCls, vertical = _ref.vertical, reverse = _ref.reverse, marks = _ref.marks, dots = _ref.dots, step = _ref.step, included = _ref.included, lowerBound = _ref.lowerBound, upperBound = _ref.upperBound, max = _ref.max, min = _ref.min, dotStyle = _ref.dotStyle, activeDotStyle = _ref.activeDotStyle; var range = max - min; var elements = calcPoints(vertical, marks, dots, step, min, max).map(function (point) { var _classNames; var offset = Math.abs(point - min) / range * 100 + '%'; var isActived = !included && point === upperBound || included && point <= upperBound && point >= lowerBound; var style = vertical ? babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, dotStyle, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, reverse ? 'top' : 'bottom', offset)) : babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, dotStyle, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, reverse ? 'right' : 'left', offset)); if (isActived) { style = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, style, activeDotStyle); } var pointClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()((_classNames = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, prefixCls + '-dot', true), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, prefixCls + '-dot-active', isActived), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, prefixCls + '-dot-reverse', reverse), _classNames)); return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement('span', { className: pointClassName, style: style, key: point }); }); return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( 'div', { className: prefixCls + '-step' }, elements ); }; Steps.propTypes = { prefixCls: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string, activeDotStyle: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, dotStyle: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, min: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, max: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, upperBound: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, lowerBound: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, included: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool, dots: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool, step: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, marks: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, vertical: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool, reverse: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool }; /* harmony default export */ __webpack_exports__["default"] = (Steps); /***/ }), /***/ "./node_modules/rc-slider/es/common/Track.js": /*!***************************************************!*\ !*** ./node_modules/rc-slider/es/common/Track.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* eslint-disable react/prop-types */ var Track = function Track(props) { var _ref, _ref2; var className = props.className, included = props.included, vertical = props.vertical, style = props.style; var length = props.length, offset = props.offset, reverse = props.reverse; if (length < 0) { reverse = !reverse; length = Math.abs(length); offset = 100 - offset; } var positonStyle = vertical ? (_ref = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref, reverse ? 'top' : 'bottom', offset + '%'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref, reverse ? 'bottom' : 'top', 'auto'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref, 'height', length + '%'), _ref) : (_ref2 = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, reverse ? 'right' : 'left', offset + '%'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, reverse ? 'left' : 'right', 'auto'), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, 'width', length + '%'), _ref2); var elStyle = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, style, positonStyle); return included ? react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement('div', { className: className, style: elStyle }) : null; }; /* harmony default export */ __webpack_exports__["default"] = (Track); /***/ }), /***/ "./node_modules/rc-slider/es/common/createSlider.js": /*!**********************************************************!*\ !*** ./node_modules/rc-slider/es/common/createSlider.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createSlider; }); /* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ "./node_modules/babel-runtime/helpers/objectWithoutProperties.js"); /* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ "./node_modules/babel-runtime/helpers/classCallCheck.js"); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ "./node_modules/babel-runtime/helpers/createClass.js"); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js"); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! babel-runtime/helpers/get */ "./node_modules/babel-runtime/helpers/get.js"); /* harmony import */ var babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ "./node_modules/babel-runtime/helpers/inherits.js"); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ "./node_modules/rc-util/es/Dom/addEventListener.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _Steps__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Steps */ "./node_modules/rc-slider/es/common/Steps.js"); /* harmony import */ var _Marks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Marks */ "./node_modules/rc-slider/es/common/Marks.js"); /* harmony import */ var _Handle__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../Handle */ "./node_modules/rc-slider/es/Handle.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils */ "./node_modules/rc-slider/es/utils.js"); function noop() {} function createSlider(Component) { var _class, _temp; return _temp = _class = function (_Component) { babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(ComponentEnhancer, _Component); function ComponentEnhancer(props) { babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, ComponentEnhancer); var _this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (ComponentEnhancer.__proto__ || Object.getPrototypeOf(ComponentEnhancer)).call(this, props)); _this.onMouseDown = function (e) { if (e.button !== 0) { return; } var isVertical = _this.props.vertical; var position = _utils__WEBPACK_IMPORTED_MODULE_16__["getMousePosition"](isVertical, e); if (!_utils__WEBPACK_IMPORTED_MODULE_16__["isEventFromHandle"](e, _this.handlesRefs)) { _this.dragOffset = 0; } else { var handlePosition = _utils__WEBPACK_IMPORTED_MODULE_16__["getHandleCenterPosition"](isVertical, e.target); _this.dragOffset = position - handlePosition; position = handlePosition; } _this.removeDocumentEvents(); _this.onStart(position); _this.addDocumentMouseEvents(); }; _this.onTouchStart = function (e) { if (_utils__WEBPACK_IMPORTED_MODULE_16__["isNotTouchEvent"](e)) return; var isVertical = _this.props.vertical; var position = _utils__WEBPACK_IMPORTED_MODULE_16__["getTouchPosition"](isVertical, e); if (!_utils__WEBPACK_IMPORTED_MODULE_16__["isEventFromHandle"](e, _this.handlesRefs)) { _this.dragOffset = 0; } else { var handlePosition = _utils__WEBPACK_IMPORTED_MODULE_16__["getHandleCenterPosition"](isVertical, e.target); _this.dragOffset = position - handlePosition; position = handlePosition; } _this.onStart(position); _this.addDocumentTouchEvents(); _utils__WEBPACK_IMPORTED_MODULE_16__["pauseEvent"](e); }; _this.onFocus = function (e) { var _this$props = _this.props, onFocus = _this$props.onFocus, vertical = _this$props.vertical; if (_utils__WEBPACK_IMPORTED_MODULE_16__["isEventFromHandle"](e, _this.handlesRefs)) { var handlePosition = _utils__WEBPACK_IMPORTED_MODULE_16__["getHandleCenterPosition"](vertical, e.target); _this.dragOffset = 0; _this.onStart(handlePosition); _utils__WEBPACK_IMPORTED_MODULE_16__["pauseEvent"](e); if (onFocus) { onFocus(e); } } }; _this.onBlur = function (e) { var onBlur = _this.props.onBlur; _this.onEnd(); if (onBlur) { onBlur(e); } }; _this.onMouseUp = function () { if (_this.handlesRefs[_this.prevMovedHandleIndex]) { _this.handlesRefs[_this.prevMovedHandleIndex].clickFocus(); } }; _this.onMouseMove = function (e) { if (!_this.sliderRef) { _this.onEnd(); return; } var position = _utils__WEBPACK_IMPORTED_MODULE_16__["getMousePosition"](_this.props.vertical, e); _this.onMove(e, position - _this.dragOffset); }; _this.onTouchMove = function (e) { if (_utils__WEBPACK_IMPORTED_MODULE_16__["isNotTouchEvent"](e) || !_this.sliderRef) { _this.onEnd(); return; } var position = _utils__WEBPACK_IMPORTED_MODULE_16__["getTouchPosition"](_this.props.vertical, e); _this.onMove(e, position - _this.dragOffset); }; _this.onKeyDown = function (e) { if (_this.sliderRef && _utils__WEBPACK_IMPORTED_MODULE_16__["isEventFromHandle"](e, _this.handlesRefs)) { _this.onKeyboard(e); } }; _this.onClickMarkLabel = function (e, value) { e.stopPropagation(); _this.onChange({ value: value }); _this.setState({ value: value }, function () { return _this.onEnd(true); }); }; _this.saveSlider = function (slider) { _this.sliderRef = slider; }; var step = props.step, max = props.max, min = props.min; var isPointDiffEven = isFinite(max - min) ? (max - min) % step === 0 : true; // eslint-disable-line warning__WEBPACK_IMPORTED_MODULE_12___default()(step && Math.floor(step) === step ? isPointDiffEven : true, 'Slider[max] - Slider[min] (%s) should be a multiple of Slider[step] (%s)', max - min, step); _this.handlesRefs = {}; return _this; } babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(ComponentEnhancer, [{ key: 'componentDidMount', value: function componentDidMount() { // Snapshot testing cannot handle refs, so be sure to null-check this. this.document = this.sliderRef && this.sliderRef.ownerDocument; var _props = this.props, autoFocus = _props.autoFocus, disabled = _props.disabled; if (autoFocus && !disabled) { this.focus(); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_6___default()(ComponentEnhancer.prototype.__proto__ || Object.getPrototypeOf(ComponentEnhancer.prototype), 'componentWillUnmount', this)) babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_6___default()(ComponentEnhancer.prototype.__proto__ || Object.getPrototypeOf(ComponentEnhancer.prototype), 'componentWillUnmount', this).call(this); this.removeDocumentEvents(); } }, { key: 'getSliderStart', value: function getSliderStart() { var slider = this.sliderRef; var _props2 = this.props, vertical = _props2.vertical, reverse = _props2.reverse; var rect = slider.getBoundingClientRect(); if (vertical) { return reverse ? rect.bottom : rect.top; } return window.pageXOffset + (reverse ? rect.right : rect.left); } }, { key: 'getSliderLength', value: function getSliderLength() { var slider = this.sliderRef; if (!slider) { return 0; } var coords = slider.getBoundingClientRect(); return this.props.vertical ? coords.height : coords.width; } }, { key: 'addDocumentTouchEvents', value: function addDocumentTouchEvents() { // just work for Chrome iOS Safari and Android Browser this.onTouchMoveListener = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__["default"])(this.document, 'touchmove', this.onTouchMove); this.onTouchUpListener = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__["default"])(this.document, 'touchend', this.onEnd); } }, { key: 'addDocumentMouseEvents', value: function addDocumentMouseEvents() { this.onMouseMoveListener = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__["default"])(this.document, 'mousemove', this.onMouseMove); this.onMouseUpListener = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_10__["default"])(this.document, 'mouseup', this.onEnd); } }, { key: 'removeDocumentEvents', value: function removeDocumentEvents() { /* eslint-disable no-unused-expressions */ this.onTouchMoveListener && this.onTouchMoveListener.remove(); this.onTouchUpListener && this.onTouchUpListener.remove(); this.onMouseMoveListener && this.onMouseMoveListener.remove(); this.onMouseUpListener && this.onMouseUpListener.remove(); /* eslint-enable no-unused-expressions */ } }, { key: 'focus', value: function focus() { if (!this.props.disabled) { this.handlesRefs[0].focus(); } } }, { key: 'blur', value: function blur() { var _this2 = this; if (!this.props.disabled) { Object.keys(this.handlesRefs).forEach(function (key) { if (_this2.handlesRefs[key] && _this2.handlesRefs[key].blur) { _this2.handlesRefs[key].blur(); } }); } } }, { key: 'calcValue', value: function calcValue(offset) { var _props3 = this.props, vertical = _props3.vertical, min = _props3.min, max = _props3.max; var ratio = Math.abs(Math.max(offset, 0) / this.getSliderLength()); var value = vertical ? (1 - ratio) * (max - min) + min : ratio * (max - min) + min; return value; } }, { key: 'calcValueByPos', value: function calcValueByPos(position) { var sign = this.props.reverse ? -1 : +1; var pixelOffset = sign * (position - this.getSliderStart()); var nextValue = this.trimAlignValue(this.calcValue(pixelOffset)); return nextValue; } }, { key: 'calcOffset', value: function calcOffset(value) { var _props4 = this.props, min = _props4.min, max = _props4.max; var ratio = (value - min) / (max - min); return ratio * 100; } }, { key: 'saveHandle', value: function saveHandle(index, handle) { this.handlesRefs[index] = handle; } }, { key: 'render', value: function render() { var _classNames; var _props5 = this.props, prefixCls = _props5.prefixCls, className = _props5.className, marks = _props5.marks, dots = _props5.dots, step = _props5.step, included = _props5.included, disabled = _props5.disabled, vertical = _props5.vertical, reverse = _props5.reverse, min = _props5.min, max = _props5.max, children = _props5.children, maximumTrackStyle = _props5.maximumTrackStyle, style = _props5.style, railStyle = _props5.railStyle, dotStyle = _props5.dotStyle, activeDotStyle = _props5.activeDotStyle; var _get$call = babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_6___default()(ComponentEnhancer.prototype.__proto__ || Object.getPrototypeOf(ComponentEnhancer.prototype), 'render', this).call(this), tracks = _get$call.tracks, handles = _get$call.handles; var sliderClassName = classnames__WEBPACK_IMPORTED_MODULE_11___default()(prefixCls, (_classNames = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(_classNames, prefixCls + '-with-marks', Object.keys(marks).length), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(_classNames, prefixCls + '-disabled', disabled), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(_classNames, prefixCls + '-vertical', vertical), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(_classNames, className, className), _classNames)); return react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement( 'div', { ref: this.saveSlider, className: sliderClassName, onTouchStart: disabled ? noop : this.onTouchStart, onMouseDown: disabled ? noop : this.onMouseDown, onMouseUp: disabled ? noop : this.onMouseUp, onKeyDown: disabled ? noop : this.onKeyDown, onFocus: disabled ? noop : this.onFocus, onBlur: disabled ? noop : this.onBlur, style: style }, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement('div', { className: prefixCls + '-rail', style: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, maximumTrackStyle, railStyle) }), tracks, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_Steps__WEBPACK_IMPORTED_MODULE_13__["default"], { prefixCls: prefixCls, vertical: vertical, reverse: reverse, marks: marks, dots: dots, step: step, included: included, lowerBound: this.getLowerBound(), upperBound: this.getUpperBound(), max: max, min: min, dotStyle: dotStyle, activeDotStyle: activeDotStyle }), handles, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_Marks__WEBPACK_IMPORTED_MODULE_14__["default"], { className: prefixCls + '-mark', onClickLabel: disabled ? noop : this.onClickMarkLabel, vertical: vertical, marks: marks, included: included, lowerBound: this.getLowerBound(), upperBound: this.getUpperBound(), max: max, min: min, reverse: reverse }), children ); } }]); return ComponentEnhancer; }(Component), _class.displayName = 'ComponentEnhancer(' + Component.displayName + ')', _class.propTypes = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, Component.propTypes, { min: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number, max: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number, startPoint: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number, step: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number, marks: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, included: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool, className: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string, prefixCls: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string, disabled: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool, children: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.any, onBeforeChange: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func, onChange: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func, onAfterChange: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func, handle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func, dots: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool, vertical: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool, style: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, reverse: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool, minimumTrackStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, // just for compatibility, will be deperecate maximumTrackStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, // just for compatibility, will be deperecate handleStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object)]), trackStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object)]), railStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, dotStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, activeDotStyle: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object, autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool, onFocus: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func, onBlur: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func }), _class.defaultProps = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, Component.defaultProps, { prefixCls: 'rc-slider', className: '', min: 0, max: 100, step: 1, marks: {}, handle: function handle(_ref) { var index = _ref.index, restProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0___default()(_ref, ['index']); delete restProps.dragging; if (restProps.value === null) { return null; } return react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_Handle__WEBPACK_IMPORTED_MODULE_15__["default"], babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, restProps, { key: index })); }, onBeforeChange: noop, onChange: noop, onAfterChange: noop, included: true, disabled: false, dots: false, vertical: false, reverse: false, trackStyle: [{}], handleStyle: [{}], railStyle: {}, dotStyle: {}, activeDotStyle: {} }), _temp; } /***/ }), /***/ "./node_modules/rc-slider/es/createSliderWithTooltip.js": /*!**************************************************************!*\ !*** ./node_modules/rc-slider/es/createSliderWithTooltip.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createSliderWithTooltip; }); /* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ "./node_modules/babel-runtime/helpers/objectWithoutProperties.js"); /* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "./node_modules/babel-runtime/helpers/defineProperty.js"); /* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ "./node_modules/babel-runtime/helpers/classCallCheck.js"); /* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ "./node_modules/babel-runtime/helpers/createClass.js"); /* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ "./node_modules/babel-runtime/helpers/possibleConstructorReturn.js"); /* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ "./node_modules/babel-runtime/helpers/inherits.js"); /* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var rc_tooltip__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-tooltip */ "./node_modules/rc-tooltip/es/index.js"); /* harmony import */ var _Handle__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Handle */ "./node_modules/rc-slider/es/Handle.js"); function createSliderWithTooltip(Component) { var _class, _temp2; return _temp2 = _class = function (_React$Component) { babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(ComponentWrapper, _React$Component); function ComponentWrapper() { var _ref; var _temp, _this, _ret; babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, ComponentWrapper); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_ref = ComponentWrapper.__proto__ || Object.getPrototypeOf(ComponentWrapper)).call.apply(_ref, [this].concat(args))), _this), _this.state = { visibles: {} }, _this.handleTooltipVisibleChange = function (index, visible) { _this.setState(function (prevState) { return { visibles: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, prevState.visibles, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, index, visible)) }; }); }, _this.handleWithTooltip = function (_ref2) { var value = _ref2.value, dragging = _ref2.dragging, index = _ref2.index, disabled = _ref2.disabled, restProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0___default()(_ref2, ['value', 'dragging', 'index', 'disabled']); var _this$props = _this.props, tipFormatter = _this$props.tipFormatter, tipProps = _this$props.tipProps, handleStyle = _this$props.handleStyle; var _tipProps$prefixCls = tipProps.prefixCls, prefixCls = _tipProps$prefixCls === undefined ? 'rc-slider-tooltip' : _tipProps$prefixCls, _tipProps$overlay = tipProps.overlay, overlay = _tipProps$overlay === undefined ? tipFormatter(value) : _tipProps$overlay, _tipProps$placement = tipProps.placement, placement = _tipProps$placement === undefined ? 'top' : _tipProps$placement, _tipProps$visible = tipProps.visible, visible = _tipProps$visible === undefined ? false : _tipProps$visible, restTooltipProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0___default()(tipProps, ['prefixCls', 'overlay', 'placement', 'visible']); var handleStyleWithIndex = void 0; if (Array.isArray(handleStyle)) { handleStyleWithIndex = handleStyle[index] || handleStyle[0]; } else { handleStyleWithIndex = handleStyle; } return react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement( rc_tooltip__WEBPACK_IMPORTED_MODULE_9__["default"], babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, restTooltipProps, { prefixCls: prefixCls, overlay: overlay, placement: placement, visible: !disabled && (_this.state.visibles[index] || dragging) || visible, key: index }), react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_Handle__WEBPACK_IMPORTED_MODULE_10__["default"], babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, restProps, { style: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, handleStyleWithIndex), value: value, onMouseEnter: function onMouseEnter() { return _this.handleTooltipVisibleChange(index, true); }, onMouseLeave: function onMouseLeave() { return _this.handleTooltipVisibleChange(index, false); } })) ); }, _temp), babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(_this, _ret); } babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(ComponentWrapper, [{ key: 'render', value: function render() { return react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(Component, babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, this.props, { handle: this.handleWithTooltip })); } }]); return ComponentWrapper; }(react__WEBPACK_IMPORTED_MODULE_7___default.a.Component), _class.propTypes = { tipFormatter: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.func, handleStyle: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.object)]), tipProps: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.object }, _class.defaultProps = { tipFormatter: function tipFormatter(value) { return value; }, handleStyle: [{}], tipProps: {} }, _temp2; } /***/ }), /***/ "./node_modules/rc-slider/es/index.js": /*!********************************************!*\ !*** ./node_modules/rc-slider/es/index.js ***! \********************************************/ /*! exports provided: default, Range, Handle, createSliderWithTooltip */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Slider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Slider */ "./node_modules/rc-slider/es/Slider.js"); /* harmony import */ var _Range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Range */ "./node_modules/rc-slider/es/Range.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return _Range__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _Handle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Handle */ "./node_modules/rc-slider/es/Handle.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Handle", function() { return _Handle__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _createSliderWithTooltip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./createSliderWithTooltip */ "./node_modules/rc-slider/es/createSliderWithTooltip.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSliderWithTooltip", function() { return _createSliderWithTooltip__WEBPACK_IMPORTED_MODULE_3__["default"]; }); _Slider__WEBPACK_IMPORTED_MODULE_0__["default"].Range = _Range__WEBPACK_IMPORTED_MODULE_1__["default"]; _Slider__WEBPACK_IMPORTED_MODULE_0__["default"].Handle = _Handle__WEBPACK_IMPORTED_MODULE_2__["default"]; _Slider__WEBPACK_IMPORTED_MODULE_0__["default"].createSliderWithTooltip = _createSliderWithTooltip__WEBPACK_IMPORTED_MODULE_3__["default"]; /* harmony default export */ __webpack_exports__["default"] = (_Slider__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./node_modules/rc-slider/es/utils.js": /*!********************************************!*\ !*** ./node_modules/rc-slider/es/utils.js ***! \********************************************/ /*! exports provided: isEventFromHandle, isValueOutOfRange, isNotTouchEvent, getClosestPoint, getPrecision, getMousePosition, getTouchPosition, getHandleCenterPosition, ensureValueInRange, ensureValuePrecision, pauseEvent, calculateNextValue, getKeyboardValueMutator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEventFromHandle", function() { return isEventFromHandle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValueOutOfRange", function() { return isValueOutOfRange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNotTouchEvent", function() { return isNotTouchEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClosestPoint", function() { return getClosestPoint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPrecision", function() { return getPrecision; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMousePosition", function() { return getMousePosition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTouchPosition", function() { return getTouchPosition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHandleCenterPosition", function() { return getHandleCenterPosition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ensureValueInRange", function() { return ensureValueInRange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ensureValuePrecision", function() { return ensureValuePrecision; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pauseEvent", function() { return pauseEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateNextValue", function() { return calculateNextValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getKeyboardValueMutator", function() { return getKeyboardValueMutator; }); /* harmony import */ var babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ "./node_modules/babel-runtime/helpers/toConsumableArray.js"); /* harmony import */ var babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/KeyCode */ "./node_modules/rc-util/es/KeyCode.js"); function isEventFromHandle(e, handles) { try { return Object.keys(handles).some(function (key) { return e.target === Object(react_dom__WEBPACK_IMPORTED_MODULE_1__["findDOMNode"])(handles[key]); }); } catch (error) { return false; } } function isValueOutOfRange(value, _ref) { var min = _ref.min, max = _ref.max; return value < min || value > max; } function isNotTouchEvent(e) { return e.touches.length > 1 || e.type.toLowerCase() === 'touchend' && e.touches.length > 0; } function getClosestPoint(val, _ref2) { var marks = _ref2.marks, step = _ref2.step, min = _ref2.min, max = _ref2.max; var points = Object.keys(marks).map(parseFloat); if (step !== null) { var maxSteps = Math.floor((max - min) / step); var steps = Math.min((val - min) / step, maxSteps); var closestStep = Math.round(steps) * step + min; points.push(closestStep); } var diffs = points.map(function (point) { return Math.abs(val - point); }); return points[diffs.indexOf(Math.min.apply(Math, babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(diffs)))]; } function getPrecision(step) { var stepString = step.toString(); var precision = 0; if (stepString.indexOf('.') >= 0) { precision = stepString.length - stepString.indexOf('.') - 1; } return precision; } function getMousePosition(vertical, e) { return vertical ? e.clientY : e.pageX; } function getTouchPosition(vertical, e) { return vertical ? e.touches[0].clientY : e.touches[0].pageX; } function getHandleCenterPosition(vertical, handle) { var coords = handle.getBoundingClientRect(); return vertical ? coords.top + coords.height * 0.5 : window.pageXOffset + coords.left + coords.width * 0.5; } function ensureValueInRange(val, _ref3) { var max = _ref3.max, min = _ref3.min; if (val <= min) { return min; } if (val >= max) { return max; } return val; } function ensureValuePrecision(val, props) { var step = props.step; var closestPoint = isFinite(getClosestPoint(val, props)) ? getClosestPoint(val, props) : 0; // eslint-disable-line return step === null ? closestPoint : parseFloat(closestPoint.toFixed(getPrecision(step))); } function pauseEvent(e) { e.stopPropagation(); e.preventDefault(); } function calculateNextValue(func, value, props) { var operations = { increase: function increase(a, b) { return a + b; }, decrease: function decrease(a, b) { return a - b; } }; var indexToGet = operations[func](Object.keys(props.marks).indexOf(JSON.stringify(value)), 1); var keyToGet = Object.keys(props.marks)[indexToGet]; if (props.step) { return operations[func](value, props.step); } else if (!!Object.keys(props.marks).length && !!props.marks[keyToGet]) { return props.marks[keyToGet]; } return value; } function getKeyboardValueMutator(e, vertical, reverse) { var increase = 'increase'; var decrease = 'decrease'; var method = increase; switch (e.keyCode) { case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].UP: method = vertical && reverse ? decrease : increase;break; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].RIGHT: method = !vertical && reverse ? decrease : increase;break; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].DOWN: method = vertical && reverse ? increase : decrease;break; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].LEFT: method = !vertical && reverse ? increase : decrease;break; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].END: return function (value, props) { return props.max; }; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].HOME: return function (value, props) { return props.min; }; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].PAGE_UP: return function (value, props) { return value + props.step * 2; }; case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__["default"].PAGE_DOWN: return function (value, props) { return value - props.step * 2; }; default: return undefined; } return function (value, props) { return calculateNextValue(method, value, props); }; } /***/ }), /***/ "./node_modules/rc-tooltip/es/Content.js": /*!***********************************************!*\ !*** ./node_modules/rc-tooltip/es/Content.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var Content = function Content(props) { var overlay = props.overlay, prefixCls = props.prefixCls, id = props.id; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "".concat(prefixCls, "-inner"), id: id, role: "tooltip" }, typeof overlay === 'function' ? overlay() : overlay); }; /* harmony default export */ __webpack_exports__["default"] = (Content); /***/ }), /***/ "./node_modules/rc-tooltip/es/Tooltip.js": /*!***********************************************!*\ !*** ./node_modules/rc-tooltip/es/Tooltip.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var rc_trigger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-trigger */ "./node_modules/rc-trigger/es/index.js"); /* harmony import */ var _placements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./placements */ "./node_modules/rc-tooltip/es/placements.js"); /* harmony import */ var _Content__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Content */ "./node_modules/rc-tooltip/es/Content.js"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } var Tooltip = function Tooltip(props, ref) { var overlayClassName = props.overlayClassName, _props$trigger = props.trigger, trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger, _props$mouseEnterDela = props.mouseEnterDelay, mouseEnterDelay = _props$mouseEnterDela === void 0 ? 0 : _props$mouseEnterDela, _props$mouseLeaveDela = props.mouseLeaveDelay, mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela, overlayStyle = props.overlayStyle, _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? 'rc-tooltip' : _props$prefixCls, children = props.children, onVisibleChange = props.onVisibleChange, afterVisibleChange = props.afterVisibleChange, transitionName = props.transitionName, animation = props.animation, _props$placement = props.placement, placement = _props$placement === void 0 ? 'right' : _props$placement, _props$align = props.align, align = _props$align === void 0 ? {} : _props$align, _props$destroyTooltip = props.destroyTooltipOnHide, destroyTooltipOnHide = _props$destroyTooltip === void 0 ? false : _props$destroyTooltip, defaultVisible = props.defaultVisible, getTooltipContainer = props.getTooltipContainer, restProps = _objectWithoutProperties(props, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer"]); var domRef = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(null); Object(react__WEBPACK_IMPORTED_MODULE_0__["useImperativeHandle"])(ref, function () { return domRef.current; }); var extraProps = _objectSpread({}, restProps); if ('visible' in props) { extraProps.popupVisible = props.visible; } var getPopupElement = function getPopupElement() { var _props$arrowContent = props.arrowContent, arrowContent = _props$arrowContent === void 0 ? null : _props$arrowContent, overlay = props.overlay, id = props.id; return [react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "".concat(prefixCls, "-arrow"), key: "arrow" }, arrowContent), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Content__WEBPACK_IMPORTED_MODULE_3__["default"], { key: "content", prefixCls: prefixCls, id: id, overlay: overlay })]; }; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(rc_trigger__WEBPACK_IMPORTED_MODULE_1__["default"], Object.assign({ popupClassName: overlayClassName, prefixCls: prefixCls, popup: getPopupElement, action: trigger, builtinPlacements: _placements__WEBPACK_IMPORTED_MODULE_2__["placements"], popupPlacement: placement, ref: domRef, popupAlign: align, getPopupContainer: getTooltipContainer, onPopupVisibleChange: onVisibleChange, afterPopupVisibleChange: afterVisibleChange, popupTransitionName: transitionName, popupAnimation: animation, defaultPopupVisible: defaultVisible, destroyPopupOnHide: destroyTooltipOnHide, mouseLeaveDelay: mouseLeaveDelay, popupStyle: overlayStyle, mouseEnterDelay: mouseEnterDelay }, extraProps), children); }; /* harmony default export */ __webpack_exports__["default"] = (Object(react__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(Tooltip)); /***/ }), /***/ "./node_modules/rc-tooltip/es/index.js": /*!*********************************************!*\ !*** ./node_modules/rc-tooltip/es/index.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Tooltip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tooltip */ "./node_modules/rc-tooltip/es/Tooltip.js"); /* harmony default export */ __webpack_exports__["default"] = (_Tooltip__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./node_modules/rc-tooltip/es/placements.js": /*!**************************************************!*\ !*** ./node_modules/rc-tooltip/es/placements.js ***! \**************************************************/ /*! exports provided: placements, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "placements", function() { return placements; }); var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var targetOffset = [0, 0]; var placements = { left: { points: ['cr', 'cl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset }, right: { points: ['cl', 'cr'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, top: { points: ['bc', 'tc'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, bottom: { points: ['tc', 'bc'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, leftTop: { points: ['tr', 'tl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset }, topRight: { points: ['br', 'tr'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, rightTop: { points: ['tl', 'tr'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, bottomRight: { points: ['tr', 'br'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, rightBottom: { points: ['bl', 'br'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, leftBottom: { points: ['br', 'bl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset } }; /* harmony default export */ __webpack_exports__["default"] = (placements); /***/ }), /***/ "./node_modules/rc-trigger/es/Popup.js": /*!*********************************************!*\ !*** ./node_modules/rc-trigger/es/Popup.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raf */ "./node_modules/raf/index.js"); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_align__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-align */ "./node_modules/rc-align/es/index.js"); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_animate_es_CSSMotion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-animate/es/CSSMotion */ "./node_modules/rc-animate/es/CSSMotion.js"); /* harmony import */ var _PopupInner__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./PopupInner */ "./node_modules/rc-trigger/es/PopupInner.js"); /* harmony import */ var _utils_legacyUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/legacyUtil */ "./node_modules/rc-trigger/es/utils/legacyUtil.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /* eslint-disable no-param-reassign */ var CSSMotion = rc_animate_es_CSSMotion__WEBPACK_IMPORTED_MODULE_5__["default"]; function supportMotion(motion) { return motion && motion.motionName; } var Popup = /*#__PURE__*/ function (_Component) { _inherits(Popup, _Component); function Popup() { var _this; _classCallCheck(this, Popup); _this = _possibleConstructorReturn(this, _getPrototypeOf(Popup).apply(this, arguments)); _this.state = { targetWidth: undefined, targetHeight: undefined, status: null, prevVisible: null, alignClassName: null }; _this.popupRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.createRef(); _this.alignRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.createRef(); _this.nextFrameState = null; _this.nextFrameId = null; _this.onAlign = function (popupDomNode, align) { var status = _this.state.status; var _this$props = _this.props, getClassNameFromAlign = _this$props.getClassNameFromAlign, onAlign = _this$props.onAlign; var alignClassName = getClassNameFromAlign(align); if (status === 'align') { _this.setState({ alignClassName: alignClassName, status: 'aligned' }, function () { _this.alignRef.current.forceAlign(); }); } else if (status === 'aligned') { _this.setState({ alignClassName: alignClassName, status: 'afterAlign' }); onAlign(popupDomNode, align); } else { _this.setState({ alignClassName: alignClassName }); } }; _this.onMotionEnd = function () { var visible = _this.props.visible; _this.setState({ status: visible ? 'AfterMotion' : 'stable' }); }; _this.setStateOnNextFrame = function (state) { _this.cancelFrameState(); _this.nextFrameState = _objectSpread({}, _this.nextFrameState, {}, state); _this.nextFrameId = raf__WEBPACK_IMPORTED_MODULE_1___default()(function () { var submitState = _objectSpread({}, _this.nextFrameState); _this.nextFrameState = null; _this.setState(submitState); }); }; _this.getMotion = function () { return _objectSpread({}, Object(_utils_legacyUtil__WEBPACK_IMPORTED_MODULE_7__["getMotion"])(_this.props)); }; // `target` on `rc-align` can accept as a function to get the bind element or a point. // ref: https://www.npmjs.com/package/rc-align _this.getAlignTarget = function () { var _this$props2 = _this.props, point = _this$props2.point, getRootDomNode = _this$props2.getRootDomNode; if (point) { return point; } return getRootDomNode; }; _this.cancelFrameState = function () { raf__WEBPACK_IMPORTED_MODULE_1___default.a.cancel(_this.nextFrameId); }; _this.renderPopupElement = function () { var _this$state = _this.state, status = _this$state.status, targetHeight = _this$state.targetHeight, targetWidth = _this$state.targetWidth, alignClassName = _this$state.alignClassName; var _this$props3 = _this.props, prefixCls = _this$props3.prefixCls, className = _this$props3.className, style = _this$props3.style, stretch = _this$props3.stretch, visible = _this$props3.visible, align = _this$props3.align, destroyPopupOnHide = _this$props3.destroyPopupOnHide, onMouseEnter = _this$props3.onMouseEnter, onMouseLeave = _this$props3.onMouseLeave, onMouseDown = _this$props3.onMouseDown, onTouchStart = _this$props3.onTouchStart, children = _this$props3.children; var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, className, alignClassName); var hiddenClassName = "".concat(prefixCls, "-hidden"); // ================== Style ================== var sizeStyle = {}; if (stretch) { // Stretch with target if (stretch.indexOf('height') !== -1) { sizeStyle.height = targetHeight; } else if (stretch.indexOf('minHeight') !== -1) { sizeStyle.minHeight = targetHeight; } if (stretch.indexOf('width') !== -1) { sizeStyle.width = targetWidth; } else if (stretch.indexOf('minWidth') !== -1) { sizeStyle.minWidth = targetWidth; } } var mergedStyle = _objectSpread({}, sizeStyle, {}, style, {}, _this.getZIndexStyle(), { opacity: status === 'stable' || !visible ? undefined : 0 }); // ================= Motions ================= var mergedMotion = _this.getMotion(); var mergedMotionVisible = visible; if (visible && status !== 'beforeMotion' && status !== 'motion' && status !== 'stable') { mergedMotion.motionAppear = false; mergedMotion.motionEnter = false; mergedMotion.motionLeave = false; } if (status === 'afterAlign' || status === 'beforeMotion') { mergedMotionVisible = false; } // ================== Align ================== var mergedAlignDisabled = !visible || status !== 'align' && status !== 'aligned' && status !== 'stable'; // ================== Popup ================== var mergedPopupVisible = true; if (status === 'stable') { mergedPopupVisible = visible; } // Only remove popup since mask may still need animation if (destroyPopupOnHide && !mergedPopupVisible) { return null; } return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CSSMotion, Object.assign({ visible: mergedMotionVisible }, mergedMotion, { removeOnLeave: false, onEnterEnd: _this.onMotionEnd, onLeaveEnd: _this.onMotionEnd }), function (_ref, motionRef) { var motionStyle = _ref.style, motionClassName = _ref.className; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(rc_align__WEBPACK_IMPORTED_MODULE_2__["default"], { target: _this.getAlignTarget(), key: "popup", ref: _this.alignRef, monitorWindowResize: true, disabled: mergedAlignDisabled, align: align, onAlign: _this.onAlign }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PopupInner__WEBPACK_IMPORTED_MODULE_6__["default"], { prefixCls: prefixCls, visible: mergedPopupVisible, hiddenClassName: hiddenClassName, className: classnames__WEBPACK_IMPORTED_MODULE_4___default()(mergedClassName, motionClassName), ref: Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_3__["composeRef"])(motionRef, _this.popupRef), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onTouchStart: onTouchStart, style: _objectSpread({}, mergedStyle, {}, motionStyle) }, children)); }); }; _this.renderMaskElement = function () { var _this$props4 = _this.props, mask = _this$props4.mask, maskMotion = _this$props4.maskMotion, maskTransitionName = _this$props4.maskTransitionName, maskAnimation = _this$props4.maskAnimation, prefixCls = _this$props4.prefixCls, visible = _this$props4.visible; if (!mask) { return null; } var motion = {}; if (maskMotion && maskMotion.motionName) { motion = _objectSpread({ motionAppear: true }, Object(_utils_legacyUtil__WEBPACK_IMPORTED_MODULE_7__["getMotion"])({ motion: maskMotion, prefixCls: prefixCls, transitionName: maskTransitionName, animation: maskAnimation })); } return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CSSMotion, Object.assign({}, motion, { visible: visible, removeOnLeave: true }), function (_ref2) { var className = _ref2.className; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: _this.getZIndexStyle(), key: "mask", className: classnames__WEBPACK_IMPORTED_MODULE_4___default()("".concat(prefixCls, "-mask"), className) }); }); }; return _this; } _createClass(Popup, [{ key: "componentDidMount", value: function componentDidMount() { this.componentDidUpdate(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { var status = this.state.status; var _this$props5 = this.props, getRootDomNode = _this$props5.getRootDomNode, visible = _this$props5.visible, stretch = _this$props5.stretch; if (visible && status !== 'stable') { switch (status) { case null: { this.setStateOnNextFrame({ status: stretch ? 'measure' : 'align' }); break; } case 'afterAlign': { this.setStateOnNextFrame({ status: supportMotion(this.getMotion()) ? 'beforeMotion' : 'stable' }); break; } case 'AfterMotion': { this.setStateOnNextFrame({ status: 'stable' }); break; } default: { // Go to next status var queue = ['measure', 'align', null, 'beforeMotion', 'motion']; var index = queue.indexOf(status); var nextStatus = queue[index + 1]; if (index !== -1 && nextStatus) { this.setStateOnNextFrame({ status: nextStatus }); } } } } // Measure stretch size if (status === 'measure') { var $ele = getRootDomNode(); if ($ele) { this.setStateOnNextFrame({ targetHeight: $ele.offsetHeight, targetWidth: $ele.offsetWidth }); } } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.cancelFrameState(); } }, { key: "getZIndexStyle", value: function getZIndexStyle() { var zIndex = this.props.zIndex; return { zIndex: zIndex }; } }, { key: "render", value: function render() { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, this.renderMaskElement(), this.renderPopupElement()); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(_ref3, _ref4) { var visible = _ref3.visible, props = _objectWithoutProperties(_ref3, ["visible"]); var prevVisible = _ref4.prevVisible, status = _ref4.status; var newState = { prevVisible: visible, status: status }; var mergedMotion = Object(_utils_legacyUtil__WEBPACK_IMPORTED_MODULE_7__["getMotion"])(props); if (prevVisible === null && visible === false) { // Init render should always be stable newState.status = 'stable'; } else if (visible !== prevVisible) { newState.status = visible || supportMotion(mergedMotion) ? null : 'stable'; if (visible) { newState.alignClassName = null; } } return newState; } }]); return Popup; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Popup); /* eslint-enable */ /***/ }), /***/ "./node_modules/rc-trigger/es/PopupInner.js": /*!**************************************************!*\ !*** ./node_modules/rc-trigger/es/PopupInner.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); var PopupInner = function PopupInner(props, ref) { var prefixCls = props.prefixCls, className = props.className, visible = props.visible, style = props.style, children = props.children, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, onMouseDown = props.onMouseDown, onTouchStart = props.onTouchStart; var childNode = children; if (react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.count(children) > 1) { childNode = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "".concat(prefixCls, "-content") }, children); } return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { ref: ref, className: classnames__WEBPACK_IMPORTED_MODULE_1___default()(className, !visible && "".concat(props.hiddenClassName)), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onTouchStart: onTouchStart, style: style }, childNode); }; var RefPopupInner = react__WEBPACK_IMPORTED_MODULE_0___default.a.forwardRef(PopupInner); RefPopupInner.displayName = 'PopupInner'; /* harmony default export */ __webpack_exports__["default"] = (RefPopupInner); /***/ }), /***/ "./node_modules/rc-trigger/es/context.js": /*!***********************************************!*\ !*** ./node_modules/rc-trigger/es/context.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var TriggerContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(null); /* harmony default export */ __webpack_exports__["default"] = (TriggerContext); /***/ }), /***/ "./node_modules/rc-trigger/es/index.js": /*!*********************************************!*\ !*** ./node_modules/rc-trigger/es/index.js ***! \*********************************************/ /*! exports provided: generateTrigger, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateTrigger", function() { return generateTrigger; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/Dom/contains */ "./node_modules/rc-util/es/Dom/contains.js"); /* harmony import */ var rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/Dom/findDOMNode */ "./node_modules/rc-util/es/Dom/findDOMNode.js"); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ "./node_modules/rc-util/es/Dom/addEventListener.js"); /* harmony import */ var rc_util_es_Portal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/Portal */ "./node_modules/rc-util/es/Portal.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _utils_alignUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/alignUtil */ "./node_modules/rc-trigger/es/utils/alignUtil.js"); /* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Popup */ "./node_modules/rc-trigger/es/Popup.js"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./context */ "./node_modules/rc-trigger/es/context.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function noop() {} function returnEmptyString() { return ''; } function returnDocument() { return window.document; } var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu']; /** * Internal usage. Do not use in your code since this will be removed. */ function generateTrigger(PortalComponent) { var Trigger = /*#__PURE__*/ function (_React$Component) { _inherits(Trigger, _React$Component); function Trigger(props) { var _this; _classCallCheck(this, Trigger); _this = _possibleConstructorReturn(this, _getPrototypeOf(Trigger).call(this, props)); _this.popupRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.createRef(); _this.triggerRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.createRef(); _this.onMouseEnter = function (e) { var mouseEnterDelay = _this.props.mouseEnterDelay; _this.fireEvents('onMouseEnter', e); _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e); }; _this.onMouseMove = function (e) { _this.fireEvents('onMouseMove', e); _this.setPoint(e); }; _this.onMouseLeave = function (e) { _this.fireEvents('onMouseLeave', e); _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay); }; _this.onPopupMouseEnter = function () { _this.clearDelayTimer(); }; _this.onPopupMouseLeave = function (e) { // https://github.com/react-component/trigger/pull/13 // react bug? if (e.relatedTarget && !e.relatedTarget.setTimeout && _this.popupRef.current && _this.popupRef.current.popupRef.current && Object(rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_2__["default"])(_this.popupRef.current.popupRef.current, e.relatedTarget)) { return; } _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay); }; _this.onFocus = function (e) { _this.fireEvents('onFocus', e); // incase focusin and focusout _this.clearDelayTimer(); if (_this.isFocusToShow()) { _this.focusTime = Date.now(); _this.delaySetPopupVisible(true, _this.props.focusDelay); } }; _this.onMouseDown = function (e) { _this.fireEvents('onMouseDown', e); _this.preClickTime = Date.now(); }; _this.onTouchStart = function (e) { _this.fireEvents('onTouchStart', e); _this.preTouchTime = Date.now(); }; _this.onBlur = function (e) { _this.fireEvents('onBlur', e); _this.clearDelayTimer(); if (_this.isBlurToHide()) { _this.delaySetPopupVisible(false, _this.props.blurDelay); } }; _this.onContextMenu = function (e) { e.preventDefault(); _this.fireEvents('onContextMenu', e); _this.setPopupVisible(true, e); }; _this.onContextMenuClose = function () { if (_this.isContextMenuToShow()) { _this.close(); } }; _this.onClick = function (event) { _this.fireEvents('onClick', event); // focus will trigger click if (_this.focusTime) { var preTime; if (_this.preClickTime && _this.preTouchTime) { preTime = Math.min(_this.preClickTime, _this.preTouchTime); } else if (_this.preClickTime) { preTime = _this.preClickTime; } else if (_this.preTouchTime) { preTime = _this.preTouchTime; } if (Math.abs(preTime - _this.focusTime) < 20) { return; } _this.focusTime = 0; } _this.preClickTime = 0; _this.preTouchTime = 0; // Only prevent default when all the action is click. // https://github.com/ant-design/ant-design/issues/17043 // https://github.com/ant-design/ant-design/issues/17291 if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) { event.preventDefault(); } var nextVisible = !_this.state.popupVisible; if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) { _this.setPopupVisible(!_this.state.popupVisible, event); } }; _this.onPopupMouseDown = function () { _this.hasPopupMouseDown = true; clearTimeout(_this.mouseDownTimeout); _this.mouseDownTimeout = window.setTimeout(function () { _this.hasPopupMouseDown = false; }, 0); if (_this.context) { var _this$context; (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments); } }; _this.onDocumentClick = function (event) { if (_this.props.mask && !_this.props.maskClosable) { return; } var target = event.target; var root = _this.getRootDomNode(); var popupNode = _this.getPopupDomNode(); if (!Object(rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_2__["default"])(root, target) && !Object(rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_2__["default"])(popupNode, target) && !_this.hasPopupMouseDown) { _this.close(); } }; _this.getRootDomNode = function () { var getTriggerDOMNode = _this.props.getTriggerDOMNode; if (getTriggerDOMNode) { return getTriggerDOMNode(_this.triggerRef.current); } try { var domNode = Object(rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_3__["default"])(_this.triggerRef.current); if (domNode) { return domNode; } } catch (err) {// Do nothing } return react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.findDOMNode(_assertThisInitialized(_this)); }; _this.getPopupClassNameFromAlign = function (align) { var className = []; var _this$props = _this.props, popupPlacement = _this$props.popupPlacement, builtinPlacements = _this$props.builtinPlacements, prefixCls = _this$props.prefixCls, alignPoint = _this$props.alignPoint, getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign; if (popupPlacement && builtinPlacements) { className.push(Object(_utils_alignUtil__WEBPACK_IMPORTED_MODULE_8__["getAlignPopupClassName"])(builtinPlacements, prefixCls, align, alignPoint)); } if (getPopupClassNameFromAlign) { className.push(getPopupClassNameFromAlign(align)); } return className.join(' '); }; _this.getComponent = function () { var _this$props2 = _this.props, prefixCls = _this$props2.prefixCls, destroyPopupOnHide = _this$props2.destroyPopupOnHide, popupClassName = _this$props2.popupClassName, onPopupAlign = _this$props2.onPopupAlign, popupMotion = _this$props2.popupMotion, popupAnimation = _this$props2.popupAnimation, popupTransitionName = _this$props2.popupTransitionName, popupStyle = _this$props2.popupStyle, mask = _this$props2.mask, maskAnimation = _this$props2.maskAnimation, maskTransitionName = _this$props2.maskTransitionName, maskMotion = _this$props2.maskMotion, zIndex = _this$props2.zIndex, popup = _this$props2.popup, stretch = _this$props2.stretch, alignPoint = _this$props2.alignPoint; var _this$state = _this.state, popupVisible = _this$state.popupVisible, point = _this$state.point; var align = _this.getPopupAlign(); var mouseProps = {}; if (_this.isMouseEnterToShow()) { mouseProps.onMouseEnter = _this.onPopupMouseEnter; } if (_this.isMouseLeaveToHide()) { mouseProps.onMouseLeave = _this.onPopupMouseLeave; } mouseProps.onMouseDown = _this.onPopupMouseDown; mouseProps.onTouchStart = _this.onPopupMouseDown; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Popup__WEBPACK_IMPORTED_MODULE_9__["default"], Object.assign({ prefixCls: prefixCls, destroyPopupOnHide: destroyPopupOnHide, visible: popupVisible, point: alignPoint && point, className: popupClassName, align: align, onAlign: onPopupAlign, animation: popupAnimation, getClassNameFromAlign: _this.getPopupClassNameFromAlign }, mouseProps, { stretch: stretch, getRootDomNode: _this.getRootDomNode, style: popupStyle, mask: mask, zIndex: zIndex, transitionName: popupTransitionName, maskAnimation: maskAnimation, maskTransitionName: maskTransitionName, maskMotion: maskMotion, ref: _this.popupRef, motion: popupMotion }), typeof popup === 'function' ? popup() : popup); }; _this.getContainer = function () { var _assertThisInitialize = _assertThisInitialized(_this), props = _assertThisInitialize.props; var popupContainer = document.createElement('div'); // Make sure default popup container will never cause scrollbar appearing // https://github.com/react-component/trigger/issues/41 popupContainer.style.position = 'absolute'; popupContainer.style.top = '0'; popupContainer.style.left = '0'; popupContainer.style.width = '100%'; var mountNode = props.getPopupContainer ? props.getPopupContainer(_this.getRootDomNode()) : props.getDocument().body; mountNode.appendChild(popupContainer); return popupContainer; }; _this.setPoint = function (point) { var alignPoint = _this.props.alignPoint; if (!alignPoint || !point) return; _this.setState({ point: { pageX: point.pageX, pageY: point.pageY } }); }; _this.handlePortalUpdate = function () { if (_this.state.prevPopupVisible !== _this.state.popupVisible) { _this.props.afterPopupVisibleChange(_this.state.popupVisible); } }; var popupVisible; if ('popupVisible' in props) { popupVisible = !!props.popupVisible; } else { popupVisible = !!props.defaultPopupVisible; } _this.state = { prevPopupVisible: popupVisible, popupVisible: popupVisible }; ALL_HANDLERS.forEach(function (h) { _this["fire".concat(h)] = function (e) { _this.fireEvents(h, e); }; }); return _this; } _createClass(Trigger, [{ key: "componentDidMount", value: function componentDidMount() { this.componentDidUpdate(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { var props = this.props; var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case: // https://github.com/ant-design/ant-design/issues/5804 // https://github.com/react-component/calendar/issues/250 // https://github.com/react-component/trigger/issues/50 if (state.popupVisible) { var currentDocument; if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) { currentDocument = props.getDocument(); this.clickOutsideHandler = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_5__["default"])(currentDocument, 'mousedown', this.onDocumentClick); } // always hide on mobile if (!this.touchOutsideHandler) { currentDocument = currentDocument || props.getDocument(); this.touchOutsideHandler = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_5__["default"])(currentDocument, 'touchstart', this.onDocumentClick); } // close popup when trigger type contains 'onContextMenu' and document is scrolling. if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) { currentDocument = currentDocument || props.getDocument(); this.contextMenuOutsideHandler1 = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_5__["default"])(currentDocument, 'scroll', this.onContextMenuClose); } // close popup when trigger type contains 'onContextMenu' and window is blur. if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) { this.contextMenuOutsideHandler2 = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_5__["default"])(window, 'blur', this.onContextMenuClose); } return; } this.clearOutsideHandler(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.clearDelayTimer(); this.clearOutsideHandler(); clearTimeout(this.mouseDownTimeout); } }, { key: "getPopupDomNode", value: function getPopupDomNode() { // for test if (this.popupRef.current && this.popupRef.current.popupRef.current) { return this.popupRef.current.popupRef.current; } return null; } }, { key: "getPopupAlign", value: function getPopupAlign() { var props = this.props; var popupPlacement = props.popupPlacement, popupAlign = props.popupAlign, builtinPlacements = props.builtinPlacements; if (popupPlacement && builtinPlacements) { return Object(_utils_alignUtil__WEBPACK_IMPORTED_MODULE_8__["getAlignFromPlacement"])(builtinPlacements, popupPlacement, popupAlign); } return popupAlign; } /** * @param popupVisible Show or not the popup element * @param event SyntheticEvent, used for `pointAlign` */ }, { key: "setPopupVisible", value: function setPopupVisible(popupVisible, event) { var alignPoint = this.props.alignPoint; var prevPopupVisible = this.state.popupVisible; this.clearDelayTimer(); if (prevPopupVisible !== popupVisible) { if (!('popupVisible' in this.props)) { this.setState({ popupVisible: popupVisible, prevPopupVisible: prevPopupVisible }); } this.props.onPopupVisibleChange(popupVisible); } // Always record the point position since mouseEnterDelay will delay the show if (alignPoint && event) { this.setPoint(event); } } }, { key: "delaySetPopupVisible", value: function delaySetPopupVisible(visible, delayS, event) { var _this2 = this; var delay = delayS * 1000; this.clearDelayTimer(); if (delay) { var point = event ? { pageX: event.pageX, pageY: event.pageY } : null; this.delayTimer = window.setTimeout(function () { _this2.setPopupVisible(visible, point); _this2.clearDelayTimer(); }, delay); } else { this.setPopupVisible(visible, event); } } }, { key: "clearDelayTimer", value: function clearDelayTimer() { if (this.delayTimer) { clearTimeout(this.delayTimer); this.delayTimer = null; } } }, { key: "clearOutsideHandler", value: function clearOutsideHandler() { if (this.clickOutsideHandler) { this.clickOutsideHandler.remove(); this.clickOutsideHandler = null; } if (this.contextMenuOutsideHandler1) { this.contextMenuOutsideHandler1.remove(); this.contextMenuOutsideHandler1 = null; } if (this.contextMenuOutsideHandler2) { this.contextMenuOutsideHandler2.remove(); this.contextMenuOutsideHandler2 = null; } if (this.touchOutsideHandler) { this.touchOutsideHandler.remove(); this.touchOutsideHandler = null; } } }, { key: "createTwoChains", value: function createTwoChains(event) { var childPros = this.props.children.props; var props = this.props; if (childPros[event] && props[event]) { return this["fire".concat(event)]; } return childPros[event] || props[event]; } }, { key: "isClickToShow", value: function isClickToShow() { var _this$props3 = this.props, action = _this$props3.action, showAction = _this$props3.showAction; return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1; } }, { key: "isContextMenuToShow", value: function isContextMenuToShow() { var _this$props4 = this.props, action = _this$props4.action, showAction = _this$props4.showAction; return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1; } }, { key: "isClickToHide", value: function isClickToHide() { var _this$props5 = this.props, action = _this$props5.action, hideAction = _this$props5.hideAction; return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1; } }, { key: "isMouseEnterToShow", value: function isMouseEnterToShow() { var _this$props6 = this.props, action = _this$props6.action, showAction = _this$props6.showAction; return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1; } }, { key: "isMouseLeaveToHide", value: function isMouseLeaveToHide() { var _this$props7 = this.props, action = _this$props7.action, hideAction = _this$props7.hideAction; return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1; } }, { key: "isFocusToShow", value: function isFocusToShow() { var _this$props8 = this.props, action = _this$props8.action, showAction = _this$props8.showAction; return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1; } }, { key: "isBlurToHide", value: function isBlurToHide() { var _this$props9 = this.props, action = _this$props9.action, hideAction = _this$props9.hideAction; return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1; } }, { key: "forcePopupAlign", value: function forcePopupAlign() { if (this.state.popupVisible && this.popupRef.current && this.popupRef.current.alignRef.current) { this.popupRef.current.alignRef.current.forceAlign(); } } }, { key: "fireEvents", value: function fireEvents(type, e) { var childCallback = this.props.children.props[type]; if (childCallback) { childCallback(e); } var callback = this.props[type]; if (callback) { callback(e); } } }, { key: "close", value: function close() { this.setPopupVisible(false); } }, { key: "render", value: function render() { var popupVisible = this.state.popupVisible; var _this$props10 = this.props, children = _this$props10.children, forceRender = _this$props10.forceRender, alignPoint = _this$props10.alignPoint, className = _this$props10.className; var child = react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.only(children); var newChildProps = { key: 'trigger' }; if (this.isContextMenuToShow()) { newChildProps.onContextMenu = this.onContextMenu; } else { newChildProps.onContextMenu = this.createTwoChains('onContextMenu'); } if (this.isClickToHide() || this.isClickToShow()) { newChildProps.onClick = this.onClick; newChildProps.onMouseDown = this.onMouseDown; newChildProps.onTouchStart = this.onTouchStart; } else { newChildProps.onClick = this.createTwoChains('onClick'); newChildProps.onMouseDown = this.createTwoChains('onMouseDown'); newChildProps.onTouchStart = this.createTwoChains('onTouchStart'); } if (this.isMouseEnterToShow()) { newChildProps.onMouseEnter = this.onMouseEnter; if (alignPoint) { newChildProps.onMouseMove = this.onMouseMove; } } else { newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter'); } if (this.isMouseLeaveToHide()) { newChildProps.onMouseLeave = this.onMouseLeave; } else { newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave'); } if (this.isFocusToShow() || this.isBlurToHide()) { newChildProps.onFocus = this.onFocus; newChildProps.onBlur = this.onBlur; } else { newChildProps.onFocus = this.createTwoChains('onFocus'); newChildProps.onBlur = this.createTwoChains('onBlur'); } var childrenClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(child && child.props && child.props.className, className); if (childrenClassName) { newChildProps.className = childrenClassName; } var trigger = react__WEBPACK_IMPORTED_MODULE_0___default.a.cloneElement(child, _objectSpread({}, newChildProps, { ref: Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_4__["composeRef"])(this.triggerRef, child.ref) })); var portal; // prevent unmounting after it's rendered if (popupVisible || this.popupRef.current || forceRender) { portal = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(PortalComponent, { key: "portal", getContainer: this.getContainer, didUpdate: this.handlePortalUpdate }, this.getComponent()); } return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_context__WEBPACK_IMPORTED_MODULE_10__["default"].Provider, { value: { onPopupMouseDown: this.onPopupMouseDown } }, trigger, portal); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(_ref, prevState) { var popupVisible = _ref.popupVisible; var newState = {}; if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) { newState.popupVisible = popupVisible; newState.prevPopupVisible = prevState.popupVisible; } return newState; } }]); return Trigger; }(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component); Trigger.contextType = _context__WEBPACK_IMPORTED_MODULE_10__["default"]; Trigger.defaultProps = { prefixCls: 'rc-trigger-popup', getPopupClassNameFromAlign: returnEmptyString, getDocument: returnDocument, onPopupVisibleChange: noop, afterPopupVisibleChange: noop, onPopupAlign: noop, popupClassName: '', mouseEnterDelay: 0, mouseLeaveDelay: 0.1, focusDelay: 0, blurDelay: 0.15, popupStyle: {}, destroyPopupOnHide: false, popupAlign: {}, defaultPopupVisible: false, mask: false, maskClosable: true, action: [], showAction: [], hideAction: [] }; return Trigger; } /* harmony default export */ __webpack_exports__["default"] = (generateTrigger(rc_util_es_Portal__WEBPACK_IMPORTED_MODULE_6__["default"])); /***/ }), /***/ "./node_modules/rc-trigger/es/utils/alignUtil.js": /*!*******************************************************!*\ !*** ./node_modules/rc-trigger/es/utils/alignUtil.js ***! \*******************************************************/ /*! exports provided: getAlignFromPlacement, getAlignPopupClassName */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAlignFromPlacement", function() { return getAlignFromPlacement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAlignPopupClassName", function() { return getAlignPopupClassName; }); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function isPointsEq(a1, a2, isAlignPoint) { if (isAlignPoint) { return a1[0] === a2[0]; } return a1[0] === a2[0] && a1[1] === a2[1]; } function getAlignFromPlacement(builtinPlacements, placementStr, align) { var baseAlign = builtinPlacements[placementStr] || {}; return _objectSpread({}, baseAlign, {}, align); } function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) { var points = align.points; var placements = Object.keys(builtinPlacements); for (var i = 0; i < placements.length; i += 1) { var placement = placements[i]; if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) { return "".concat(prefixCls, "-placement-").concat(placement); } } return ''; } /***/ }), /***/ "./node_modules/rc-trigger/es/utils/legacyUtil.js": /*!********************************************************!*\ !*** ./node_modules/rc-trigger/es/utils/legacyUtil.js ***! \********************************************************/ /*! exports provided: getMotion */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMotion", function() { return getMotion; }); function getMotion(_ref) { var prefixCls = _ref.prefixCls, motion = _ref.motion, animation = _ref.animation, transitionName = _ref.transitionName; if (motion) { return motion; } if (animation) { return { motionName: "".concat(prefixCls, "-").concat(animation) }; } if (transitionName) { return { motionName: transitionName }; } return null; } /***/ }), /***/ "./node_modules/rc-util/es/Dom/addEventListener.js": /*!*********************************************************!*\ !*** ./node_modules/rc-util/es/Dom/addEventListener.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addEventListenerWrap; }); /* harmony import */ var add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! add-dom-event-listener */ "./node_modules/add-dom-event-listener/lib/index.js"); /* harmony import */ var add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); function addEventListenerWrap(target, eventType, cb, option) { /* eslint camelcase: 2 */ var callback = react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.unstable_batchedUpdates ? function run(e) { react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.unstable_batchedUpdates(cb, e); } : cb; return add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0___default()(target, eventType, callback, option); } /***/ }), /***/ "./node_modules/rc-util/es/Dom/contains.js": /*!*************************************************!*\ !*** ./node_modules/rc-util/es/Dom/contains.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return contains; }); function contains(root, n) { var node = n; while (node) { if (node === root) { return true; } node = node.parentNode; } return false; } /***/ }), /***/ "./node_modules/rc-util/es/Dom/findDOMNode.js": /*!****************************************************!*\ !*** ./node_modules/rc-util/es/Dom/findDOMNode.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return findDOMNode; }); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__); /** * Return if a node is a DOM node. Else will return by `findDOMNode` */ function findDOMNode(node) { if (node instanceof HTMLElement) { return node; } return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node); } /***/ }), /***/ "./node_modules/rc-util/es/KeyCode.js": /*!********************************************!*\ !*** ./node_modules/rc-util/es/KeyCode.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * @ignore * some key-codes definition and utils from closure-library * @author yiminghe@gmail.com */ var KeyCode = { /** * MAC_ENTER */ MAC_ENTER: 3, /** * BACKSPACE */ BACKSPACE: 8, /** * TAB */ TAB: 9, /** * NUMLOCK on FF/Safari Mac */ NUM_CENTER: 12, /** * ENTER */ ENTER: 13, /** * SHIFT */ SHIFT: 16, /** * CTRL */ CTRL: 17, /** * ALT */ ALT: 18, /** * PAUSE */ PAUSE: 19, /** * CAPS_LOCK */ CAPS_LOCK: 20, /** * ESC */ ESC: 27, /** * SPACE */ SPACE: 32, /** * PAGE_UP */ PAGE_UP: 33, /** * PAGE_DOWN */ PAGE_DOWN: 34, /** * END */ END: 35, /** * HOME */ HOME: 36, /** * LEFT */ LEFT: 37, /** * UP */ UP: 38, /** * RIGHT */ RIGHT: 39, /** * DOWN */ DOWN: 40, /** * PRINT_SCREEN */ PRINT_SCREEN: 44, /** * INSERT */ INSERT: 45, /** * DELETE */ DELETE: 46, /** * ZERO */ ZERO: 48, /** * ONE */ ONE: 49, /** * TWO */ TWO: 50, /** * THREE */ THREE: 51, /** * FOUR */ FOUR: 52, /** * FIVE */ FIVE: 53, /** * SIX */ SIX: 54, /** * SEVEN */ SEVEN: 55, /** * EIGHT */ EIGHT: 56, /** * NINE */ NINE: 57, /** * QUESTION_MARK */ QUESTION_MARK: 63, /** * A */ A: 65, /** * B */ B: 66, /** * C */ C: 67, /** * D */ D: 68, /** * E */ E: 69, /** * F */ F: 70, /** * G */ G: 71, /** * H */ H: 72, /** * I */ I: 73, /** * J */ J: 74, /** * K */ K: 75, /** * L */ L: 76, /** * M */ M: 77, /** * N */ N: 78, /** * O */ O: 79, /** * P */ P: 80, /** * Q */ Q: 81, /** * R */ R: 82, /** * S */ S: 83, /** * T */ T: 84, /** * U */ U: 85, /** * V */ V: 86, /** * W */ W: 87, /** * X */ X: 88, /** * Y */ Y: 89, /** * Z */ Z: 90, /** * META */ META: 91, /** * WIN_KEY_RIGHT */ WIN_KEY_RIGHT: 92, /** * CONTEXT_MENU */ CONTEXT_MENU: 93, /** * NUM_ZERO */ NUM_ZERO: 96, /** * NUM_ONE */ NUM_ONE: 97, /** * NUM_TWO */ NUM_TWO: 98, /** * NUM_THREE */ NUM_THREE: 99, /** * NUM_FOUR */ NUM_FOUR: 100, /** * NUM_FIVE */ NUM_FIVE: 101, /** * NUM_SIX */ NUM_SIX: 102, /** * NUM_SEVEN */ NUM_SEVEN: 103, /** * NUM_EIGHT */ NUM_EIGHT: 104, /** * NUM_NINE */ NUM_NINE: 105, /** * NUM_MULTIPLY */ NUM_MULTIPLY: 106, /** * NUM_PLUS */ NUM_PLUS: 107, /** * NUM_MINUS */ NUM_MINUS: 109, /** * NUM_PERIOD */ NUM_PERIOD: 110, /** * NUM_DIVISION */ NUM_DIVISION: 111, /** * F1 */ F1: 112, /** * F2 */ F2: 113, /** * F3 */ F3: 114, /** * F4 */ F4: 115, /** * F5 */ F5: 116, /** * F6 */ F6: 117, /** * F7 */ F7: 118, /** * F8 */ F8: 119, /** * F9 */ F9: 120, /** * F10 */ F10: 121, /** * F11 */ F11: 122, /** * F12 */ F12: 123, /** * NUMLOCK */ NUMLOCK: 144, /** * SEMICOLON */ SEMICOLON: 186, /** * DASH */ DASH: 189, /** * EQUALS */ EQUALS: 187, /** * COMMA */ COMMA: 188, /** * PERIOD */ PERIOD: 190, /** * SLASH */ SLASH: 191, /** * APOSTROPHE */ APOSTROPHE: 192, /** * SINGLE_QUOTE */ SINGLE_QUOTE: 222, /** * OPEN_SQUARE_BRACKET */ OPEN_SQUARE_BRACKET: 219, /** * BACKSLASH */ BACKSLASH: 220, /** * CLOSE_SQUARE_BRACKET */ CLOSE_SQUARE_BRACKET: 221, /** * WIN_KEY */ WIN_KEY: 224, /** * MAC_FF_META */ MAC_FF_META: 224, /** * WIN_IME */ WIN_IME: 229, // ======================== Function ======================== /** * whether text and modified key is entered at the same time. */ isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) { var keyCode = e.keyCode; if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) { return false; } // The following keys are quite harmless, even in combination with // CTRL, ALT or SHIFT. switch (keyCode) { case KeyCode.ALT: case KeyCode.CAPS_LOCK: case KeyCode.CONTEXT_MENU: case KeyCode.CTRL: case KeyCode.DOWN: case KeyCode.END: case KeyCode.ESC: case KeyCode.HOME: case KeyCode.INSERT: case KeyCode.LEFT: case KeyCode.MAC_FF_META: case KeyCode.META: case KeyCode.NUMLOCK: case KeyCode.NUM_CENTER: case KeyCode.PAGE_DOWN: case KeyCode.PAGE_UP: case KeyCode.PAUSE: case KeyCode.PRINT_SCREEN: case KeyCode.RIGHT: case KeyCode.SHIFT: case KeyCode.UP: case KeyCode.WIN_KEY: case KeyCode.WIN_KEY_RIGHT: return false; default: return true; } }, /** * whether character is entered. */ isCharacterKey: function isCharacterKey(keyCode) { if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) { return true; } if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) { return true; } if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) { return true; } // Safari sends zero key code for non-latin characters. if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) { return true; } switch (keyCode) { case KeyCode.SPACE: case KeyCode.QUESTION_MARK: case KeyCode.NUM_PLUS: case KeyCode.NUM_MINUS: case KeyCode.NUM_PERIOD: case KeyCode.NUM_DIVISION: case KeyCode.SEMICOLON: case KeyCode.DASH: case KeyCode.EQUALS: case KeyCode.COMMA: case KeyCode.PERIOD: case KeyCode.SLASH: case KeyCode.APOSTROPHE: case KeyCode.SINGLE_QUOTE: case KeyCode.OPEN_SQUARE_BRACKET: case KeyCode.BACKSLASH: case KeyCode.CLOSE_SQUARE_BRACKET: return true; default: return false; } } }; /* harmony default export */ __webpack_exports__["default"] = (KeyCode); /***/ }), /***/ "./node_modules/rc-util/es/Portal.js": /*!*******************************************!*\ !*** ./node_modules/rc-util/es/Portal.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Portal; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var Portal = /*#__PURE__*/ function (_React$Component) { _inherits(Portal, _React$Component); function Portal() { _classCallCheck(this, Portal); return _possibleConstructorReturn(this, _getPrototypeOf(Portal).apply(this, arguments)); } _createClass(Portal, [{ key: "componentDidMount", value: function componentDidMount() { this.createContainer(); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var didUpdate = this.props.didUpdate; if (didUpdate) { didUpdate(prevProps); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.removeContainer(); } }, { key: "createContainer", value: function createContainer() { this._container = this.props.getContainer(); this.forceUpdate(); } }, { key: "removeContainer", value: function removeContainer() { if (this._container) { this._container.parentNode.removeChild(this._container); } } }, { key: "render", value: function render() { if (this._container) { return react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.createPortal(this.props.children, this._container); } return null; } }]); return Portal; }(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component); Portal.propTypes = { getContainer: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func.isRequired, children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node.isRequired, didUpdate: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func }; /***/ }), /***/ "./node_modules/rc-util/es/ref.js": /*!****************************************!*\ !*** ./node_modules/rc-util/es/ref.js ***! \****************************************/ /*! exports provided: fillRef, composeRef, supportRef */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fillRef", function() { return fillRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "composeRef", function() { return composeRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportRef", function() { return supportRef; }); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function fillRef(ref, node) { if (typeof ref === 'function') { ref(node); } else if (_typeof(ref) === 'object' && ref && 'current' in ref) { ref.current = node; } } /** * Merge refs into one ref function to support ref passing. */ function composeRef() { for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) { refs[_key] = arguments[_key]; } return function (node) { refs.forEach(function (ref) { fillRef(ref, node); }); }; } function supportRef(nodeOrComponent) { // Function component node if (nodeOrComponent.type && nodeOrComponent.type.prototype && !nodeOrComponent.type.prototype.render) { return false; } // Class component if (typeof nodeOrComponent === 'function' && nodeOrComponent.prototype && !nodeOrComponent.prototype.render) { return false; } return true; } /* eslint-enable */ /***/ }), /***/ "./node_modules/react-is/cjs/react-is.development.js": /*!***********************************************************!*\ !*** ./node_modules/react-is/cjs/react-is.development.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @license React v16.8.6 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (true) { (function() { 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); // The Symbol used to tag the ReactElement-like types. If there is no native Symbol // nor polyfill, then a plain number is used for performance. var hasSymbol = typeof Symbol === 'function' && Symbol.for; var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; function isValidElementType(type) { return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE); } /** * Forked from fbjs/warning: * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js * * Only change is we use console.warn instead of console.error, * and do nothing when 'console' is not supported. * This really simplifies the code. * --- * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var lowPriorityWarning = function () {}; { var printWarning = function (format) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.warn(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; lowPriorityWarning = function (condition, format) { if (format === undefined) { throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (!condition) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } printWarning.apply(undefined, [format].concat(args)); } }; } var lowPriorityWarning$1 = lowPriorityWarning; function typeOf(object) { if (typeof object === 'object' && object !== null) { var $$typeof = object.$$typeof; switch ($$typeof) { case REACT_ELEMENT_TYPE: var type = object.type; switch (type) { case REACT_ASYNC_MODE_TYPE: case REACT_CONCURRENT_MODE_TYPE: case REACT_FRAGMENT_TYPE: case REACT_PROFILER_TYPE: case REACT_STRICT_MODE_TYPE: case REACT_SUSPENSE_TYPE: return type; default: var $$typeofType = type && type.$$typeof; switch ($$typeofType) { case REACT_CONTEXT_TYPE: case REACT_FORWARD_REF_TYPE: case REACT_PROVIDER_TYPE: return $$typeofType; default: return $$typeof; } } case REACT_LAZY_TYPE: case REACT_MEMO_TYPE: case REACT_PORTAL_TYPE: return $$typeof; } } return undefined; } // AsyncMode is deprecated along with isAsyncMode var AsyncMode = REACT_ASYNC_MODE_TYPE; var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; var ContextConsumer = REACT_CONTEXT_TYPE; var ContextProvider = REACT_PROVIDER_TYPE; var Element = REACT_ELEMENT_TYPE; var ForwardRef = REACT_FORWARD_REF_TYPE; var Fragment = REACT_FRAGMENT_TYPE; var Lazy = REACT_LAZY_TYPE; var Memo = REACT_MEMO_TYPE; var Portal = REACT_PORTAL_TYPE; var Profiler = REACT_PROFILER_TYPE; var StrictMode = REACT_STRICT_MODE_TYPE; var Suspense = REACT_SUSPENSE_TYPE; var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated function isAsyncMode(object) { { if (!hasWarnedAboutDeprecatedIsAsyncMode) { hasWarnedAboutDeprecatedIsAsyncMode = true; lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); } } return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; } function isConcurrentMode(object) { return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; } function isContextConsumer(object) { return typeOf(object) === REACT_CONTEXT_TYPE; } function isContextProvider(object) { return typeOf(object) === REACT_PROVIDER_TYPE; } function isElement(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } function isForwardRef(object) { return typeOf(object) === REACT_FORWARD_REF_TYPE; } function isFragment(object) { return typeOf(object) === REACT_FRAGMENT_TYPE; } function isLazy(object) { return typeOf(object) === REACT_LAZY_TYPE; } function isMemo(object) { return typeOf(object) === REACT_MEMO_TYPE; } function isPortal(object) { return typeOf(object) === REACT_PORTAL_TYPE; } function isProfiler(object) { return typeOf(object) === REACT_PROFILER_TYPE; } function isStrictMode(object) { return typeOf(object) === REACT_STRICT_MODE_TYPE; } function isSuspense(object) { return typeOf(object) === REACT_SUSPENSE_TYPE; } exports.typeOf = typeOf; exports.AsyncMode = AsyncMode; exports.ConcurrentMode = ConcurrentMode; exports.ContextConsumer = ContextConsumer; exports.ContextProvider = ContextProvider; exports.Element = Element; exports.ForwardRef = ForwardRef; exports.Fragment = Fragment; exports.Lazy = Lazy; exports.Memo = Memo; exports.Portal = Portal; exports.Profiler = Profiler; exports.StrictMode = StrictMode; exports.Suspense = Suspense; exports.isValidElementType = isValidElementType; exports.isAsyncMode = isAsyncMode; exports.isConcurrentMode = isConcurrentMode; exports.isContextConsumer = isContextConsumer; exports.isContextProvider = isContextProvider; exports.isElement = isElement; exports.isForwardRef = isForwardRef; exports.isFragment = isFragment; exports.isLazy = isLazy; exports.isMemo = isMemo; exports.isPortal = isPortal; exports.isProfiler = isProfiler; exports.isStrictMode = isStrictMode; exports.isSuspense = isSuspense; })(); } /***/ }), /***/ "./node_modules/react-is/index.js": /*!****************************************!*\ !*** ./node_modules/react-is/index.js ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; if (false) {} else { module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js"); } /***/ }), /***/ "./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js": /*!****************************************************************************!*\ !*** ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js ***! \****************************************************************************/ /*! exports provided: polyfill */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyfill", function() { return polyfill; }); /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ function componentWillMount() { // Call this.constructor.gDSFP to support sub-classes. var state = this.constructor.getDerivedStateFromProps(this.props, this.state); if (state !== null && state !== undefined) { this.setState(state); } } function componentWillReceiveProps(nextProps) { // Call this.constructor.gDSFP to support sub-classes. // Use the setState() updater to ensure state isn't stale in certain edge cases. function updater(prevState) { var state = this.constructor.getDerivedStateFromProps(nextProps, prevState); return state !== null && state !== undefined ? state : null; } // Binding "this" is important for shallow renderer support. this.setState(updater.bind(this)); } function componentWillUpdate(nextProps, nextState) { try { var prevProps = this.props; var prevState = this.state; this.props = nextProps; this.state = nextState; this.__reactInternalSnapshotFlag = true; this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate( prevProps, prevState ); } finally { this.props = prevProps; this.state = prevState; } } // React may warn about cWM/cWRP/cWU methods being deprecated. // Add a flag to suppress these warnings for this special case. componentWillMount.__suppressDeprecationWarning = true; componentWillReceiveProps.__suppressDeprecationWarning = true; componentWillUpdate.__suppressDeprecationWarning = true; function polyfill(Component) { var prototype = Component.prototype; if (!prototype || !prototype.isReactComponent) { throw new Error('Can only polyfill class components'); } if ( typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function' ) { return Component; } // If new component APIs are defined, "unsafe" lifecycles won't be called. // Error if any of these lifecycles are present, // Because they would work differently between older and newer (16.3+) versions of React. var foundWillMountName = null; var foundWillReceivePropsName = null; var foundWillUpdateName = null; if (typeof prototype.componentWillMount === 'function') { foundWillMountName = 'componentWillMount'; } else if (typeof prototype.UNSAFE_componentWillMount === 'function') { foundWillMountName = 'UNSAFE_componentWillMount'; } if (typeof prototype.componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'componentWillReceiveProps'; } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; } if (typeof prototype.componentWillUpdate === 'function') { foundWillUpdateName = 'componentWillUpdate'; } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') { foundWillUpdateName = 'UNSAFE_componentWillUpdate'; } if ( foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null ) { var componentName = Component.displayName || Component.name; var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()'; throw Error( 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks' ); } // React <= 16.2 does not support static getDerivedStateFromProps. // As a workaround, use cWM and cWRP to invoke the new static lifecycle. // Newer versions of React will ignore these lifecycles if gDSFP exists. if (typeof Component.getDerivedStateFromProps === 'function') { prototype.componentWillMount = componentWillMount; prototype.componentWillReceiveProps = componentWillReceiveProps; } // React <= 16.2 does not support getSnapshotBeforeUpdate. // As a workaround, use cWU to invoke the new lifecycle. // Newer versions of React will ignore that lifecycle if gSBU exists. if (typeof prototype.getSnapshotBeforeUpdate === 'function') { if (typeof prototype.componentDidUpdate !== 'function') { throw new Error( 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype' ); } prototype.componentWillUpdate = componentWillUpdate; var componentDidUpdate = prototype.componentDidUpdate; prototype.componentDidUpdate = function componentDidUpdatePolyfill( prevProps, prevState, maybeSnapshot ) { // 16.3+ will not execute our will-update method; // It will pass a snapshot value to did-update though. // Older versions will require our polyfilled will-update value. // We need to handle both cases, but can't just check for the presence of "maybeSnapshot", // Because for <= 15.x versions this might be a "prevContext" object. // We also can't just check "__reactInternalSnapshot", // Because get-snapshot might return a falsy value. // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior. var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot; componentDidUpdate.call(this, prevProps, prevState, snapshot); }; } return Component; } /***/ }), /***/ "./node_modules/react-numeric-input/index.js": /*!***************************************************!*\ !*** ./node_modules/react-numeric-input/index.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(2); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var KEYCODE_UP = 38; var KEYCODE_DOWN = 40; var IS_BROWSER = typeof document != 'undefined'; var RE_NUMBER = /^[+-]?((\.\d+)|(\d+(\.\d+)?))$/; var RE_INCOMPLETE_NUMBER = /^([+-]|\.0*|[+-]\.0*|[+-]?\d+\.)?$/; function addClass(element, className) { if (element.classList) { return element.classList.add(className); } if (!element.className.search(new RegExp("\\b" + className + "\\b"))) { element.className = " " + className; } } function removeClass(element, className) { if (element.className) { if (element.classList) { return element.classList.remove(className); } element.className = element.className.replace(new RegExp("\\b" + className + "\\b", "g"), ""); } } function access(object, prop, defaultValue) { var result = object[prop]; if (typeof result == "function") { for (var _len = arguments.length, args = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { args[_key - 3] = arguments[_key]; } result = result.apply(undefined, args); } return result === undefined ? defaultValue : result; } var NumericInput = function (_Component) { _inherits(NumericInput, _Component); function NumericInput() { var _ref; _classCallCheck(this, NumericInput); for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } var _this = _possibleConstructorReturn(this, (_ref = NumericInput.__proto__ || Object.getPrototypeOf(NumericInput)).call.apply(_ref, [this].concat(args))); _this._isStrict = !!_this.props.strict; _this.state = _extends({ btnDownHover: false, btnDownActive: false, btnUpHover: false, btnUpActive: false, stringValue: "" }, _this._propsToState(_this.props)); _this.stop = _this.stop.bind(_this); _this.onTouchEnd = _this.onTouchEnd.bind(_this); _this.refsInput = {}; _this.refsWrapper = {}; return _this; } _createClass(NumericInput, [{ key: '_propsToState', value: function _propsToState(props) { var out = {}; if (props.hasOwnProperty("value")) { out.stringValue = String(props.value || props.value === 0 ? props.value : '').trim(); out.value = out.stringValue !== '' ? this._parse(props.value) : null; } else if (!this._isMounted && props.hasOwnProperty("defaultValue")) { out.stringValue = String(props.defaultValue || props.defaultValue === 0 ? props.defaultValue : '').trim(); out.value = props.defaultValue !== '' ? this._parse(props.defaultValue) : null; } return out; } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(props) { var _this2 = this; this._isStrict = !!props.strict; var nextState = this._propsToState(props); if (Object.keys(nextState).length) { this._ignoreValueChange = true; this.setState(nextState, function () { _this2._ignoreValueChange = false; }); } } }, { key: 'componentWillUpdate', value: function componentWillUpdate() { this.saveSelection(); } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { if (!this._ignoreValueChange && prevState.value !== this.state.value && (!isNaN(this.state.value) || this.state.value === null)) { this._invokeEventCallback("onChange", this.state.value, this.refsInput.value, this.refsInput); } if (this._inputFocus) { this.refsInput.focus(); if (this.state.selectionStart || this.state.selectionStart === 0) { this.refsInput.selectionStart = this.state.selectionStart; } if (this.state.selectionEnd || this.state.selectionEnd === 0) { this.refsInput.selectionEnd = this.state.selectionEnd; } } this.checkValidity(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this._isMounted = false; this.stop(); } }, { key: 'componentDidMount', value: function componentDidMount() { var _this3 = this; this._isMounted = true; this.refsInput.getValueAsNumber = function () { return _this3.state.value || 0; }; this.refsInput.setValue = function (value) { _this3.setState({ value: _this3._parse(value), stringValue: value }); }; if (!this._inputFocus && IS_BROWSER && document.activeElement === this.refsInput) { this._inputFocus = true; this.refsInput.focus(); this._invokeEventCallback("onFocus", { target: this.refsInput, type: "focus" }); } this.checkValidity(); } }, { key: 'saveSelection', value: function saveSelection() { this.state.selectionStart = this.refsInput.selectionStart; this.state.selectionEnd = this.refsInput.selectionEnd; } }, { key: 'checkValidity', value: function checkValidity() { var valid = void 0, validationError = ""; var supportsValidation = !!this.refsInput.checkValidity; var noValidate = !!(this.props.noValidate && this.props.noValidate != "false"); this.refsInput.noValidate = noValidate; valid = noValidate || !supportsValidation; if (valid) { validationError = ""; } else { if (this.refsInput.pattern === "") { this.refsInput.pattern = this.props.required ? ".+" : ".*"; } if (supportsValidation) { this.refsInput.checkValidity(); valid = this.refsInput.validity.valid; if (!valid) { validationError = this.refsInput.validationMessage; } } if (valid && supportsValidation && this.props.maxLength) { if (this.refsInput.value.length > this.props.maxLength) { validationError = "This value is too long"; } } } validationError = validationError || (valid ? "" : this.refsInput.validationMessage || "Unknown Error"); var validStateChanged = this._valid !== validationError; this._valid = validationError; if (validationError) { addClass(this.refsWrapper, "has-error"); if (validStateChanged) { this._invokeEventCallback("onInvalid", validationError, this.state.value, this.refsInput.value); } } else { removeClass(this.refsWrapper, "has-error"); if (validStateChanged) { this._invokeEventCallback("onValid", this.state.value, this.refsInput.value); } } } }, { key: '_toNumber', value: function _toNumber(x) { var n = parseFloat(x); if (isNaN(n) || !isFinite(n)) { n = 0; } if (this._isStrict) { var precision = access(this.props, "precision", null, this); var q = Math.pow(10, precision === null ? 10 : precision); var _min = +access(this.props, "min", NumericInput.defaultProps.min, this); var _max = +access(this.props, "max", NumericInput.defaultProps.max, this); n = Math.min(Math.max(n, _min), _max); n = Math.round(n * q) / q; } return n; } }, { key: '_parse', value: function _parse(x) { x = String(x); if (typeof this.props.parse == 'function') { return parseFloat(this.props.parse(x)); } return parseFloat(x); } }, { key: '_format', value: function _format(n) { var _n = this._toNumber(n); var precision = access(this.props, "precision", null, this); if (precision !== null) { _n = n.toFixed(precision); } _n += ""; if (this.props.format) { return this.props.format(_n); } return _n; } }, { key: '_step', value: function _step(n, callback) { var _isStrict = this._isStrict; this._isStrict = true; var _step = +access(this.props, "step", NumericInput.defaultProps.step, this, n > 0 ? NumericInput.DIRECTION_UP : NumericInput.DIRECTION_DOWN); var _n = this._toNumber((this.state.value || 0) + _step * n); if (this.props.snap) { _n = Math.round(_n / _step) * _step; } this._isStrict = _isStrict; if (_n !== this.state.value) { this.setState({ value: _n, stringValue: _n + "" }, callback); return true; } return false; } }, { key: '_onKeyDown', value: function _onKeyDown() { for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { args[_key3] = arguments[_key3]; } args[0].persist(); this._invokeEventCallback.apply(this, ["onKeyDown"].concat(args)); var e = args[0]; if (!e.isDefaultPrevented()) { if (e.keyCode === KEYCODE_UP) { e.preventDefault(); this._step(e.ctrlKey || e.metaKey ? 0.1 : e.shiftKey ? 10 : 1); } else if (e.keyCode === KEYCODE_DOWN) { e.preventDefault(); this._step(e.ctrlKey || e.metaKey ? -0.1 : e.shiftKey ? -10 : -1); } else { var _value = this.refsInput.value, length = _value.length; if (e.keyCode === 8) { if (this.refsInput.selectionStart == this.refsInput.selectionEnd && this.refsInput.selectionEnd > 0 && _value.length && _value.charAt(this.refsInput.selectionEnd - 1) === ".") { e.preventDefault(); this.refsInput.selectionStart = this.refsInput.selectionEnd = this.refsInput.selectionEnd - 1; } } else if (e.keyCode === 46) { if (this.refsInput.selectionStart == this.refsInput.selectionEnd && this.refsInput.selectionEnd < length + 1 && _value.length && _value.charAt(this.refsInput.selectionEnd) === ".") { e.preventDefault(); this.refsInput.selectionStart = this.refsInput.selectionEnd = this.refsInput.selectionEnd + 1; } } } } } }, { key: 'stop', value: function stop() { if (this._timer) { clearTimeout(this._timer); } } }, { key: 'increase', value: function increase() { var _this4 = this; var _recursive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var callback = arguments[1]; this.stop(); this._step(1, callback); var _max = +access(this.props, "max", NumericInput.defaultProps.max, this); if (isNaN(this.state.value) || +this.state.value < _max) { this._timer = setTimeout(function () { _this4.increase(true); }, _recursive ? NumericInput.SPEED : NumericInput.DELAY); } } }, { key: 'decrease', value: function decrease() { var _this5 = this; var _recursive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var callback = arguments[1]; this.stop(); this._step(-1, callback); var _min = +access(this.props, "min", NumericInput.defaultProps.min, this); if (isNaN(this.state.value) || +this.state.value > _min) { this._timer = setTimeout(function () { _this5.decrease(true); }, _recursive ? NumericInput.SPEED : NumericInput.DELAY); } } }, { key: 'onMouseDown', value: function onMouseDown(dir, callback) { if (dir == 'down') { this.decrease(false, callback); } else if (dir == 'up') { this.increase(false, callback); } } }, { key: 'onTouchStart', value: function onTouchStart(dir, e) { e.preventDefault(); if (dir == 'down') { this.decrease(); } else if (dir == 'up') { this.increase(); } } }, { key: 'onTouchEnd', value: function onTouchEnd(e) { e.preventDefault(); this.stop(); } }, { key: '_invokeEventCallback', value: function _invokeEventCallback(callbackName) { if (typeof this.props[callbackName] == "function") { var _props$callbackName; for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { args[_key4 - 1] = arguments[_key4]; } (_props$callbackName = this.props[callbackName]).call.apply(_props$callbackName, [null].concat(args)); } } }, { key: 'render', value: function render() { var _this6 = this; var props = this.props; var state = this.state; var css = {}; var _props = this.props, step = _props.step, min = _props.min, max = _props.max, precision = _props.precision, parse = _props.parse, format = _props.format, mobile = _props.mobile, snap = _props.snap, componentClass = _props.componentClass, value = _props.value, type = _props.type, style = _props.style, defaultValue = _props.defaultValue, onInvalid = _props.onInvalid, onValid = _props.onValid, strict = _props.strict, noStyle = _props.noStyle, rest = _objectWithoutProperties(_props, ['step', 'min', 'max', 'precision', 'parse', 'format', 'mobile', 'snap', 'componentClass', 'value', 'type', 'style', 'defaultValue', 'onInvalid', 'onValid', 'strict', 'noStyle']); noStyle = noStyle || style === false; for (var x in NumericInput.style) { css[x] = _extends({}, NumericInput.style[x], style ? style[x] || {} : {}); } var hasFormControl = props.className && /\bform-control\b/.test(props.className); if (mobile == 'auto') { mobile = IS_BROWSER && 'ontouchstart' in document; } if (typeof mobile == "function") { mobile = mobile.call(this); } mobile = !!mobile; var attrs = { wrap: { style: noStyle ? null : css.wrap, className: 'react-numeric-input', ref: function ref(e) { if (e != null && e != undefined) { _this6.refsWrapper = e; } }, onMouseUp: undefined, onMouseLeave: undefined }, input: _extends({ ref: function ref(e) { if (e != null && e != undefined) { _this6.refsInput = e; } }, type: 'text', style: noStyle ? null : _extends({}, css.input, !hasFormControl ? css['input:not(.form-control)'] : {}, this._inputFocus ? css['input:focus'] : {}) }, rest), btnUp: { onMouseEnter: undefined, onMouseDown: undefined, onMouseUp: undefined, onMouseLeave: undefined, onTouchStart: undefined, onTouchEnd: undefined, style: noStyle ? null : _extends({}, css.btn, css.btnUp, props.disabled || props.readOnly ? css['btn:disabled'] : state.btnUpActive ? css['btn:active'] : state.btnUpHover ? css['btn:hover'] : {}) }, btnDown: { onMouseEnter: undefined, onMouseDown: undefined, onMouseUp: undefined, onMouseLeave: undefined, onTouchStart: undefined, onTouchEnd: undefined, style: noStyle ? null : _extends({}, css.btn, css.btnDown, props.disabled || props.readOnly ? css['btn:disabled'] : state.btnDownActive ? css['btn:active'] : state.btnDownHover ? css['btn:hover'] : {}) } }; var stringValue = String(state.stringValue || (state.value || state.value === 0 ? state.value : "") || ""); var loose = !this._isStrict && (this._inputFocus || !this._isMounted); if (loose && RE_INCOMPLETE_NUMBER.test(stringValue)) { attrs.input.value = stringValue; } else if (loose && stringValue && !RE_NUMBER.test(stringValue)) { attrs.input.value = stringValue; } else if (state.value || state.value === 0) { attrs.input.value = this._format(state.value); } else { attrs.input.value = ""; } if (hasFormControl && !noStyle) { _extends(attrs.wrap.style, css['wrap.hasFormControl']); } if (mobile && !noStyle) { _extends(attrs.input.style, css['input.mobile']); _extends(attrs.btnUp.style, css['btnUp.mobile']); _extends(attrs.btnDown.style, css['btnDown.mobile']); } if (!props.disabled && !props.readOnly) { _extends(attrs.wrap, { onMouseUp: this.stop, onMouseLeave: this.stop }); _extends(attrs.btnUp, { onTouchStart: this.onTouchStart.bind(this, 'up'), onTouchEnd: this.onTouchEnd, onMouseEnter: function onMouseEnter() { _this6.setState({ btnUpHover: true }); }, onMouseLeave: function onMouseLeave() { _this6.stop(); _this6.setState({ btnUpHover: false, btnUpActive: false }); }, onMouseUp: function onMouseUp() { _this6.setState({ btnUpHover: true, btnUpActive: false }); }, onMouseDown: function onMouseDown() { for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { args[_key5] = arguments[_key5]; } args[0].preventDefault(); args[0].persist(); _this6._inputFocus = true; _this6.setState({ btnUpHover: true, btnUpActive: true }, function () { _this6._invokeEventCallback.apply(_this6, ["onFocus"].concat(args)); _this6.onMouseDown('up'); }); } }); _extends(attrs.btnDown, { onTouchStart: this.onTouchStart.bind(this, 'down'), onTouchEnd: this.onTouchEnd, onMouseEnter: function onMouseEnter() { _this6.setState({ btnDownHover: true }); }, onMouseLeave: function onMouseLeave() { _this6.stop(); _this6.setState({ btnDownHover: false, btnDownActive: false }); }, onMouseUp: function onMouseUp() { _this6.setState({ btnDownHover: true, btnDownActive: false }); }, onMouseDown: function onMouseDown() { for (var _len6 = arguments.length, args = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { args[_key6] = arguments[_key6]; } args[0].preventDefault(); args[0].persist(); _this6._inputFocus = true; _this6.setState({ btnDownHover: true, btnDownActive: true }, function () { _this6._invokeEventCallback.apply(_this6, ["onFocus"].concat(args)); _this6.onMouseDown('down'); }); } }); _extends(attrs.input, { onChange: function onChange(e) { var original = e.target.value; var val = _this6._parse(original); if (isNaN(val)) { val = null; } _this6.setState({ value: _this6._isStrict ? _this6._toNumber(val) : val, stringValue: original }); }, onKeyDown: this._onKeyDown.bind(this), onInput: function onInput() { for (var _len7 = arguments.length, args = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { args[_key7] = arguments[_key7]; } _this6.saveSelection(); _this6._invokeEventCallback.apply(_this6, ["onInput"].concat(args)); }, onSelect: function onSelect() { for (var _len8 = arguments.length, args = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { args[_key8] = arguments[_key8]; } _this6.saveSelection(); _this6._invokeEventCallback.apply(_this6, ["onSelect"].concat(args)); }, onFocus: function onFocus() { for (var _len9 = arguments.length, args = Array(_len9), _key9 = 0; _key9 < _len9; _key9++) { args[_key9] = arguments[_key9]; } args[0].persist(); _this6._inputFocus = true; var val = _this6._parse(args[0].target.value); _this6.setState({ value: val, stringValue: val || val === 0 ? val + "" : "" }, function () { _this6._invokeEventCallback.apply(_this6, ["onFocus"].concat(args)); }); }, onBlur: function onBlur() { for (var _len10 = arguments.length, args = Array(_len10), _key10 = 0; _key10 < _len10; _key10++) { args[_key10] = arguments[_key10]; } var _isStrict = _this6._isStrict; _this6._isStrict = true; args[0].persist(); _this6._inputFocus = false; var val = _this6._parse(args[0].target.value); _this6.setState({ value: val }, function () { _this6._invokeEventCallback.apply(_this6, ["onBlur"].concat(args)); _this6._isStrict = _isStrict; }); } }); } else { if (!noStyle && props.disabled) { _extends(attrs.input.style, css['input:disabled']); } } var InputTag = componentClass || 'input'; if (mobile) { return _react2.default.createElement( 'span', attrs.wrap, _react2.default.createElement(InputTag, attrs.input), _react2.default.createElement( 'b', attrs.btnUp, _react2.default.createElement('i', { style: noStyle ? null : css.minus }), _react2.default.createElement('i', { style: noStyle ? null : css.plus }) ), _react2.default.createElement( 'b', attrs.btnDown, _react2.default.createElement('i', { style: noStyle ? null : css.minus }) ) ); } return _react2.default.createElement( 'span', attrs.wrap, _react2.default.createElement(InputTag, attrs.input), _react2.default.createElement( 'b', attrs.btnUp, _react2.default.createElement('i', { style: noStyle ? null : css.arrowUp }) ), _react2.default.createElement( 'b', attrs.btnDown, _react2.default.createElement('i', { style: noStyle ? null : css.arrowDown }) ) ); } }]); return NumericInput; }(_react.Component); NumericInput.propTypes = { step: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.func]), min: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.func]), max: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.func]), precision: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.func]), maxLength: _propTypes2.default.number, parse: _propTypes2.default.func, format: _propTypes2.default.func, className: _propTypes2.default.string, disabled: _propTypes2.default.bool, readOnly: _propTypes2.default.bool, required: _propTypes2.default.bool, snap: _propTypes2.default.bool, noValidate: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.string]), style: _propTypes2.default.oneOfType([_propTypes2.default.object, _propTypes2.default.bool]), noStyle: _propTypes2.default.bool, type: _propTypes2.default.string, pattern: _propTypes2.default.string, onFocus: _propTypes2.default.func, onBlur: _propTypes2.default.func, onKeyDown: _propTypes2.default.func, onChange: _propTypes2.default.func, onInvalid: _propTypes2.default.func, onValid: _propTypes2.default.func, onInput: _propTypes2.default.func, onSelect: _propTypes2.default.func, size: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]), value: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]), defaultValue: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]), strict: _propTypes2.default.bool, componentClass: _propTypes2.default.string, mobile: function mobile(props, propName) { var prop = props[propName]; if (prop !== true && prop !== false && prop !== 'auto' && typeof prop != 'function') { return new Error('The "mobile" prop must be true, false, "auto" or a function'); } } }; NumericInput.defaultProps = { step: 1, min: Number.MIN_SAFE_INTEGER || -9007199254740991, max: Number.MAX_SAFE_INTEGER || 9007199254740991, precision: null, parse: null, format: null, mobile: 'auto', strict: false, componentClass: "input", style: {} }; NumericInput.style = { wrap: { position: 'relative', display: 'inline-block' }, 'wrap.hasFormControl': { display: 'block' }, arrowUp: { position: 'absolute', top: '50%', left: '50%', width: 0, height: 0, borderWidth: '0 0.6ex 0.6ex 0.6ex', borderColor: 'transparent transparent rgba(0, 0, 0, 0.7)', borderStyle: 'solid', margin: '-0.3ex 0 0 -0.56ex' }, arrowDown: { position: 'absolute', top: '50%', left: '50%', width: 0, height: 0, borderWidth: '0.6ex 0.6ex 0 0.6ex', borderColor: 'rgba(0, 0, 0, 0.7) transparent transparent', borderStyle: 'solid', margin: '-0.3ex 0 0 -0.56ex' }, plus: { position: 'absolute', top: '50%', left: '50%', width: 2, height: 10, background: 'rgba(0,0,0,.7)', margin: '-5px 0 0 -1px' }, minus: { position: 'absolute', top: '50%', left: '50%', width: 10, height: 2, background: 'rgba(0,0,0,.7)', margin: '-1px 0 0 -5px' }, btn: { position: 'absolute', right: 2, width: '2.26ex', borderColor: 'rgba(0,0,0,.1)', borderStyle: 'solid', textAlign: 'center', cursor: 'default', transition: 'all 0.1s', background: 'rgba(0,0,0,.1)', boxShadow: '-1px -1px 3px rgba(0,0,0,.1) inset,' + '1px 1px 3px rgba(255,255,255,.7) inset' }, btnUp: { top: 2, bottom: '50%', borderRadius: '2px 2px 0 0', borderWidth: '1px 1px 0 1px' }, 'btnUp.mobile': { width: '3.3ex', bottom: 2, boxShadow: 'none', borderRadius: 2, borderWidth: 1 }, btnDown: { top: '50%', bottom: 2, borderRadius: '0 0 2px 2px', borderWidth: '0 1px 1px 1px' }, 'btnDown.mobile': { width: '3.3ex', bottom: 2, left: 2, top: 2, right: 'auto', boxShadow: 'none', borderRadius: 2, borderWidth: 1 }, 'btn:hover': { background: 'rgba(0,0,0,.2)' }, 'btn:active': { background: 'rgba(0,0,0,.3)', boxShadow: '0 1px 3px rgba(0,0,0,.2) inset,' + '-1px -1px 4px rgba(255,255,255,.5) inset' }, 'btn:disabled': { opacity: 0.5, boxShadow: 'none', cursor: 'not-allowed' }, input: { paddingRight: '3ex', boxSizing: 'border-box', fontSize: 'inherit' }, 'input:not(.form-control)': { border: '1px solid #ccc', borderRadius: 2, paddingLeft: 4, display: 'block', WebkitAppearance: 'none', lineHeight: 'normal' }, 'input.mobile': { paddingLeft: ' 3.4ex', paddingRight: '3.4ex', textAlign: 'center' }, 'input:focus': {}, 'input:disabled': { color: 'rgba(0, 0, 0, 0.3)', textShadow: '0 1px 0 rgba(255, 255, 255, 0.8)' } }; NumericInput.SPEED = 50; NumericInput.DELAY = 500; NumericInput.DIRECTION_UP = "up"; NumericInput.DIRECTION_DOWN = "down"; module.exports = NumericInput; /***/ }), /* 1 */ /***/ (function(module, exports) { module.exports = __webpack_require__(/*! react */ "react"); /***/ }), /* 2 */ /***/ (function(module, exports) { module.exports = __webpack_require__(/*! prop-types */ "prop-types"); /***/ }) /******/ ]); /***/ }), /***/ "./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js": /*!*************************************************************************!*\ !*** ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js ***! \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* WEBPACK VAR INJECTION */(function(global) {/** * A collection of shims that provide minimal functionality of the ES6 collections. * * These implementations are not meant to be used outside of the ResizeObserver * modules as they cover only a limited range of use cases. */ /* eslint-disable require-jsdoc, valid-jsdoc */ var MapShim = (function () { if (typeof Map !== 'undefined') { return Map; } /** * Returns index in provided array that matches the specified key. * * @param {Array} arr * @param {*} key * @returns {number} */ function getIndex(arr, key) { var result = -1; arr.some(function (entry, index) { if (entry[0] === key) { result = index; return true; } return false; }); return result; } return /** @class */ (function () { function class_1() { this.__entries__ = []; } Object.defineProperty(class_1.prototype, "size", { /** * @returns {boolean} */ get: function () { return this.__entries__.length; }, enumerable: true, configurable: true }); /** * @param {*} key * @returns {*} */ class_1.prototype.get = function (key) { var index = getIndex(this.__entries__, key); var entry = this.__entries__[index]; return entry && entry[1]; }; /** * @param {*} key * @param {*} value * @returns {void} */ class_1.prototype.set = function (key, value) { var index = getIndex(this.__entries__, key); if (~index) { this.__entries__[index][1] = value; } else { this.__entries__.push([key, value]); } }; /** * @param {*} key * @returns {void} */ class_1.prototype.delete = function (key) { var entries = this.__entries__; var index = getIndex(entries, key); if (~index) { entries.splice(index, 1); } }; /** * @param {*} key * @returns {void} */ class_1.prototype.has = function (key) { return !!~getIndex(this.__entries__, key); }; /** * @returns {void} */ class_1.prototype.clear = function () { this.__entries__.splice(0); }; /** * @param {Function} callback * @param {*} [ctx=null] * @returns {void} */ class_1.prototype.forEach = function (callback, ctx) { if (ctx === void 0) { ctx = null; } for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) { var entry = _a[_i]; callback.call(ctx, entry[1], entry[0]); } }; return class_1; }()); })(); /** * Detects whether window and document objects are available in current environment. */ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document; // Returns global object of a current environment. var global$1 = (function () { if (typeof global !== 'undefined' && global.Math === Math) { return global; } if (typeof self !== 'undefined' && self.Math === Math) { return self; } if (typeof window !== 'undefined' && window.Math === Math) { return window; } // eslint-disable-next-line no-new-func return Function('return this')(); })(); /** * A shim for the requestAnimationFrame which falls back to the setTimeout if * first one is not supported. * * @returns {number} Requests' identifier. */ var requestAnimationFrame$1 = (function () { if (typeof requestAnimationFrame === 'function') { // It's required to use a bounded function because IE sometimes throws // an "Invalid calling object" error if rAF is invoked without the global // object on the left hand side. return requestAnimationFrame.bind(global$1); } return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); }; })(); // Defines minimum timeout before adding a trailing call. var trailingTimeout = 2; /** * Creates a wrapper function which ensures that provided callback will be * invoked only once during the specified delay period. * * @param {Function} callback - Function to be invoked after the delay period. * @param {number} delay - Delay after which to invoke callback. * @returns {Function} */ function throttle (callback, delay) { var leadingCall = false, trailingCall = false, lastCallTime = 0; /** * Invokes the original callback function and schedules new invocation if * the "proxy" was called during current request. * * @returns {void} */ function resolvePending() { if (leadingCall) { leadingCall = false; callback(); } if (trailingCall) { proxy(); } } /** * Callback invoked after the specified delay. It will further postpone * invocation of the original function delegating it to the * requestAnimationFrame. * * @returns {void} */ function timeoutCallback() { requestAnimationFrame$1(resolvePending); } /** * Schedules invocation of the original function. * * @returns {void} */ function proxy() { var timeStamp = Date.now(); if (leadingCall) { // Reject immediately following calls. if (timeStamp - lastCallTime < trailingTimeout) { return; } // Schedule new call to be in invoked when the pending one is resolved. // This is important for "transitions" which never actually start // immediately so there is a chance that we might miss one if change // happens amids the pending invocation. trailingCall = true; } else { leadingCall = true; trailingCall = false; setTimeout(timeoutCallback, delay); } lastCallTime = timeStamp; } return proxy; } // Minimum delay before invoking the update of observers. var REFRESH_DELAY = 20; // A list of substrings of CSS properties used to find transition events that // might affect dimensions of observed elements. var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight']; // Check if MutationObserver is available. var mutationObserverSupported = typeof MutationObserver !== 'undefined'; /** * Singleton controller class which handles updates of ResizeObserver instances. */ var ResizeObserverController = /** @class */ (function () { /** * Creates a new instance of ResizeObserverController. * * @private */ function ResizeObserverController() { /** * Indicates whether DOM listeners have been added. * * @private {boolean} */ this.connected_ = false; /** * Tells that controller has subscribed for Mutation Events. * * @private {boolean} */ this.mutationEventsAdded_ = false; /** * Keeps reference to the instance of MutationObserver. * * @private {MutationObserver} */ this.mutationsObserver_ = null; /** * A list of connected observers. * * @private {Array} */ this.observers_ = []; this.onTransitionEnd_ = this.onTransitionEnd_.bind(this); this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY); } /** * Adds observer to observers list. * * @param {ResizeObserverSPI} observer - Observer to be added. * @returns {void} */ ResizeObserverController.prototype.addObserver = function (observer) { if (!~this.observers_.indexOf(observer)) { this.observers_.push(observer); } // Add listeners if they haven't been added yet. if (!this.connected_) { this.connect_(); } }; /** * Removes observer from observers list. * * @param {ResizeObserverSPI} observer - Observer to be removed. * @returns {void} */ ResizeObserverController.prototype.removeObserver = function (observer) { var observers = this.observers_; var index = observers.indexOf(observer); // Remove observer if it's present in registry. if (~index) { observers.splice(index, 1); } // Remove listeners if controller has no connected observers. if (!observers.length && this.connected_) { this.disconnect_(); } }; /** * Invokes the update of observers. It will continue running updates insofar * it detects changes. * * @returns {void} */ ResizeObserverController.prototype.refresh = function () { var changesDetected = this.updateObservers_(); // Continue running updates if changes have been detected as there might // be future ones caused by CSS transitions. if (changesDetected) { this.refresh(); } }; /** * Updates every observer from observers list and notifies them of queued * entries. * * @private * @returns {boolean} Returns "true" if any observer has detected changes in * dimensions of it's elements. */ ResizeObserverController.prototype.updateObservers_ = function () { // Collect observers that have active observations. var activeObservers = this.observers_.filter(function (observer) { return observer.gatherActive(), observer.hasActive(); }); // Deliver notifications in a separate cycle in order to avoid any // collisions between observers, e.g. when multiple instances of // ResizeObserver are tracking the same element and the callback of one // of them changes content dimensions of the observed target. Sometimes // this may result in notifications being blocked for the rest of observers. activeObservers.forEach(function (observer) { return observer.broadcastActive(); }); return activeObservers.length > 0; }; /** * Initializes DOM listeners. * * @private * @returns {void} */ ResizeObserverController.prototype.connect_ = function () { // Do nothing if running in a non-browser environment or if listeners // have been already added. if (!isBrowser || this.connected_) { return; } // Subscription to the "Transitionend" event is used as a workaround for // delayed transitions. This way it's possible to capture at least the // final state of an element. document.addEventListener('transitionend', this.onTransitionEnd_); window.addEventListener('resize', this.refresh); if (mutationObserverSupported) { this.mutationsObserver_ = new MutationObserver(this.refresh); this.mutationsObserver_.observe(document, { attributes: true, childList: true, characterData: true, subtree: true }); } else { document.addEventListener('DOMSubtreeModified', this.refresh); this.mutationEventsAdded_ = true; } this.connected_ = true; }; /** * Removes DOM listeners. * * @private * @returns {void} */ ResizeObserverController.prototype.disconnect_ = function () { // Do nothing if running in a non-browser environment or if listeners // have been already removed. if (!isBrowser || !this.connected_) { return; } document.removeEventListener('transitionend', this.onTransitionEnd_); window.removeEventListener('resize', this.refresh); if (this.mutationsObserver_) { this.mutationsObserver_.disconnect(); } if (this.mutationEventsAdded_) { document.removeEventListener('DOMSubtreeModified', this.refresh); } this.mutationsObserver_ = null; this.mutationEventsAdded_ = false; this.connected_ = false; }; /** * "Transitionend" event handler. * * @private * @param {TransitionEvent} event * @returns {void} */ ResizeObserverController.prototype.onTransitionEnd_ = function (_a) { var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b; // Detect whether transition may affect dimensions of an element. var isReflowProperty = transitionKeys.some(function (key) { return !!~propertyName.indexOf(key); }); if (isReflowProperty) { this.refresh(); } }; /** * Returns instance of the ResizeObserverController. * * @returns {ResizeObserverController} */ ResizeObserverController.getInstance = function () { if (!this.instance_) { this.instance_ = new ResizeObserverController(); } return this.instance_; }; /** * Holds reference to the controller's instance. * * @private {ResizeObserverController} */ ResizeObserverController.instance_ = null; return ResizeObserverController; }()); /** * Defines non-writable/enumerable properties of the provided target object. * * @param {Object} target - Object for which to define properties. * @param {Object} props - Properties to be defined. * @returns {Object} Target object. */ var defineConfigurable = (function (target, props) { for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) { var key = _a[_i]; Object.defineProperty(target, key, { value: props[key], enumerable: false, writable: false, configurable: true }); } return target; }); /** * Returns the global object associated with provided element. * * @param {Object} target * @returns {Object} */ var getWindowOf = (function (target) { // Assume that the element is an instance of Node, which means that it // has the "ownerDocument" property from which we can retrieve a // corresponding global object. var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView; // Return the local global object if it's not possible extract one from // provided element. return ownerGlobal || global$1; }); // Placeholder of an empty content rectangle. var emptyRect = createRectInit(0, 0, 0, 0); /** * Converts provided string to a number. * * @param {number|string} value * @returns {number} */ function toFloat(value) { return parseFloat(value) || 0; } /** * Extracts borders size from provided styles. * * @param {CSSStyleDeclaration} styles * @param {...string} positions - Borders positions (top, right, ...) * @returns {number} */ function getBordersSize(styles) { var positions = []; for (var _i = 1; _i < arguments.length; _i++) { positions[_i - 1] = arguments[_i]; } return positions.reduce(function (size, position) { var value = styles['border-' + position + '-width']; return size + toFloat(value); }, 0); } /** * Extracts paddings sizes from provided styles. * * @param {CSSStyleDeclaration} styles * @returns {Object} Paddings box. */ function getPaddings(styles) { var positions = ['top', 'right', 'bottom', 'left']; var paddings = {}; for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) { var position = positions_1[_i]; var value = styles['padding-' + position]; paddings[position] = toFloat(value); } return paddings; } /** * Calculates content rectangle of provided SVG element. * * @param {SVGGraphicsElement} target - Element content rectangle of which needs * to be calculated. * @returns {DOMRectInit} */ function getSVGContentRect(target) { var bbox = target.getBBox(); return createRectInit(0, 0, bbox.width, bbox.height); } /** * Calculates content rectangle of provided HTMLElement. * * @param {HTMLElement} target - Element for which to calculate the content rectangle. * @returns {DOMRectInit} */ function getHTMLElementContentRect(target) { // Client width & height properties can't be // used exclusively as they provide rounded values. var clientWidth = target.clientWidth, clientHeight = target.clientHeight; // By this condition we can catch all non-replaced inline, hidden and // detached elements. Though elements with width & height properties less // than 0.5 will be discarded as well. // // Without it we would need to implement separate methods for each of // those cases and it's not possible to perform a precise and performance // effective test for hidden elements. E.g. even jQuery's ':visible' filter // gives wrong results for elements with width & height less than 0.5. if (!clientWidth && !clientHeight) { return emptyRect; } var styles = getWindowOf(target).getComputedStyle(target); var paddings = getPaddings(styles); var horizPad = paddings.left + paddings.right; var vertPad = paddings.top + paddings.bottom; // Computed styles of width & height are being used because they are the // only dimensions available to JS that contain non-rounded values. It could // be possible to utilize the getBoundingClientRect if only it's data wasn't // affected by CSS transformations let alone paddings, borders and scroll bars. var width = toFloat(styles.width), height = toFloat(styles.height); // Width & height include paddings and borders when the 'border-box' box // model is applied (except for IE). if (styles.boxSizing === 'border-box') { // Following conditions are required to handle Internet Explorer which // doesn't include paddings and borders to computed CSS dimensions. // // We can say that if CSS dimensions + paddings are equal to the "client" // properties then it's either IE, and thus we don't need to subtract // anything, or an element merely doesn't have paddings/borders styles. if (Math.round(width + horizPad) !== clientWidth) { width -= getBordersSize(styles, 'left', 'right') + horizPad; } if (Math.round(height + vertPad) !== clientHeight) { height -= getBordersSize(styles, 'top', 'bottom') + vertPad; } } // Following steps can't be applied to the document's root element as its // client[Width/Height] properties represent viewport area of the window. // Besides, it's as well not necessary as the itself neither has // rendered scroll bars nor it can be clipped. if (!isDocumentElement(target)) { // In some browsers (only in Firefox, actually) CSS width & height // include scroll bars size which can be removed at this step as scroll // bars are the only difference between rounded dimensions + paddings // and "client" properties, though that is not always true in Chrome. var vertScrollbar = Math.round(width + horizPad) - clientWidth; var horizScrollbar = Math.round(height + vertPad) - clientHeight; // Chrome has a rather weird rounding of "client" properties. // E.g. for an element with content width of 314.2px it sometimes gives // the client width of 315px and for the width of 314.7px it may give // 314px. And it doesn't happen all the time. So just ignore this delta // as a non-relevant. if (Math.abs(vertScrollbar) !== 1) { width -= vertScrollbar; } if (Math.abs(horizScrollbar) !== 1) { height -= horizScrollbar; } } return createRectInit(paddings.left, paddings.top, width, height); } /** * Checks whether provided element is an instance of the SVGGraphicsElement. * * @param {Element} target - Element to be checked. * @returns {boolean} */ var isSVGGraphicsElement = (function () { // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement // interface. if (typeof SVGGraphicsElement !== 'undefined') { return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; }; } // If it's so, then check that element is at least an instance of the // SVGElement and that it has the "getBBox" method. // eslint-disable-next-line no-extra-parens return function (target) { return (target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === 'function'); }; })(); /** * Checks whether provided element is a document element (). * * @param {Element} target - Element to be checked. * @returns {boolean} */ function isDocumentElement(target) { return target === getWindowOf(target).document.documentElement; } /** * Calculates an appropriate content rectangle for provided html or svg element. * * @param {Element} target - Element content rectangle of which needs to be calculated. * @returns {DOMRectInit} */ function getContentRect(target) { if (!isBrowser) { return emptyRect; } if (isSVGGraphicsElement(target)) { return getSVGContentRect(target); } return getHTMLElementContentRect(target); } /** * Creates rectangle with an interface of the DOMRectReadOnly. * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly * * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions. * @returns {DOMRectReadOnly} */ function createReadOnlyRect(_a) { var x = _a.x, y = _a.y, width = _a.width, height = _a.height; // If DOMRectReadOnly is available use it as a prototype for the rectangle. var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object; var rect = Object.create(Constr.prototype); // Rectangle's properties are not writable and non-enumerable. defineConfigurable(rect, { x: x, y: y, width: width, height: height, top: y, right: x + width, bottom: height + y, left: x }); return rect; } /** * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates. * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit * * @param {number} x - X coordinate. * @param {number} y - Y coordinate. * @param {number} width - Rectangle's width. * @param {number} height - Rectangle's height. * @returns {DOMRectInit} */ function createRectInit(x, y, width, height) { return { x: x, y: y, width: width, height: height }; } /** * Class that is responsible for computations of the content rectangle of * provided DOM element and for keeping track of it's changes. */ var ResizeObservation = /** @class */ (function () { /** * Creates an instance of ResizeObservation. * * @param {Element} target - Element to be observed. */ function ResizeObservation(target) { /** * Broadcasted width of content rectangle. * * @type {number} */ this.broadcastWidth = 0; /** * Broadcasted height of content rectangle. * * @type {number} */ this.broadcastHeight = 0; /** * Reference to the last observed content rectangle. * * @private {DOMRectInit} */ this.contentRect_ = createRectInit(0, 0, 0, 0); this.target = target; } /** * Updates content rectangle and tells whether it's width or height properties * have changed since the last broadcast. * * @returns {boolean} */ ResizeObservation.prototype.isActive = function () { var rect = getContentRect(this.target); this.contentRect_ = rect; return (rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight); }; /** * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data * from the corresponding properties of the last observed content rectangle. * * @returns {DOMRectInit} Last observed content rectangle. */ ResizeObservation.prototype.broadcastRect = function () { var rect = this.contentRect_; this.broadcastWidth = rect.width; this.broadcastHeight = rect.height; return rect; }; return ResizeObservation; }()); var ResizeObserverEntry = /** @class */ (function () { /** * Creates an instance of ResizeObserverEntry. * * @param {Element} target - Element that is being observed. * @param {DOMRectInit} rectInit - Data of the element's content rectangle. */ function ResizeObserverEntry(target, rectInit) { var contentRect = createReadOnlyRect(rectInit); // According to the specification following properties are not writable // and are also not enumerable in the native implementation. // // Property accessors are not being used as they'd require to define a // private WeakMap storage which may cause memory leaks in browsers that // don't support this type of collections. defineConfigurable(this, { target: target, contentRect: contentRect }); } return ResizeObserverEntry; }()); var ResizeObserverSPI = /** @class */ (function () { /** * Creates a new instance of ResizeObserver. * * @param {ResizeObserverCallback} callback - Callback function that is invoked * when one of the observed elements changes it's content dimensions. * @param {ResizeObserverController} controller - Controller instance which * is responsible for the updates of observer. * @param {ResizeObserver} callbackCtx - Reference to the public * ResizeObserver instance which will be passed to callback function. */ function ResizeObserverSPI(callback, controller, callbackCtx) { /** * Collection of resize observations that have detected changes in dimensions * of elements. * * @private {Array} */ this.activeObservations_ = []; /** * Registry of the ResizeObservation instances. * * @private {Map} */ this.observations_ = new MapShim(); if (typeof callback !== 'function') { throw new TypeError('The callback provided as parameter 1 is not a function.'); } this.callback_ = callback; this.controller_ = controller; this.callbackCtx_ = callbackCtx; } /** * Starts observing provided element. * * @param {Element} target - Element to be observed. * @returns {void} */ ResizeObserverSPI.prototype.observe = function (target) { if (!arguments.length) { throw new TypeError('1 argument required, but only 0 present.'); } // Do nothing if current environment doesn't have the Element interface. if (typeof Element === 'undefined' || !(Element instanceof Object)) { return; } if (!(target instanceof getWindowOf(target).Element)) { throw new TypeError('parameter 1 is not of type "Element".'); } var observations = this.observations_; // Do nothing if element is already being observed. if (observations.has(target)) { return; } observations.set(target, new ResizeObservation(target)); this.controller_.addObserver(this); // Force the update of observations. this.controller_.refresh(); }; /** * Stops observing provided element. * * @param {Element} target - Element to stop observing. * @returns {void} */ ResizeObserverSPI.prototype.unobserve = function (target) { if (!arguments.length) { throw new TypeError('1 argument required, but only 0 present.'); } // Do nothing if current environment doesn't have the Element interface. if (typeof Element === 'undefined' || !(Element instanceof Object)) { return; } if (!(target instanceof getWindowOf(target).Element)) { throw new TypeError('parameter 1 is not of type "Element".'); } var observations = this.observations_; // Do nothing if element is not being observed. if (!observations.has(target)) { return; } observations.delete(target); if (!observations.size) { this.controller_.removeObserver(this); } }; /** * Stops observing all elements. * * @returns {void} */ ResizeObserverSPI.prototype.disconnect = function () { this.clearActive(); this.observations_.clear(); this.controller_.removeObserver(this); }; /** * Collects observation instances the associated element of which has changed * it's content rectangle. * * @returns {void} */ ResizeObserverSPI.prototype.gatherActive = function () { var _this = this; this.clearActive(); this.observations_.forEach(function (observation) { if (observation.isActive()) { _this.activeObservations_.push(observation); } }); }; /** * Invokes initial callback function with a list of ResizeObserverEntry * instances collected from active resize observations. * * @returns {void} */ ResizeObserverSPI.prototype.broadcastActive = function () { // Do nothing if observer doesn't have active observations. if (!this.hasActive()) { return; } var ctx = this.callbackCtx_; // Create ResizeObserverEntry instance for every active observation. var entries = this.activeObservations_.map(function (observation) { return new ResizeObserverEntry(observation.target, observation.broadcastRect()); }); this.callback_.call(ctx, entries, ctx); this.clearActive(); }; /** * Clears the collection of active observations. * * @returns {void} */ ResizeObserverSPI.prototype.clearActive = function () { this.activeObservations_.splice(0); }; /** * Tells whether observer has active observations. * * @returns {boolean} */ ResizeObserverSPI.prototype.hasActive = function () { return this.activeObservations_.length > 0; }; return ResizeObserverSPI; }()); // Registry of internal observers. If WeakMap is not available use current shim // for the Map collection as it has all required methods and because WeakMap // can't be fully polyfilled anyway. var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim(); /** * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation * exposing only those methods and properties that are defined in the spec. */ var ResizeObserver = /** @class */ (function () { /** * Creates a new instance of ResizeObserver. * * @param {ResizeObserverCallback} callback - Callback that is invoked when * dimensions of the observed elements change. */ function ResizeObserver(callback) { if (!(this instanceof ResizeObserver)) { throw new TypeError('Cannot call a class as a function.'); } if (!arguments.length) { throw new TypeError('1 argument required, but only 0 present.'); } var controller = ResizeObserverController.getInstance(); var observer = new ResizeObserverSPI(callback, controller, this); observers.set(this, observer); } return ResizeObserver; }()); // Expose public methods of ResizeObserver. [ 'observe', 'unobserve', 'disconnect' ].forEach(function (method) { ResizeObserver.prototype[method] = function () { var _a; return (_a = observers.get(this))[method].apply(_a, arguments); }; }); var index = (function () { // Export existing implementation if available. if (typeof global$1.ResizeObserver !== 'undefined') { return global$1.ResizeObserver; } return ResizeObserver; })(); /* harmony default export */ __webpack_exports__["default"] = (index); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), /***/ "./node_modules/shallowequal/index.js": /*!********************************************!*\ !*** ./node_modules/shallowequal/index.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { // module.exports = function shallowEqual(objA, objB, compare, compareContext) { var ret = compare ? compare.call(compareContext, objA, objB) : void 0; if (ret !== void 0) { return !!ret; } if (objA === objB) { return true; } if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); // Test for A's keys different from B. for (var idx = 0; idx < keysA.length; idx++) { var key = keysA[idx]; if (!bHasOwnProperty(key)) { return false; } var valueA = objA[key]; var valueB = objB[key]; ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; if (ret === false || (ret === void 0 && valueA !== valueB)) { return false; } } return true; }; /***/ }), /***/ "./node_modules/simple-swizzle/index.js": /*!**********************************************!*\ !*** ./node_modules/simple-swizzle/index.js ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var isArrayish = __webpack_require__(/*! is-arrayish */ "./node_modules/is-arrayish/index.js"); var concat = Array.prototype.concat; var slice = Array.prototype.slice; var swizzle = module.exports = function swizzle(args) { var results = []; for (var i = 0, len = args.length; i < len; i++) { var arg = args[i]; if (isArrayish(arg)) { // http://jsperf.com/javascript-array-concat-vs-push/98 results = concat.call(results, slice.call(arg)); } else { results.push(arg); } } return results; }; swizzle.wrap = function (fn) { return function () { return fn(swizzle(arguments)); }; }; /***/ }), /***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": /*!****************************************************************************!*\ !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var isOldIE = function isOldIE() { var memo; return function memorize() { if (typeof memo === 'undefined') { // Test for IE <= 9 as proposed by Browserhacks // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 // Tests for existence of standard globals is to allow style-loader // to operate correctly into non-standard environments // @see https://github.com/webpack-contrib/style-loader/issues/177 memo = Boolean(window && document && document.all && !window.atob); } return memo; }; }(); var getTarget = function getTarget() { var memo = {}; return function memorize(target) { if (typeof memo[target] === 'undefined') { var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { try { // This will throw an exception if access to iframe is blocked // due to cross-origin restrictions styleTarget = styleTarget.contentDocument.head; } catch (e) { // istanbul ignore next styleTarget = null; } } memo[target] = styleTarget; } return memo[target]; }; }(); var stylesInDom = []; function getIndexByIdentifier(identifier) { var result = -1; for (var i = 0; i < stylesInDom.length; i++) { if (stylesInDom[i].identifier === identifier) { result = i; break; } } return result; } function modulesToDom(list, options) { var idCountMap = {}; var identifiers = []; for (var i = 0; i < list.length; i++) { var item = list[i]; var id = options.base ? item[0] + options.base : item[0]; var count = idCountMap[id] || 0; var identifier = "".concat(id, " ").concat(count); idCountMap[id] = count + 1; var index = getIndexByIdentifier(identifier); var obj = { css: item[1], media: item[2], sourceMap: item[3] }; if (index !== -1) { stylesInDom[index].references++; stylesInDom[index].updater(obj); } else { stylesInDom.push({ identifier: identifier, updater: addStyle(obj, options), references: 1 }); } identifiers.push(identifier); } return identifiers; } function insertStyleElement(options) { var style = document.createElement('style'); var attributes = options.attributes || {}; if (typeof attributes.nonce === 'undefined') { var nonce = true ? __webpack_require__.nc : undefined; if (nonce) { attributes.nonce = nonce; } } Object.keys(attributes).forEach(function (key) { style.setAttribute(key, attributes[key]); }); if (typeof options.insert === 'function') { options.insert(style); } else { var target = getTarget(options.insert || 'head'); if (!target) { throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); } target.appendChild(style); } return style; } function removeStyleElement(style) { // istanbul ignore if if (style.parentNode === null) { return false; } style.parentNode.removeChild(style); } /* istanbul ignore next */ var replaceText = function replaceText() { var textStore = []; return function replace(index, replacement) { textStore[index] = replacement; return textStore.filter(Boolean).join('\n'); }; }(); function applyToSingletonTag(style, index, remove, obj) { var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE /* istanbul ignore if */ if (style.styleSheet) { style.styleSheet.cssText = replaceText(index, css); } else { var cssNode = document.createTextNode(css); var childNodes = style.childNodes; if (childNodes[index]) { style.removeChild(childNodes[index]); } if (childNodes.length) { style.insertBefore(cssNode, childNodes[index]); } else { style.appendChild(cssNode); } } } function applyToTag(style, options, obj) { var css = obj.css; var media = obj.media; var sourceMap = obj.sourceMap; if (media) { style.setAttribute('media', media); } else { style.removeAttribute('media'); } if (sourceMap && btoa) { css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); } // For old IE /* istanbul ignore if */ if (style.styleSheet) { style.styleSheet.cssText = css; } else { while (style.firstChild) { style.removeChild(style.firstChild); } style.appendChild(document.createTextNode(css)); } } var singleton = null; var singletonCounter = 0; function addStyle(obj, options) { var style; var update; var remove; if (options.singleton) { var styleIndex = singletonCounter++; style = singleton || (singleton = insertStyleElement(options)); update = applyToSingletonTag.bind(null, style, styleIndex, false); remove = applyToSingletonTag.bind(null, style, styleIndex, true); } else { style = insertStyleElement(options); update = applyToTag.bind(null, style, options); remove = function remove() { removeStyleElement(style); }; } update(obj); return function updateStyle(newObj) { if (newObj) { if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { return; } update(obj = newObj); } else { remove(); } }; } module.exports = function (list, options) { options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of '; }; }; /* takes a css factory function and outputs an element factory */ var wrapAsElement = function wrapAsElement(css, names) { return function () { var _props; var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props[SC_VERSION_ATTR] = "4.4.0", _props); var nonce = getNonce(); if (nonce) { // $FlowFixMe props.nonce = nonce; } // eslint-disable-next-line react/no-danger return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } })); }; }; var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) { return function () { return Object.keys(markers); }; }; /* speedy tags utilise insertRule */ var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) { var names = Object.create(null); var markers = Object.create(null); var sizes = []; var extractImport = getImportRuleTag !== undefined; /* indicates whether getImportRuleTag was called */ var usedImportRuleTag = false; var insertMarker = function insertMarker(id) { var prev = markers[id]; if (prev !== undefined) { return prev; } markers[id] = sizes.length; sizes.push(0); resetIdNames(names, id); return markers[id]; }; var insertRules = function insertRules(id, cssRules, name) { var marker = insertMarker(id); var sheet = sheetForTag(el); var insertIndex = addUpUntilIndex(sizes, marker); var injectedRules = 0; var importRules = []; var cssRulesSize = cssRules.length; for (var i = 0; i < cssRulesSize; i += 1) { var cssRule = cssRules[i]; var mayHaveImport = extractImport; /* @import rules are reordered to appear first */ if (mayHaveImport && cssRule.indexOf('@import') !== -1) { importRules.push(cssRule); } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) { mayHaveImport = false; injectedRules += 1; } } if (extractImport && importRules.length > 0) { usedImportRuleTag = true; // $FlowFixMe getImportRuleTag().insertRules(id + '-import', importRules); } sizes[marker] += injectedRules; /* add up no of injected rules */ addNameForId(names, id, name); }; var removeRules = function removeRules(id) { var marker = markers[id]; if (marker === undefined) return; // $FlowFixMe if (el.isConnected === false) return; var size = sizes[marker]; var sheet = sheetForTag(el); var removalIndex = addUpUntilIndex(sizes, marker) - 1; deleteRules(sheet, removalIndex, size); sizes[marker] = 0; resetIdNames(names, id); if (extractImport && usedImportRuleTag) { // $FlowFixMe getImportRuleTag().removeRules(id + '-import'); } }; var css = function css() { var _sheetForTag = sheetForTag(el), cssRules = _sheetForTag.cssRules; var str = ''; // eslint-disable-next-line guard-for-in for (var id in markers) { str += makeTextMarker(id); var marker = markers[id]; var end = addUpUntilIndex(sizes, marker); var size = sizes[marker]; for (var i = end - size; i < end; i += 1) { var rule = cssRules[i]; if (rule !== undefined) { str += rule.cssText; } } } return str; }; return { clone: function clone() { throw new StyledComponentsError(5); }, css: css, getIds: getIdsFromMarkersFactory(markers), hasNameForId: hasNameForId(names), insertMarker: insertMarker, insertRules: insertRules, removeRules: removeRules, sealed: false, styleTag: el, toElement: wrapAsElement(css, names), toHTML: wrapAsHtmlTag(css, names) }; }; var makeTextNode = function makeTextNode(targetDocument, id) { return targetDocument.createTextNode(makeTextMarker(id)); }; var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) { var names = Object.create(null); var markers = Object.create(null); var extractImport = getImportRuleTag !== undefined; /* indicates whether getImportRuleTag was called */ var usedImportRuleTag = false; var insertMarker = function insertMarker(id) { var prev = markers[id]; if (prev !== undefined) { return prev; } markers[id] = makeTextNode(el.ownerDocument, id); el.appendChild(markers[id]); names[id] = Object.create(null); return markers[id]; }; var insertRules = function insertRules(id, cssRules, name) { var marker = insertMarker(id); var importRules = []; var cssRulesSize = cssRules.length; for (var i = 0; i < cssRulesSize; i += 1) { var rule = cssRules[i]; var mayHaveImport = extractImport; if (mayHaveImport && rule.indexOf('@import') !== -1) { importRules.push(rule); } else { mayHaveImport = false; var separator = i === cssRulesSize - 1 ? '' : ' '; marker.appendData('' + rule + separator); } } addNameForId(names, id, name); if (extractImport && importRules.length > 0) { usedImportRuleTag = true; // $FlowFixMe getImportRuleTag().insertRules(id + '-import', importRules); } }; var removeRules = function removeRules(id) { var marker = markers[id]; if (marker === undefined) return; /* create new empty text node and replace the current one */ var newMarker = makeTextNode(el.ownerDocument, id); el.replaceChild(newMarker, marker); markers[id] = newMarker; resetIdNames(names, id); if (extractImport && usedImportRuleTag) { // $FlowFixMe getImportRuleTag().removeRules(id + '-import'); } }; var css = function css() { var str = ''; // eslint-disable-next-line guard-for-in for (var id in markers) { str += markers[id].data; } return str; }; return { clone: function clone() { throw new StyledComponentsError(5); }, css: css, getIds: getIdsFromMarkersFactory(markers), hasNameForId: hasNameForId(names), insertMarker: insertMarker, insertRules: insertRules, removeRules: removeRules, sealed: false, styleTag: el, toElement: wrapAsElement(css, names), toHTML: wrapAsHtmlTag(css, names) }; }; var makeServerTag = function makeServerTag(namesArg, markersArg) { var names = namesArg === undefined ? Object.create(null) : namesArg; var markers = markersArg === undefined ? Object.create(null) : markersArg; var insertMarker = function insertMarker(id) { var prev = markers[id]; if (prev !== undefined) { return prev; } return markers[id] = ['']; }; var insertRules = function insertRules(id, cssRules, name) { var marker = insertMarker(id); marker[0] += cssRules.join(' '); addNameForId(names, id, name); }; var removeRules = function removeRules(id) { var marker = markers[id]; if (marker === undefined) return; marker[0] = ''; resetIdNames(names, id); }; var css = function css() { var str = ''; // eslint-disable-next-line guard-for-in for (var id in markers) { var cssForId = markers[id][0]; if (cssForId) { str += makeTextMarker(id) + cssForId; } } return str; }; var clone = function clone() { var namesClone = cloneNames(names); var markersClone = Object.create(null); // eslint-disable-next-line guard-for-in for (var id in markers) { markersClone[id] = [markers[id][0]]; } return makeServerTag(namesClone, markersClone); }; var tag = { clone: clone, css: css, getIds: getIdsFromMarkersFactory(markers), hasNameForId: hasNameForId(names), insertMarker: insertMarker, insertRules: insertRules, removeRules: removeRules, sealed: false, styleTag: null, toElement: wrapAsElement(css, names), toHTML: wrapAsHtmlTag(css, names) }; return tag; }; var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) { if (IS_BROWSER && !forceServer) { var el = makeStyleTag(target, tagEl, insertBefore); if (DISABLE_SPEEDY) { return makeBrowserTag(el, getImportRuleTag); } else { return makeSpeedyTag(el, getImportRuleTag); } } return makeServerTag(); }; var rehydrate = function rehydrate(tag, els, extracted) { /* add all extracted components to the new tag */ for (var i = 0, len = extracted.length; i < len; i += 1) { var _extracted$i = extracted[i], componentId = _extracted$i.componentId, cssFromDOM = _extracted$i.cssFromDOM; var cssRules = splitByRules(cssFromDOM); tag.insertRules(componentId, cssRules); } /* remove old HTMLStyleElements, since they have been rehydrated */ for (var _i = 0, _len = els.length; _i < _len; _i += 1) { var el = els[_i]; if (el.parentNode) { el.parentNode.removeChild(el); } } }; // var SPLIT_REGEX = /\s+/; /* determine the maximum number of components before tags are sharded */ var MAX_SIZE = void 0; if (IS_BROWSER) { /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */ MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000; } else { /* for servers we do not need to shard at all */ MAX_SIZE = -1; } var sheetRunningId = 0; var master = void 0; var StyleSheet = function () { /* a map from ids to tags */ /* deferred rules for a given id */ /* this is used for not reinjecting rules via hasNameForId() */ /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */ /* a list of tags belonging to this StyleSheet */ /* a tag for import rules */ /* current capacity until a new tag must be created */ /* children (aka clones) of this StyleSheet inheriting all and future injections */ function StyleSheet() { var _this = this; var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null; var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; classCallCheck(this, StyleSheet); this.getImportRuleTag = function () { var importRuleTag = _this.importRuleTag; if (importRuleTag !== undefined) { return importRuleTag; } var firstTag = _this.tags[0]; var insertBefore = true; return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore); }; sheetRunningId += 1; this.id = sheetRunningId; this.forceServer = forceServer; this.target = forceServer ? null : target; this.tagMap = {}; this.deferred = {}; this.rehydratedNames = {}; this.ignoreRehydratedNames = {}; this.tags = []; this.capacity = 1; this.clones = []; } /* rehydrate all SSR'd style tags */ StyleSheet.prototype.rehydrate = function rehydrate$$1() { if (!IS_BROWSER || this.forceServer) return this; var els = []; var extracted = []; var isStreamed = false; /* retrieve all of our SSR style elements from the DOM */ var nodes = document.querySelectorAll('style[' + SC_ATTR + '][' + SC_VERSION_ATTR + '="' + "4.4.0" + '"]'); var nodesSize = nodes.length; /* abort rehydration if no previous style tags were found */ if (!nodesSize) return this; for (var i = 0; i < nodesSize; i += 1) { var el = nodes[i]; /* check if style tag is a streamed tag */ if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR); /* retrieve all component names */ var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX); var elNamesSize = elNames.length; for (var j = 0, name; j < elNamesSize; j += 1) { name = elNames[j]; /* add rehydrated name to sheet to avoid re-adding styles */ this.rehydratedNames[name] = true; } /* extract all components and their CSS */ extracted.push.apply(extracted, extractComps(el.textContent)); /* store original HTMLStyleElement */ els.push(el); } /* abort rehydration if nothing was extracted */ var extractedSize = extracted.length; if (!extractedSize) return this; /* create a tag to be used for rehydration */ var tag = this.makeTag(null); rehydrate(tag, els, extracted); /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */ this.capacity = Math.max(1, MAX_SIZE - extractedSize); this.tags.push(tag); /* retrieve all component ids */ for (var _j = 0; _j < extractedSize; _j += 1) { this.tagMap[extracted[_j].componentId] = tag; } return this; }; /* retrieve a "master" instance of StyleSheet which is typically used when no other is available * The master StyleSheet is targeted by createGlobalStyle, keyframes, and components outside of any * StyleSheetManager's context */ /* reset the internal "master" instance */ StyleSheet.reset = function reset() { var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; master = new StyleSheet(undefined, forceServer).rehydrate(); }; /* adds "children" to the StyleSheet that inherit all of the parents' rules * while their own rules do not affect the parent */ StyleSheet.prototype.clone = function clone() { var sheet = new StyleSheet(this.target, this.forceServer); /* add to clone array */ this.clones.push(sheet); /* clone all tags */ sheet.tags = this.tags.map(function (tag) { var ids = tag.getIds(); var newTag = tag.clone(); /* reconstruct tagMap */ for (var i = 0; i < ids.length; i += 1) { sheet.tagMap[ids[i]] = newTag; } return newTag; }); /* clone other maps */ sheet.rehydratedNames = _extends({}, this.rehydratedNames); sheet.deferred = _extends({}, this.deferred); return sheet; }; /* force StyleSheet to create a new tag on the next injection */ StyleSheet.prototype.sealAllTags = function sealAllTags() { this.capacity = 1; this.tags.forEach(function (tag) { // eslint-disable-next-line no-param-reassign tag.sealed = true; }); }; StyleSheet.prototype.makeTag = function makeTag$$1(tag) { var lastEl = tag ? tag.styleTag : null; var insertBefore = false; return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag); }; /* get a tag for a given componentId, assign the componentId to one, or shard */ StyleSheet.prototype.getTagForId = function getTagForId(id) { /* simply return a tag, when the componentId was already assigned one */ var prev = this.tagMap[id]; if (prev !== undefined && !prev.sealed) { return prev; } var tag = this.tags[this.tags.length - 1]; /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */ this.capacity -= 1; if (this.capacity === 0) { this.capacity = MAX_SIZE; tag = this.makeTag(tag); this.tags.push(tag); } return this.tagMap[id] = tag; }; /* mainly for createGlobalStyle to check for its id */ StyleSheet.prototype.hasId = function hasId(id) { return this.tagMap[id] !== undefined; }; /* caching layer checking id+name to already have a corresponding tag and injected rules */ StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) { /* exception for rehydrated names which are checked separately */ if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) { return true; } var tag = this.tagMap[id]; return tag !== undefined && tag.hasNameForId(id, name); }; /* registers a componentId and registers it on its tag */ StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) { /* don't inject when the id is already registered */ if (this.tagMap[id] !== undefined) return; var clones = this.clones; for (var i = 0; i < clones.length; i += 1) { clones[i].deferredInject(id, cssRules); } this.getTagForId(id).insertMarker(id); this.deferred[id] = cssRules; }; /* injects rules for a given id with a name that will need to be cached */ StyleSheet.prototype.inject = function inject(id, cssRules, name) { var clones = this.clones; for (var i = 0; i < clones.length; i += 1) { clones[i].inject(id, cssRules, name); } var tag = this.getTagForId(id); /* add deferred rules for component */ if (this.deferred[id] !== undefined) { // Combine passed cssRules with previously deferred CSS rules // NOTE: We cannot mutate the deferred array itself as all clones // do the same (see clones[i].inject) var rules = this.deferred[id].concat(cssRules); tag.insertRules(id, rules, name); this.deferred[id] = undefined; } else { tag.insertRules(id, cssRules, name); } }; /* removes all rules for a given id, which doesn't remove its marker but resets it */ StyleSheet.prototype.remove = function remove(id) { var tag = this.tagMap[id]; if (tag === undefined) return; var clones = this.clones; for (var i = 0; i < clones.length; i += 1) { clones[i].remove(id); } /* remove all rules from the tag */ tag.removeRules(id); /* ignore possible rehydrated names */ this.ignoreRehydratedNames[id] = true; /* delete possible deferred rules */ this.deferred[id] = undefined; }; StyleSheet.prototype.toHTML = function toHTML() { return this.tags.map(function (tag) { return tag.toHTML(); }).join(''); }; StyleSheet.prototype.toReactElements = function toReactElements() { var id = this.id; return this.tags.map(function (tag, i) { var key = 'sc-' + id + '-' + i; return Object(react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"])(tag.toElement(), { key: key }); }); }; createClass(StyleSheet, null, [{ key: 'master', get: function get$$1() { return master || (master = new StyleSheet().rehydrate()); } /* NOTE: This is just for backwards-compatibility with jest-styled-components */ }, { key: 'instance', get: function get$$1() { return StyleSheet.master; } }]); return StyleSheet; }(); // var Keyframes = function () { function Keyframes(name, rules) { var _this = this; classCallCheck(this, Keyframes); this.inject = function (styleSheet) { if (!styleSheet.hasNameForId(_this.id, _this.name)) { styleSheet.inject(_this.id, _this.rules, _this.name); } }; this.toString = function () { throw new StyledComponentsError(12, String(_this.name)); }; this.name = name; this.rules = rules; this.id = 'sc-keyframes-' + name; } Keyframes.prototype.getName = function getName() { return this.name; }; return Keyframes; }(); // /** * inlined version of * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js */ var uppercasePattern = /([A-Z])/g; var msPattern = /^ms-/; /** * Hyphenates a camelcased CSS property name, for example: * * > hyphenateStyleName('backgroundColor') * < "background-color" * > hyphenateStyleName('MozTransition') * < "-moz-transition" * > hyphenateStyleName('msTransition') * < "-ms-transition" * * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix * is converted to `-ms-`. * * @param {string} string * @return {string} */ function hyphenateStyleName(string) { return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); } // // Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js function addUnitIfNeeded(name, value) { // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133 // $FlowFixMe if (value == null || typeof value === 'boolean' || value === '') { return ''; } if (typeof value === 'number' && value !== 0 && !(name in _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__["default"])) { return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers } return String(value).trim(); } // /** * It's falsish not falsy because 0 is allowed. */ var isFalsish = function isFalsish(chunk) { return chunk === undefined || chunk === null || chunk === false || chunk === ''; }; var objToCssArray = function objToCssArray(obj, prevKey) { var rules = []; var keys = Object.keys(obj); keys.forEach(function (key) { if (!isFalsish(obj[key])) { if (isPlainObject(obj[key])) { rules.push.apply(rules, objToCssArray(obj[key], key)); return rules; } else if (isFunction(obj[key])) { rules.push(hyphenateStyleName(key) + ':', obj[key], ';'); return rules; } rules.push(hyphenateStyleName(key) + ': ' + addUnitIfNeeded(key, obj[key]) + ';'); } return rules; }); return prevKey ? [prevKey + ' {'].concat(rules, ['}']) : rules; }; function flatten(chunk, executionContext, styleSheet) { if (Array.isArray(chunk)) { var ruleSet = []; for (var i = 0, len = chunk.length, result; i < len; i += 1) { result = flatten(chunk[i], executionContext, styleSheet); if (result === null) continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result); } return ruleSet; } if (isFalsish(chunk)) { return null; } /* Handle other components */ if (isStyledComponent(chunk)) { return '.' + chunk.styledComponentId; } /* Either execute or defer the function */ if (isFunction(chunk)) { if (isStatelessFunction(chunk) && executionContext) { var _result = chunk(executionContext); if ( true && Object(react_is__WEBPACK_IMPORTED_MODULE_4__["isElement"])(_result)) { // eslint-disable-next-line no-console console.warn(getComponentName(chunk) + ' is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.'); } return flatten(_result, executionContext, styleSheet); } else return chunk; } if (chunk instanceof Keyframes) { if (styleSheet) { chunk.inject(styleSheet); return chunk.getName(); } else return chunk; } /* Handle objects */ return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString(); } // function css(styles) { for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { interpolations[_key - 1] = arguments[_key]; } if (isFunction(styles) || isPlainObject(styles)) { // $FlowFixMe return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations))); } // $FlowFixMe return flatten(interleave(styles, interpolations)); } // function constructWithOptions(componentConstructor, tag) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT; if (!Object(react_is__WEBPACK_IMPORTED_MODULE_4__["isValidElementType"])(tag)) { throw new StyledComponentsError(1, String(tag)); } /* This is callable directly as a template function */ // $FlowFixMe: Not typed to avoid destructuring arguments var templateFunction = function templateFunction() { return componentConstructor(tag, options, css.apply(undefined, arguments)); }; /* If config methods are called, wrap up a new template function and merge options */ templateFunction.withConfig = function (config) { return constructWithOptions(componentConstructor, tag, _extends({}, options, config)); }; /* Modify/inject new props at runtime */ templateFunction.attrs = function (attrs) { return constructWithOptions(componentConstructor, tag, _extends({}, options, { attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean) })); }; return templateFunction; } // // Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js function murmurhash(c) { for (var e = c.length | 0, a = e | 0, d = 0, b; e >= 4;) { b = c.charCodeAt(d) & 255 | (c.charCodeAt(++d) & 255) << 8 | (c.charCodeAt(++d) & 255) << 16 | (c.charCodeAt(++d) & 255) << 24, b = 1540483477 * (b & 65535) + ((1540483477 * (b >>> 16) & 65535) << 16), b ^= b >>> 24, b = 1540483477 * (b & 65535) + ((1540483477 * (b >>> 16) & 65535) << 16), a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16) ^ b, e -= 4, ++d; } switch (e) { case 3: a ^= (c.charCodeAt(d + 2) & 255) << 16; case 2: a ^= (c.charCodeAt(d + 1) & 255) << 8; case 1: a ^= c.charCodeAt(d) & 255, a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16); } a ^= a >>> 13; a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16); return (a ^ a >>> 15) >>> 0; } // /* eslint-disable no-bitwise */ /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised * counterparts */ var charsLength = 52; /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */ var getAlphabeticChar = function getAlphabeticChar(code) { return String.fromCharCode(code + (code > 25 ? 39 : 97)); }; /* input a number, usually a hash and convert it to base-52 */ function generateAlphabeticName(code) { var name = ''; var x = void 0; /* get a char and divide by alphabet-length */ for (x = code; x > charsLength; x = Math.floor(x / charsLength)) { name = getAlphabeticChar(x % charsLength) + name; } return getAlphabeticChar(x % charsLength) + name; } // function hasFunctionObjectKey(obj) { // eslint-disable-next-line guard-for-in, no-restricted-syntax for (var key in obj) { if (isFunction(obj[key])) { return true; } } return false; } function isStaticRules(rules, attrs) { for (var i = 0; i < rules.length; i += 1) { var rule = rules[i]; // recursive case if (Array.isArray(rule) && !isStaticRules(rule, attrs)) { return false; } else if (isFunction(rule) && !isStyledComponent(rule)) { // functions are allowed to be static if they're just being // used to get the classname of a nested styled component return false; } } if (attrs.some(function (x) { return isFunction(x) || hasFunctionObjectKey(x); })) return false; return true; } // /* combines hashStr (murmurhash) and nameGenerator for convenience */ var hasher = function hasher(str) { return generateAlphabeticName(murmurhash(str)); }; /* ComponentStyle is all the CSS-specific stuff, not the React-specific stuff. */ var ComponentStyle = function () { function ComponentStyle(rules, attrs, componentId) { classCallCheck(this, ComponentStyle); this.rules = rules; this.isStatic = false && false; this.componentId = componentId; if (!StyleSheet.master.hasId(componentId)) { StyleSheet.master.deferredInject(componentId, []); } } /* * Flattens a rule set into valid CSS * Hashes it, wraps the whole chunk in a .hash1234 {} * Returns the hash to be injected on render() * */ ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) { var isStatic = this.isStatic, componentId = this.componentId, lastClassName = this.lastClassName; if (IS_BROWSER && isStatic && typeof lastClassName === 'string' && styleSheet.hasNameForId(componentId, lastClassName)) { return lastClassName; } var flatCSS = flatten(this.rules, executionContext, styleSheet); var name = hasher(this.componentId + flatCSS.join('')); if (!styleSheet.hasNameForId(componentId, name)) { styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name, undefined, componentId), name); } this.lastClassName = name; return name; }; ComponentStyle.generateName = function generateName(str) { return hasher(str); }; return ComponentStyle; }(); // var LIMIT = 200; var createWarnTooManyClasses = (function (displayName) { var generatedClasses = {}; var warningSeen = false; return function (className) { if (!warningSeen) { generatedClasses[className] = true; if (Object.keys(generatedClasses).length >= LIMIT) { // Unable to find latestRule in test environment. /* eslint-disable no-console, prefer-template */ console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. \n' + 'Consider using the attrs method, together with a style object for frequently changed styles.\n' + 'Example:\n' + ' const Component = styled.div.attrs(props => ({\n' + ' style: {\n' + ' background: props.background,\n' + ' },\n' + ' }))`width: 100%;`\n\n' + ' '); warningSeen = true; generatedClasses = {}; } } }; }); // var determineTheme = (function (props, fallbackTheme) { var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT; // Props should take precedence over ThemeProvider, which should take precedence over // defaultProps, but React automatically puts defaultProps on props. /* eslint-disable react/prop-types, flowtype-errors/show-errors */ var isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false; var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme; /* eslint-enable */ return theme; }); // var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g; var dashesAtEnds = /(^-|-$)/g; /** * TODO: Explore using CSS.escape when it becomes more available * in evergreen browsers. */ function escape(str) { return str // Replace all possible CSS selectors .replace(escapeRegex, '-') // Remove extraneous hyphens at the start and end .replace(dashesAtEnds, ''); } // function isTag(target) { return typeof target === 'string' && ( true ? target.charAt(0) === target.charAt(0).toLowerCase() : undefined); } // function generateDisplayName(target) { // $FlowFixMe return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')'; } var _TYPE_STATICS; var REACT_STATICS = { childContextTypes: true, contextTypes: true, defaultProps: true, displayName: true, getDerivedStateFromProps: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[react_is__WEBPACK_IMPORTED_MODULE_4__["ForwardRef"]] = { $$typeof: true, render: true }, _TYPE_STATICS); var defineProperty$1 = Object.defineProperty, getOwnPropertyNames = Object.getOwnPropertyNames, _Object$getOwnPropert = Object.getOwnPropertySymbols, getOwnPropertySymbols = _Object$getOwnPropert === undefined ? function () { return []; } : _Object$getOwnPropert, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getPrototypeOf = Object.getPrototypeOf, objectPrototype = Object.prototype; var arrayPrototype = Array.prototype; function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } var keys = arrayPrototype.concat(getOwnPropertyNames(sourceComponent), // $FlowFixMe getOwnPropertySymbols(sourceComponent)); var targetStatics = TYPE_STATICS[targetComponent.$$typeof] || REACT_STATICS; var sourceStatics = TYPE_STATICS[sourceComponent.$$typeof] || REACT_STATICS; var i = keys.length; var descriptor = void 0; var key = void 0; // eslint-disable-next-line no-plusplus while (i--) { key = keys[i]; if ( // $FlowFixMe !KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && // $FlowFixMe !(targetStatics && targetStatics[key])) { descriptor = getOwnPropertyDescriptor(sourceComponent, key); if (descriptor) { try { // Avoid failures from read-only properties defineProperty$1(targetComponent, key, descriptor); } catch (e) { /* fail silently */ } } } } return targetComponent; } return targetComponent; } // function isDerivedReactComponent(fn) { return !!(fn && fn.prototype && fn.prototype.isReactComponent); } // // Helper to call a given function, only once var once = (function (cb) { var called = false; return function () { if (!called) { called = true; cb.apply(undefined, arguments); } }; }); // var ThemeContext = Object(react__WEBPACK_IMPORTED_MODULE_2__["createContext"])(); var ThemeConsumer = ThemeContext.Consumer; /** * Provide a theme to an entire react component tree via context */ var ThemeProvider = function (_Component) { inherits(ThemeProvider, _Component); function ThemeProvider(props) { classCallCheck(this, ThemeProvider); var _this = possibleConstructorReturn(this, _Component.call(this, props)); _this.getContext = Object(memoize_one__WEBPACK_IMPORTED_MODULE_5__["default"])(_this.getContext.bind(_this)); _this.renderInner = _this.renderInner.bind(_this); return _this; } ThemeProvider.prototype.render = function render() { if (!this.props.children) return null; return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( ThemeContext.Consumer, null, this.renderInner ); }; ThemeProvider.prototype.renderInner = function renderInner(outerTheme) { var context = this.getContext(this.props.theme, outerTheme); return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( ThemeContext.Provider, { value: context }, this.props.children ); }; /** * Get the theme from the props, supporting both (outerTheme) => {} * as well as object notation */ ThemeProvider.prototype.getTheme = function getTheme(theme, outerTheme) { if (isFunction(theme)) { var mergedTheme = theme(outerTheme); if ( true && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === 'undefined' ? 'undefined' : _typeof(mergedTheme)) !== 'object')) { throw new StyledComponentsError(7); } return mergedTheme; } if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') { throw new StyledComponentsError(8); } return _extends({}, outerTheme, theme); }; ThemeProvider.prototype.getContext = function getContext(theme, outerTheme) { return this.getTheme(theme, outerTheme); }; return ThemeProvider; }(react__WEBPACK_IMPORTED_MODULE_2__["Component"]); // var CLOSING_TAG_R = /^\s*<\/[a-z]/i; var ServerStyleSheet = function () { function ServerStyleSheet() { classCallCheck(this, ServerStyleSheet); /* The master sheet might be reset, so keep a reference here */ this.masterSheet = StyleSheet.master; this.instance = this.masterSheet.clone(); this.sealed = false; } /** * Mark the ServerStyleSheet as being fully emitted and manually GC it from the * StyleSheet singleton. */ ServerStyleSheet.prototype.seal = function seal() { if (!this.sealed) { /* Remove sealed StyleSheets from the master sheet */ var index = this.masterSheet.clones.indexOf(this.instance); this.masterSheet.clones.splice(index, 1); this.sealed = true; } }; ServerStyleSheet.prototype.collectStyles = function collectStyles(children) { if (this.sealed) { throw new StyledComponentsError(2); } return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( StyleSheetManager, { sheet: this.instance }, children ); }; ServerStyleSheet.prototype.getStyleTags = function getStyleTags() { this.seal(); return this.instance.toHTML(); }; ServerStyleSheet.prototype.getStyleElement = function getStyleElement() { this.seal(); return this.instance.toReactElements(); }; ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) { var _this = this; { throw new StyledComponentsError(3); } /* the tag index keeps track of which tags have already been emitted */ var instance = this.instance; var instanceTagIndex = 0; var streamAttr = SC_STREAM_ATTR + '="true"'; var transformer = new stream.Transform({ transform: function appendStyleChunks(chunk, /* encoding */_, callback) { var tags = instance.tags; var html = ''; /* retrieve html for each new style tag */ for (; instanceTagIndex < tags.length; instanceTagIndex += 1) { var tag = tags[instanceTagIndex]; html += tag.toHTML(streamAttr); } /* force our StyleSheets to emit entirely new tags */ instance.sealAllTags(); var renderedHtml = chunk.toString(); /* prepend style html to chunk, unless the start of the chunk is a closing tag in which case append right after that */ if (CLOSING_TAG_R.test(renderedHtml)) { var endOfClosingTag = renderedHtml.indexOf('>'); this.push(renderedHtml.slice(0, endOfClosingTag + 1) + html + renderedHtml.slice(endOfClosingTag + 1)); } else this.push(html + renderedHtml); callback(); } }); readableStream.on('end', function () { return _this.seal(); }); readableStream.on('error', function (err) { _this.seal(); // forward the error to the transform stream transformer.emit('error', err); }); return readableStream.pipe(transformer); }; return ServerStyleSheet; }(); // var StyleSheetContext = Object(react__WEBPACK_IMPORTED_MODULE_2__["createContext"])(); var StyleSheetConsumer = StyleSheetContext.Consumer; var StyleSheetManager = function (_Component) { inherits(StyleSheetManager, _Component); function StyleSheetManager(props) { classCallCheck(this, StyleSheetManager); var _this = possibleConstructorReturn(this, _Component.call(this, props)); _this.getContext = Object(memoize_one__WEBPACK_IMPORTED_MODULE_5__["default"])(_this.getContext); return _this; } StyleSheetManager.prototype.getContext = function getContext(sheet, target) { if (sheet) { return sheet; } else if (target) { return new StyleSheet(target); } else { throw new StyledComponentsError(4); } }; StyleSheetManager.prototype.render = function render() { var _props = this.props, children = _props.children, sheet = _props.sheet, target = _props.target; return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( StyleSheetContext.Provider, { value: this.getContext(sheet, target) }, true ? react__WEBPACK_IMPORTED_MODULE_2___default.a.Children.only(children) : undefined ); }; return StyleSheetManager; }(react__WEBPACK_IMPORTED_MODULE_2__["Component"]); true ? StyleSheetManager.propTypes = { sheet: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.instanceOf(StyleSheet), prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.instanceOf(ServerStyleSheet)]), target: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.shape({ appendChild: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.func.isRequired }) } : undefined; // var THEME_PROP_REGEX = /\.theme[.[]/; var identifiers = {}; /* We depend on components having unique IDs */ function generateId(_ComponentStyle, _displayName, parentComponentId) { var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName); /** * This ensures uniqueness if two components happen to share * the same displayName. */ var nr = (identifiers[displayName] || 0) + 1; identifiers[displayName] = nr; var componentId = displayName + '-' + _ComponentStyle.generateName(displayName + nr); return parentComponentId ? parentComponentId + '-' + componentId : componentId; } // $FlowFixMe var StyledComponent = function (_Component) { inherits(StyledComponent, _Component); function StyledComponent() { classCallCheck(this, StyledComponent); var _this = possibleConstructorReturn(this, _Component.call(this)); _this.attrs = {}; _this.renderOuter = _this.renderOuter.bind(_this); _this.renderInner = _this.renderInner.bind(_this); if (true) { _this.warnInnerRef = once(function (displayName) { return ( // eslint-disable-next-line no-console console.warn('The "innerRef" API has been removed in styled-components v4 in favor of React 16 ref forwarding, use "ref" instead like a typical component. "innerRef" was detected on component "' + displayName + '".') ); }); _this.warnAttrsFnObjectKeyDeprecated = once(function (key, displayName) { return ( // eslint-disable-next-line no-console console.warn('Functions as object-form attrs({}) keys are now deprecated and will be removed in a future version of styled-components. Switch to the new attrs(props => ({})) syntax instead for easier and more powerful composition. The attrs key in question is "' + key + '" on component "' + displayName + '".', '\n ' + new Error().stack) ); }); _this.warnNonStyledComponentAttrsObjectKey = once(function (key, displayName) { return ( // eslint-disable-next-line no-console console.warn('It looks like you\'ve used a non styled-component as the value for the "' + key + '" prop in an object-form attrs constructor of "' + displayName + '".\n' + 'You should use the new function-form attrs constructor which avoids this issue: attrs(props => ({ yourStuff }))\n' + "To continue using the deprecated object syntax, you'll need to wrap your component prop in a function to make it available inside the styled component (you'll still get the deprecation warning though.)\n" + ('For example, { ' + key + ': () => InnerComponent } instead of { ' + key + ': InnerComponent }')) ); }); } return _this; } StyledComponent.prototype.render = function render() { return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( StyleSheetConsumer, null, this.renderOuter ); }; StyledComponent.prototype.renderOuter = function renderOuter() { var styleSheet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : StyleSheet.master; this.styleSheet = styleSheet; // No need to subscribe a static component to theme changes, it won't change anything if (this.props.forwardedComponent.componentStyle.isStatic) return this.renderInner(); return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( ThemeConsumer, null, this.renderInner ); }; StyledComponent.prototype.renderInner = function renderInner(theme) { var _props$forwardedCompo = this.props.forwardedComponent, componentStyle = _props$forwardedCompo.componentStyle, defaultProps = _props$forwardedCompo.defaultProps, displayName = _props$forwardedCompo.displayName, foldedComponentIds = _props$forwardedCompo.foldedComponentIds, styledComponentId = _props$forwardedCompo.styledComponentId, target = _props$forwardedCompo.target, usesTheme = _props$forwardedCompo.usesTheme; var generatedClassName = void 0; var rawTheme = void 0; if (componentStyle.isStatic) { generatedClassName = this.generateAndInjectStyles(EMPTY_OBJECT, this.props); } else { rawTheme = determineTheme(this.props, theme, defaultProps); generatedClassName = this.generateAndInjectStyles(rawTheme || EMPTY_OBJECT, this.props); if ( true && usesTheme && !rawTheme) { console.error('Component \'' + // $FlowFixMe displayName + '\' (.' + styledComponentId + ') references the \'theme\' prop in its styles but no theme was provided via prop or .'); } } var elementToBeCreated = this.props.as || this.attrs.as || target; var isTargetTag = isTag(elementToBeCreated); var propsForElement = {}; var computedProps = _extends({}, this.props, this.attrs); var key = void 0; // eslint-disable-next-line guard-for-in for (key in computedProps) { if ( true && key === 'innerRef' && isTargetTag) { this.warnInnerRef(displayName); } if (key === 'forwardedComponent' || key === 'as') { continue; } else if (key === 'forwardedRef') propsForElement.ref = computedProps[key];else if (key === 'forwardedAs') propsForElement.as = computedProps[key];else if (!isTargetTag || Object(_emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_7__["default"])(key)) { // Don't pass through non HTML tags through to HTML elements propsForElement[key] = computedProps[key]; } } if (this.props.style && this.attrs.style) { propsForElement.style = _extends({}, this.attrs.style, this.props.style); } propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, this.props.className, this.attrs.className).filter(Boolean).join(' '); return Object(react__WEBPACK_IMPORTED_MODULE_2__["createElement"])(elementToBeCreated, propsForElement); }; StyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props, attrs) { var _this2 = this; var context = _extends({}, props, { theme: theme }); if (!attrs.length) return context; this.attrs = {}; attrs.forEach(function (attrDef) { var resolvedAttrDef = attrDef; var attrDefWasFn = false; var attr = void 0; var key = void 0; if (isFunction(resolvedAttrDef)) { // $FlowFixMe resolvedAttrDef = resolvedAttrDef(context); attrDefWasFn = true; } /* eslint-disable guard-for-in */ // $FlowFixMe for (key in resolvedAttrDef) { attr = resolvedAttrDef[key]; if (!attrDefWasFn) { if (isFunction(attr) && !isDerivedReactComponent(attr) && !isStyledComponent(attr)) { if (true) { _this2.warnAttrsFnObjectKeyDeprecated(key, props.forwardedComponent.displayName); } attr = attr(context); if ( true && react__WEBPACK_IMPORTED_MODULE_2___default.a.isValidElement(attr)) { _this2.warnNonStyledComponentAttrsObjectKey(key, props.forwardedComponent.displayName); } } } _this2.attrs[key] = attr; context[key] = attr; } /* eslint-enable */ }); return context; }; StyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) { var _props$forwardedCompo2 = props.forwardedComponent, attrs = _props$forwardedCompo2.attrs, componentStyle = _props$forwardedCompo2.componentStyle, warnTooManyClasses = _props$forwardedCompo2.warnTooManyClasses; // statically styled-components don't need to build an execution context object, // and shouldn't be increasing the number of class names if (componentStyle.isStatic && !attrs.length) { return componentStyle.generateAndInjectStyles(EMPTY_OBJECT, this.styleSheet); } var className = componentStyle.generateAndInjectStyles(this.buildExecutionContext(theme, props, attrs), this.styleSheet); if ( true && warnTooManyClasses) warnTooManyClasses(className); return className; }; return StyledComponent; }(react__WEBPACK_IMPORTED_MODULE_2__["Component"]); function createStyledComponent(target, options, rules) { var isTargetStyledComp = isStyledComponent(target); var isClass = !isTag(target); var _options$displayName = options.displayName, displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName, _options$componentId = options.componentId, componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId, _options$ParentCompon = options.ParentComponent, ParentComponent = _options$ParentCompon === undefined ? StyledComponent : _options$ParentCompon, _options$attrs = options.attrs, attrs = _options$attrs === undefined ? EMPTY_ARRAY : _options$attrs; var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId; // fold the underlying StyledComponent attrs up (implicit extend) var finalAttrs = // $FlowFixMe isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs; var componentStyle = new ComponentStyle(isTargetStyledComp ? // fold the underlying StyledComponent rules up (implicit extend) // $FlowFixMe target.componentStyle.rules.concat(rules) : rules, finalAttrs, styledComponentId); /** * forwardRef creates a new interim component, which we'll take advantage of * instead of extending ParentComponent to create _another_ interim class */ var WrappedStyledComponent = void 0; var forwardRef = function forwardRef(props, ref) { return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(ParentComponent, _extends({}, props, { forwardedComponent: WrappedStyledComponent, forwardedRef: ref })); }; forwardRef.displayName = displayName; WrappedStyledComponent = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef(forwardRef); WrappedStyledComponent.displayName = displayName; // $FlowFixMe WrappedStyledComponent.attrs = finalAttrs; // $FlowFixMe WrappedStyledComponent.componentStyle = componentStyle; // $FlowFixMe WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? // $FlowFixMe Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY; // $FlowFixMe WrappedStyledComponent.styledComponentId = styledComponentId; // fold the underlying StyledComponent target up since we folded the styles // $FlowFixMe WrappedStyledComponent.target = isTargetStyledComp ? target.target : target; // $FlowFixMe WrappedStyledComponent.withComponent = function withComponent(tag) { var previousComponentId = options.componentId, optionsToCopy = objectWithoutProperties(options, ['componentId']); var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag))); var newOptions = _extends({}, optionsToCopy, { attrs: finalAttrs, componentId: newComponentId, ParentComponent: ParentComponent }); return createStyledComponent(tag, newOptions, rules); }; // $FlowFixMe Object.defineProperty(WrappedStyledComponent, 'defaultProps', { get: function get$$1() { return this._foldedDefaultProps; }, set: function set$$1(obj) { // $FlowFixMe this._foldedDefaultProps = isTargetStyledComp ? Object(merge_anything__WEBPACK_IMPORTED_MODULE_8__["default"])(target.defaultProps, obj) : obj; } }); if (true) { // $FlowFixMe WrappedStyledComponent.usesTheme = componentStyle.rules.some(function (x) { return isFunction(x) && THEME_PROP_REGEX.test(x.toString()); }); // $FlowFixMe WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName); } // $FlowFixMe WrappedStyledComponent.toString = function () { return '.' + WrappedStyledComponent.styledComponentId; }; if (isClass) { hoistNonReactStatics(WrappedStyledComponent, target, { // all SC-specific things should not be hoisted attrs: true, componentStyle: true, displayName: true, foldedComponentIds: true, styledComponentId: true, target: true, withComponent: true }); } return WrappedStyledComponent; } // // Thanks to ReactDOMFactories for this handy list! var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan']; // var styled = function styled(tag) { return constructWithOptions(createStyledComponent, tag); }; // Shorthands for all valid HTML Elements domElements.forEach(function (domElement) { styled[domElement] = styled(domElement); }); // var GlobalStyle = function () { function GlobalStyle(rules, componentId) { classCallCheck(this, GlobalStyle); this.rules = rules; this.componentId = componentId; this.isStatic = isStaticRules(rules, EMPTY_ARRAY); if (!StyleSheet.master.hasId(componentId)) { StyleSheet.master.deferredInject(componentId, []); } } GlobalStyle.prototype.createStyles = function createStyles(executionContext, styleSheet) { var flatCSS = flatten(this.rules, executionContext, styleSheet); var css = stringifyRules(flatCSS, ''); styleSheet.inject(this.componentId, css); }; GlobalStyle.prototype.removeStyles = function removeStyles(styleSheet) { var componentId = this.componentId; if (styleSheet.hasId(componentId)) { styleSheet.remove(componentId); } }; // TODO: overwrite in-place instead of remove+create? GlobalStyle.prototype.renderStyles = function renderStyles(executionContext, styleSheet) { this.removeStyles(styleSheet); this.createStyles(executionContext, styleSheet); }; return GlobalStyle; }(); // // place our cache into shared context so it'll persist between HMRs if (IS_BROWSER) { window.scCGSHMRCache = {}; } function createGlobalStyle(strings) { for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { interpolations[_key - 1] = arguments[_key]; } var rules = css.apply(undefined, [strings].concat(interpolations)); var id = 'sc-global-' + murmurhash(JSON.stringify(rules)); var style = new GlobalStyle(rules, id); var GlobalStyleComponent = function (_React$Component) { inherits(GlobalStyleComponent, _React$Component); function GlobalStyleComponent(props) { classCallCheck(this, GlobalStyleComponent); var _this = possibleConstructorReturn(this, _React$Component.call(this, props)); var _this$constructor = _this.constructor, globalStyle = _this$constructor.globalStyle, styledComponentId = _this$constructor.styledComponentId; if (IS_BROWSER) { window.scCGSHMRCache[styledComponentId] = (window.scCGSHMRCache[styledComponentId] || 0) + 1; } /** * This fixes HMR compatibility. Don't ask me why, but this combination of * caching the closure variables via statics and then persisting the statics in * state works across HMR where no other combination did. ¯\_(ツ)_/¯ */ _this.state = { globalStyle: globalStyle, styledComponentId: styledComponentId }; return _this; } GlobalStyleComponent.prototype.componentWillUnmount = function componentWillUnmount() { if (window.scCGSHMRCache[this.state.styledComponentId]) { window.scCGSHMRCache[this.state.styledComponentId] -= 1; } /** * Depending on the order "render" is called this can cause the styles to be lost * until the next render pass of the remaining instance, which may * not be immediate. */ if (window.scCGSHMRCache[this.state.styledComponentId] === 0) { this.state.globalStyle.removeStyles(this.styleSheet); } }; GlobalStyleComponent.prototype.render = function render() { var _this2 = this; if ( true && react__WEBPACK_IMPORTED_MODULE_2___default.a.Children.count(this.props.children)) { // eslint-disable-next-line no-console console.warn('The global style component ' + this.state.styledComponentId + ' was given child JSX. createGlobalStyle does not render children.'); } return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( StyleSheetConsumer, null, function (styleSheet) { _this2.styleSheet = styleSheet || StyleSheet.master; var globalStyle = _this2.state.globalStyle; if (globalStyle.isStatic) { globalStyle.renderStyles(STATIC_EXECUTION_CONTEXT, _this2.styleSheet); return null; } else { return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( ThemeConsumer, null, function (theme) { // $FlowFixMe var defaultProps = _this2.constructor.defaultProps; var context = _extends({}, _this2.props); if (typeof theme !== 'undefined') { context.theme = determineTheme(_this2.props, theme, defaultProps); } globalStyle.renderStyles(context, _this2.styleSheet); return null; } ); } } ); }; return GlobalStyleComponent; }(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component); GlobalStyleComponent.globalStyle = style; GlobalStyleComponent.styledComponentId = id; return GlobalStyleComponent; } // var replaceWhitespace = function replaceWhitespace(str) { return str.replace(/\s|\\n/g, ''); }; function keyframes(strings) { /* Warning if you've used keyframes on React Native */ if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { // eslint-disable-next-line no-console console.warn('`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.'); } for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { interpolations[_key - 1] = arguments[_key]; } var rules = css.apply(undefined, [strings].concat(interpolations)); var name = generateAlphabeticName(murmurhash(replaceWhitespace(JSON.stringify(rules)))); return new Keyframes(name, stringifyRules(rules, name, '@keyframes')); } // var withTheme = (function (Component$$1) { var WithTheme = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef(function (props, ref) { return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement( ThemeConsumer, null, function (theme) { // $FlowFixMe var defaultProps = Component$$1.defaultProps; var themeProp = determineTheme(props, theme, defaultProps); if ( true && themeProp === undefined) { // eslint-disable-next-line no-console console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "' + getComponentName(Component$$1) + '"'); } return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(Component$$1, _extends({}, props, { theme: themeProp, ref: ref })); } ); }); hoistNonReactStatics(WithTheme, Component$$1); WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')'; return WithTheme; }); // /* eslint-disable */ var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = { StyleSheet: StyleSheet }; // /* Warning if you've imported this file on React Native */ if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { // eslint-disable-next-line no-console console.warn("It looks like you've imported 'styled-components' on React Native.\n" + "Perhaps you're looking to import 'styled-components/native'?\n" + 'Read more about this at https://www.styled-components.com/docs/basics#react-native'); } /* Warning if there are several instances of styled-components */ if ( true && typeof window !== 'undefined' && typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Node.js') === -1 && navigator.userAgent.indexOf('jsdom') === -1) { window['__styled-components-init__'] = window['__styled-components-init__'] || 0; if (window['__styled-components-init__'] === 1) { // eslint-disable-next-line no-console console.warn("It looks like there are several instances of 'styled-components' initialized in this application. " + 'This may cause dynamic styles not rendering properly, errors happening during rehydration process ' + 'and makes your application bigger without a good reason.\n\n' + 'See https://s-c.sh/2BAXzed for more info.'); } window['__styled-components-init__'] += 1; } // /* harmony default export */ __webpack_exports__["default"] = (styled); //# sourceMappingURL=styled-components.browser.esm.js.map /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"))) /***/ }), /***/ "./node_modules/stylis-rule-sheet/index.js": /*!*************************************************!*\ !*** ./node_modules/stylis-rule-sheet/index.js ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { (function (factory) { true ? (module['exports'] = factory()) : undefined }(function () { 'use strict' return function (insertRule) { var delimiter = '/*|*/' var needle = delimiter+'}' function toSheet (block) { if (block) try { insertRule(block + '}') } catch (e) {} } return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) { switch (context) { // property case 1: // @import if (depth === 0 && content.charCodeAt(0) === 64) return insertRule(content+';'), '' break // selector case 2: if (ns === 0) return content + delimiter break // at-rule case 3: switch (ns) { // @font-face, @page case 102: case 112: return insertRule(selectors[0]+content), '' default: return content + (at === 0 ? delimiter : '') } case -2: content.split(needle).forEach(toSheet) } } } })) /***/ }), /***/ "./node_modules/stylis/stylis.min.js": /*!*******************************************!*\ !*** ./node_modules/stylis/stylis.min.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { !function(e){ true?module.exports=e(null):undefined}(function e(a){"use strict";var r=/^\0+/g,c=/[\0\r\f]/g,s=/: */g,t=/zoo|gra/,i=/([,: ])(transform)/g,f=/,+\s*(?![^(]*[)])/g,n=/ +\s*(?![^(]*[)])/g,l=/ *[\0] */g,o=/,\r+?/g,h=/([\t\r\n ])*\f?&/g,u=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,d=/\W+/g,b=/@(k\w+)\s*(\S*)\s*/,p=/::(place)/g,k=/:(read-only)/g,g=/\s+(?=[{\];=:>])/g,A=/([[}=:>])\s+/g,C=/(\{[^{]+?);(?=\})/g,w=/\s{2,}/g,v=/([^\(])(:+) */g,m=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,$=/([\s\S]*?);/g,y=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,j=/stretch|:\s*\w+\-(?:conte|avail)/,z=/([^-])(image-set\()/,N="-webkit-",S="-moz-",F="-ms-",W=59,q=125,B=123,D=40,E=41,G=91,H=93,I=10,J=13,K=9,L=64,M=32,P=38,Q=45,R=95,T=42,U=44,V=58,X=39,Y=34,Z=47,_=62,ee=43,ae=126,re=0,ce=12,se=11,te=107,ie=109,fe=115,ne=112,le=111,oe=105,he=99,ue=100,de=112,be=1,pe=1,ke=0,ge=1,Ae=1,Ce=1,we=0,ve=0,me=0,xe=[],$e=[],ye=0,Oe=null,je=-2,ze=-1,Ne=0,Se=1,Fe=2,We=3,qe=0,Be=1,De="",Ee="",Ge="";function He(e,a,s,t,i){for(var f,n,o=0,h=0,u=0,d=0,g=0,A=0,C=0,w=0,m=0,$=0,y=0,O=0,j=0,z=0,R=0,we=0,$e=0,Oe=0,je=0,ze=s.length,Je=ze-1,Re="",Te="",Ue="",Ve="",Xe="",Ye="";R0)Te=Te.replace(c,"");if(Te.trim().length>0){switch(C){case M:case K:case W:case J:case I:break;default:Te+=s.charAt(R)}C=W}}if(1===$e)switch(C){case B:case q:case W:case Y:case X:case D:case E:case U:$e=0;case K:case J:case I:case M:break;default:for($e=0,je=R,g=C,R--,C=W;je0)++R,C=g;case B:je=ze}}switch(C){case B:for(g=(Te=Te.trim()).charCodeAt(0),y=1,je=++R;R0)Te=Te.replace(c,"");switch(A=Te.charCodeAt(1)){case ue:case ie:case fe:case Q:f=a;break;default:f=xe}if(je=(Ue=He(a,f,Ue,A,i+1)).length,me>0&&0===je)je=Te.length;if(ye>0)if(f=Ie(xe,Te,Oe),n=Pe(We,Ue,f,a,pe,be,je,A,i,t),Te=f.join(""),void 0!==n)if(0===(je=(Ue=n.trim()).length))A=0,Ue="";if(je>0)switch(A){case fe:Te=Te.replace(x,Me);case ue:case ie:case Q:Ue=Te+"{"+Ue+"}";break;case te:if(Ue=(Te=Te.replace(b,"$1 $2"+(Be>0?De:"")))+"{"+Ue+"}",1===Ae||2===Ae&&Le("@"+Ue,3))Ue="@"+N+Ue+"@"+Ue;else Ue="@"+Ue;break;default:if(Ue=Te+Ue,t===de)Ve+=Ue,Ue=""}else Ue="";break;default:Ue=He(a,Ie(a,Te,Oe),Ue,t,i+1)}Xe+=Ue,O=0,$e=0,z=0,we=0,Oe=0,j=0,Te="",Ue="",C=s.charCodeAt(++R);break;case q:case W:if((je=(Te=(we>0?Te.replace(c,""):Te).trim()).length)>1){if(0===z)if((g=Te.charCodeAt(0))===Q||g>96&&g<123)je=(Te=Te.replace(" ",":")).length;if(ye>0)if(void 0!==(n=Pe(Se,Te,a,e,pe,be,Ve.length,t,i,t)))if(0===(je=(Te=n.trim()).length))Te="\0\0";switch(g=Te.charCodeAt(0),A=Te.charCodeAt(1),g){case re:break;case L:if(A===oe||A===he){Ye+=Te+s.charAt(R);break}default:if(Te.charCodeAt(je-1)===V)break;Ve+=Ke(Te,g,A,Te.charCodeAt(2))}}O=0,$e=0,z=0,we=0,Oe=0,Te="",C=s.charCodeAt(++R)}}switch(C){case J:case I:if(h+d+u+o+ve===0)switch($){case E:case X:case Y:case L:case ae:case _:case T:case ee:case Z:case Q:case V:case U:case W:case B:case q:break;default:if(z>0)$e=1}if(h===Z)h=0;else if(ge+O===0&&t!==te&&Te.length>0)we=1,Te+="\0";if(ye*qe>0)Pe(Ne,Te,a,e,pe,be,Ve.length,t,i,t);be=1,pe++;break;case W:case q:if(h+d+u+o===0){be++;break}default:switch(be++,Re=s.charAt(R),C){case K:case M:if(d+o+h===0)switch(w){case U:case V:case K:case M:Re="";break;default:if(C!==M)Re=" "}break;case re:Re="\\0";break;case ce:Re="\\f";break;case se:Re="\\v";break;case P:if(d+h+o===0&&ge>0)Oe=1,we=1,Re="\f"+Re;break;case 108:if(d+h+o+ke===0&&z>0)switch(R-z){case 2:if(w===ne&&s.charCodeAt(R-3)===V)ke=w;case 8:if(m===le)ke=m}break;case V:if(d+h+o===0)z=R;break;case U:if(h+u+d+o===0)we=1,Re+="\r";break;case Y:case X:if(0===h)d=d===C?0:0===d?C:d;break;case G:if(d+h+u===0)o++;break;case H:if(d+h+u===0)o--;break;case E:if(d+h+o===0)u--;break;case D:if(d+h+o===0){if(0===O)switch(2*w+3*m){case 533:break;default:y=0,O=1}u++}break;case L:if(h+u+d+o+z+j===0)j=1;break;case T:case Z:if(d+o+u>0)break;switch(h){case 0:switch(2*C+3*s.charCodeAt(R+1)){case 235:h=Z;break;case 220:je=R,h=T}break;case T:if(C===Z&&w===T&&je+2!==R){if(33===s.charCodeAt(je+2))Ve+=s.substring(je,R+1);Re="",h=0}}}if(0===h){if(ge+d+o+j===0&&t!==te&&C!==W)switch(C){case U:case ae:case _:case ee:case E:case D:if(0===O){switch(w){case K:case M:case I:case J:Re+="\0";break;default:Re="\0"+Re+(C===U?"":"\0")}we=1}else switch(C){case D:if(z+7===R&&108===w)z=0;O=++y;break;case E:if(0==(O=--y))we=1,Re+="\0"}break;case K:case M:switch(w){case re:case B:case q:case W:case U:case ce:case K:case M:case I:case J:break;default:if(0===O)we=1,Re+="\0"}}if(Te+=Re,C!==M&&C!==K)$=C}}m=w,w=C,R++}if(je=Ve.length,me>0)if(0===je&&0===Xe.length&&0===a[0].length==false)if(t!==ie||1===a.length&&(ge>0?Ee:Ge)===a[0])je=a.join(",").length+2;if(je>0){if(f=0===ge&&t!==te?function(e){for(var a,r,s=0,t=e.length,i=Array(t);s1)continue;if(u=n.charCodeAt(n.length-1),d=r.charCodeAt(0),a="",0!==o)switch(u){case T:case ae:case _:case ee:case M:case D:break;default:a=" "}switch(d){case P:r=a+Ee;case ae:case _:case ee:case M:case E:case D:break;case G:r=a+r+Ee;break;case V:switch(2*r.charCodeAt(1)+3*r.charCodeAt(2)){case 530:if(Ce>0){r=a+r.substring(8,h-1);break}default:if(o<1||f[o-1].length<1)r=a+Ee+r}break;case U:a="";default:if(h>1&&r.indexOf(":")>0)r=a+r.replace(v,"$1"+Ee+"$2");else r=a+r+Ee}n+=r}i[s]=n.replace(c,"").trim()}return i}(a):a,ye>0)if(void 0!==(n=Pe(Fe,Ve,f,e,pe,be,je,t,i,t))&&0===(Ve=n).length)return Ye+Ve+Xe;if(Ve=f.join(",")+"{"+Ve+"}",Ae*ke!=0){if(2===Ae&&!Le(Ve,2))ke=0;switch(ke){case le:Ve=Ve.replace(k,":"+S+"$1")+Ve;break;case ne:Ve=Ve.replace(p,"::"+N+"input-$1")+Ve.replace(p,"::"+S+"$1")+Ve.replace(p,":"+F+"input-$1")+Ve}ke=0}}return Ye+Ve+Xe}function Ie(e,a,r){var c=a.trim().split(o),s=c,t=c.length,i=e.length;switch(i){case 0:case 1:for(var f=0,n=0===i?"":e[0]+" ";f0&&ge>0)return s.replace(u,"$1").replace(h,"$1"+Ge);break;default:return e.trim()+s.replace(h,"$1"+e.trim())}default:if(r*ge>0&&s.indexOf("\f")>0)return s.replace(h,(e.charCodeAt(0)===V?"":"$1")+e.trim())}return e+s}function Ke(e,a,r,c){var l,o=0,h=e+";",u=2*a+3*r+4*c;if(944===u)return function(e){var a=e.length,r=e.indexOf(":",9)+1,c=e.substring(0,r).trim(),s=e.substring(r,a-1).trim();switch(e.charCodeAt(9)*Be){case 0:break;case Q:if(110!==e.charCodeAt(10))break;default:for(var t=s.split((s="",f)),i=0,r=0,a=t.length;iL&&h<90||h>96&&h<123||h===R||h===Q&&l.charCodeAt(1)!==Q))switch(isNaN(parseFloat(l))+(-1!==l.indexOf("("))){case 1:switch(l){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:l+=De}}o[r++]=l}s+=(0===i?"":",")+o.join(" ")}}if(s=c+s+";",1===Ae||2===Ae&&Le(s,1))return N+s+s;return s}(h);else if(0===Ae||2===Ae&&!Le(h,1))return h;switch(u){case 1015:return 97===h.charCodeAt(10)?N+h+h:h;case 951:return 116===h.charCodeAt(3)?N+h+h:h;case 963:return 110===h.charCodeAt(5)?N+h+h:h;case 1009:if(100!==h.charCodeAt(4))break;case 969:case 942:return N+h+h;case 978:return N+h+S+h+h;case 1019:case 983:return N+h+S+h+F+h+h;case 883:if(h.charCodeAt(8)===Q)return N+h+h;if(h.indexOf("image-set(",11)>0)return h.replace(z,"$1"+N+"$2")+h;return h;case 932:if(h.charCodeAt(4)===Q)switch(h.charCodeAt(5)){case 103:return N+"box-"+h.replace("-grow","")+N+h+F+h.replace("grow","positive")+h;case 115:return N+h+F+h.replace("shrink","negative")+h;case 98:return N+h+F+h.replace("basis","preferred-size")+h}return N+h+F+h+h;case 964:return N+h+F+"flex-"+h+h;case 1023:if(99!==h.charCodeAt(8))break;return l=h.substring(h.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),N+"box-pack"+l+N+h+F+"flex-pack"+l+h;case 1005:return t.test(h)?h.replace(s,":"+N)+h.replace(s,":"+S)+h:h;case 1e3:switch(o=(l=h.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(o)){case 226:l=h.replace(m,"tb");break;case 232:l=h.replace(m,"tb-rl");break;case 220:l=h.replace(m,"lr");break;default:return h}return N+h+F+l+h;case 1017:if(-1===h.indexOf("sticky",9))return h;case 975:switch(o=(h=e).length-10,u=(l=(33===h.charCodeAt(o)?h.substring(0,o):h).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(l.charCodeAt(8)<111)break;case 115:h=h.replace(l,N+l)+";"+h;break;case 207:case 102:h=h.replace(l,N+(u>102?"inline-":"")+"box")+";"+h.replace(l,N+l)+";"+h.replace(l,F+l+"box")+";"+h}return h+";";case 938:if(h.charCodeAt(5)===Q)switch(h.charCodeAt(6)){case 105:return l=h.replace("-items",""),N+h+N+"box-"+l+F+"flex-"+l+h;case 115:return N+h+F+"flex-item-"+h.replace(y,"")+h;default:return N+h+F+"flex-line-pack"+h.replace("align-content","").replace(y,"")+h}break;case 973:case 989:if(h.charCodeAt(3)!==Q||122===h.charCodeAt(4))break;case 931:case 953:if(true===j.test(e))if(115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0))return Ke(e.replace("stretch","fill-available"),a,r,c).replace(":fill-available",":stretch");else return h.replace(l,N+l)+h.replace(l,S+l.replace("fill-",""))+h;break;case 962:if(h=N+h+(102===h.charCodeAt(5)?F+h:"")+h,r+c===211&&105===h.charCodeAt(13)&&h.indexOf("transform",10)>0)return h.substring(0,h.indexOf(";",27)+1).replace(i,"$1"+N+"$2")+h}return h}function Le(e,a){var r=e.indexOf(1===a?":":"{"),c=e.substring(0,3!==a?r:10),s=e.substring(r+1,e.length-1);return Oe(2!==a?c:c.replace(O,"$1"),s,a)}function Me(e,a){var r=Ke(a,a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2));return r!==a+";"?r.replace($," or ($1)").substring(4):"("+a+")"}function Pe(e,a,r,c,s,t,i,f,n,l){for(var o,h=0,u=a;h0)De=s.replace(d,t===G?"":"-");if(t=1,1===ge)Ge=s;else Ee=s;var i,f=[Ge];if(ye>0)if(void 0!==(i=Pe(ze,r,f,f,pe,be,0,0,0,0))&&"string"==typeof i)r=i;var n=He(xe,f,r,0,0);if(ye>0)if(void 0!==(i=Pe(je,n,f,f,pe,be,n.length,0,0,0))&&"string"!=typeof(n=i))t=0;return De="",Ge="",Ee="",ke=0,pe=1,be=1,we*t==0?n:n.replace(c,"").replace(g,"").replace(A,"$1").replace(C,"$1").replace(w," ")}if(Te.use=function e(a){switch(a){case void 0:case null:ye=$e.length=0;break;default:if("function"==typeof a)$e[ye++]=a;else if("object"==typeof a)for(var r=0,c=a.length;r= 0; var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); if (needsAlphaFormat) { // Special case for "transparent", all other non-alpha formats // will return rgba when there is transparency. if (format === "name" && this._a === 0) { return this.toName(); } return this.toRgbString(); } if (format === "rgb") { formattedString = this.toRgbString(); } if (format === "prgb") { formattedString = this.toPercentageRgbString(); } if (format === "hex" || format === "hex6") { formattedString = this.toHexString(); } if (format === "hex3") { formattedString = this.toHexString(true); } if (format === "hex4") { formattedString = this.toHex8String(true); } if (format === "hex8") { formattedString = this.toHex8String(); } if (format === "name") { formattedString = this.toName(); } if (format === "hsl") { formattedString = this.toHslString(); } if (format === "hsv") { formattedString = this.toHsvString(); } return formattedString || this.toHexString(); }, clone: function() { return tinycolor(this.toString()); }, _applyModification: function(fn, args) { var color = fn.apply(null, [this].concat([].slice.call(args))); this._r = color._r; this._g = color._g; this._b = color._b; this.setAlpha(color._a); return this; }, lighten: function() { return this._applyModification(lighten, arguments); }, brighten: function() { return this._applyModification(brighten, arguments); }, darken: function() { return this._applyModification(darken, arguments); }, desaturate: function() { return this._applyModification(desaturate, arguments); }, saturate: function() { return this._applyModification(saturate, arguments); }, greyscale: function() { return this._applyModification(greyscale, arguments); }, spin: function() { return this._applyModification(spin, arguments); }, _applyCombination: function(fn, args) { return fn.apply(null, [this].concat([].slice.call(args))); }, analogous: function() { return this._applyCombination(analogous, arguments); }, complement: function() { return this._applyCombination(complement, arguments); }, monochromatic: function() { return this._applyCombination(monochromatic, arguments); }, splitcomplement: function() { return this._applyCombination(splitcomplement, arguments); }, triad: function() { return this._applyCombination(triad, arguments); }, tetrad: function() { return this._applyCombination(tetrad, arguments); } }; // If input is an object, force 1 into "1.0" to handle ratios properly // String input requires "1.0" as input, so 1 will be treated as 1 tinycolor.fromRatio = function(color, opts) { if (typeof color == "object") { var newColor = {}; for (var i in color) { if (color.hasOwnProperty(i)) { if (i === "a") { newColor[i] = color[i]; } else { newColor[i] = convertToPercentage(color[i]); } } } color = newColor; } return tinycolor(color, opts); }; // Given a string or object, convert that input to RGB // Possible string inputs: // // "red" // "#f00" or "f00" // "#ff0000" or "ff0000" // "#ff000000" or "ff000000" // "rgb 255 0 0" or "rgb (255, 0, 0)" // "rgb 1.0 0 0" or "rgb (1, 0, 0)" // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" // function inputToRGB(color) { var rgb = { r: 0, g: 0, b: 0 }; var a = 1; var s = null; var v = null; var l = null; var ok = false; var format = false; if (typeof color == "string") { color = stringInputToObject(color); } if (typeof color == "object") { if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { rgb = rgbToRgb(color.r, color.g, color.b); ok = true; format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { s = convertToPercentage(color.s); v = convertToPercentage(color.v); rgb = hsvToRgb(color.h, s, v); ok = true; format = "hsv"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { s = convertToPercentage(color.s); l = convertToPercentage(color.l); rgb = hslToRgb(color.h, s, l); ok = true; format = "hsl"; } if (color.hasOwnProperty("a")) { a = color.a; } } a = boundAlpha(a); return { ok: ok, format: color.format || format, r: mathMin(255, mathMax(rgb.r, 0)), g: mathMin(255, mathMax(rgb.g, 0)), b: mathMin(255, mathMax(rgb.b, 0)), a: a }; } // Conversion Functions // -------------------- // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: // // `rgbToRgb` // Handle bounds / percentage checking to conform to CSS color spec // // *Assumes:* r, g, b in [0, 255] or [0, 1] // *Returns:* { r, g, b } in [0, 255] function rgbToRgb(r, g, b){ return { r: bound01(r, 255) * 255, g: bound01(g, 255) * 255, b: bound01(b, 255) * 255 }; } // `rgbToHsl` // Converts an RGB color value to HSL. // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] // *Returns:* { h, s, l } in [0,1] function rgbToHsl(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); var max = mathMax(r, g, b), min = mathMin(r, g, b); var h, s, l = (max + min) / 2; if(max == min) { h = s = 0; // achromatic } else { var d = max - min; s = l > 0.5 ? d / (2 - max - min) : d / (max + min); switch(max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h, s: s, l: l }; } // `hslToRgb` // Converts an HSL color value to RGB. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] // *Returns:* { r, g, b } in the set [0, 255] function hslToRgb(h, s, l) { var r, g, b; h = bound01(h, 360); s = bound01(s, 100); l = bound01(l, 100); function hue2rgb(p, q, t) { if(t < 0) t += 1; if(t > 1) t -= 1; if(t < 1/6) return p + (q - p) * 6 * t; if(t < 1/2) return q; if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; return p; } if(s === 0) { r = g = b = l; // achromatic } else { var q = l < 0.5 ? l * (1 + s) : l + s - l * s; var p = 2 * l - q; r = hue2rgb(p, q, h + 1/3); g = hue2rgb(p, q, h); b = hue2rgb(p, q, h - 1/3); } return { r: r * 255, g: g * 255, b: b * 255 }; } // `rgbToHsv` // Converts an RGB color value to HSV // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] // *Returns:* { h, s, v } in [0,1] function rgbToHsv(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); var max = mathMax(r, g, b), min = mathMin(r, g, b); var h, s, v = max; var d = max - min; s = max === 0 ? 0 : d / max; if(max == min) { h = 0; // achromatic } else { switch(max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h, s: s, v: v }; } // `hsvToRgb` // Converts an HSV color value to RGB. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] // *Returns:* { r, g, b } in the set [0, 255] function hsvToRgb(h, s, v) { h = bound01(h, 360) * 6; s = bound01(s, 100); v = bound01(v, 100); var i = Math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod]; return { r: r * 255, g: g * 255, b: b * 255 }; } // `rgbToHex` // Converts an RGB color to hex // Assumes r, g, and b are contained in the set [0, 255] // Returns a 3 or 6 character hex function rgbToHex(r, g, b, allow3Char) { var hex = [ pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ]; // Return a 3 character hex if possible if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); } return hex.join(""); } // `rgbaToHex` // Converts an RGBA color plus alpha transparency to hex // Assumes r, g, b are contained in the set [0, 255] and // a in [0, 1]. Returns a 4 or 8 character rgba hex function rgbaToHex(r, g, b, a, allow4Char) { var hex = [ pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)), pad2(convertDecimalToHex(a)) ]; // Return a 4 character hex if possible if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); } return hex.join(""); } // `rgbaToArgbHex` // Converts an RGBA color to an ARGB Hex8 string // Rarely used, but required for "toFilter()" function rgbaToArgbHex(r, g, b, a) { var hex = [ pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ]; return hex.join(""); } // `equals` // Can be called with any tinycolor input tinycolor.equals = function (color1, color2) { if (!color1 || !color2) { return false; } return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); }; tinycolor.random = function() { return tinycolor.fromRatio({ r: mathRandom(), g: mathRandom(), b: mathRandom() }); }; // Modification Functions // ---------------------- // Thanks to less.js for some of the basics here // function desaturate(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.s -= amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } function saturate(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.s += amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } function greyscale(color) { return tinycolor(color).desaturate(100); } function lighten (color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.l += amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } function brighten(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var rgb = tinycolor(color).toRgb(); rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100)))); rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100)))); rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100)))); return tinycolor(rgb); } function darken (color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.l -= amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. // Values outside of this range will be wrapped into this range. function spin(color, amount) { var hsl = tinycolor(color).toHsl(); var hue = (hsl.h + amount) % 360; hsl.h = hue < 0 ? 360 + hue : hue; return tinycolor(hsl); } // Combination Functions // --------------------- // Thanks to jQuery xColor for some of the ideas behind these // function complement(color) { var hsl = tinycolor(color).toHsl(); hsl.h = (hsl.h + 180) % 360; return tinycolor(hsl); } function triad(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) ]; } function tetrad(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) ]; } function splitcomplement(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) ]; } function analogous(color, results, slices) { results = results || 6; slices = slices || 30; var hsl = tinycolor(color).toHsl(); var part = 360 / slices; var ret = [tinycolor(color)]; for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { hsl.h = (hsl.h + part) % 360; ret.push(tinycolor(hsl)); } return ret; } function monochromatic(color, results) { results = results || 6; var hsv = tinycolor(color).toHsv(); var h = hsv.h, s = hsv.s, v = hsv.v; var ret = []; var modification = 1 / results; while (results--) { ret.push(tinycolor({ h: h, s: s, v: v})); v = (v + modification) % 1; } return ret; } // Utility Functions // --------------------- tinycolor.mix = function(color1, color2, amount) { amount = (amount === 0) ? 0 : (amount || 50); var rgb1 = tinycolor(color1).toRgb(); var rgb2 = tinycolor(color2).toRgb(); var p = amount / 100; var rgba = { r: ((rgb2.r - rgb1.r) * p) + rgb1.r, g: ((rgb2.g - rgb1.g) * p) + rgb1.g, b: ((rgb2.b - rgb1.b) * p) + rgb1.b, a: ((rgb2.a - rgb1.a) * p) + rgb1.a }; return tinycolor(rgba); }; // Readability Functions // --------------------- // false // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false tinycolor.isReadable = function(color1, color2, wcag2) { var readability = tinycolor.readability(color1, color2); var wcag2Parms, out; out = false; wcag2Parms = validateWCAG2Parms(wcag2); switch (wcag2Parms.level + wcag2Parms.size) { case "AAsmall": case "AAAlarge": out = readability >= 4.5; break; case "AAlarge": out = readability >= 3; break; case "AAAsmall": out = readability >= 7; break; } return out; }; // `mostReadable` // Given a base color and a list of possible foreground or background // colors for that base, returns the most readable color. // Optionally returns Black or White if the most readable color is unreadable. // *Example* // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255" // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff" // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3" // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff" tinycolor.mostReadable = function(baseColor, colorList, args) { var bestColor = null; var bestScore = 0; var readability; var includeFallbackColors, level, size ; args = args || {}; includeFallbackColors = args.includeFallbackColors ; level = args.level; size = args.size; for (var i= 0; i < colorList.length ; i++) { readability = tinycolor.readability(baseColor, colorList[i]); if (readability > bestScore) { bestScore = readability; bestColor = tinycolor(colorList[i]); } } if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) { return bestColor; } else { args.includeFallbackColors=false; return tinycolor.mostReadable(baseColor,["#fff", "#000"],args); } }; // Big List of Colors // ------------------ // var names = tinycolor.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "00f", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", burntsienna: "ea7e5d", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "0ff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "f0f", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "663399", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" }; // Make it easy to access colors via `hexNames[hex]` var hexNames = tinycolor.hexNames = flip(names); // Utilities // --------- // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` function flip(o) { var flipped = { }; for (var i in o) { if (o.hasOwnProperty(i)) { flipped[o[i]] = i; } } return flipped; } // Return a valid alpha value [0,1] with all invalid values being set to 1 function boundAlpha(a) { a = parseFloat(a); if (isNaN(a) || a < 0 || a > 1) { a = 1; } return a; } // Take input from [0, n] and return it as [0, 1] function bound01(n, max) { if (isOnePointZero(n)) { n = "100%"; } var processPercent = isPercentage(n); n = mathMin(max, mathMax(0, parseFloat(n))); // Automatically convert percentage into number if (processPercent) { n = parseInt(n * max, 10) / 100; } // Handle floating point rounding errors if ((Math.abs(n - max) < 0.000001)) { return 1; } // Convert into [0, 1] range if it isn't already return (n % max) / parseFloat(max); } // Force a number between 0 and 1 function clamp01(val) { return mathMin(1, mathMax(0, val)); } // Parse a base-16 hex value into a base-10 integer function parseIntFromHex(val) { return parseInt(val, 16); } // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 // function isOnePointZero(n) { return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; } // Check to see if string passed in is a percentage function isPercentage(n) { return typeof n === "string" && n.indexOf('%') != -1; } // Force a hex value to have 2 characters function pad2(c) { return c.length == 1 ? '0' + c : '' + c; } // Replace a decimal with it's percentage value function convertToPercentage(n) { if (n <= 1) { n = (n * 100) + "%"; } return n; } // Converts a decimal to a hex value function convertDecimalToHex(d) { return Math.round(parseFloat(d) * 255).toString(16); } // Converts a hex value to a decimal function convertHexToDecimal(h) { return (parseIntFromHex(h) / 255); } var matchers = (function() { // var CSS_INTEGER = "[-\\+]?\\d+%?"; // var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; // Actual matching. // Parentheses and commas are optional, but not required. // Whitespace can take the place of commas or opening paren var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; return { CSS_UNIT: new RegExp(CSS_UNIT), rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ }; })(); // `isValidCSSUnit` // Take in a single string / number and check to see if it looks like a CSS unit // (see `matchers` above for definition). function isValidCSSUnit(color) { return !!matchers.CSS_UNIT.exec(color); } // `stringInputToObject` // Permissive string parsing. Take in a number of formats, and output an object // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` function stringInputToObject(color) { color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); var named = false; if (names[color]) { color = names[color]; named = true; } else if (color == 'transparent') { return { r: 0, g: 0, b: 0, a: 0, format: "name" }; } // Try to match string input using regular expressions. // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] // Just return an object and let the conversion functions handle that. // This way the result will be the same whether the tinycolor is initialized with string or object. var match; if ((match = matchers.rgb.exec(color))) { return { r: match[1], g: match[2], b: match[3] }; } if ((match = matchers.rgba.exec(color))) { return { r: match[1], g: match[2], b: match[3], a: match[4] }; } if ((match = matchers.hsl.exec(color))) { return { h: match[1], s: match[2], l: match[3] }; } if ((match = matchers.hsla.exec(color))) { return { h: match[1], s: match[2], l: match[3], a: match[4] }; } if ((match = matchers.hsv.exec(color))) { return { h: match[1], s: match[2], v: match[3] }; } if ((match = matchers.hsva.exec(color))) { return { h: match[1], s: match[2], v: match[3], a: match[4] }; } if ((match = matchers.hex8.exec(color))) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), a: convertHexToDecimal(match[4]), format: named ? "name" : "hex8" }; } if ((match = matchers.hex6.exec(color))) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), format: named ? "name" : "hex" }; } if ((match = matchers.hex4.exec(color))) { return { r: parseIntFromHex(match[1] + '' + match[1]), g: parseIntFromHex(match[2] + '' + match[2]), b: parseIntFromHex(match[3] + '' + match[3]), a: convertHexToDecimal(match[4] + '' + match[4]), format: named ? "name" : "hex8" }; } if ((match = matchers.hex3.exec(color))) { return { r: parseIntFromHex(match[1] + '' + match[1]), g: parseIntFromHex(match[2] + '' + match[2]), b: parseIntFromHex(match[3] + '' + match[3]), format: named ? "name" : "hex" }; } return false; } function validateWCAG2Parms(parms) { // return valid WCAG2 parms for isReadable. // If input parms are invalid, return {"level":"AA", "size":"small"} var level, size; parms = parms || {"level":"AA", "size":"small"}; level = (parms.level || "AA").toUpperCase(); size = (parms.size || "small").toLowerCase(); if (level !== "AA" && level !== "AAA") { level = "AA"; } if (size !== "small" && size !== "large") { size = "small"; } return {"level":level, "size":size}; } // Node: Export function if ( true && module.exports) { module.exports = tinycolor; } // AMD/requirejs: Define the module else if (true) { !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return tinycolor;}).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } // Browser: Expose to window else {} })(Math); /***/ }), /***/ "./node_modules/tinygradient/tinygradient.js": /*!***************************************************!*\ !*** ./node_modules/tinygradient/tinygradient.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! * TinyGradient 0.4.3 * Copyright 2014-2018 Damien "Mistic" Sorel (http://www.strangeplanet.fr) * Licensed under MIT (http://opensource.org/licenses/MIT) */ (function (root, factory) { if ( true && module.exports) { module.exports = factory(__webpack_require__(/*! tinycolor2 */ "./node_modules/tinycolor2/tinycolor.js")); } else if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! tinycolor2 */ "./node_modules/tinycolor2/tinycolor.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }(this, function (tinycolor) { "use strict"; var RGBA_MAX = {r: 256, g: 256, b: 256, a: 1}; var HSVA_MAX = {h: 360, s: 1, v: 1, a: 1}; /** * Linearly compute the step size between start and end (not normalized) * @param {Object} start - rgba or hsva * @param {Object} end - rgba or hsva * @param {int} steps - number of desired steps * @return {Object} rgba or hsva */ function stepize(start, end, steps) { var step = {}; for (var k in start) { if (start.hasOwnProperty(k)) { step[k] = steps === 0 ? 0 : (end[k] - start[k]) / steps; } } return step; } /** * Compute the final step color * @param {Object} step - rgba or hsva from `stepize` * @param {Object} start - rgba or hsva * @param {int} i - color index * @param {Object} max - rgba or hsva of maximum values for each channel * @return {Object} rgba or hsva */ function interpolate(step, start, i, max) { var color = {}; for (var k in start) { if (start.hasOwnProperty(k)) { color[k] = step[k] * i + start[k]; color[k] = color[k] < 0 ? color[k] + max[k] : ( max[k] !== 1 ? color[k] % max[k] : color[k] ); } } return color; } /** * Generate gradient with RGBa interpolation * @param {Object} stop1 * @param {Object} stop2 * @param {int} steps * @return {tinycolor[]} color1 included, color2 excluded */ function interpolateRgb(stop1, stop2, steps) { var start = stop1.color.toRgb(), end = stop2.color.toRgb(), gradient = [stop1.color], step = stepize(start, end, steps), color; for (var i = 1; i < steps; i++) { color = interpolate(step, start, i, RGBA_MAX); gradient.push(tinycolor(color)); } return gradient; } /** * Generate gradient with HSVa interpolation * @param {Object} stop1 * @param {Object} stop2 * @param {int} steps * @param {Boolean} trigonometric - true to step in trigonometric order * @return {tinycolor[]} color1 included, color2 excluded */ function interpolateHsv(stop1, stop2, steps, trigonometric) { var start = stop1.color.toHsv(), end = stop2.color.toHsv(), gradient = [stop1.color], step = stepize(start, end, steps), diff, color; // recompute hue if ((start.h <= end.h && !trigonometric) || (start.h >= end.h && trigonometric)) { diff = end.h - start.h; } else if (trigonometric) { diff = 360 - end.h + start.h; } else { diff = 360 - start.h + end.h; } step.h = Math.pow(-1, trigonometric ? 1 : 0) * Math.abs(diff) / steps; for (var i = 1; i < steps; i++) { color = interpolate(step, start, i, HSVA_MAX); gradient.push(tinycolor(color)); } return gradient; } /** * Compute substeps between each stops * @param {Object[]} stops * @param {int} steps * @return {int[]} */ function computeSubsteps(stops, steps) { var l = stops.length; // validation steps = parseInt(steps); if (isNaN(steps) || steps < 2) { throw new Error('Invalid number of steps (< 2)'); } if (steps < l) { throw new Error('Number of steps cannot be inferior to number of stops'); } // compute substeps from stop positions var substeps = []; for (var i = 1; i < l; i++) { var step = (steps - 1) * (stops[i].pos - stops[i - 1].pos); substeps.push(Math.max(1, Math.round(step))); } // adjust number of steps var totalSubsteps = 1; for (var n = l - 1; n--;) totalSubsteps += substeps[n]; while (totalSubsteps !== steps) { if (totalSubsteps < steps) { var min = Math.min.apply(null, substeps); substeps[substeps.indexOf(min)]++; totalSubsteps++; } else { var max = Math.max.apply(null, substeps); substeps[substeps.indexOf(max)]--; totalSubsteps--; } } return substeps; } /** * Compute the color at a specific position * @param {Object[]} stops * @param {float} pos * @param {string} method * @param {Object} max * @returns {tinycolor} */ function computeAt(stops, pos, method, max) { if (pos < 0 || pos > 1) { throw new Error('Position must be between 0 and 1'); } var start, end; for (var i = 0, l = stops.length; i < l - 1; i++) { if (pos >= stops[i].pos && pos < stops[i + 1].pos) { start = stops[i]; end = stops[i + 1]; break; } } if (!start) { start = end = stops[stops.length - 1]; } var step = stepize(start.color[method](), end.color[method](), (end.pos - start.pos) * 100); var color = interpolate(step, start.color[method](), Math.round((pos - start.pos) * 100), max); return tinycolor(color); } /** * @class tinygradient * @param {*} stops */ var TinyGradient = function (stops) { // varargs if (arguments.length === 1) { if (!(arguments[0] instanceof Array)) { throw new Error('"stops" is not an array'); } stops = arguments[0]; } else { stops = Array.prototype.slice.call(arguments); } // if we are called as a function, call using new instead if (!(this instanceof TinyGradient)) { return new TinyGradient(stops); } // validation if (stops.length < 2) { throw new Error('Invalid number of stops (< 2)'); } var havingPositions = stops[0].pos !== undefined, l = stops.length, p = -1; // create tinycolor objects and clean positions this.stops = stops.map(function (stop, i) { var hasPosition = stop.pos !== undefined; if (havingPositions ^ hasPosition) { throw new Error('Cannot mix positionned and not posionned color stops'); } if (hasPosition) { stop = { color: tinycolor(stop.color), pos : stop.pos }; if (stop.pos < 0 || stop.pos > 1) { throw new Error('Color stops positions must be between 0 and 1'); } else if (stop.pos <= p) { throw new Error('Color stops positions are not ordered'); } p = stop.pos; } else { stop = { color: tinycolor(stop), pos : i / (l - 1) }; } return stop; }); if (this.stops[0].pos !== 0) { this.stops.unshift({ color: this.stops[0].color, pos : 0 }); } if (this.stops[this.stops.length - 1].pos !== 1) { this.stops.push({ color: this.stops[this.stops.length - 1].color, pos : 1 }); } }; /** * Return new instance with reversed stops * @return {tinygradient} */ TinyGradient.prototype.reverse = function () { var stops = []; this.stops.forEach(function (stop) { stops.push({ color: stop.color, pos : 1 - stop.pos }); }); return new TinyGradient(stops.reverse()); }; /** * Generate gradient with RGBa interpolation * @param {int} steps * @return {tinycolor[]} */ TinyGradient.prototype.rgb = function (steps) { var substeps = computeSubsteps(this.stops, steps), gradient = []; for (var i = 0, l = this.stops.length; i < l - 1; i++) { gradient = gradient.concat(interpolateRgb(this.stops[i], this.stops[i + 1], substeps[i])); } gradient.push(this.stops[l - 1].color); return gradient; }; /** * Generate gradient with HSVa interpolation * @param {int} steps * @param {Boolean|String} [mode=false] * - false to step in clockwise * - true to step in trigonometric order * - 'short' to use the shortest way * - 'long' to use the longest way * @return {tinycolor[]} */ TinyGradient.prototype.hsv = function (steps, mode) { var substeps = computeSubsteps(this.stops, steps), trigonometric = mode === true, parametrized = typeof mode === 'string', gradient = [], start, end, trig; for (var i = 0, l = this.stops.length; i < l - 1; i++) { start = this.stops[i].color.toHsv(); end = this.stops[i + 1].color.toHsv(); if (parametrized) { trig = (start.h < end.h && end.h - start.h < 180) || (start.h > end.h && start.h - end.h > 180); } // rgb interpolation if one of the steps in grayscale if (start.s === 0 || end.s === 0) { gradient = gradient.concat(interpolateRgb(this.stops[i], this.stops[i + 1], substeps[i])); } else { gradient = gradient.concat(interpolateHsv(this.stops[i], this.stops[i + 1], substeps[i], (mode === 'long' && trig) || (mode === 'short' && !trig) || (!parametrized && trigonometric) )); } } gradient.push(this.stops[l - 1].color); return gradient; }; /** * Generate CSS3 command (no prefix) for this gradient * @param {String} [mode=linear] - 'linear' or 'radial' * @param {String} [direction] - default is 'to right' or 'ellipse at center' * @return {String} */ TinyGradient.prototype.css = function (mode, direction) { mode = mode || 'linear'; direction = direction || (mode === 'linear' ? 'to right' : 'ellipse at center'); var css = mode + '-gradient(' + direction; this.stops.forEach(function (stop) { css += ', ' + stop.color.toRgbString() + ' ' + (stop.pos * 100) + '%'; }); css += ')'; return css; }; /** * Returns the color at specific position with RGBa interpolation * @param {float} pos, between 0 and 1 * @return {tinycolor} */ TinyGradient.prototype.rgbAt = function (pos) { return computeAt(this.stops, pos, 'toRgb', RGBA_MAX); }; /** * Returns the color at specific position with HSVa interpolation * @param {float} pos, between 0 and 1 * @return {tinycolor} */ TinyGradient.prototype.hsvAt = function (pos) { return computeAt(this.stops, pos, 'toHsv', HSVA_MAX); }; var STATIC_FNS = { 'rgb' : 1, 'hsv' : 2, 'css' : 2, 'rgbAt': 1, 'hsvAt': 1 }; Object.keys(STATIC_FNS).forEach(function (fn) { TinyGradient[fn] = function () { var colors = Array.prototype.slice.call(arguments); var args = colors.splice(-STATIC_FNS[fn]); var gradient = new TinyGradient(colors); return gradient[fn].apply(gradient, args); }; }); // export return TinyGradient; })); /***/ }), /***/ "./node_modules/warning/warning.js": /*!*****************************************!*\ !*** ./node_modules/warning/warning.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var __DEV__ = "development" !== 'production'; var warning = function() {}; if (__DEV__) { var printWarning = function printWarning(format, args) { var len = arguments.length; args = new Array(len > 1 ? len - 1 : 0); for (var key = 1; key < len; key++) { args[key - 1] = arguments[key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function() { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} } warning = function(condition, format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (!condition) { printWarning.apply(null, [format].concat(args)); } }; } module.exports = warning; /***/ }), /***/ "./node_modules/webpack/buildin/global.js": /*!***********************************!*\ !*** (webpack)/buildin/global.js ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || new Function("return this")(); } catch (e) { // This works if the window reference is available if (typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /***/ "./src/components/BooleanSwitch.react.js": /*!***********************************************!*\ !*** ./src/components/BooleanSwitch.react.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _ToggleSwitch_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ToggleSwitch.react */ "./src/components/ToggleSwitch.react.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * A switch component that toggles * between on and off. */ var BooleanSwitch = /*#__PURE__*/ function (_Component) { _inherits(BooleanSwitch, _Component); function BooleanSwitch(props) { var _this; _classCallCheck(this, BooleanSwitch); _this = _possibleConstructorReturn(this, _getPrototypeOf(BooleanSwitch).call(this, props)); _this.state = { on: props.persisted_props == 'on' ? localStorage.getItem(props.id) == null ? props.on : localStorage.getItem(props.id) == 'true' : props.on }; _this.setPropsOverride = _this.setPropsOverride.bind(_assertThisInitialized(_this)); return _this; } _createClass(BooleanSwitch, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { if (newProps.on !== this.state.on) this.setState({ on: newProps.on }); } }, { key: "setPropsOverride", value: function setPropsOverride(_ref) { var value = _ref.value; this.setState({ on: value }); if (this.props.setProps) this.props.setProps({ on: value }); } }, { key: "render", value: function render() { var _this$props = this.props, color = _this$props.color, theme = _this$props.theme; var filteredProps = Object(ramda__WEBPACK_IMPORTED_MODULE_3__["omit"])(['persisted_props'], this.props); if (this.props.persisted_props == 'on' && this.props.id != null) { localStorage.setItem(this.props.id, this.state.on); } return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ToggleSwitch_react__WEBPACK_IMPORTED_MODULE_5__["default"], _extends({}, filteredProps, { value: this.state.on, setProps: this.setPropsOverride, booleanSwitch: true, color: color || theme.primary })); } }]); return BooleanSwitch; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); BooleanSwitch.defaultProps = { on: false, vertical: false, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_4__["light"], labelPosition: 'top', persisted_props: ['on'], persistence_type: 'local' }; BooleanSwitch.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Whether or not the switch is on */ on: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Color to highlight active switch background */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * If true, switch will be vertical instead * of horizontal */ vertical: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * If true, switch cannot be clicked */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root object. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when * switch is toggled. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `on` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['on'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['local', 'session', 'memory']), /** * size of the switch */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number }; var ThemedBooleanSwitch = Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(BooleanSwitch); ThemedBooleanSwitch.defaultProps = BooleanSwitch.defaultProps; /* harmony default export */ __webpack_exports__["default"] = (ThemedBooleanSwitch); /***/ }), /***/ "./src/components/ColorPicker.react.js": /*!*********************************************!*\ !*** ./src/components/ColorPicker.react.js ***! \*********************************************/ /*! exports provided: default, defaultProps, propTypes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ColorPicker; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultProps", function() { return defaultProps; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "propTypes", function() { return propTypes; }); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var RealColorPicker = Object(react__WEBPACK_IMPORTED_MODULE_1__["lazy"])(function () { return __webpack_require__.e(/*! import() | colorpicker */ "async-colorpicker").then(__webpack_require__.bind(null, /*! ../fragments/ColorPicker.react */ "./src/fragments/ColorPicker.react.js")); }); /** * A color picker. */ var ColorPicker = /*#__PURE__*/ function (_Component) { _inherits(ColorPicker, _Component); function ColorPicker() { _classCallCheck(this, ColorPicker); return _possibleConstructorReturn(this, _getPrototypeOf(ColorPicker).apply(this, arguments)); } _createClass(ColorPicker, [{ key: "render", value: function render() { return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1__["Suspense"], { fallback: null }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(RealColorPicker, this.props)); } }]); return ColorPicker; }(react__WEBPACK_IMPORTED_MODULE_1__["Component"]); ColorPicker.defaultProps = { size: 225, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_2__["light"], labelPosition: 'top', persisted_props: ['value'], persistence_type: 'local' }; ColorPicker.propTypes = { /** * The ID used to identify the color picker in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Color value of the picker */ value: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ /** * Hex string */ hex: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * RGB/RGBA object */ rbg: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ r: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, g: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, b: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, a: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number }) }), /** * If true, color cannot be picked. */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * Size (width) of the component in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string })]), /** * Where the indicator label is positioned */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element */ className: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Dash-assigned callback that gets fired when * the color picker's value changes */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func, /** * Style to apply to the root component element */ style: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['local', 'session', 'memory']) }; var defaultProps = ColorPicker.defaultProps; var propTypes = ColorPicker.propTypes; /***/ }), /***/ "./src/components/DarkThemeProvider.react.js": /*!***************************************************!*\ !*** ./src/components/DarkThemeProvider.react.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /** * DarkThemeProvider is a component that is placed at the root of * the component tree to make all components match the dark theme */ function DarkThemeProvider(props) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(styled_components__WEBPACK_IMPORTED_MODULE_2__["ThemeProvider"], { theme: props.theme || _styled_constants__WEBPACK_IMPORTED_MODULE_3__["dark"] }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, props.children)); } DarkThemeProvider.propTypes = { /** * The children of this component */ children: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node), prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node]), /** * Theme object to override with a custom theme */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Highlight color */ primary: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Supporting color */ secondary: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Color used for UI details, like borders */ detail: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * True for Dark mode, false for Light */ dark: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool }) }; /* harmony default export */ __webpack_exports__["default"] = (DarkThemeProvider); /***/ }), /***/ "./src/components/Gauge.react.js": /*!***************************************!*\ !*** ./src/components/Gauge.react.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _helpers_GaugeSvg_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/GaugeSvg.react */ "./src/helpers/GaugeSvg.react.js"); /* harmony import */ var _styled_Gauge_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/Gauge.styled */ "./src/styled/Gauge.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/CurrentValue.styled */ "./src/styled/CurrentValue.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _styled_Tank_styled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styled/Tank.styled */ "./src/styled/Tank.styled.js"); /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../helpers/util */ "./src/helpers/util.js"); /* harmony import */ var _helpers_logarithm__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../helpers/logarithm */ "./src/helpers/logarithm.js"); /* harmony import */ var _helpers_scale__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../helpers/scale */ "./src/helpers/scale.js"); /* harmony import */ var _helpers_colorRanges__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../helpers/colorRanges */ "./src/helpers/colorRanges.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); /* harmony import */ var conic_gradient__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! conic-gradient */ "./node_modules/conic-gradient/conic-gradient.js"); /* harmony import */ var conic_gradient__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(conic_gradient__WEBPACK_IMPORTED_MODULE_14__); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * A Gauge component that points to * a value between some range. */ var Gauge = function Gauge(props) { var max = props.max, min = props.min, showCurrentValue = props.showCurrentValue, units = props.units, logarithmic = props.logarithmic, base = props.base, id = props.id, className = props.className, style = props.style, theme = props.theme, digits = props.digits; var warningPara = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(null); var color = Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_12__["convertInRange"])(props.color, max, min ? min : 0); var colorValue = props.textColor || Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_12__["getColorValue"])(color); var rawValue = props.value != null ? props.value : min; var dirtyValue = logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_10__["default"].compute(rawValue) : rawValue; var currentDisplayValue = dirtyValue; var value = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_9__["sanitizeRangeValue"])({ min: min, max: max, value: dirtyValue }); var formatter = logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_10__["default"].generateLogFormatter({ base: base, isSVG: true }) : null; var scale = Object(_helpers_scale__WEBPACK_IMPORTED_MODULE_11__["default"])(_objectSpread({}, props, { formatter: formatter })); var progress = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_9__["computeProgress"])({ min: min, max: max, value: value, progressionTarget: 1 }); var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_13__["getClassName"])('gauge', theme); var currentValue = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_6__["default"], { className: elementName + '__current-value', valueColor: colorValue, units: units, valueSize: (props.size + 32) * 13.3333 / 100, css: 'transform: translateY(-150%); top: 0;' }, logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_10__["default"].formatValue(currentDisplayValue, base) : currentDisplayValue.toFixed(digits)); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_13__["getFilteredProps"])(props); Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () { var currValue = logarithmic ? Math.pow(base || 10, currentDisplayValue) : currentDisplayValue; var maximum = logarithmic ? Math.pow(base || 10, max) : max; var minimum = logarithmic ? Math.pow(base || 10, min) : min; if (currValue > maximum) { var str = ''; warningPara.current.innerHTML = props.exceedMessage ? typeof props.exceedMessage == 'string' ? props.exceedMessage : props.exceedMessage(currValue, maximum) || str : str; } else if (currValue < minimum) { var _str = ''; warningPara.current.innerHTML = props.lagingMessage ? typeof props.lagingMessage == 'string' ? props.lagingMessage : props.lagingMessage(currValue, minimum) || _str : _str; } else { warningPara.current.innerHTML = ''; } }, [currentDisplayValue]); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_8__["ExceededWarning"], { ref: warningPara }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], _extends({ className: elementName + '__label' }, filteredProps, { labelCSS: props.labelPosition === 'top' ? null : 'transform: translateY(-80px);' }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Gauge_styled__WEBPACK_IMPORTED_MODULE_4__["default"], { color: colorValue }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_helpers_GaugeSvg_react__WEBPACK_IMPORTED_MODULE_3__["default"], _extends({ className: elementName + '__gauge' }, _objectSpread({}, filteredProps, { scale: scale, progress: progress, color: color }))), showCurrentValue && currentValue))); }; Gauge.defaultProps = { min: 0, max: 10, base: 10, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_7__["light"], labelPosition: 'top', digits: 1, size: 208 }; Gauge.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of gauge. If logarithmic, the displayed * value will be the logarithm of the inputted value. */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The size (diameter) of the gauge in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The minimum value of the gauge. If logarithmic, * represents the minimum exponent. */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the gauge. If logarithmic, * represents the maximum exponent. */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Base to be used in logarithmic scale. */ base: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If set to true, a logarithmic scale will be * used. */ logarithmic: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * If true, the current value of the gauge * will be displayed */ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Number of digits for current value */ digits: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Label for the current value */ units: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Value to start the scale from. Defaults * to min. */ start: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label for the mark */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Style object with label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]) }), /** * Color configuration for the gauge's track. */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Color used for gauge's track/indicator */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Color ranges configuration. */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Color used for current value text and other minor accents */ "default": prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Display ranges as a gradient between given colors. */ gradient: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Define multiple color ranges on the gauge's track. * The key determines the color of the range and * the value is the start,end of the range itself. * Ranges must be contiguous along the entirety * of the gauge's range of values. */ ranges: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number)])) }) })]), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Warning message when value exceed max */ exceedMessage: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]), /** * Warning message when value is laging from min */ lagingMessage: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]), /** * text color for theme */ textColor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(Gauge)); /***/ }), /***/ "./src/components/GraduatedBar.react.js": /*!**********************************************!*\ !*** ./src/components/GraduatedBar.react.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_colorRanges__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/colorRanges */ "./src/helpers/colorRanges.js"); /* harmony import */ var _styled_GraduatedBar_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/GraduatedBar.styled */ "./src/styled/GraduatedBar.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var valueColor = function valueColor(value, color) { var entry = Object.entries(color.ranges).filter(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), range = _ref2[1]; return value >= range[0] && value <= range[1]; })[0]; return entry && entry[0]; }; /** * A graduated bar component that displays * a value within some range as a * percentage. */ var GraduatedBar = function GraduatedBar(props) { var step = props.step, min = props.min, max = props.max, label = props.label, labelPosition = props.labelPosition, id = props.id, className = props.className, color = props.color, size = props.size, style = props.style, showCurrentValue = props.showCurrentValue, vertical = props.vertical, theme = props.theme; var value = props.value || min; var gradient = null; var progressBlocks = []; var normalizedValue = Math.max(Math.min(max, value), min); if (color.gradient && Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_4__["isContiguous"])({ color: color, min: min, max: max })) { gradient = Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_4__["getGradientObject"])({ color: color, min: min, max: max }); } var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getClassName"])('graduatedbar', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getFilteredProps"])(props); for (var i = min; i < normalizedValue; i += step) { var blockProps = _objectSpread({}, filteredProps, { color: Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_4__["getColorValue"])(color) }); if (color.ranges && valueColor(i, color)) { blockProps = _objectSpread({}, filteredProps, { color: valueColor(i, color) }); } progressBlocks.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_GraduatedBar_styled__WEBPACK_IMPORTED_MODULE_5__["Block"], _extends({ className: elementName + '__progressBlock', key: i, progress: i / (max - min), gradient: gradient }, blockProps))); } var percent = normalizedValue / (max - min) * 100; if (!isFinite(percent)) percent = 0; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_6__["default"], { className: elementName + '__label', label: label, labelPosition: labelPosition }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_GraduatedBar_styled__WEBPACK_IMPORTED_MODULE_5__["Container"], { vertical: vertical, size: size }, progressBlocks, showCurrentValue && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_GraduatedBar_styled__WEBPACK_IMPORTED_MODULE_5__["Value"], { className: elementName + '__currentvalue', vertical: vertical }, percent.toFixed(0), "%")))); }; GraduatedBar.defaultProps = { min: 0, max: 10, size: 250, step: 0.5, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_3__["light"], labelPosition: 'top', color: _styled_constants__WEBPACK_IMPORTED_MODULE_3__["light"].primary }; GraduatedBar.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of the graduated bar */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Color configuration for the graduated bar's * progress blocks. */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Color used for graduated bar's track/indicator */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Color ranges configuration. */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Fallback color to use when color.ranges * has gaps. */ "default": prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Display ranges as a gradient between given colors. * Requires color.ranges to be contiguous along * the entirety of the graduated bar's range of values. */ gradient: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Define multiple color ranges on the graduated bar's track. * The key determines the color of the range and * the value is the start,end of the range itself. */ ranges: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number) }) })]), /** * The size (length) of the graduated bar in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If true, will display bar vertically instead of horizontally */ vertical: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * The minimum value of the graduated bar */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the graduated bar */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Value by which progress blocks appear */ step: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If true, the current percentage * of the bar will be displayed */ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(GraduatedBar)); /***/ }), /***/ "./src/components/Indicator.react.js": /*!*******************************************!*\ !*** ./src/components/Indicator.react.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! color */ "./node_modules/color/index.js"); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(color__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/shared/Indicator.styled */ "./src/styled/shared/Indicator.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); /** * A boolean indicator LED. */ var Indicator = function Indicator(props) { var id = props.id, className = props.className, color = props.color, size = props.size, width = props.width, height = props.height, value = props.value, style = props.style, theme = props.theme; var bg = color__WEBPACK_IMPORTED_MODULE_2___default()(color).desaturate(0.2).lighten(0.2).rgb().toString(); var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getClassName"])('indicator', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getFilteredProps"])(props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], filteredProps, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_4__["default"], { className: elementName + '__indicator' + (props.value ? '--on' : '--off'), size: size, width: width, height: height, rectangular: width && height, main: true, on: value, primary: color, secondary: !theme.dark ? bg : null }))); }; Indicator.defaultProps = { color: _styled_constants__WEBPACK_IMPORTED_MODULE_6__["colors"].DARKER_PRIMARY, size: 15, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_6__["light"], labelPosition: 'top' }; Indicator.propTypes = { /** * The ID used to identify the indicator in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * If true, indicator is illuminated */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Color of the indicator */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Size of the component. Either use this or width and height */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Width of the component. Set both width and height for a rectangular indicator */ width: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Height of the component. Set both width and height for a rectangular indicator */ height: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the indicator label is positioned */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom', 'right', 'left']), /** * Class to apply to the root component element */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_3__["withTheme"])(Indicator)); /***/ }), /***/ "./src/components/Joystick.react.js": /*!******************************************!*\ !*** ./src/components/Joystick.react.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var nipplejs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! nipplejs */ "./node_modules/nipplejs/dist/nipplejs.js"); /* harmony import */ var nipplejs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(nipplejs__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * A joystick. */ var Joystick = /*#__PURE__*/ function (_Component) { _inherits(Joystick, _Component); function Joystick(props) { var _this; _classCallCheck(this, Joystick); _this = _possibleConstructorReturn(this, _getPrototypeOf(Joystick).call(this, props)); _this.lastAngle = 0; return _this; } _createClass(Joystick, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; var _this$props = this.props, size = _this$props.size, setProps = _this$props.setProps; this.manager = nipplejs__WEBPACK_IMPORTED_MODULE_3___default.a.create({ mode: 'static', color: 'grey', size: size, position: { left: '50%', top: '50%' }, zone: this.zoneRef }); this.manager.on('move', function (e, data) { var degree = data.angle.degree, force = data.force; _this2.lastAngle = degree; if (setProps) { setProps({ angle: degree, force: force }); } }); this.manager.on('end', function () { if (setProps) { setProps({ angle: _this2.lastAngle, force: 0 }); } }); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.manager.destroy(); } }, { key: "render", value: function render() { var _this3 = this; var _this$props2 = this.props, id = _this$props2.id, className = _this$props2.className, style = _this$props2.style, size = _this$props2.size, theme = _this$props2.theme; var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_6__["getClassName"])('joystick', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_6__["getFilteredProps"])(this.props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], _extends({ className: elementName + '__label' }, filteredProps), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: elementName + '__joystick', ref: function ref(_ref) { return _this3.zoneRef = _ref; }, style: { position: 'relative', width: size + 'px', height: size + 'px' } }))); } }]); return Joystick; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); Joystick.defaultProps = { size: 100, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_4__["light"], labelPosition: 'top' }; Joystick.propTypes = { /** * The ID used to identify the Joystick in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Joystick angle in degrees, 0 = right, 90 = up, 180 = left, 270 = down */ angle: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Joystick force: distance between cursor and center in big-circle radii */ force: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Size (width) of the component in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the indicator label is positioned */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Dash-assigned callback that gets fired when * the color picker's value changes */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Style to apply to the root component element */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(Joystick)); /***/ }), /***/ "./src/components/Knob.react.js": /*!**************************************!*\ !*** ./src/components/Knob.react.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _helpers_KnobSvg_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/KnobSvg.react */ "./src/helpers/KnobSvg.react.js"); /* harmony import */ var _styled_Knob_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/Knob.styled */ "./src/styled/Knob.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/CurrentValue.styled */ "./src/styled/CurrentValue.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/util */ "./src/helpers/util.js"); /* harmony import */ var _helpers_colorRanges__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../helpers/colorRanges */ "./src/helpers/colorRanges.js"); /* harmony import */ var _helpers_scale__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../helpers/scale */ "./src/helpers/scale.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var RESET_START_ANGLE = -1; var valueToDeg = function valueToDeg(_ref) { var min = _ref.min, max = _ref.max, value = _ref.value; return Object(_helpers_util__WEBPACK_IMPORTED_MODULE_8__["computeProgress"])({ min: min, max: max, value: value, progressionTarget: _styled_constants__WEBPACK_IMPORTED_MODULE_7__["TRACK_TOTAL_DEG"] }); }; var degToValue = function degToValue(_ref2) { var min = _ref2.min, max = _ref2.max, deg = _ref2.deg; return Object(_helpers_util__WEBPACK_IMPORTED_MODULE_8__["computeProgress"])({ min: 0, max: _styled_constants__WEBPACK_IMPORTED_MODULE_7__["TRACK_TOTAL_DEG"], value: deg, progressionTarget: max - min }) + min; }; /** * A knob component that can be turned * to a value between some range. */ var Knob = /*#__PURE__*/ function (_Component) { _inherits(Knob, _Component); function Knob(props) { var _this; _classCallCheck(this, Knob); _this = _possibleConstructorReturn(this, _getPrototypeOf(Knob).call(this, props)); var currentDeg = valueToDeg({ min: props.min, max: props.max, value: props.value != null ? props.value : props.min }); _this.state = { min: props.min, max: props.max, value: props.value || props.min, scale: Object(_helpers_scale__WEBPACK_IMPORTED_MODULE_10__["default"])(props), isDragging: false, startAngle: RESET_START_ANGLE, rotation: currentDeg, currentDeg: currentDeg }; _this.onMouseDown = _this.onMouseDown.bind(_assertThisInitialized(_this)); _this.onMouseUp = _this.onMouseUp.bind(_assertThisInitialized(_this)); _this.onMouseMove = _this.onMouseMove.bind(_assertThisInitialized(_this)); _this.setValue = _this.setValue.bind(_assertThisInitialized(_this)); return _this; } _createClass(Knob, [{ key: "noop", value: function noop() {} }, { key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { if (typeof newProps.value !== 'undefined') this.setState({ value: newProps.value }); if (this.state.max != newProps.max) { this.setState({ max: newProps.max instanceof Number ? newProps.max : this.state.max }); } if (this.state.min != newProps.min) { this.setState({ min: newProps.min instanceof Number ? newProps.min : this.state.min }); } } }, { key: "componentDidMount", value: function componentDidMount() { window.addEventListener('mouseup', this.onMouseUp, false); // eslint-disable-next-line __webpack_require__(/*! conic-gradient */ "./node_modules/conic-gradient/conic-gradient.js"); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { window.removeEventListener('mouseup', this.onMouseUp, false); } }, { key: "onMouseDown", value: function onMouseDown() { this.setState({ isDragging: true }); } }, { key: "onMouseUp", value: function onMouseUp() { if (this.state.isDragging) { this.setState(function (state) { return { rotation: state.currentDeg, isDragging: false, startAngle: RESET_START_ANGLE }; }); } } }, { key: "onMouseMove", value: function onMouseMove(e) { if (!this.state.isDragging) { return; } var _this$props = this.props, min = _this$props.min, max = _this$props.max; var rotation = this.state.rotation; var startAngle = this.state.startAngle; if (e.touches) { e = e.touches[0]; } var rect = this.knobElement.getBoundingClientRect(); var centerX = rect.width / 2 + rect.left; var centerY = rect.height / 2 + rect.top; var radians = Math.atan2(e.clientX - centerX, e.clientY - centerY); var angle = radians * (180 / Math.PI); if (e.clientX - centerX >= 0) { angle = Math.abs(360 - angle) + 180; } else { angle = angle - 180; } angle = Math.abs(angle); if (startAngle === RESET_START_ANGLE) { startAngle = angle; this.setState({ startAngle: startAngle }); } var tmp = Math.floor(angle - startAngle + rotation); tmp = Math.min(tmp, _styled_constants__WEBPACK_IMPORTED_MODULE_7__["TRACK_TOTAL_DEG"]); tmp = Math.max(tmp, 0); this.setState({ currentDeg: tmp }); this.setValue(Object(_helpers_util__WEBPACK_IMPORTED_MODULE_8__["roundToDecimal"])(degToValue({ min: min, max: max, deg: tmp }), 2)); } }, { key: "setValue", value: function setValue(value) { this.setState({ value: value }); if (this.props.setProps) this.props.setProps({ value: value }); } }, { key: "render", value: function render() { var _this2 = this; var _this$props2 = this.props, min = _this$props2.min, max = _this$props2.max, _this$props2$value = _this$props2.value, value = _this$props2$value === void 0 ? this.props.min : _this$props2$value; var _this$props3 = this.props, id = _this$props3.id, className = _this$props3.className, labelPosition = _this$props3.labelPosition, color = _this$props3.color, style = _this$props3.style, disabled = _this$props3.disabled, theme = _this$props3.theme, textColor = _this$props3.textColor; var progress = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_8__["computeProgress"])({ min: min, max: max, value: value > min && value < max ? value : (min + max) / 2, progressionTarget: 1 }); var colorValue = textColor || Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_9__["getColorValue"])(color); var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_11__["getClassName"])('knob', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_11__["getFilteredProps"])(this.props); var currentValue = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_6__["default"], { className: elementName + '__current-value', valueColor: colorValue, valueSize: Math.min((this.props.size + 32) * 13.3333 / 100, 32), units: false, css: 'transform: translateY(0%); top: 0;' }, value.toFixed(this.props.digits))); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], _extends({ className: elementName + '__label' }, filteredProps, { labelCSS: labelPosition === 'top' ? null : 'transform: translateY(-40px);' }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Knob_styled__WEBPACK_IMPORTED_MODULE_4__["default"], { className: elementName + '__container', colorValue: colorValue, color: Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_9__["getColorValue"])(color) }, this.props.showCurrentValue && currentValue, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_helpers_KnobSvg_react__WEBPACK_IMPORTED_MODULE_3__["default"], _extends({ progress: progress }, filteredProps, this.state, { min: this.props.min != this.state.min ? this.props.min : this.state.min, max: this.props.max != this.state.max ? this.props.max : this.state.max, value: value > min && value < max ? value : (min + max) / 2, scale: Object(_helpers_scale__WEBPACK_IMPORTED_MODULE_10__["default"])(this.props), currentDeg: valueToDeg({ min: this.props.min, max: this.props.max, value: value > min && value < max ? value : (min + max) / 2 }), refFunc: function refFunc(ele) { return _this2.knobElement = ele; }, onMouseDown: disabled ? this.noop : this.onMouseDown, onMouseUp: disabled ? this.noop : this.onMouseUp, onMouseMove: disabled ? this.noop : this.onMouseMove }))))); } }]); return Knob; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); Knob.defaultProps = { min: 0, max: 10, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_7__["light"], labelPosition: 'top', persisted_props: ['value'], persistence_type: 'local', size: 114 }; Knob.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of knob */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Color configuration for the knob's track. */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Color used for knob's track/indicator */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Color ranges configuration. */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Color used for current value text and other minor accents */ "default": prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Display ranges as a gradient between given colors. */ gradient: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Define multiple color ranges on the knob's track. * The key determines the color of the range and * the value is the start,end of the range itself. * Ranges must be contiguous along the entirety * of the knob's range of values. */ ranges: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number) }) })]), /** * The size (diameter) of the knob in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The minimum value of the knob */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the knob */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If true, knob cannot be moved. */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the knob label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Value to start the scale from. Defaults * to min. */ start: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label for the mark */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Style object with label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]) }), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when selected * value changes. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['local', 'session', 'memory']), /** * show current value of knob */ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * text color of scale */ textColor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * number of digits to show after decimal places */ digits: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number }; var ThemedKnob = Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(Knob); ThemedKnob.defaultProps = Knob.defaultProps; /* harmony default export */ __webpack_exports__["default"] = (ThemedKnob); /***/ }), /***/ "./src/components/LEDDisplay.react.js": /*!********************************************!*\ !*** ./src/components/LEDDisplay.react.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _helpers_LEDDisplaySvg_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/LEDDisplaySvg.react */ "./src/helpers/LEDDisplaySvg.react.js"); /* harmony import */ var _styled_LEDDisplay_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/LEDDisplay.styled */ "./src/styled/LEDDisplay.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); var VALID_INPUT = /^(\-)?((\.|:)?[0-9])*$/; var isValidInput = VALID_INPUT.test.bind(VALID_INPUT); /** * A 7-bar LED display component. */ var LEDDisplay = function LEDDisplay(props) { var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getClassName"])('leddisplay', props.theme); var digits = isValidInput(props.value) ? extractDigits(props, elementName) : null; var led = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_LEDDisplay_styled__WEBPACK_IMPORTED_MODULE_4__["LEDContainer"], { backgroundColor: props.backgroundColor }, digits); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getFilteredProps"])(props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: props.id, className: elementName + (props.className ? ' ' + props.className : ''), style: props.style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], filteredProps, digits ? led : 'Invalid Input')); }; function extractDigits(_ref, elementName) { var value = _ref.value, color = _ref.color, backgroundColor = _ref.backgroundColor, theme = _ref.theme, size = _ref.size; var digitStack = value.toString().split('').reverse(); var formattedDigits = []; addLeadingZeroIfNeeded(digitStack); var currKey = 0; while (digitStack.length) { var currDigit = digitStack.pop(); var nextDigit = digitStack.pop(); formattedDigits.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_helpers_LEDDisplaySvg_react__WEBPACK_IMPORTED_MODULE_3__["Digit"], { className: elementName + '__digit', theme: theme, key: currKey++, value: currDigit, hasColon: nextDigit === ':', hasDecimal: nextDigit === '.', color: color, backgroundColor: backgroundColor, size: size })); if (nextDigit && nextDigit !== '.' && nextDigit !== ':') digitStack.push(nextDigit); } return formattedDigits; } function addLeadingZeroIfNeeded(digits) { var isNegative = false; if (digits[digits.length - 1] === '-') { isNegative = true; digits.pop(); } var leadingDigit = digits[digits.length - 1]; if (['.', ':'].includes(leadingDigit)) digits.push('0'); if (isNegative) digits.push('-'); } LEDDisplay.defaultProps = { color: _styled_constants__WEBPACK_IMPORTED_MODULE_6__["colors"].PRIMARY, backgroundColor: '#fff', size: 42, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_6__["light"], labelPosition: 'top' }; LEDDisplay.propTypes = { /** * The ID used to identify the display in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Value to be displayed. A number or a string * containing only digits (0-9), periods, and colons, * and possibly starting with a minus sign. */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]), /** * Color of the display */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Color of the display's background */ backgroundColor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Size of the display */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the display label is positioned */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(LEDDisplay)); /***/ }), /***/ "./src/components/NumericInput.react.js": /*!**********************************************!*\ !*** ./src/components/NumericInput.react.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); /* harmony import */ var _helpers_NumericInput__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../helpers/NumericInput */ "./src/helpers/NumericInput.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * A numeric input component that can be * set to a value between some range. */ var NumericInput = /*#__PURE__*/ function (_Component) { _inherits(NumericInput, _Component); function NumericInput(props) { var _this; _classCallCheck(this, NumericInput); _this = _possibleConstructorReturn(this, _getPrototypeOf(NumericInput).call(this, props)); _this.state = { value: props.value || props.min }; _this.setValue = _this.setValue.bind(_assertThisInitialized(_this)); return _this; } _createClass(NumericInput, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { if (newProps.value !== this.state.value) this.setState({ value: newProps.value }); } }, { key: "setValue", value: function setValue(value) { if (value != null && value >= this.props.min && value <= this.props.max) { this.setState({ value: value }); if (this.props.setProps) this.props.setProps({ value: value }); } } }, { key: "render", value: function render() { var _this$props = this.props, size = _this$props.size, theme = _this$props.theme, style = _this$props.style, className = _this$props.className, id = _this$props.id, disabled = _this$props.disabled, min = _this$props.min, max = _this$props.max; var buttonStyle = { background: 'none', boxShadow: 'none', border: 'none', color: theme.secondary, cursor: 'pointer' }; var padding = Math.max(this.state.value ? 16 - 2 * this.state.value.toString().length : 16, 10); var inputStyle = { borderRadius: 3, border: theme.dark ? 'none' : "1px solid ".concat(_styled_constants__WEBPACK_IMPORTED_MODULE_4__["colors"].GREY), outline: 'none', paddingRight: padding, paddingLeft: padding, paddingTop: 8, paddingBottom: 8, width: size || 56, color: theme.dark ? '#fff' : _styled_constants__WEBPACK_IMPORTED_MODULE_4__["colors"].OFF_WHITE, backgroundColor: theme.dark ? '#22272a' : '#fff', fontSize: 14, boxSizing: 'border-box' }; var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_5__["getClassName"])('numericinput', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_5__["getFilteredProps"])(this.props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_3__["default"], _extends({ className: elementName + '__label' }, filteredProps), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_helpers_NumericInput__WEBPACK_IMPORTED_MODULE_6__["default"], { className: elementName + '__input', disabled: disabled, style: { input: inputStyle, 'input:not(.form-control)': inputStyle, btn: buttonStyle, 'btn:hover': buttonStyle, 'btn:active': buttonStyle, 'input:disabled': { opacity: 0.65, cursor: 'not-allowed' } }, min: min, max: max, value: this.state.value, onChange: this.setValue, mobile: false }))); } }]); return NumericInput; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); NumericInput.defaultProps = { min: 0, max: 10, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_4__["light"], labelPosition: 'top', persisted_props: ['value'], persistence_type: 'local', style: { display: 'flex', justifyContent: 'center' } }; NumericInput.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of numeric input */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The size (length) of the numeric input in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The minimum value of the numeric input */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the numeric input */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If true, numeric input cannot changed. */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the numeric input label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when selected * value changes. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['local', 'session', 'memory']) }; var ThemedNumericInput = Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(NumericInput); ThemedNumericInput.defaultProps = NumericInput.defaultProps; /* harmony default export */ __webpack_exports__["default"] = (ThemedNumericInput); /***/ }), /***/ "./src/components/PowerButton.react.js": /*!*********************************************!*\ !*** ./src/components/PowerButton.react.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_PowerButton_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/PowerButton.styled */ "./src/styled/PowerButton.styled.js"); /* harmony import */ var _helpers_PowerButtonSvg_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/PowerButtonSvg.react */ "./src/helpers/PowerButtonSvg.react.js"); /* harmony import */ var _styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/Indicator.styled */ "./src/styled/shared/Indicator.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * A power button component can be * turned on and off. */ var PowerButton = /*#__PURE__*/ function (_Component) { _inherits(PowerButton, _Component); function PowerButton(props) { var _this; _classCallCheck(this, PowerButton); _this = _possibleConstructorReturn(this, _getPrototypeOf(PowerButton).call(this, props)); _this.state = { on: _this.props.on }; _this.onClick = _this.onClick.bind(_assertThisInitialized(_this)); return _this; } _createClass(PowerButton, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { if (newProps.on !== this.state.on) this.setState({ on: newProps.on }); } }, { key: "onClick", value: function onClick() { var newOnValue = !this.state.on; this.setState({ on: newOnValue }); if (this.props.setProps) this.props.setProps({ on: newOnValue }); } }, { key: "render", value: function render() { var _this$props = this.props, id = _this$props.id, size = _this$props.size, className = _this$props.className, color = _this$props.color, disabled = _this$props.disabled, style = _this$props.style, theme = _this$props.theme; var INDICATOR_SIZE = size / 10 * 1.25; var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_8__["getClassName"])('powerbutton', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_8__["getFilteredProps"])(this.props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_6__["default"], _extends({ className: elementName + '__label' }, filteredProps), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_PowerButton_styled__WEBPACK_IMPORTED_MODULE_3__["Container"], { className: elementName + '__container' }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_PowerButton_styled__WEBPACK_IMPORTED_MODULE_3__["Button"], { className: elementName + '__button', on: this.state.on, color: color, size: size, disabled: disabled, onClick: this.onClick, style: this.state.on ? this.props.onButtonStyle : this.props.offButtonStyle }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_helpers_PowerButtonSvg_react__WEBPACK_IMPORTED_MODULE_4__["default"], { on: this.state.on, color: color, size: size * 0.3 })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_5__["default"], { className: elementName + '__indicator', on: this.state.on, primary: color, main: true, size: INDICATOR_SIZE })))); } }]); return PowerButton; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); PowerButton.defaultProps = { on: false, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_7__["light"], size: 48, labelPosition: 'top', persisted_props: ['on'], persistence_type: 'local' }; PowerButton.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Whether or not the power button is on */ on: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * The indicator color to display when power button is on */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The size (diameter) of the power button in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If true, power button cannot be clicked */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the button. To control styling, pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the button label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * style to apply on switch on button */ onButtonStyle: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * style to apply on switch off button */ offButtonStyle: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when * button is clicked. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `on` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['on'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['local', 'session', 'memory']) }; var ThemedPowerButton = Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(PowerButton); ThemedPowerButton.defaultProps = PowerButton.defaultProps; /* harmony default export */ __webpack_exports__["default"] = (ThemedPowerButton); /***/ }), /***/ "./src/components/PrecisionInput.react.js": /*!************************************************!*\ !*** ./src/components/PrecisionInput.react.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_PrecisionInput_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/PrecisionInput.styled */ "./src/styled/PrecisionInput.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); /* harmony import */ var _helpers_NumericInput__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../helpers/NumericInput */ "./src/helpers/NumericInput.js"); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var defaultRootStyles = { display: 'flex', flexDirection: 'column', justifyContent: 'space-between', alignItems: 'center' }; /** * A numeric input component that converts * an input value to the desired precision. */ var PrecisionInput = /*#__PURE__*/ function (_Component) { _inherits(PrecisionInput, _Component); function PrecisionInput(props) { var _this; _classCallCheck(this, PrecisionInput); _this = _possibleConstructorReturn(this, _getPrototypeOf(PrecisionInput).call(this, props)); _this.formatPrecision = _this.formatPrecision.bind(_assertThisInitialized(_this)); _this.setTempValue = _this.setTempValue.bind(_assertThisInitialized(_this)); _this.blur = _this.blur.bind(_assertThisInitialized(_this)); _this.setValue = _this.setValue.bind(_assertThisInitialized(_this)); _this.toggleInput = _this.toggleInput.bind(_assertThisInitialized(_this)); _this.state = { value: props.value != null ? _this.formatPrecision(props.value) : _this.formatPrecision(props.min), isInput: false, tempValue: null }; return _this; } _createClass(PrecisionInput, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { if (newProps.value != null && newProps.value !== this.state.value) this.setState({ value: this.formatPrecision(newProps.value) }); } }, { key: "formatPrecision", value: function formatPrecision(value) { return Number(Number(value.toPrecision(this.props.precision))); } }, { key: "setValue", value: function setValue(value) { if (value != null && value >= this.props.min && value <= this.props.max) { var newValue = this.formatPrecision(value); this.setState({ value: newValue }); if (this.props.setProps) { this.props.setProps({ value: newValue }); } } } }, { key: "toggleInput", value: function toggleInput() { if (this.props.disabled) return; var isInput = !this.state.isInput; this.setState({ isInput: isInput }); if (isInput) { this.setState({ tempValue: this.state.value }); } } }, { key: "setTempValue", value: function setTempValue(tempValue) { this.setState({ tempValue: tempValue }); } }, { key: "blur", value: function blur() { if (this.state.tempValue != null) { this.setValue(this.state.tempValue); } this.setState({ tempValue: null }); this.toggleInput(); } }, { key: "render", value: function render() { var _this$props = this.props, id = _this$props.id, className = _this$props.className, style = _this$props.style, size = _this$props.size, theme = _this$props.theme, disabled = _this$props.disabled, precision = _this$props.precision, min = _this$props.min, max = _this$props.max; var buttonStyle = { background: 'none', boxShadow: 'none', border: 'none', color: theme.secondary, cursor: 'pointer' }; var MINIMUM_PADDING = 10; var dynamicPadding = this.state.value ? 16 - 2 * this.state.value.toString().length : 16; var padding = Math.max(dynamicPadding, MINIMUM_PADDING); var inputStyle = { borderRadius: 3, border: theme.dark ? 'none' : "1px solid ".concat(_styled_constants__WEBPACK_IMPORTED_MODULE_5__["colors"].GREY), outline: 'none', paddingRight: padding, paddingLeft: padding, paddingTop: 4, paddingBottom: 4, width: size || 56 + precision * 20, height: 36, backgroundColor: theme.dark ? '#22272a' : '#fff', color: theme.dark ? '#fff' : '#000', fontSize: 14, lineHeight: 14, boxSizing: 'border-box' }; var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_6__["getClassName"])('precisioninput', theme.dark); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_6__["getFilteredProps"])(this.props); var precisionElement; if (this.state.isInput) { precisionElement = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_helpers_NumericInput__WEBPACK_IMPORTED_MODULE_7__["default"], { autoFocus: true, className: elementName + '__input', disabled: disabled, style: { input: inputStyle, 'input:not(.form-control)': inputStyle, btn: buttonStyle, 'btn:hover': buttonStyle, 'btn:active': buttonStyle, 'input:disabled': { opacity: 0.65, cursor: 'not-allowed' } }, min: min, max: max, value: this.state.tempValue, onChange: this.setTempValue, onBlur: this.blur }); } else { precisionElement = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(PrecisionOutput, { elementName: elementName + '__output', value: this.state.value, size: size, onClick: this.toggleInput, color: theme.dark ? '#fff' : _styled_constants__WEBPACK_IMPORTED_MODULE_5__["colors"].OFF_WHITE }); } return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: Object.assign({}, defaultRootStyles, style) }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_4__["default"], _extends({ className: elementName + '__label' }, filteredProps), precisionElement)); } }]); return PrecisionInput; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); var toScientificNotation = function toScientificNotation(value) { var scientificNum = Number(value).toExponential(); return scientificNum.replace('+', ''); }; var mergeLeadingNegative = function mergeLeadingNegative(digits) { if (digits[0] === '-') { digits.shift(); var leading = digits.shift(); digits.unshift("-".concat(leading)); } return digits; }; var PrecisionOutput = function PrecisionOutput(_ref) { var value = _ref.value, onClick = _ref.onClick, size = _ref.size, elementName = _ref.elementName; var _toScientificNotation = toScientificNotation(value).split('e'), _toScientificNotation2 = _slicedToArray(_toScientificNotation, 2), characteristic = _toScientificNotation2[0], mantissa = _toScientificNotation2[1]; var characteristicDigits = mergeLeadingNegative(characteristic.split('')); var mantissaDigits = mergeLeadingNegative(mantissa.split('')); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_PrecisionInput_styled__WEBPACK_IMPORTED_MODULE_3__["Container"], { size: size, onClick: onClick, className: elementName }, characteristicDigits.map(function (digit, i) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_PrecisionInput_styled__WEBPACK_IMPORTED_MODULE_3__["Digit"], { className: elementName + '__digit', key: "d".concat(i) }, digit); }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_PrecisionInput_styled__WEBPACK_IMPORTED_MODULE_3__["ExponentialDigit"], { className: elementName + '__exp' }, "E"), mantissaDigits.map(function (digit, i) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_PrecisionInput_styled__WEBPACK_IMPORTED_MODULE_3__["ExponentialDigit"], { className: elementName + '__expdigit', key: "e".concat(i) }, digit); })); }; PrecisionInput.defaultProps = { min: 0, max: Number.MAX_SAFE_INTEGER, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_5__["light"], labelPosition: 'top', precision: 2, persisted_props: ['value'], persistence_type: 'local' }; PrecisionInput.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of numeric input */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The size (length) of the numeric input in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The minimum value of the numeric input */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the numeric input */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Number of significant figures */ precision: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired, /** * If true, numeric input cannot be changed. */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the scientific notation. To control styling, * pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the numeric input label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when selected * value changes. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['local', 'session', 'memory']) }; var ThemedPrecisionInput = Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(PrecisionInput); ThemedPrecisionInput.defaultProps = PrecisionInput.defaultProps; /* harmony default export */ __webpack_exports__["default"] = (ThemedPrecisionInput); /***/ }), /***/ "./src/components/Slider.react.js": /*!****************************************!*\ !*** ./src/components/Slider.react.js ***! \****************************************/ /*! exports provided: default, defaultProps, propTypes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Slider; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultProps", function() { return defaultProps; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "propTypes", function() { return propTypes; }); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _fragments_Slider_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../fragments/Slider.react */ "./src/fragments/Slider.react.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } // const RealSlider = lazy(() => import(/* webpackChunkName: "slider" */ '../fragments/Slider.react')); /** * A slider component with support for * a target value. */ var Slider = /*#__PURE__*/ function (_Component) { _inherits(Slider, _Component); function Slider() { _classCallCheck(this, Slider); return _possibleConstructorReturn(this, _getPrototypeOf(Slider).apply(this, arguments)); } _createClass(Slider, [{ key: "render", value: function render() { return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1__["Suspense"], { fallback: null }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_fragments_Slider_react__WEBPACK_IMPORTED_MODULE_3__["default"], this.props)); } }]); return Slider; }(react__WEBPACK_IMPORTED_MODULE_1__["Component"]); Slider.defaultProps = { theme: _styled_constants__WEBPACK_IMPORTED_MODULE_2__["light"], targets: {}, updatemode: 'mouseup', color: _styled_constants__WEBPACK_IMPORTED_MODULE_2__["colors"].DARKER_PRIMARY, min: 0, size: 265, labelPosition: 'bottom', persisted_props: ['value'], persistence_type: 'local', style: { display: 'flex', justifyContent: 'center' } }; Slider.propTypes = { /** * The ID used to identify this component in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, /** * Marks on the slider. * The key determines the position, * and the value determines what will show. * If you want to set the style of a specific mark point, * the value should be an object which * contains style and label properties. */ marks: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ number: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([ /** * The label of the mark */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * The style and label of the mark */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string })]) }), /** * Color configuration for the slider's track. */ color: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([ /** * Color used for slider's track/indicator */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Color ranges configuration. */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ /** * Fallback color to use when color.ranges * has gaps. */ "default": prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Display ranges as a gradient between given colors. * Requires color.ranges to be contiguous along * the entirety of the gauge's range of values. */ gradient: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * Define multiple color ranges on the slider's track. * The key determines the color of the range and * the value is the start,end of the range itself. */ ranges: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ color: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number) }) })]), /** * The value of the input. */ value: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * Additional CSS class for the root DOM node. */ className: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['top', 'bottom']), /** * If true, the handles can't be moved. */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * When the step value is greater than 1, * you can set the dots to true if you want to * render the slider with dots. * * Note: dots are disabled automatically when * using color.ranges */ dots: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * If the value is true, it means a continuous * value is included. Otherwise, it is an independent value. */ included: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * Minimum allowed value of the slider. */ min: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * Maximum allowed value of the slider. */ max: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * Value by which increments or decrements are made. */ step: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * If true, the slider will be vertical. */ vertical: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * Size of the slider in pixels. */ size: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * Targets on the slider. * The key determines the position, * and the value determines what will show. * If you want to set the style of a specific target point, * the value should be an object which * contains style and label properties. */ targets: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ number: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([ /** * The label of the mark */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * The style and label of the mark */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, label: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, color: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, style: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object })]) }), /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, /** * Configuration of the slider handle's label. * Passing falsy value will disable the label. */ handleLabel: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([ /** * The label of the handle */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * The style and label of the handle */ prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, label: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, color: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, style: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object })]), /** * Determines when the component should update * its value. If `mouseup`, then the slider * will only trigger its value when the user has * finished dragging the slider. If `drag`, then * the slider will update its value continuously * as it is being dragged. * Only use `drag` if your updates are fast. */ updatemode: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['mouseup', 'drag']), /** * Dash-assigned callback that gets fired when the value changes. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['local', 'session', 'memory']), /** * make slider same size of its parent */ fullSize: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool }; var defaultProps = Slider.defaultProps; var propTypes = Slider.propTypes; /***/ }), /***/ "./src/components/StopButton.react.js": /*!********************************************!*\ !*** ./src/components/StopButton.react.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_StopButton_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/StopButton.styled */ "./src/styled/StopButton.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); /** * A Stop button component */ var StopButton = function StopButton(props) { var id = props.id, className = props.className, style = props.style, size = props.size, disabled = props.disabled, children = props.children, n_clicks = props.n_clicks, buttonText = props.buttonText, theme = props.theme; var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_5__["getClassName"])('stopbutton', theme); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_5__["getFilteredProps"])(props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_4__["default"], filteredProps, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_StopButton_styled__WEBPACK_IMPORTED_MODULE_3__["Button"], { className: elementName + '__button', size: size, disabled: disabled, onClick: function onClick() { if (props.setProps) props.setProps({ n_clicks: n_clicks + 1 }); } }, children || buttonText))); }; StopButton.defaultProps = { buttonText: 'Stop', n_clicks: 0, size: 92, labelPosition: 'top' }; StopButton.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The size (width) of the stop button in pixels */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Text displayed in the button */ buttonText: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Number of times the button was clicked */ n_clicks: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If true, button cannot be pressesd. */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * The children of the button. */ children: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the button. * To control styling, pass an object with label and * style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when the * button is clicked. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(StopButton)); /***/ }), /***/ "./src/components/Tank.react.js": /*!**************************************!*\ !*** ./src/components/Tank.react.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/Tank.styled */ "./src/styled/Tank.styled.js"); /* harmony import */ var _styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/CurrentValue.styled */ "./src/styled/CurrentValue.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _helpers_logarithm__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/logarithm */ "./src/helpers/logarithm.js"); /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/util */ "./src/helpers/util.js"); /* harmony import */ var _helpers_scale__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/scale */ "./src/helpers/scale.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * A Tank component that fills to * a value between some range. */ var Tank = function Tank(props) { var min = props.min, max = props.max, showCurrentValue = props.showCurrentValue, units = props.units, className = props.className, id = props.id, style = props.style, color = props.color, logarithmic = props.logarithmic, base = props.base, height = props.height, width = props.width, theme = props.theme; var warningPara = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(null); var dirtyValue = logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_6__["default"].compute(props.value, base) : props.value; var currentDisplayValue = dirtyValue; var value = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_7__["sanitizeRangeValue"])({ min: min, max: max, value: dirtyValue }); var colorValue = props.textColor || color; var percentageFill = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_7__["computeProgress"])({ min: min, max: max, value: value }); var formatter = logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_6__["default"].generateLogFormatter({ base: base }) : null; var scale = Object(_helpers_scale__WEBPACK_IMPORTED_MODULE_8__["default"])(_objectSpread({}, props, { formatter: formatter })); var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_9__["getClassName"])('tank', theme); var currentValueStyle = props.currentValueStyle || (theme.dark ? { 'color': 'white' } : { 'color': 'black' }); var renderTicks = function renderTicks() { return Object.entries(scale).map(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), k = _ref2[0], v = _ref2[1]; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__["Tick"], { className: elementName + '__tick', key: k, color: colorValue, xPosition: Object(_helpers_util__WEBPACK_IMPORTED_MODULE_7__["computeProgress"])({ min: min, max: max, value: k }) }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "tick" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "label" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: v && v.style ? v.style : null }, v && v.label || v))); }); }; var scaleContainer = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__["TickContainer"], { xPositioned: scale }, renderTicks()); var currentValue = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_4__["default"], { units: units, valueColor: colorValue, customStyle: currentValueStyle }, logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_6__["default"].formatValue(currentDisplayValue, base) : currentDisplayValue); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_9__["getFilteredProps"])(props); Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () { var currValue = logarithmic ? Math.pow(base || 10, currentDisplayValue) : currentDisplayValue; var maximum = logarithmic ? Math.pow(base || 10, max) : max; var minimum = logarithmic ? Math.pow(base || 10, min) : min; if (currValue > maximum) { var str = ''; warningPara.current.innerHTML = props.exceedMessage ? typeof props.exceedMessage == 'string' ? props.exceedMessage : props.exceedMessage(currValue, maximum) || str : str; } else if (currValue < minimum) { var _str = ''; warningPara.current.innerHTML = props.lagingMessage ? typeof props.lagingMessage == 'string' ? props.lagingMessage : props.lagingMessage(currValue, minimum) || _str : _str; } else { warningPara.current.innerHTML = ''; } }, [currentDisplayValue]); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: elementName + (className ? ' ' + className : ''), id: id, style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__["ExceededWarning"], { ref: warningPara }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], _extends({ className: elementName + '__label' }, filteredProps), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__["Container"], null, scaleContainer, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__["TankContainer"], { className: elementName + '__container', height: height, width: width }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_3__["TankFill"], { className: elementName + '__fill', color: color, height: "".concat(percentageFill, "%") }), showCurrentValue && currentValue)))); }; Tank.defaultProps = { min: 0, max: 10, height: 192, width: 112, base: 10, labelPosition: 'top', theme: _styled_constants__WEBPACK_IMPORTED_MODULE_10__["light"] }; Tank.propTypes = { /** * The ID used to identify this component in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of tank. If logarithmic, the displayed value * will be the logarithm of the inputted value. */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The height of the tank in pixels */ height: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The width of the tank in pixels */ width: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The color of tank fill */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * text style of current value */ currentValueStyle: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * The minimum value of the tank. If logarithmic, * represents minimum exponent. */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the tank. If logarithmic, * represents the maximum exponent. */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Base to be used in logarithmic scale. */ base: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If set to true, a logarithmic scale will be * used. */ logarithmic: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * If true, the current value of the tank * will be displayed */ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Label for the current value */ units: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Value to start the scale from. Defaults * to min. */ start: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label for the mark */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Style object with label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]) }), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Warning message when value exceed max */ exceedMessage: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]), /** * Warning message when value is laging from min */ lagingMessage: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]), /** * text color */ textColor: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(Tank)); /***/ }), /***/ "./src/components/Thermometer.react.js": /*!*********************************************!*\ !*** ./src/components/Thermometer.react.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_Thermometer_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/Thermometer.styled */ "./src/styled/Thermometer.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_Tank_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/Tank.styled */ "./src/styled/Tank.styled.js"); /* harmony import */ var _styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/CurrentValue.styled */ "./src/styled/CurrentValue.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_logarithm__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/logarithm */ "./src/helpers/logarithm.js"); /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../helpers/util */ "./src/helpers/util.js"); /* harmony import */ var _helpers_scale__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../helpers/scale */ "./src/helpers/scale.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * A thermometer component that * fills to a value between some * range */ var Thermometer = function Thermometer(props) { var min = props.min, max = props.max, id = props.id, className = props.className, style = props.style, logarithmic = props.logarithmic, base = props.base, showCurrentValue = props.showCurrentValue, units = props.units, theme = props.theme, color = props.color, height = props.height, width = props.width; var dirtyValue = logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_8__["default"].compute(props.value, base) : props.value; var value = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_9__["sanitizeRangeValue"])({ min: min, max: max, value: dirtyValue }); var formatter = logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_8__["default"].generateLogFormatter({ base: base }) : null; var scale = Object(_helpers_scale__WEBPACK_IMPORTED_MODULE_10__["default"])(_objectSpread({}, props, { formatter: formatter })); var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_11__["getClassName"])('thermometer', theme); var renderTicks = function renderTicks() { return Object.entries(scale).map(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), k = _ref2[0], v = _ref2[1]; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_5__["Tick"], { className: elementName + '__tick', key: k, xPosition: Object(_helpers_util__WEBPACK_IMPORTED_MODULE_9__["computeProgress"])({ min: min, max: max, value: k }) }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "tick" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "label", style: v && v.style ? v.style : null }, v && v.label || v)); }); }; var scaleContainer = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_5__["TickContainer"], { xPositioned: scale }, renderTicks()); var currentValue = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Thermometer_styled__WEBPACK_IMPORTED_MODULE_3__["CurrentValueContainer"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_CurrentValue_styled__WEBPACK_IMPORTED_MODULE_6__["default"], { className: elementName + '__currentvalue', valueColor: color, units: units, css: 'top: 0;' }, logarithmic ? _helpers_logarithm__WEBPACK_IMPORTED_MODULE_8__["default"].formatValue(value, base) : value.toFixed(1))); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_11__["getFilteredProps"])(props); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: elementName + (className ? ' ' + className : ''), style: style }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_4__["default"], _extends({ className: elementName + '__label' }, filteredProps, { labelCSS: props.labelPosition === 'top' ? null : 'transform: translateY(-30px);' }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Thermometer_styled__WEBPACK_IMPORTED_MODULE_3__["ThermometerContainer"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_5__["Container"], { thermometer: true, xPositioned: scale }, scaleContainer, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_5__["TankContainer"], { thermometer: true, className: elementName + '__container', height: height, width: width }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Tank_styled__WEBPACK_IMPORTED_MODULE_5__["TankFill"], { thermometer: true, className: elementName + '__fill', color: color, height: "".concat(Object(_helpers_util__WEBPACK_IMPORTED_MODULE_9__["computeProgress"])({ min: min, max: max, value: value }), "%") }), theme.dark ? null : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Thermometer_styled__WEBPACK_IMPORTED_MODULE_3__["Bulb"], { on: value !== min, color: color }))), showCurrentValue && currentValue))); }; Thermometer.defaultProps = { min: 0, max: 10, height: 192, width: 20, base: 10, labelPosition: 'top', theme: _styled_constants__WEBPACK_IMPORTED_MODULE_7__["light"] }; Thermometer.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The value of thermometer. If logarthmic, the value * displayed will be the logarithm of the inputted value. */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The height of the thermometer in pixels */ height: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The width of the thermometer in pixels */ width: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The color of the thermometer fill/current value text */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The minimum value of the thermometer. If logarithmic, * represents the minimum exponent. */ min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * The maximum value of the thermometer. If logarithmic, * represents the maximum exponent. */ max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Base to be used in logarithmic scale. */ base: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * If set to true, a logarithmic scale will be * used. */ logarithmic: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * If true, the current value of the * thermometer will be displayed */ showCurrentValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Label for the current value */ units: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]), /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ /** * Value to start the scale from. Defaults * to min. */ start: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label for the mark */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Style object with label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]) }), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root component element. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object }; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(Thermometer)); /***/ }), /***/ "./src/components/ToggleSwitch.react.js": /*!**********************************************!*\ !*** ./src/components/ToggleSwitch.react.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/shared/Indicator.styled */ "./src/styled/shared/Indicator.styled.js"); /* harmony import */ var _styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styled/ToggleSwitch.styled */ "./src/styled/ToggleSwitch.styled.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function getLabelProps(label) { if (_typeof(label) === 'object') { return { children: label.label, style: label.style }; } return { children: label, style: {} }; } /** * A switch component that toggles between * two values. */ var ToggleSwitch = /*#__PURE__*/ function (_Component) { _inherits(ToggleSwitch, _Component); function ToggleSwitch(props) { var _this; _classCallCheck(this, ToggleSwitch); _this = _possibleConstructorReturn(this, _getPrototypeOf(ToggleSwitch).call(this, props)); _this.state = { value: props.value }; _this.click = _this.click.bind(_assertThisInitialized(_this)); return _this; } _createClass(ToggleSwitch, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { if (newProps.value !== this.state.value) this.setState({ value: newProps.value }); } }, { key: "click", value: function click() { if (!this.props.disabled) { var newValue = !this.state.value; this.setState({ value: newValue }); if (this.props.setProps) this.props.setProps({ value: newValue }); } } }, { key: "render", value: function render() { var _this$props = this.props, id = _this$props.id, className = _this$props.className, style = _this$props.style, label = _this$props.label, labelPosition = _this$props.labelPosition, booleanSwitch = _this$props.booleanSwitch, theme = _this$props.theme, color = _this$props.color, vertical = _this$props.vertical, disabled = _this$props.disabled; var size = this.props.size || 45; var SwitchContainer = _styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["ButtonContainer"]; var Switch = _styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["Button"]; if (theme.dark && !booleanSwitch) { SwitchContainer = _styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["DarkSwitchContainer"]; Switch = _styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["DarkSwitch"]; } var indicatorSize = size / 10 * 1.25; var doubleLabel = Array.isArray(label); var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getClassName"])(booleanSwitch ? 'booleanswitch' : 'toggleswitch', theme.dark); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_7__["getFilteredProps"])(this.props); var switchCore = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["Wrapper"], { className: elementName, rotate: vertical ? -90 : 0, size: size }, !booleanSwitch && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_3__["default"], { className: elementName + '__indicator' + (this.state.value ? '--off' : '--on'), on: this.state.value, size: indicatorSize, primary: color }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(SwitchContainer, { className: elementName + '__background', onClick: this.click, size: size, color: color, on: this.state.value, booleanSwitch: booleanSwitch }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Switch, { className: elementName + '__button', disabled: disabled, on: this.state.value, size: size, booleanSwitch: booleanSwitch })), !booleanSwitch && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_Indicator_styled__WEBPACK_IMPORTED_MODULE_3__["default"], { className: elementName + '__indicator' + (this.state.value ? '--on' : '--off'), main: true, on: this.state.value, size: indicatorSize, primary: color })); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, className: className, style: style }, doubleLabel ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["RowContainer"], filteredProps, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["RowLabel"], _extends({ className: elementName + '__label', position: vertical ? 'bottom' : 'left' }, getLabelProps(label[0]))), switchCore, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_ToggleSwitch_styled__WEBPACK_IMPORTED_MODULE_4__["RowLabel"], _extends({ className: elementName + '__label', position: vertical ? 'top' : 'right' }, getLabelProps(label[1])))) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_5__["default"], { className: elementName + '__label', label: label, labelPosition: labelPosition }, switchCore)); } }]); return ToggleSwitch; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); ToggleSwitch.defaultProps = { value: false, vertical: false, theme: _styled_constants__WEBPACK_IMPORTED_MODULE_6__["light"], labelPosition: 'top', persisted_props: ['value'], persistence_type: 'local' }; ToggleSwitch.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The state of the switch */ value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * The size of the switch */ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, /** * Color to highlight button/indicator */ color: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * If true, switch will be vertical instead * of horizontal */ vertical: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * If true, switch cannot be clicked */ disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string }), /** * Multiple labels for both toggle states. The label at index 0 will be left * (or bottom if the switch is vertical), and the label at index 0 will be * on the right (or top if vertical) */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([ /** * Label to be displayed */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * The style and label */ prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string })]))]), /** * Where the component label is positioned. */ labelPosition: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, /** * Style to apply to the root object. */ style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, /** * Dash-assigned callback that gets fired when * switch is toggled. */ setProps: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['local', 'session', 'memory']) }; var ThemedToggleSwitch = Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(ToggleSwitch); ThemedToggleSwitch.defaultProps = ToggleSwitch.defaultProps; /* harmony default export */ __webpack_exports__["default"] = (ThemedToggleSwitch); /***/ }), /***/ "./src/fragments/Slider.react.js": /*!***************************************!*\ !*** ./src/fragments/Slider.react.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var rc_slider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-slider */ "./node_modules/rc-slider/es/index.js"); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var deep_equal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! deep-equal */ "./node_modules/deep-equal/index.js"); /* harmony import */ var deep_equal__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(deep_equal__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _helpers_colorRanges__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers/colorRanges */ "./src/helpers/colorRanges.js"); /* harmony import */ var _styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled/shared/LabelContainer.styled */ "./src/styled/shared/LabelContainer.styled.js"); /* harmony import */ var rc_slider_assets_index_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-slider/assets/index.css */ "./node_modules/rc-slider/assets/index.css"); /* harmony import */ var rc_slider_assets_index_css__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(rc_slider_assets_index_css__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _styled_Slider_styled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styled/Slider.styled */ "./src/styled/Slider.styled.js"); /* harmony import */ var _components_Slider_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../components/Slider.react */ "./src/components/Slider.react.js"); /* harmony import */ var _helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../helpers/classNameGenerator */ "./src/helpers/classNameGenerator.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } var renderHandle = function renderHandle(props) { var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, isTarget = _ref.isTarget, showLabel = _ref.showLabel; var label = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Slider_styled__WEBPACK_IMPORTED_MODULE_8__["Label"], _extends({ isTarget: isTarget }, props), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "label" }, props.label), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "value" }, props.value)); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Slider_styled__WEBPACK_IMPORTED_MODULE_8__["HandleContainer"], _extends({ isTarget: isTarget }, props), showLabel && label, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Slider_styled__WEBPACK_IMPORTED_MODULE_8__["Handle"], _extends({ isTarget: isTarget, showLabel: showLabel }, props))); }; var getTrackStyle = function getTrackStyle(props) { if (!props.color.ranges || !Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_5__["isContiguous"])(props)) { var colorValue = Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_5__["getColorValue"])(props.color); return { trackStyle: { backgroundColor: colorValue }, activeDotStyle: props.theme.dark ? { background: colorValue, boxShadow: "0 0 6px 1px ".concat(colorValue) } : { borderColor: colorValue } }; } return { railStyle: { backgroundImage: "".concat(Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_5__["getLinearGradientCSS"])(props), ", linear-gradient(0deg, #000, #000)"), backgroundBlendMode: props.theme.dark ? 'none' : 'overlay' }, trackStyle: { mixBlendMode: 'overlay', background: props.theme.dark ? '#fff' : '#000' }, dotStyle: { display: 'none' } }; }; /** * A slider component with support for * a target value. */ var Slider = /*#__PURE__*/ function (_Component) { _inherits(Slider, _Component); function Slider(props) { var _this; _classCallCheck(this, Slider); _this = _possibleConstructorReturn(this, _getPrototypeOf(Slider).call(this, props)); _this.state = { value: props.value != null ? props.value : props.min, trackStyle: getTrackStyle(props) }; _this.onChange = _this.onChange.bind(_assertThisInitialized(_this)); _this.onAfterChange = _this.onAfterChange.bind(_assertThisInitialized(_this)); _this.renderSliderHandle = _this.renderSliderHandle.bind(_assertThisInitialized(_this)); _this.renderTargets = _this.renderTargets.bind(_assertThisInitialized(_this)); _this.calcLabelOffset = _this.calcLabelOffset.bind(_assertThisInitialized(_this)); return _this; } _createClass(Slider, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(newProps) { var updates = {}; var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_10__["getFilteredProps"])(this.props); if (typeof newProps.value !== 'undefined' && newProps.value !== this.state.value) { updates.value = newProps.value; } if (!deep_equal__WEBPACK_IMPORTED_MODULE_4___default()(newProps.color, this.props.color)) { updates.trackStyle = getTrackStyle(_objectSpread({}, filteredProps, {}, newProps)); } this.setState(updates); } }, { key: "onChange", value: function onChange(value) { var _this$props = this.props, updatemode = _this$props.updatemode, setProps = _this$props.setProps; if (!this.props.value || updatemode !== 'drag') { this.setState({ value: value }); } if (updatemode === 'drag') { if (setProps) setProps({ value: value }); } } }, { key: "onAfterChange", value: function onAfterChange(value) { var _this$props2 = this.props, updatemode = _this$props2.updatemode, setProps = _this$props2.setProps; if (updatemode === 'mouseup') { if (setProps) setProps({ value: value }); } } }, { key: "renderSliderHandle", value: function renderSliderHandle(props) { var handleLabel = this.props.handleLabel; var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_10__["getFilteredProps"])(this.props); var handleProps = _objectSpread({}, filteredProps, {}, props); if (!handleLabel) { return renderHandle(handleProps); } var value = handleLabel.showCurrentValue && this.state.value; handleProps = _objectSpread({}, handleProps, { value: value, label: handleLabel.label || (handleLabel instanceof Object ? ' ' : handleLabel), color: handleLabel.color || Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_5__["getColorValue"])(this.props.color), style: handleLabel.style }); return renderHandle(handleProps, { showLabel: true }); } }, { key: "renderTargets", value: function renderTargets() { var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_10__["getFilteredProps"])(this.props); return Object.entries(this.props.targets).reduce(function (acc, _ref2) { var _ref3 = _slicedToArray(_ref2, 2), k = _ref3[0], v = _ref3[1]; var props = _objectSpread({}, filteredProps, { label: v.label || v, value: v.showCurrentValue && k, color: v.color, style: v.style }); var Handle = renderHandle(props, { isTarget: true, showLabel: !!v }); // use rc-slider's props.marks format acc[k] = { style: _styled_Slider_styled__WEBPACK_IMPORTED_MODULE_8__["targetStyles"], label: Handle }; return acc; }, {}); } }, { key: "calcLabelOffset", value: function calcLabelOffset(_ref4) { var vertical = _ref4.vertical, labelPosition = _ref4.labelPosition, marks = _ref4.marks, targets = _ref4.targets, handleLabel = _ref4.handleLabel; if (vertical) return null; if (labelPosition === 'bottom') { return "transform: translateY(".concat(marks ? 20 : 0, "px);"); } var showingCurrentValue = false; Object.values(targets).map(function (target) { if (target.showCurrentValue) showingCurrentValue = true; }); if (handleLabel && handleLabel.showCurrentValue) { showingCurrentValue = true; } return "transform: translateY(".concat(showingCurrentValue ? -38 : -16, "px);"); } }, { key: "render", value: function render() { var value = this.state.value; var _this$props3 = this.props, className = _this$props3.className, id = _this$props3.id, theme = _this$props3.theme, label = _this$props3.label, size = _this$props3.size, vertical = _this$props3.vertical, style = _this$props3.style, marks = _this$props3.marks; var elementName = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_10__["getClassName"])('slider', theme.dark); var filteredProps = Object(_helpers_classNameGenerator__WEBPACK_IMPORTED_MODULE_10__["getFilteredProps"])(this.props); var cssStyle = this.props.vertical ? _objectSpread({}, style, { marginLeft: '45px' }) : _objectSpread({}, style, { marginTop: '45px' }); cssStyle = this.props.fullSize ? this.props.vertical ? _objectSpread({}, cssStyle, { height: '100%' }) : _objectSpread({}, cssStyle, { width: '100%' }) : cssStyle; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { id: id, style: cssStyle, className: elementName + (className ? ' ' + className : '') }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_shared_LabelContainer_styled__WEBPACK_IMPORTED_MODULE_6__["default"], _extends({ className: elementName + '__label', labelCSS: label ? this.calcLabelOffset(this.props) : null }, filteredProps), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_Slider_styled__WEBPACK_IMPORTED_MODULE_8__["SliderContainer"], { fullSize: this.props.fullSize, size: size, vertical: vertical }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(rc_slider__WEBPACK_IMPORTED_MODULE_1__["default"], _extends({ className: elementName + '__slider', onChange: this.onChange, onAfterChange: this.onAfterChange, value: value, handle: this.renderSliderHandle, marks: _objectSpread({}, marks, {}, this.renderTargets()) }, this.state.trackStyle, Object(ramda__WEBPACK_IMPORTED_MODULE_3__["omit"])(['setProps', 'updatemode', 'value', 'marks'], filteredProps)))))); } }]); return Slider; }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); Slider.defaultProps = _components_Slider_react__WEBPACK_IMPORTED_MODULE_9__["defaultProps"]; Slider.propTypes = _components_Slider_react__WEBPACK_IMPORTED_MODULE_9__["propTypes"]; /* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_2__["withTheme"])(Slider)); /***/ }), /***/ "./src/helpers/GaugeSvg.react.js": /*!***************************************!*\ !*** ./src/helpers/GaugeSvg.react.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styled/shared/DarkGradient */ "./src/styled/shared/DarkGradient.js"); /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/util */ "./src/helpers/util.js"); /* harmony import */ var _shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./shared/TrackSvg */ "./src/helpers/shared/TrackSvg.js"); var lightNeedleKnob = function lightNeedleKnob(_ref) { var CX = _ref.CX, CY = _ref.CY; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { className: "needle-knob", cx: CX, cy: CY, r: "14", fill: "#fff" }); }; var darkNeedleKnob = function darkNeedleKnob(_ref2) { var CX = _ref2.CX, CY = _ref2.CY; var id = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_3__["getRandomInt"])(); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "needle-knob-edge-".concat(id), strokeWidth: "2px", fill: "none", cx: CX, cy: CY, r: "14" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "needle-knob-".concat(id), className: "needle-knob", cx: CX, cy: CY, r: "14" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#141414", xlinkHref: "#needle-knob-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#l)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#needle-knob-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#m)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#needle-knob-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#141414", filter: "url(#n)", xlinkHref: "#needle-knob-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "#000000", xlinkHref: "#needle-knob-edge-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#p)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#needle-knob-edge-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#q)", strokeOpacity: ".4", xlinkHref: "#needle-knob-edge-".concat(id) })); }; var darkTrack = function darkTrack(props, dimensions) { var progress = props.progress; var CX = dimensions.CX, CY = dimensions.CY, GAUGE_RAD = dimensions.GAUGE_RAD, CIRCLE_CIR = dimensions.CIRCLE_CIR, GAP_ARC_LENGTH = dimensions.GAP_ARC_LENGTH, TRACK_ARC_LENGTH = dimensions.TRACK_ARC_LENGTH; var id = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_3__["getRandomInt"])(); var colorValue = props.color && (typeof props.color === 'string' ? props.color : props.color["default"]); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "gauge-track-".concat(id), className: "track", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH, strokeWidth: "6", transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "gauge-track-progress-".concat(id), className: "track progress", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH + (1 - progress) * TRACK_ARC_LENGTH, strokeWidth: "6", transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "black", filter: "url(#a)", xlinkHref: "#gauge-track-".concat(id) }), props.color && props.color.ranges && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "#15181A", xlinkHref: "#gauge-track-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#c)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#gauge-track-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "black", filter: "url(#d)", xlinkHref: "#gauge-track-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "black", filter: "url(#e)", xlinkHref: "#gauge-track-progress-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: colorValue || '#ABE2FB', xlinkHref: "#gauge-track-progress-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#g)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#gauge-track-progress-".concat(id) }), props.color && props.color.ranges && Object(_shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__["colorRangesTrack"])(props, dimensions)); }; var needle = function needle(needleRotation, _ref3) { var CX = _ref3.CX, CY = _ref3.CY, SCALE_RAD = _ref3.SCALE_RAD; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("line", { className: "needle", x1: CX, y1: CY, x2: CX + SCALE_RAD, y2: CY, transform: "rotate(".concat(needleRotation || 0, " ").concat(CX, " ").concat(CY, ")"), strokeLinecap: "round" }); }; var defs = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_2__["default"]); var GaugeSvg = function GaugeSvg(props) { var progress = props.progress, min = props.min, max = props.max, step = props.step, scale = props.scale; var dimensions = calcDimensions(props); var scaleItems = Object(_shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__["drawScale"])({ min: min, max: max, step: step, scale: scale }, dimensions); var knob = props.theme.dark ? darkNeedleKnob(dimensions) : lightNeedleKnob(dimensions); var track = props.theme.dark ? darkTrack(props, dimensions) : Object(_shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__["lightTrack"])(props, dimensions); var needleRotation = 270 * progress - 225; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { width: dimensions.SVG_WIDTH, height: dimensions.SVG_WIDTH, viewBox: "0 0 ".concat(dimensions.SVG_WIDTH, " ").concat(dimensions.SVG_WIDTH) }, props.theme.dark && defs, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { className: "scale" }, scaleItems), needle(needleRotation, dimensions), knob, track); }; GaugeSvg.defaultProps = { theme: _styled_constants__WEBPACK_IMPORTED_MODULE_1__["light"], size: 208 }; /* harmony default export */ __webpack_exports__["default"] = (GaugeSvg); // private helpers function calcDimensions(_ref4) { var size = _ref4.size; var OFFSET = 8; var d = {}; d.SVG_WIDTH = size + 32; d.CY = ~~(d.SVG_WIDTH / 2); d.CX = ~~(d.SVG_WIDTH / 2); d.GAUGE_RAD = size / 2; d.SCALE_RAD = d.GAUGE_RAD - OFFSET; d.CIRCLE_CIR = 2 * Math.PI * d.GAUGE_RAD; d.GAP_ARC_LENGTH = 90 / 360 * (2 * Math.PI * d.GAUGE_RAD); d.TRACK_ARC_LENGTH = d.CIRCLE_CIR - d.GAP_ARC_LENGTH; d.SCALE_TICK_OUTER_RAD = d.SCALE_RAD; d.SCALE_TICK_INNER_RAD = d.SCALE_TICK_OUTER_RAD - 6; d.SCALE_TEXT_RAD = d.SCALE_TICK_INNER_RAD - 8; d.IS_GAUGE = true; return d; } /***/ }), /***/ "./src/helpers/KnobSvg.react.js": /*!**************************************!*\ !*** ./src/helpers/KnobSvg.react.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); /* harmony import */ var _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styled/shared/DarkGradient */ "./src/styled/shared/DarkGradient.js"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util */ "./src/helpers/util.js"); /* harmony import */ var _shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./shared/TrackSvg */ "./src/helpers/shared/TrackSvg.js"); /* harmony import */ var _colorRanges__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./colorRanges */ "./src/helpers/colorRanges.js"); var START_ANGLE_OFFSET = -225; var lightKnob = function lightKnob(newAngle, _ref) { var CX = _ref.CX, CY = _ref.CY, KNOB_RAD = _ref.KNOB_RAD; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { transform: "translate(".concat(CX, " ").concat(CY, ") rotate(").concat(newAngle, ")") }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { className: "base", cx: "0", cy: "0", r: KNOB_RAD, fill: "#fff" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { className: "indent", cx: KNOB_RAD * (2 / 3), cy: "0", r: KNOB_RAD / 6, fill: "#fff" })); }; var darkKnob = function darkKnob(color, newAngle, _ref2) { var CX = _ref2.CX, CY = _ref2.CY, KNOB_RAD = _ref2.KNOB_RAD; var id = Object(_util__WEBPACK_IMPORTED_MODULE_3__["getRandomInt"])(); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { transform: "translate(".concat(CX, " ").concat(CY, ")") }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "base-edge-".concat(id), strokeWidth: "2px", fill: "none", d: "M-".concat(KNOB_RAD, ",0a").concat(KNOB_RAD, ",").concat(KNOB_RAD, " 0 1,0 ").concat(KNOB_RAD * 2, ",0a").concat(KNOB_RAD, ",").concat(KNOB_RAD, " 0 1,0 -").concat(KNOB_RAD * 2, ",0") }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "base-".concat(id), className: "base", cx: "0", cy: "0", r: KNOB_RAD }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("rect", { id: "indent-".concat(id), width: "8", height: "2", x: KNOB_RAD - 16, y: "0", rx: "1" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#141414", xlinkHref: "#base-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#l)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#base-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#m)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#base-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#141414", filter: "url(#n)", xlinkHref: "#base-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "#000000", xlinkHref: "#base-edge-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#p)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#base-edge-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#q)", strokeOpacity: ".4", xlinkHref: "#base-edge-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { transform: "rotate(".concat(newAngle, ")") }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "black", filter: "url(#r)", xlinkHref: "#indent-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: Object(_colorRanges__WEBPACK_IMPORTED_MODULE_5__["getColorValue"])(color) || '#ABE2FB', xlinkHref: "#indent-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "black", filter: "url(#t)", xlinkHref: "#indent-".concat(id) }))); }; var darkTrack = function darkTrack(props, dimensions) { var progress = props.progress; var CX = dimensions.CX, CY = dimensions.CY, GAUGE_RAD = dimensions.GAUGE_RAD, CIRCLE_CIR = dimensions.CIRCLE_CIR, GAP_ARC_LENGTH = dimensions.GAP_ARC_LENGTH, TRACK_ARC_LENGTH = dimensions.TRACK_ARC_LENGTH; var id = Object(_util__WEBPACK_IMPORTED_MODULE_3__["getRandomInt"])(); var hasColorRanges = props.color && props.color.ranges; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "knob-track-".concat(id), className: "track", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH, strokeWidth: "6", transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { id: "knob-track-progress-".concat(id), className: "track progress", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH + (1 - progress) * TRACK_ARC_LENGTH, strokeWidth: "6", transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "#15181A", filter: "url(#a)", xlinkHref: "#knob-track-".concat(id) }), hasColorRanges && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "#15181A", xlinkHref: "#knob-track-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#c)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#knob-track-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "#15181A", filter: "url(#d)", xlinkHref: "#knob-track-".concat(id) }), !hasColorRanges && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "black", filter: "url(#e)", xlinkHref: "#knob-track-progress-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: "url(#g)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#knob-track-progress-".concat(id) }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { stroke: Object(_colorRanges__WEBPACK_IMPORTED_MODULE_5__["getColorValue"])(props.color) || '#ABE2FB', xlinkHref: "#knob-track-progress-".concat(id) }), props.color && props.color.ranges && Object(_shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__["colorRangesTrack"])(props, dimensions)); }; var KnobSvg = function KnobSvg(props) { var theme = props.theme, currentDeg = props.currentDeg, disabled = props.disabled, color = props.color; var newAngle = currentDeg + START_ANGLE_OFFSET; var dimensions = calcDimensions(props); var knob = theme.dark ? darkKnob(color, newAngle, dimensions) : lightKnob(newAngle, dimensions); var track = theme.dark ? darkTrack(props, dimensions) : Object(_shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__["lightTrack"])(props, dimensions); var scaleElements = Object(_shared_TrackSvg__WEBPACK_IMPORTED_MODULE_4__["drawScale"])(props, dimensions); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { width: dimensions.SVG_WIDTH, height: dimensions.SVG_WIDTH, viewBox: "0 0 ".concat(dimensions.SVG_WIDTH, " ").concat(dimensions.SVG_WIDTH) }, theme.dark && _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_2__["default"], react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { className: "scale" }, scaleElements), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { ref: props.refFunc, onMouseDown: props.onMouseDown, onMouseUp: props.onMouseUp, onMouseMove: props.onMouseMove, onTouchStart: props.onMouseDown, onTouchEnd: props.onMouseUp, onTouchMove: props.onMouseMove, className: "knob ".concat(disabled ? 'disabled' : '') }, knob), track); }; KnobSvg.defaultProps = { theme: _styled_constants__WEBPACK_IMPORTED_MODULE_1__["light"], size: 144 }; /* harmony default export */ __webpack_exports__["default"] = (KnobSvg); // private helpers function calcDimensions(_ref3) { var size = _ref3.size; var OFFSET = 36; var d = {}; d.SVG_WIDTH = size + 80; d.CY = ~~(d.SVG_WIDTH / 2); d.CX = ~~(d.SVG_WIDTH / 2); d.GAUGE_RAD = size / 2; d.SCALE_RAD = d.GAUGE_RAD + OFFSET; d.KNOB_RAD = d.GAUGE_RAD - 12; d.CIRCLE_CIR = 2 * Math.PI * d.GAUGE_RAD; d.GAP_ARC_LENGTH = 90 / 360 * (2 * Math.PI * d.GAUGE_RAD); d.TRACK_ARC_LENGTH = d.CIRCLE_CIR - d.GAP_ARC_LENGTH; d.SCALE_TICK_OUTER_RAD = d.SCALE_RAD - 27; d.SCALE_TICK_INNER_RAD = d.SCALE_TICK_OUTER_RAD - 0.5; d.SCALE_TEXT_RAD = d.SCALE_RAD - 20; return d; } /***/ }), /***/ "./src/helpers/LEDDisplaySvg.react.js": /*!********************************************!*\ !*** ./src/helpers/LEDDisplaySvg.react.js ***! \********************************************/ /*! exports provided: Digit, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Digit", function() { return Digit; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! color */ "./node_modules/color/index.js"); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(color__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _styled_LEDDisplay_styled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styled/LEDDisplay.styled */ "./src/styled/LEDDisplay.styled.js"); /* harmony import */ var _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styled/shared/DarkGradient */ "./src/styled/shared/DarkGradient.js"); var DIGITS = { 0: ['A', 'B', 'C', 'D', 'E', 'F'], 1: ['B', 'C'], 2: ['A', 'B', 'G', 'E', 'D'], 3: ['A', 'B', 'G', 'C', 'D'], 4: ['F', 'G', 'B', 'C'], 5: ['A', 'F', 'G', 'C', 'D'], 6: ['A', 'F', 'G', 'C', 'D', 'E'], 7: ['A', 'B', 'C'], 8: ['A', 'B', 'C', 'D', 'E', 'F', 'G'], 9: ['A', 'B', 'C', 'D', 'F', 'G'], '-': ['G'] }; // See the following link for segment mappings: // https://en.wikipedia.org/wiki/Seven-segment_display#/media/File:7_segment_display_labeled.svg var LIGHT_SEGMENTS = { A: { base: 'M3.778 3.778L6.555 1h16.667L26 3.778l-2.778 2.778H6.555L3.778 3.778z', stroke: 'M3.778 3.778L6.555 1h16.667L26 3.778l-2.778 2.778H6.555L3.778 3.778z' }, B: { base: 'M26 3.778l2.778 2.777v16.667L26 26l-2.778-2.778V6.555L26 3.778z', stroke: 'M26 3.778l2.778 2.777v16.667L26 26l-2.778-2.778V6.555L26 3.778z' }, C: { base: 'M26 26l2.778 2.778v16.666L26 48.222l-2.778-2.778V28.778L26 26z', stroke: 'M26 26l2.778 2.778v16.666L26 48.222l-2.778-2.778V28.778L26 26z' }, D: { base: 'M26 48.222L23.222 51H6.555l-2.777-2.778 2.777-2.778h16.667L26 48.222z', stroke: 'M26 48.222L23.222 51H6.555l-2.777-2.778 2.777-2.778h16.667L26 48.222z' }, E: { base: 'M3.778 48.222L1 45.444V28.778L3.778 26l2.778 2.778v16.666l-2.778 2.778z', stroke: 'M3.778 48.222L1 45.444V28.778L3.778 26l2.778 2.778v16.666l-2.778 2.778z' }, F: { base: 'M3.778 26L1 23.222V6.555l2.778-2.777 2.778 2.777v16.667L3.778 26z', stroke: 'M3.778 26L1 23.222V6.555l2.778-2.777 2.778 2.777v16.667L3.778 26z' }, G: { base: 'M3.778 26l2.777-2.778h16.667L26 26l-2.778 2.778H6.555L3.778 26z', stroke: 'M3.778 26l2.777-2.778h16.667L26 26l-2.778 2.778H6.555L3.778 26z' } }; var LightSegment = function LightSegment(_ref) { var _ref$paths = _ref.paths, base = _ref$paths.base, stroke = _ref$paths.stroke, fillColor = _ref.fillColor, strokeColor = _ref.strokeColor; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { fill: fillColor, fillRule: "evenodd", d: base, clipRule: "evenodd" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { stroke: strokeColor, strokeWidth: ".75", d: stroke })); }; var LightDecimal = function LightDecimal(_ref2) { var fillColor = _ref2.fillColor, strokeColor = _ref2.strokeColor; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { transform: "translate(29 46)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { cx: "3", cy: "3", r: "3", fill: fillColor }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { cx: "3", cy: "3", r: "3", stroke: strokeColor, strokeWidth: ".75" })); }; var LightColon = function LightColon(_ref3) { var fillColor = _ref3.fillColor, strokeColor = _ref3.strokeColor; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { transform: "translate(32 36)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { cx: "3", cy: "3", r: "3", fill: fillColor }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { cx: "3", cy: "3", r: "3", stroke: strokeColor, strokeWidth: ".75" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { transform: "translate(32 9)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { cx: "3", cy: "3", r: "3", fill: fillColor }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { cx: "3", cy: "3", r: "3", stroke: strokeColor, strokeWidth: ".75" }))); }; var LightDigit = function LightDigit(_ref4) { var value = _ref4.value, hasColon = _ref4.hasColon, hasDecimal = _ref4.hasDecimal, color = _ref4.color, backgroundColor = _ref4.backgroundColor, size = _ref4.size, className = _ref4.className; var inactiveSegmentFill = color__WEBPACK_IMPORTED_MODULE_1___default()(backgroundColor).darken(0.2).fade(0.85); var activeSegments = DIGITS[value].map(function (letter) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LightSegment, { key: letter, fillColor: color, strokeColor: backgroundColor, paths: LIGHT_SEGMENTS[letter] }); }); var inactiveSegments = ['A', 'B', 'C', 'D', 'E', 'F', 'G'].map(function (letter) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LightSegment, { key: letter, fillColor: inactiveSegmentFill, strokeColor: backgroundColor, paths: LIGHT_SEGMENTS[letter] }); }); var width = hasColon ? size : size * (6 / 7); var height = size * (9 / 7); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: className }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fill: "none", style: { transform: "scale(".concat(Number(size) / 42, ")") } }, inactiveSegments, activeSegments, hasColon && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LightColon, { fillColor: color, strokeColor: backgroundColor }), hasDecimal && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LightDecimal, { fillColor: color, strokeColor: backgroundColor })))); }; var DarkDigit = function DarkDigit(_ref5) { var value = _ref5.value, hasColon = _ref5.hasColon, hasDecimal = _ref5.hasDecimal, color = _ref5.color, size = _ref5.size, className = _ref5.className; var segments = DIGITS[value].map(function (letter) { return _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_3__["DARK_SEGMENTS"][letter]; }); var width = hasColon ? size : size * (6 / 7); var height = size * (9 / 7); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_styled_LEDDisplay_styled__WEBPACK_IMPORTED_MODULE_2__["DarkDigitContainer"], { className: className, color: color }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", width: width, height: height }, _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_3__["darkLEDDefs"], react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fill: "none", fillRule: "evenodd", filter: "url(#darkLED-a)", style: { transform: "scale(".concat(Number(size) / 42, ")") } }, segments, hasColon && _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_3__["darkColon"], hasDecimal && _styled_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_3__["darkDecimal"]))); }; var Digit = function Digit(props) { return props.theme.dark ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DarkDigit, props) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LightDigit, props); }; /* harmony default export */ __webpack_exports__["default"] = (Digit); /***/ }), /***/ "./src/helpers/NumericInput.js": /*!*************************************!*\ !*** ./src/helpers/NumericInput.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react_numeric_input__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-numeric-input */ "./node_modules/react-numeric-input/index.js"); /* harmony import */ var react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_numeric_input__WEBPACK_IMPORTED_MODULE_0__); react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.UNSAFE_componentWillMount = react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.componentWillMount; react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.UNSAFE_componentWillReceiveProps = react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.componentWillReceiveProps; react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.UNSAFE_componentWillUpdate = react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.componentWillUpdate; delete react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.componentWillMount; delete react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.componentWillReceiveProps; delete react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.componentWillUpdate; /* harmony default export */ __webpack_exports__["default"] = (react_numeric_input__WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "./src/helpers/PowerButtonSvg.react.js": /*!*********************************************!*\ !*** ./src/helpers/PowerButtonSvg.react.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); var PowerButtonSvg = function PowerButtonSvg(_ref) { var color = _ref.color, theme = _ref.theme, on = _ref.on, size = _ref.size; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 14 14" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { fill: on ? color || theme.primary : theme.secondary, fillRule: "evenodd", d: "M24.5173333,14.68 C25.2764482,15.3271143 25.8799978,16.1111065 26.328,17.032 C26.7760022,17.9777825 27,18.9671059 27,20 C27,21.2693397 26.6826698,22.4453279 26.048,23.528 C25.4257747,24.5857831 24.5857831,25.4257747 23.528,26.048 C22.4453279,26.6826698 21.2693397,27 20,27 C18.7306603,27 17.5546721,26.6826698 16.472,26.048 C15.4142169,25.4257747 14.5742253,24.5857831 13.952,23.528 C13.3173302,22.4453279 13,21.2693397 13,20 C13,18.9671059 13.2302199,17.9777825 13.6906667,17.032 C14.1262244,16.1111065 14.7235518,15.3271143 15.4826667,14.68 L16.5653333,15.7626667 C15.9555525,16.2728914 15.4764462,16.8888853 15.128,17.6106667 C14.7546648,18.3697816 14.568,19.1662181 14.568,20 C14.568,20.9955605 14.8106642,21.9102181 15.296,22.744 C15.7813358,23.5653374 16.4346626,24.2186642 17.256,24.704 C18.0897819,25.1893358 19.0044395,25.432 20,25.432 C20.9955605,25.432 21.9102181,25.1893358 22.744,24.704 C23.5653374,24.2186642 24.2186642,23.5653374 24.704,22.744 C25.1893358,21.9102181 25.432,20.9955605 25.432,20 C25.432,19.1537735 25.2546684,18.3666703 24.9,17.6386667 C24.5453316,16.910663 24.056892,16.2977803 23.4346667,15.8 L24.5173333,14.68 Z M20.7653333,13 L20.7653333,20.7653333 L19.2346667,20.7653333 L19.2346667,13 L20.7653333,13 Z", transform: "translate(-13 -13)" })); }; PowerButtonSvg.defaultProps = { theme: _styled_constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; /* harmony default export */ __webpack_exports__["default"] = (PowerButtonSvg); /***/ }), /***/ "./src/helpers/classNameGenerator.js": /*!*******************************************!*\ !*** ./src/helpers/classNameGenerator.js ***! \*******************************************/ /*! exports provided: getClassName, getFilteredProps */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClassName", function() { return getClassName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFilteredProps", function() { return getFilteredProps; }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); var getClassName = function getClassName(componentName, theme) { return 'daq-' + componentName + (theme && theme.dark ? '--dark' : '--light'); }; var getFilteredProps = function getFilteredProps(props) { return Object(ramda__WEBPACK_IMPORTED_MODULE_0__["omit"])(['className', 'id', 'setProps', 'style'], props); }; /***/ }), /***/ "./src/helpers/colorRanges.js": /*!************************************!*\ !*** ./src/helpers/colorRanges.js ***! \************************************/ /*! exports provided: isContiguous, toOneDArray, convertInRange, getSortedEntries, getGradientObject, getLinearGradientCSS, getColorValue, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContiguous", function() { return isContiguous; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toOneDArray", function() { return toOneDArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertInRange", function() { return convertInRange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSortedEntries", function() { return getSortedEntries; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGradientObject", function() { return getGradientObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLinearGradientCSS", function() { return getLinearGradientCSS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getColorValue", function() { return getColorValue; }); /* harmony import */ var tinygradient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tinygradient */ "./node_modules/tinygradient/tinygradient.js"); /* harmony import */ var tinygradient__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tinygradient__WEBPACK_IMPORTED_MODULE_0__); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var isContiguous = function isContiguous(_ref) { var color = _ref.color, min = _ref.min, max = _ref.max; var ranges = toOneDArray(Object.values(color.ranges)); ranges.sort(function (r1, r2) { return r1[0] - r2[0]; }); // color ranges start at min and end at max if (ranges[0][0] !== min || ranges[ranges.length - 1][1] !== max) return false; // color ranges are contiguous for (var i = 0; i < ranges.length - 1; i++) { if (ranges[i][1] !== ranges[i + 1][0]) return false; } return true; }; var toOneDArray = function toOneDArray(ranges) { var arr = []; for (var i = 0; i < ranges.length; i++) { if (ranges[i][0] instanceof Array) { for (var j = 0; j < ranges[i].length; j++) { arr.push(ranges[i][j]); } } else { arr.push(ranges[i]); } } return arr; }; var convertInRange = function convertInRange(color, max, min) { /* * The function will check color and range attribute. * if range attribute is provided, it will check for unequal range values. * args: color, max and min props from the gauge component * example 1: * input: color -> {"red":[1, 10], "green":[10, 50]}, max -> 40, min -> 0 * output: {"red":[0, 10], "green":[10, 40]} * if color is underfined */ if (!color) { return color; } // if ranges is not passed with color if (color.ranges == null) { return color; } else { var ranges = _objectSpread({}, color.ranges); // get a flat array of ranges var rangeArr = getRangeArray(ranges); rangeArr.sort(function (a1, a2) { return a1 - a2; }); var maxArr = []; var minArr = []; manageRange({ ranges: ranges, max: max, min: min, rangeArr: rangeArr, minArr: minArr, maxArr: maxArr }); for (var i = 0; i < minArr.length; i++) { if (minArr[i]['subKey']) { ranges[minArr[i]['subKey']][minArr[i]['key']][minArr[i]['index']] = min; } else { ranges[minArr[i]['key']][minArr[i]['index']] = min; } } for (var _i = 0; _i < maxArr.length; _i++) { if (maxArr[_i]['subKey']) { ranges[maxArr[_i]['subKey']][maxArr[_i]['key']][maxArr[_i]['index']] = max; } else { ranges[maxArr[_i]['key']][maxArr[_i]['index']] = max; } } color.ranges = ranges; return _objectSpread({}, color); } }; var manageRange = function manageRange(_ref2) { var ranges = _ref2.ranges, _ref2$subKey = _ref2.subKey, subKey = _ref2$subKey === void 0 ? undefined : _ref2$subKey, max = _ref2.max, min = _ref2.min, rangeArr = _ref2.rangeArr, _ref2$minArr = _ref2.minArr, minArr = _ref2$minArr === void 0 ? [] : _ref2$minArr, _ref2$maxArr = _ref2.maxArr, maxArr = _ref2$maxArr === void 0 ? [] : _ref2$maxArr; for (var i in ranges) { if (ranges[i][0] instanceof Array) { manageRange({ ranges: ranges[i], subKey: i, max: max, min: min, rangeArr: rangeArr, minArr: minArr, maxArr: maxArr }); continue; } if (ranges[i][0] > max) { maxArr.push({ key: i, subKey: subKey, index: 0 }); } if (ranges[i][1] > max) { maxArr.push({ key: i, subKey: subKey, index: 1 }); } if (ranges[i][0] < min) { minArr.push({ key: i, subKey: subKey, index: 0 }); } if (ranges[i][1] < min) { minArr.push({ key: i, subKey: subKey, index: 1 }); } if (rangeArr[0] == ranges[i][0] && ranges[i][0] > min) { ranges[i][0] = min; } if (rangeArr[0] == ranges[i][1] && ranges[i][1] > min) { ranges[i][1] = min; } if (rangeArr[rangeArr.length - 1] == ranges[i][0] && ranges[i][0] < max) { ranges[i][0] = max; } if (rangeArr[rangeArr.length - 1] == ranges[i][1] && ranges[i][1] < max) { ranges[i][1] = max; } } }; var getRangeArray = function getRangeArray(ranges) { /* * convert range passed in colors to flat array * example -> ranges = {"red":[0, 1], "green":[1, 10]} * output -> arr = [0, 1, 1, 10] */ var arr = []; for (var i in ranges) { if (ranges[i][0] instanceof Array) { for (var j in ranges[i]) { arr = [].concat(_toConsumableArray(arr), _toConsumableArray(ranges[i][j])); } } else { arr = [].concat(_toConsumableArray(arr), _toConsumableArray(ranges[i])); } } return arr; }; var getSortedEntries = function getSortedEntries(scale) { var arr = Object.entries(scale); var arr1 = []; for (var i = 0; i < arr.length; i++) { var key = arr[i][0]; if (arr[i][1][0] instanceof Array) { for (var j = 0; j < arr[i][1].length; j++) { arr1.push([key, arr[i][1][j]]); } } else { arr1.push([key, arr[i][1]]); } } var entries = arr1; entries.sort(function (_ref3, _ref4) { var _ref5 = _slicedToArray(_ref3, 2), r1 = _ref5[1]; var _ref6 = _slicedToArray(_ref4, 2), r2 = _ref6[1]; return r1[0] - r2[0]; }); return entries; }; var getGradientObject = function getGradientObject(_ref7) { var color = _ref7.color, min = _ref7.min, max = _ref7.max; var currentPos = 0; var stops = getSortedEntries(color.ranges).map(function (_ref8) { var _ref9 = _slicedToArray(_ref8, 2), colorValue = _ref9[0], range = _ref9[1]; var rangeLength = (range[1] - range[0]) * 1.0 / (max - min); var start = currentPos; var end = currentPos + rangeLength; currentPos = end; return { color: colorValue, pos: start }; }); return tinygradient__WEBPACK_IMPORTED_MODULE_0___default()(stops); }; var getLinearGradientCSS = function getLinearGradientCSS(_ref10) { var color = _ref10.color, min = _ref10.min, max = _ref10.max, _ref10$vertical = _ref10.vertical, vertical = _ref10$vertical === void 0 ? false : _ref10$vertical; var currentPercentage = 0; var stops = getSortedEntries(color.ranges).map(function (_ref11, i) { var _ref12 = _slicedToArray(_ref11, 2), colorValue = _ref12[0], range = _ref12[1]; var rangeLength = (range[1] - range[0]) * 1.0 / (max - min) * 100; var start = currentPercentage; var end = currentPercentage + rangeLength; currentPercentage = end; if (color.gradient) { return i === 0 ? colorValue : "".concat(colorValue, " ").concat(start, "%"); } return i === 0 ? "".concat(colorValue, ", ").concat(colorValue, " ").concat(end, "%") : "".concat(colorValue, " ").concat(start, "%, ").concat(colorValue, " ").concat(end, "%"); }); stops.unshift(vertical ? 'to top' : 'to right'); return "linear-gradient(".concat(stops.join(', '), ")"); }; var getColorValue = function getColorValue(color) { return color && (typeof color === 'string' ? color : color["default"]); }; /* harmony default export */ __webpack_exports__["default"] = ({ isContiguous: isContiguous, getSortedEntries: getSortedEntries, getLinearGradientCSS: getLinearGradientCSS, getColorValue: getColorValue }); /***/ }), /***/ "./src/helpers/logarithm.js": /*!**********************************!*\ !*** ./src/helpers/logarithm.js ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ "./src/helpers/util.js"); function _templateObject() { var data = _taggedTemplateLiteral(["\n font-size: 0.9em;\n margin-left: -10px;\n\n & sup {\n font-size: 0.6em;\n }\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } function compute(value) { var base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10; if (base === 'e') base = Math.exp(1); return Math.log(value) / Math.log(base); } function generateLogFormatter(_ref) { var _ref$base = _ref.base, base = _ref$base === void 0 ? 10 : _ref$base, _ref$isSVG = _ref.isSVG, isSVG = _ref$isSVG === void 0 ? false : _ref$isSVG; return function (value) { return isSVG ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tspan", null, base, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tspan", { dy: "-6px" }, value)) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, base, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("sup", null, value)); }; } function genLogMarks(_ref2, isSVG) { var min = _ref2.min, max = _ref2.max, _ref2$step = _ref2.step, step = _ref2$step === void 0 ? 1 : _ref2$step, _ref2$base = _ref2.base, base = _ref2$base === void 0 ? 10 : _ref2$base, marks = _ref2.marks; // if no marks given, compute default marks if (!marks) { var curr = min; marks = {}; while (curr <= max) { marks[curr] = true; curr += step; } } Object.keys(marks).forEach(function (key) { if (typeof marks[key] !== 'boolean') { // custom mark label, do not format return; } marks[key] = isSVG ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tspan", null, base, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tspan", { dy: "-6px" }, key)) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, base, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("sup", null, key)); }); return marks; } function formatValue(value, base) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Value, null, "~", base, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("sup", null, Object(_util__WEBPACK_IMPORTED_MODULE_2__["roundToDecimal"])(value, 2))); } var Value = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject()); /* harmony default export */ __webpack_exports__["default"] = ({ compute: compute, generateLogFormatter: generateLogFormatter, formatValue: formatValue, genLogMarks: genLogMarks }); /***/ }), /***/ "./src/helpers/scale.js": /*!******************************!*\ !*** ./src/helpers/scale.js ***! \******************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return generateScale; }); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./src/helpers/util.js"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } // magic numbers var DEFAULT_NUM_INTERVALS = 10; var DEFAULT_LABEL_INTERVAL = 2; function generateScale(input) { var config = processInput(input); var scale = _objectSpread({}, config.custom); if (config.onlyRenderCustom) { return scale; } scale[config.min] = config.formatter(config.min); scale[config.max] = config.formatter(config.max); var curr = config.start; var markCount = 0; while (curr <= config.max) { var needsLabel = markCount % config.labelInterval === 0; var currValue = Number(Object(_util__WEBPACK_IMPORTED_MODULE_0__["decimalify"])(curr, config.interval)); var alreadyMarked = typeof scale[currValue] !== 'undefined'; curr += config.interval; markCount++; if (alreadyMarked) continue; var label = needsLabel ? config.formatter(currValue) : null; scale[currValue] = label; } return scale; } // private function processInput(_ref) { var min = _ref.min, max = _ref.max, _ref$scale = _ref.scale, scale = _ref$scale === void 0 ? {} : _ref$scale, formatter = _ref.formatter; var config = {}; var START_FLAG = scale.start != null; var INTERVAL_FLAG = scale.interval != null; var LABEL_INTERVAL_FLAG = scale.labelInterval != null; config.min = min; config.max = max; config.start = START_FLAG ? scale.start : min; config.interval = INTERVAL_FLAG ? scale.interval : computeInterval(config.start, max); config.labelInterval = LABEL_INTERVAL_FLAG ? scale.labelInterval : DEFAULT_LABEL_INTERVAL; config.custom = scale.custom || {}; config.formatter = formatter || identityFunc; var noConfigPassed = !START_FLAG && !INTERVAL_FLAG && !LABEL_INTERVAL_FLAG; var customTicks = Object.keys(config.custom).length; config.onlyRenderCustom = customTicks && noConfigPassed; config.start = config.start != min ? min : config.start; return config; } function identityFunc(x) { return x; } function computeInterval(min, max) { var ROUND_TO_WHOLE = Math.ceil; var ROUND_TO_FRACTION = function ROUND_TO_FRACTION(x) { return Number(x.toFixed(2)); }; var range = Math.abs(max - min) * 1.0; var intervalEstimate = range / DEFAULT_NUM_INTERVALS; var interval = intervalEstimate > 1 ? ROUND_TO_WHOLE(intervalEstimate) : ROUND_TO_FRACTION(intervalEstimate); return interval; } /***/ }), /***/ "./src/helpers/shared/TrackSvg.js": /*!****************************************!*\ !*** ./src/helpers/shared/TrackSvg.js ***! \****************************************/ /*! exports provided: colorRangesTrack, lightTrack, drawScale */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorRangesTrack", function() { return colorRangesTrack; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lightTrack", function() { return lightTrack; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawScale", function() { return drawScale; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../helpers/util */ "./src/helpers/util.js"); /* harmony import */ var _helpers_colorRanges__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../helpers/colorRanges */ "./src/helpers/colorRanges.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../styled/constants */ "./src/styled/constants.js"); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var colorRangesTrack = function colorRangesTrack(props, dimensions) { // const { max } = props; var CX = dimensions.CX, CY = dimensions.CY, GAUGE_RAD = dimensions.GAUGE_RAD, CIRCLE_CIR = dimensions.CIRCLE_CIR, GAP_ARC_LENGTH = dimensions.GAP_ARC_LENGTH; var TRACK_ARC_DEG = 270; var GAP_ARC_DEG = 90; var GRADIENT_BLEND = 25; if (!Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_2__["isContiguous"])(props)) return null; // set colors start from 0 if negative value is present var deepColorCopy = JSON.parse(JSON.stringify(props.color)); var _setColorRangeStartFr = setColorRangeStartFromZero(_objectSpread({}, deepColorCopy), props.max), color = _setColorRangeStartFr.color, max = _setColorRangeStartFr.max; // calculate stops var stops = Object(_helpers_colorRanges__WEBPACK_IMPORTED_MODULE_2__["getSortedEntries"])(color.ranges).map(function (_ref, i) { var _ref2 = _slicedToArray(_ref, 2), colorValue = _ref2[0], range = _ref2[1]; var startDeg = range[0] * 1.0 / max * TRACK_ARC_DEG + GAP_ARC_DEG; var endDeg = range[1] * 1.0 / max * TRACK_ARC_DEG + GAP_ARC_DEG; if (color.gradient) { // no transition between black band and first color if (i === 0) { return "".concat(colorValue, " 0"); } return "".concat(colorValue, " ").concat(startDeg + GRADIENT_BLEND, "deg, ").concat(colorValue, " ").concat(endDeg - GRADIENT_BLEND, "deg"); } return "".concat(colorValue, " ").concat(startDeg, "deg, ").concat(colorValue, " ").concat(endDeg, "deg"); }); stops.unshift(["black ".concat(GAP_ARC_DEG, "deg")]); // add black band for bottom gap if (typeof window === 'undefined') { return null; } if (!window.ConicGradient) { // eslint-disable-next-line __webpack_require__(/*! conic-gradient */ "./node_modules/conic-gradient/conic-gradient.js"); // globally sets ConicGradient } var ConicGradient = window.ConicGradient; var gradient = new ConicGradient({ stops: stops.join(', '), size: 400 }); // unique id for each track var id = "colorRangesImage-".concat(Object(_helpers_util__WEBPACK_IMPORTED_MODULE_1__["getRandomInt"])()); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("pattern", { id: id, patternUnits: "userSpaceOnUse", width: "100%", height: "100%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("image", { xlinkHref: gradient.dataURL, width: "100%", height: "100%" }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { className: "color-ranges", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", stroke: "url(#".concat(id, ")"), strokeWidth: "6px", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH, transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") })); }; var lightTrack = function lightTrack(props, dimensions) { var color = props.color, progress = props.progress; var CX = dimensions.CX, CY = dimensions.CY, GAUGE_RAD = dimensions.GAUGE_RAD, CIRCLE_CIR = dimensions.CIRCLE_CIR, GAP_ARC_LENGTH = dimensions.GAP_ARC_LENGTH, TRACK_ARC_LENGTH = dimensions.TRACK_ARC_LENGTH; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { className: "track", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH, strokeWidth: "6", transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("circle", { className: "track progress", cx: CX, cy: CY, r: GAUGE_RAD, fill: "none", strokeDasharray: CIRCLE_CIR, strokeDashoffset: GAP_ARC_LENGTH + (1 - progress) * TRACK_ARC_LENGTH, strokeWidth: "6", transform: "rotate(-225 ".concat(CX, " ").concat(CY, ")") }), color && color.ranges && colorRangesTrack(props, dimensions)); }; var getScaleString = function getScaleString(v) { if (!v) return ''; // is jsx element? if (v.props) return v.props.children[0] + ' '; return v && v.label || v; }; var drawScale = function drawScale(_ref3, _ref4) { var min = _ref3.min, max = _ref3.max, step = _ref3.step, scale = _ref3.scale; var CX = _ref4.CX, CY = _ref4.CY, SCALE_TICK_OUTER_RAD = _ref4.SCALE_TICK_OUTER_RAD, SCALE_TICK_INNER_RAD = _ref4.SCALE_TICK_INNER_RAD, SCALE_TEXT_RAD = _ref4.SCALE_TEXT_RAD, IS_GAUGE = _ref4.IS_GAUGE; var START_ANGLE_OFFSET = -225; var DEFAULT_LONGEST_STRING = 3; var scaleItems = []; var count = 0; var offset = (Math.max(Object(_helpers_util__WEBPACK_IMPORTED_MODULE_1__["longestString"])(Object.values(scale).map(getScaleString)).length, DEFAULT_LONGEST_STRING) || DEFAULT_LONGEST_STRING) * 2; var sr1 = SCALE_TICK_OUTER_RAD; var sr2 = SCALE_TICK_INNER_RAD; var srT = IS_GAUGE ? SCALE_TEXT_RAD - offset : SCALE_TEXT_RAD + offset; Object.keys(scale).forEach(function (key) { var markValue = scale[key]; var degreesProgressed = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_1__["computeProgress"])({ min: min, max: max, value: key, progressionTarget: _styled_constants__WEBPACK_IMPORTED_MODULE_3__["TRACK_TOTAL_DEG"] }); var markAngle = START_ANGLE_OFFSET + degreesProgressed; if (markValue !== null) { // draw full mark var sx1 = CX + sr1 * Math.cos(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var sy1 = CY + sr1 * Math.sin(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var sx2 = CX + sr2 * Math.cos(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var sy2 = CY + sr2 * Math.sin(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var sxT = CX + srT * Math.cos(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var syT = CY + srT * Math.sin(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]) + 4; scaleItems.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("line", { key: "line".concat(count), className: "tick", x1: sx1, y1: sy1, x2: sx2, y2: sy2, strokeLinecap: "round" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("text", { key: "text".concat(count), x: sxT, y: syT, textAnchor: "middle", style: markValue && markValue.style ? markValue.style : null }, markValue && markValue.label || markValue)); } else { // draw mini mark var _sx = CX + sr1 * Math.cos(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var _sy = CY + sr1 * Math.sin(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var _sx2 = CX + (sr2 + 3) * Math.cos(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); var _sy2 = CY + (sr2 + 3) * Math.sin(markAngle * _styled_constants__WEBPACK_IMPORTED_MODULE_3__["RADIAN"]); scaleItems.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("line", { key: "line".concat(count), className: "tick", x1: _sx, y1: _sy, x2: _sx2, y2: _sy2, strokeLinecap: "round" })); } count++; }); return scaleItems; }; var setColorRangeStartFromZero = function setColorRangeStartFromZero(color, max) { var ranges = _objectSpread({}, color.ranges); var minimum = Infinity; for (var i in ranges) { if (ranges[i][0] instanceof Array) { for (var j = 0; j < ranges[i].length; j++) { if (ranges[i][j][0] < minimum) { minimum = ranges[i][j][0]; } if (ranges[i][j][1] < minimum) { minimum = ranges[i][j][1]; } } continue; } if (ranges[i][0] < minimum) { minimum = ranges[i][0]; } if (ranges[i][1] < minimum) { minimum = ranges[i][1]; } } if (minimum < 0) { for (var _i2 in ranges) { if (ranges[_i2][0] instanceof Array) { for (var _j = 0; _j < ranges[_i2].length; _j++) { ranges[_i2][_j][0] = ranges[_i2][_j][0] - minimum; ranges[_i2][_j][1] = ranges[_i2][_j][1] - minimum; } continue; } ranges[_i2][0] = ranges[_i2][0] - minimum; ranges[_i2][1] = ranges[_i2][1] - minimum; } max = max - minimum; } color = _objectSpread({}, color, { ranges: ranges }); return { color: color, max: max }; }; /***/ }), /***/ "./src/helpers/util.js": /*!*****************************!*\ !*** ./src/helpers/util.js ***! \*****************************/ /*! exports provided: longestString, decimalify, sanitizeRangeValue, computeProgress, roundToDecimal, getRandomInt, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "longestString", function() { return longestString; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decimalify", function() { return decimalify; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitizeRangeValue", function() { return sanitizeRangeValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeProgress", function() { return computeProgress; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "roundToDecimal", function() { return roundToDecimal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRandomInt", function() { return getRandomInt; }); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var longestString = function longestString(arr) { return arr.sort(function (a, b) { return b.length - a.length; })[0]; }; var decimalify = function decimalify() { var num = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; var step = arguments.length > 1 ? arguments[1] : undefined; if (isNaN(num)) { return num; } // eslint-disable-next-line var _step$toString$split = step.toString().split('.'), _step$toString$split2 = _slicedToArray(_step$toString$split, 2), characteristic = _step$toString$split2[0], mantissa = _step$toString$split2[1]; var numDecimalPoints = mantissa ? mantissa.length : 0; return num.toFixed(numDecimalPoints); }; var sanitizeRangeValue = function sanitizeRangeValue(_ref) { var min = _ref.min, max = _ref.max, value = _ref.value; if (value == null) return min; if (value < min) { return min; } else if (value > max) { return max; } else { return value; } }; var computeProgress = function computeProgress(_ref2) { var min = _ref2.min, max = _ref2.max, value = _ref2.value, _ref2$progressionTarg = _ref2.progressionTarget, progressionTarget = _ref2$progressionTarg === void 0 ? 100 : _ref2$progressionTarg; value = Number(value); var adjustedValue = Math.abs(value - min) * 1.0; var range = Math.abs(max - min); return adjustedValue / range * progressionTarget; }; var roundToDecimal = function roundToDecimal(value, decimals) { return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals); }; var getRandomInt = function getRandomInt() { var min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 9999; return Math.floor(Math.random() * (max - min + 1)) + min; }; /* harmony default export */ __webpack_exports__["default"] = ({ decimalify: decimalify, sanitizeRangeValue: sanitizeRangeValue, computeProgress: computeProgress, longestString: longestString, roundToDecimal: roundToDecimal, getRandomInt: getRandomInt }); /***/ }), /***/ "./src/index.js": /*!**********************!*\ !*** ./src/index.js ***! \**********************/ /*! exports provided: BooleanSwitch, ColorPicker, Gauge, GraduatedBar, Indicator, Knob, LEDDisplay, NumericInput, PowerButton, PrecisionInput, StopButton, Slider, Tank, Thermometer, ToggleSwitch, DarkThemeProvider, Joystick */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _components_BooleanSwitch_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/BooleanSwitch.react */ "./src/components/BooleanSwitch.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BooleanSwitch", function() { return _components_BooleanSwitch_react__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _components_ColorPicker_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/ColorPicker.react */ "./src/components/ColorPicker.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPicker", function() { return _components_ColorPicker_react__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _components_Gauge_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/Gauge.react */ "./src/components/Gauge.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Gauge", function() { return _components_Gauge_react__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _components_GraduatedBar_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/GraduatedBar.react */ "./src/components/GraduatedBar.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GraduatedBar", function() { return _components_GraduatedBar_react__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _components_Indicator_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/Indicator.react */ "./src/components/Indicator.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Indicator", function() { return _components_Indicator_react__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _components_Knob_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/Knob.react */ "./src/components/Knob.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Knob", function() { return _components_Knob_react__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _components_LEDDisplay_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/LEDDisplay.react */ "./src/components/LEDDisplay.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LEDDisplay", function() { return _components_LEDDisplay_react__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _components_NumericInput_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/NumericInput.react */ "./src/components/NumericInput.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericInput", function() { return _components_NumericInput_react__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _components_PowerButton_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/PowerButton.react */ "./src/components/PowerButton.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PowerButton", function() { return _components_PowerButton_react__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _components_PrecisionInput_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./components/PrecisionInput.react */ "./src/components/PrecisionInput.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PrecisionInput", function() { return _components_PrecisionInput_react__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _components_StopButton_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./components/StopButton.react */ "./src/components/StopButton.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StopButton", function() { return _components_StopButton_react__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _components_Slider_react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./components/Slider.react */ "./src/components/Slider.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return _components_Slider_react__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _components_Tank_react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./components/Tank.react */ "./src/components/Tank.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tank", function() { return _components_Tank_react__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _components_Thermometer_react__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./components/Thermometer.react */ "./src/components/Thermometer.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Thermometer", function() { return _components_Thermometer_react__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _components_ToggleSwitch_react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./components/ToggleSwitch.react */ "./src/components/ToggleSwitch.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToggleSwitch", function() { return _components_ToggleSwitch_react__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _components_DarkThemeProvider_react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./components/DarkThemeProvider.react */ "./src/components/DarkThemeProvider.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DarkThemeProvider", function() { return _components_DarkThemeProvider_react__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _components_Joystick_react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./components/Joystick.react */ "./src/components/Joystick.react.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Joystick", function() { return _components_Joystick_react__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* eslint-disable import/prefer-default-export */ /***/ }), /***/ "./src/styled/CurrentValue.styled.js": /*!*******************************************!*\ !*** ./src/styled/CurrentValue.styled.js ***! \*******************************************/ /*! exports provided: Value, ValueLabel, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Value", function() { return Value; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValueLabel", function() { return ValueLabel; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject6() { var data = _taggedTemplateLiteral(["\n margin-top: -4px;\n text-transform: uppercase;\n font-size: 8px;\n color: #535d63;\n"]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n font-size: ", "px;\n "]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.4);\n "]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n font-size: 1em;\n color: ", ";\n ", ";\n ", "\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n ", ";\n "]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n\n top: 50%;\n transform: translateY(-50%);\n text-align: center;\n font-size: 32px;\n ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var ValueContainer = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject(), function (props) { return props.css ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject2(), props.css) : ''; }); var Value = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject3(), function (_ref) { var theme = _ref.theme, color = _ref.color; return color || (theme.dark ? '#000' : color || theme.primary); }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject4()) : ''; }, function (_ref3) { var fontSize = _ref3.fontSize; return fontSize ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject5(), fontSize) : ''; }); Value.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_2__["light"] }; var ValueLabel = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].label(_templateObject6()); /* harmony default export */ __webpack_exports__["default"] = (function (props) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ValueContainer, { css: props.css }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Value, { fontSize: props.valueSize, color: props.valueColor, style: props.customStyle }, props.children), props.units ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ValueLabel, null, props.units) : null); }); /***/ }), /***/ "./src/styled/Gauge.styled.js": /*!************************************!*\ !*** ./src/styled/Gauge.styled.js ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); function _templateObject2() { var data = _taggedTemplateLiteral(["\n & .needle-knob {\n stroke: ", ";\n stroke-width: 2;\n }\n\n & .track {\n stroke: ", ";\n }\n\n & .track.progress {\n stroke: ", ";\n }\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n & svg {\n text-align: center;\n }\n\n & circle {\n user-select: none;\n }\n\n & .scale {\n font-size: 12px;\n\n fill: ", ";\n user-select: none;\n }\n\n & .tick {\n stroke: ", ";\n stroke-width: 2;\n }\n\n & .tick.small {\n stroke: #2b2f32;\n }\n\n & .needle {\n stroke: ", ";\n stroke-width: 3;\n }\n\n ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject(), function (_ref) { var theme = _ref.theme, color = _ref.color; return color || (theme.dark ? '#000' : '#5b6268'); }, function (props) { return props.theme.detail; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? '#000' : '#5b6268'; }, function (_ref3) { var theme = _ref3.theme; return !theme.dark && lightTheme; }); var lightTheme = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2(), function (_ref4) { var theme = _ref4.theme; return theme.secondary; }, function (props) { return props.theme.secondary; }, function (_ref5) { var color = _ref5.color, theme = _ref5.theme; return color || theme.primary; }); Container.defaultProps = { theme: _styled_constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; /* harmony default export */ __webpack_exports__["default"] = (Container); /***/ }), /***/ "./src/styled/GraduatedBar.styled.js": /*!*******************************************!*\ !*** ./src/styled/GraduatedBar.styled.js ***! \*******************************************/ /*! exports provided: Container, Block, Value */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Container", function() { return Container; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Block", function() { return Block; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Value", function() { return Value; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject13() { var data = _taggedTemplateLiteral(["\n font-size: 11px;\n right: auto;\n "]); _templateObject13 = function _templateObject13() { return data; }; return data; } function _templateObject12() { var data = _taggedTemplateLiteral(["\n position: absolute;\n right: 4%;\n top: 50%;\n transform: translateY(-50%);\n\n ", ";\n"]); _templateObject12 = function _templateObject12() { return data; }; return data; } function _templateObject11() { var data = _taggedTemplateLiteral(["\n background-color: ", ";\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.5) 0%,\n rgba(0, 0, 0, 0.4) 100%\n );\n background-blend-mode: overlay;\n "]); _templateObject11 = function _templateObject11() { return data; }; return data; } function _templateObject10() { var data = _taggedTemplateLiteral(["\n ", " box-shadow: ", ";\n"]); _templateObject10 = function _templateObject10() { return data; }; return data; } function _templateObject9() { var data = _taggedTemplateLiteral(["\n height: ", ";\n width: ", ";\n margin: ", ";\n "]); _templateObject9 = function _templateObject9() { return data; }; return data; } function _templateObject8() { var data = _taggedTemplateLiteral(["\n background-color: ", ";\n "]); _templateObject8 = function _templateObject8() { return data; }; return data; } function _templateObject7() { var data = _taggedTemplateLiteral(["\n background-image: linear-gradient(", ", ", ", ", ");\n "]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteral(["\n display: block;\n box-sizing: border-box;\n\n ", "\n\n ", "\n\n ", ";\n"]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n background-color: ", ";\n"]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);\n padding: 3px;\n color: #fff;\n border: none;\n border-radius: 0px;\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n flex-direction: row;\n width: ", ";\n height: 30px;\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n flex-direction: column-reverse;\n width: 30px;\n height: ", ";\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n ", ";\n ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject(), function (_ref) { var vertical = _ref.vertical; return vertical ? verticalContainer : horizontalContainer; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? darkContainer : lightContainer; }); Container.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var verticalContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2(), function (_ref3) { var size = _ref3.size; return "".concat(size, "px"); }); var horizontalContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3(), function (_ref4) { var size = _ref4.size; return "".concat(size, "px"); }); var darkContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject4()); var lightContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject5(), function (props) { return props.theme.secondary; }); var Block = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject6(), function (_ref5) { var gradient = _ref5.gradient, progress = _ref5.progress, color = _ref5.color, theme = _ref5.theme, max = _ref5.max, min = _ref5.min, step = _ref5.step, size = _ref5.size, vertical = _ref5.vertical; if (gradient) { var TOTAL_STEPS = (max - min) / step; var STEP_SIZE = size / TOTAL_STEPS; var STEP_SIZE_PERCENT = STEP_SIZE / size; var start = gradient.rgbAt(progress).toString(); var end = gradient.rgbAt(progress + STEP_SIZE_PERCENT).toString(); return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject7(), vertical ? 'to top' : 'to right', start, end); } return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject8(), color || theme.primary); }, function (props) { var TOTAL_STEPS = (props.max - props.min) / props.step; var STEP_SIZE = props.size / TOTAL_STEPS; var MARGIN = STEP_SIZE >= 10 ? STEP_SIZE * 0.05 : 0.5; var BOX_SIZE = STEP_SIZE - 2 * MARGIN; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject9(), props.vertical ? "".concat(BOX_SIZE, "px") : '100%', props.vertical ? '100%' : "".concat(BOX_SIZE, "px"), props.vertical ? "".concat(MARGIN, "px 0") : "0 ".concat(MARGIN, "px")); }, function (_ref6) { var theme = _ref6.theme; return theme.dark && darkBlock; }); Block.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var darkBlock = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject10(), function (_ref7) { var color = _ref7.color, theme = _ref7.theme, gradient = _ref7.gradient; if (gradient) return; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject11(), color || theme.primary); }, function (_ref8) { var color = _ref8.color, theme = _ref8.theme; return "2px 2px 6px 1px rgba(0, 0, 0, 0.45), inset 1px 1px 2px 0 rgba(255, 255, 255, 0.3),\n 1px 1px 1px 0px rgba(0, 0, 0, 0.6), 0 0 3px 0px ".concat(color || theme.primary); }); var Value = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject12(), function (_ref9) { var vertical = _ref9.vertical; return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject13()) : ''; }); /***/ }), /***/ "./src/styled/Knob.styled.js": /*!***********************************!*\ !*** ./src/styled/Knob.styled.js ***! \***********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject3() { var data = _taggedTemplateLiteral(["\n & .scale {\n fill: #fff;\n }\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n & .scale {\n fill: #5b6268;\n }\n\n & .track {\n stroke: #e6e6e6;\n }\n\n & .knob .base,\n .knob .indent {\n stroke: #e6e6e6;\n stroke-width: 2;\n }\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-direction: column;\n & svg {\n text-align: center;\n }\n\n & circle {\n user-select: none;\n }\n\n & .scale {\n font-size: 12px;\n user-select: none;\n fill: ", " !important;\n }\n\n & .tick {\n stroke: ", ";\n stroke-width: 2;\n }\n\n & .knob {\n cursor: pointer;\n }\n\n & .disabled {\n opacity: ", ";\n cursor: not-allowed;\n }\n\n & .track.progress {\n stroke: ", ";\n }\n\n ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject(), function (_ref) { var colorValue = _ref.colorValue; return colorValue || 'black'; }, function (props) { return props.theme.detail; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? 1 : 0.65; }, function (_ref3) { var color = _ref3.color, theme = _ref3.theme; return color || theme.primary; }, function (_ref4) { var theme = _ref4.theme; return theme.dark ? darkTheme : lightTheme; }); var lightTheme = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2()); var darkTheme = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3()); Container.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; /* harmony default export */ __webpack_exports__["default"] = (Container); /***/ }), /***/ "./src/styled/LEDDisplay.styled.js": /*!*****************************************!*\ !*** ./src/styled/LEDDisplay.styled.js ***! \*****************************************/ /*! exports provided: LEDContainer, DarkDigitContainer, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LEDContainer", function() { return LEDContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DarkDigitContainer", function() { return DarkDigitContainer; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject5() { var data = _taggedTemplateLiteral(["\n & .darkLED-fill {\n fill: ", ";\n }\n"]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n border-radius: 3px;\n padding: 12px 8px 12px 14px;\n border: 1px solid ", ";\n background: ", ";\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n padding: 12px 8px 4px 16px;\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n background-color: ", ";\n "]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: inline-flex;\n flex-direction: row;\n ", ";\n ", "\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var LEDContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject(), function (_ref) { var theme = _ref.theme; return theme.dark ? darkLEDContainer : lightLEDContainer; }, function (_ref2) { var backgroundColor = _ref2.backgroundColor; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2(), backgroundColor); }); var darkLEDContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3()); var lightLEDContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject4(), function (_ref3) { var theme = _ref3.theme; return theme.detail; }, function (_ref4) { var backgroundColor = _ref4.backgroundColor; return backgroundColor; }); LEDContainer.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var DarkDigitContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject5(), function (_ref5) { var color = _ref5.color; return color; }); /* harmony default export */ __webpack_exports__["default"] = (LEDContainer); /***/ }), /***/ "./src/styled/PowerButton.styled.js": /*!******************************************!*\ !*** ./src/styled/PowerButton.styled.js ***! \******************************************/ /*! exports provided: Container, Button */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Container", function() { return Container; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return Button; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _styled_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styled/constants */ "./src/styled/constants.js"); function _templateObject7() { var data = _taggedTemplateLiteral(["\n box-shadow: 0 0 8px 2px ", ";\n "]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n "]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n ", " border-radius: 100%;\n padding: 0;\n margin-bottom: 8px;\n\n &::before,\n &::after {\n left: 4%;\n border-radius: 100%;\n transition: all 0.1s ease-in;\n }\n\n &::before {\n top: 8%;\n width: 86%;\n height: 86%;\n }\n\n &::after {\n top: 4%;\n width: 92%;\n height: 92%;\n\n ", ";\n }\n\n &:hover::before {\n background-color: rgba(0, 0, 0, 0.8);\n }\n\n &:hover::after {\n box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.66);\n }\n\n &:focus::after,\n &:active::after {\n box-shadow: ", ";\n }\n"]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n "]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n border-radius: 50%;\n box-sizing: border-box;\n background: #fff;\n border: 1px solid ", ";\n ", " margin-bottom: ", ";\n padding: 0;\n\n &:focus,\n &:hover {\n border-color: ", ";\n }\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n cursor: pointer;\n outline: none;\n display: flex;\n justify-content: center;\n align-items: center;\n\n &:disabled {\n opacity: ", ";\n cursor: not-allowed;\n }\n\n ", ";\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n\n & svg {\n margin: 0 auto;\n }\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["default"])('div')(_templateObject()); var Button = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].button(_templateObject2(), function (_ref) { var theme = _ref.theme; return theme.dark ? 1 : 0.65; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? darkTheme : lightTheme; }); var lightTheme = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3(), function (props) { return props.theme.secondary; }, function (_ref3) { var size = _ref3.size; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject4(), size, size); }, function (_ref4) { var size = _ref4.size; return "".concat(size * 0.0625, "px"); }, function (props) { return props.theme.secondary; }); var darkTheme = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject5(), function (_ref5) { var size = _ref5.size; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject6(), size, size); }, function (_ref6) { var on = _ref6.on, color = _ref6.color, theme = _ref6.theme; return on ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject7(), color || theme.primary) : ''; }, function (_ref7) { var on = _ref7.on, color = _ref7.color, theme = _ref7.theme; return on ? "0 0 8px 2px ".concat(color || theme.primary) : '0 0 3px 0 rgba(0,0,0,0.66)'; }); Button.defaultProps = { theme: _styled_constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; /***/ }), /***/ "./src/styled/PrecisionInput.styled.js": /*!*********************************************!*\ !*** ./src/styled/PrecisionInput.styled.js ***! \*********************************************/ /*! exports provided: Container, Digit, ExponentialDigit */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Container", function() { return Container; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Digit", function() { return Digit; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExponentialDigit", function() { return ExponentialDigit; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); function _templateObject9() { var data = _taggedTemplateLiteral(["\n background: #f2f2f2;\n "]); _templateObject9 = function _templateObject9() { return data; }; return data; } function _templateObject8() { var data = _taggedTemplateLiteral(["\n color: ", ";\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.9),\n 0 0 9px ", ";\n "]); _templateObject8 = function _templateObject8() { return data; }; return data; } function _templateObject7() { var data = _taggedTemplateLiteral(["\n border: none;\n ", ";\n"]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteral(["\n color: #15181a;\n border-right: 1px solid #f2f2f2;\n"]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n border-right: 1px solid rgba(0, 0, 0, 0.4);\n color: #fff;\n"]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n padding: 8px 6px;\n box-sizing: border-box;\n display: inline-block;\n font-size: 14px;\n line-height: 16px;\n text-align: center;\n\n ", ";\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n background: #ffffff;\n border-radius: 2px;\n border: 1px solid #d3d3d3;\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n margin: 0 auto;\n display: flex;\n justify-content: flex-end;\n width: ", ";\n cursor: text;\n\n ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject(), function (_ref) { var size = _ref.size; return "".concat(size, "px") || false; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? darkContainer : lightContainer; }); var darkContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2()); var lightContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3()); var Digit = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject4(), function (_ref3) { var theme = _ref3.theme; return theme.dark ? darkDigit : lightDigit; }); var darkDigit = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject5()); var lightDigit = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject6()); var ExponentialDigit = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["default"])(Digit)(_templateObject7(), function (_ref4) { var theme = _ref4.theme; return theme.dark ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject8(), function (_ref5) { var color = _ref5.color, theme = _ref5.theme; return color || theme.primary; }, function (_ref6) { var color = _ref6.color, theme = _ref6.theme; return color || theme.primary; }) : Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject9()); }); /***/ }), /***/ "./src/styled/Slider.styled.js": /*!*************************************!*\ !*** ./src/styled/Slider.styled.js ***! \*************************************/ /*! exports provided: SliderContainer, HandleContainer, Handle, targetStyles, Label, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SliderContainer", function() { return SliderContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HandleContainer", function() { return HandleContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Handle", function() { return Handle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "targetStyles", function() { return targetStyles; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Label", function() { return Label; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _shared_DarkGradient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shared/DarkGradient */ "./src/styled/shared/DarkGradient.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject32() { var data = _taggedTemplateLiteral(["\n transform: translate(-50%, ", "px);\n "]); _templateObject32 = function _templateObject32() { return data; }; return data; } function _templateObject31() { var data = _taggedTemplateLiteral(["\n transform: translate(", "px, -50%);\n "]); _templateObject31 = function _templateObject31() { return data; }; return data; } function _templateObject30() { var data = _taggedTemplateLiteral(["\n top: 0;\n "]); _templateObject30 = function _templateObject30() { return data; }; return data; } function _templateObject29() { var data = _taggedTemplateLiteral(["\n right: 0;\n "]); _templateObject29 = function _templateObject29() { return data; }; return data; } function _templateObject28() { var data = _taggedTemplateLiteral(["\n color: ", ";\n\n ", " ", ";\n"]); _templateObject28 = function _templateObject28() { return data; }; return data; } function _templateObject27() { var data = _taggedTemplateLiteral(["\n transform: translate(-50%, ", "px);\n "]); _templateObject27 = function _templateObject27() { return data; }; return data; } function _templateObject26() { var data = _taggedTemplateLiteral(["\n transform: translate(", "px, -50%);\n "]); _templateObject26 = function _templateObject26() { return data; }; return data; } function _templateObject25() { var data = _taggedTemplateLiteral(["\n color: ", ";\n\n ", ";\n"]); _templateObject25 = function _templateObject25() { return data; }; return data; } function _templateObject24() { var data = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n\n &:hover {\n border: 1px solid ", ";\n }\n"]); _templateObject24 = function _templateObject24() { return data; }; return data; } function _templateObject23() { var data = _taggedTemplateLiteral(["\n /* remove dark-gradient.css styles */\n box-shadow: none !important;\n\n background: #101010;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.3) -50%, rgba(0, 0, 0, 0.7) 100%);\n"]); _templateObject23 = function _templateObject23() { return data; }; return data; } function _templateObject22() { var data = _taggedTemplateLiteral(["\n /* remove rc-slider-handle styles */\n margin: 0 !important;\n width: auto;\n height: auto;\n\n user-select: none;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n background: #fff;\n font-size: 12px;\n padding: 2px 4px;\n border-radius: 3px;\n\n & .label {\n font-size: 8px;\n font-weight: 600;\n }\n\n & .value {\n font-size: 20px;\n line-height: 1.1;\n }\n\n ", " ", ";\n"]); _templateObject22 = function _templateObject22() { return data; }; return data; } function _templateObject21() { var data = _taggedTemplateLiteral(["\n transform: translate(", "%, ", "%) rotate(", "deg);\n "]); _templateObject21 = function _templateObject21() { return data; }; return data; } function _templateObject20() { var data = _taggedTemplateLiteral(["\n & path {\n stroke: ", ";\n }\n "]); _templateObject20 = function _templateObject20() { return data; }; return data; } function _templateObject19() { var data = _taggedTemplateLiteral(["\n & .dark-handle-custom-fill {\n fill: ", ";\n }\n "]); _templateObject19 = function _templateObject19() { return data; }; return data; } function _templateObject18() { var data = _taggedTemplateLiteral(["\n ", " ", ";\n"]); _templateObject18 = function _templateObject18() { return data; }; return data; } function _templateObject17() { var data = _taggedTemplateLiteral(["\n transform: translate(", "%, ", "%) rotate(", "deg);\n "]); _templateObject17 = function _templateObject17() { return data; }; return data; } function _templateObject16() { var data = _taggedTemplateLiteral(["\n bottom: 0;\n left: 0;\n "]); _templateObject16 = function _templateObject16() { return data; }; return data; } function _templateObject15() { var data = _taggedTemplateLiteral(["\n top: 0;\n right: 0;\n "]); _templateObject15 = function _templateObject15() { return data; }; return data; } function _templateObject14() { var data = _taggedTemplateLiteral(["\n & path {\n stroke: ", ";\n }\n "]); _templateObject14 = function _templateObject14() { return data; }; return data; } function _templateObject13() { var data = _taggedTemplateLiteral(["\n & .dark-handle-custom-fill {\n fill: ", ";\n }\n "]); _templateObject13 = function _templateObject13() { return data; }; return data; } function _templateObject12() { var data = _taggedTemplateLiteral(["\n position: absolute;\n\n ", "\n\n ", "\n\n ", ";\n"]); _templateObject12 = function _templateObject12() { return data; }; return data; } function _templateObject11() { var data = _taggedTemplateLiteral(["\n /* remove rc-slider-handle styles */\n width: auto;\n height: auto;\n border-radius: unset;\n border: none;\n background: none !important;\n margin: 0 !important;\n\n /* remove rc-slider-handle styles */\n box-shadow: none !important;\n\n ", ";\n"]); _templateObject11 = function _templateObject11() { return data; }; return data; } function _templateObject10() { var data = _taggedTemplateLiteral(["\n /* remove rc-slider-handle styles */\n width: auto;\n height: auto;\n border-radius: unset;\n border: none;\n background: none;\n margin: 0 !important;\n\n ", ";\n"]); _templateObject10 = function _templateObject10() { return data; }; return data; } function _templateObject9() { var data = _taggedTemplateLiteral(["\n left: ", "%;\n "]); _templateObject9 = function _templateObject9() { return data; }; return data; } function _templateObject8() { var data = _taggedTemplateLiteral(["\n left: 3px;\n bottom: ", "%;\n "]); _templateObject8 = function _templateObject8() { return data; }; return data; } function _templateObject7() { var data = _taggedTemplateLiteral(["\n z-index: 1;\n\n ", ";\n"]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteral(["\n bottom: 12px;\n "]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n right: 9px;\n "]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n ", ";\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n position: absolute;\n\n /* remove rc-slider-handle styles */\n width: auto;\n height: auto;\n border-radius: unset;\n border: none;\n background: none;\n margin: 0 !important;\n\n ", ";\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n box-shadow: none !important;\n "]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n ", ";\n\n & .rc-slider-disabled,\n .rc-slider-disabled .rc-slider-handle {\n background-color: unset !important;\n }\n\n & .rc-slider-track {\n ", ";\n }\n\n /* remove rc-slider-dot styles, which overlap with the marker */\n & .rc-slider-dot {\n background: none !important;\n border: none;\n height: unset !important;\n width: unset !important;\n }\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var SliderContainer = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject(), function (_ref) { var vertical = _ref.vertical, size = _ref.size, fullSize = _ref.fullSize; if (fullSize) return vertical ? 'height: 100%;' : 'width: 100%;'; if (size) return vertical ? "height: ".concat(size, "px;") : "width: ".concat(size, "px"); }, function (_ref2) { var theme = _ref2.theme; return theme.dark && Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject2()); }); var HandleContainer = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject3(), function (_ref3) { var isTarget = _ref3.isTarget; return isTarget ? targetHandleContainer : sliderHandleContainer; }); var targetHandleContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject4(), function (_ref4) { var vertical = _ref4.vertical; return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject5()) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject6()); }); var sliderHandleContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject7(), function (_ref5) { var vertical = _ref5.vertical, offset = _ref5.offset; return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject8(), offset) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject9(), offset); }); var UnstyledLightHandle = function UnstyledLightHandle(_ref6) { var className = _ref6.className; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { className: className, width: "6", height: "18", viewBox: "0 0 6 18", version: "1.1", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M 4.61171 15.9753L 5.33436 2.96765C 5.40881 1.62753 4.34219 0.5 3 0.5C 1.65781 0.5 0.591189 1.62753 0.66564 2.96765L 1.38829 15.9753C 1.43581 16.8307 2.14329 17.5 3 17.5C 3.85671 17.5 4.56419 16.8307 4.61171 15.9753Z", strokeMiterlimit: "8", fill: "#fff" })); }; var Handle = function Handle(props) { return props.theme.dark ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DarkHandle, props) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LightHandle, props); }; var LightHandle = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["default"])(UnstyledLightHandle)(_templateObject10(), function (_ref7) { var isTarget = _ref7.isTarget; return isTarget ? targetHandle : sliderHandle; }); var DarkHandle = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["default"])(_shared_DarkGradient__WEBPACK_IMPORTED_MODULE_2__["UnstyledDarkHandle"])(_templateObject11(), function (_ref8) { var isTarget = _ref8.isTarget; return isTarget ? targetHandle : sliderHandle; }); var targetHandle = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject12(), function (_ref9) { var theme = _ref9.theme, color = _ref9.color; return theme.dark ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject13(), color || theme.detail) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject14(), color || theme.detail); }, function (_ref10) { var vertical = _ref10.vertical; return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject15()) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject16()); }, function (_ref11) { var vertical = _ref11.vertical, theme = _ref11.theme; var deltaX = -50; var deltaY = 55; var rotation = 0; if (vertical) { deltaX = theme.dark ? 40 : 0; deltaY = -50; rotation = 270; } return Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject17(), deltaX, deltaY, rotation); }); var sliderHandle = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject18(), function (_ref12) { var theme = _ref12.theme, color = _ref12.color; return theme.dark ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject19(), color || theme.primary) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject20(), color || theme.primary); }, function (_ref13) { var vertical = _ref13.vertical; var deltaX = -50; var deltaY = -40; var rotation = 0; if (vertical) { deltaX = -2; deltaY = -50; rotation = 270; } return Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject21(), deltaX, deltaY, rotation); }); var targetStyles = { width: 'auto', marginLeft: 0, marginBottom: 0, textAlign: 'center', border: 'none', boxShadow: 'none' }; var Label = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject22(), function (_ref14) { var theme = _ref14.theme; return theme.dark ? darkLabel : lightLabel; }, function (_ref15) { var isTarget = _ref15.isTarget; return isTarget ? targetLabel : sliderLabel; }); var darkLabel = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject23()); var lightLabel = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject24(), _constants__WEBPACK_IMPORTED_MODULE_3__["colors"].GREY, _constants__WEBPACK_IMPORTED_MODULE_3__["colors"].GREY); var targetLabel = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject25(), function (_ref16) { var color = _ref16.color, theme = _ref16.theme; return color || theme.detail; }, function (_ref17) { var vertical = _ref17.vertical; var offset = vertical ? -9 : -5; return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject26(), offset) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject27(), offset); }); var sliderLabel = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject28(), function (_ref18) { var color = _ref18.color, theme = _ref18.theme; return color || theme.primary; }, function (_ref19) { var vertical = _ref19.vertical; return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject29()) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject30()); }, function (_ref20) { var vertical = _ref20.vertical, label = _ref20.label, value = _ref20.value; var offset = label && (value || value === 0) ? -44 : -22; if (vertical) { offset = -3; } return vertical ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject31(), offset) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject32(), offset); }); /* harmony default export */ __webpack_exports__["default"] = ({ SliderContainer: SliderContainer, Handle: Handle, targetStyles: targetStyles, Label: Label }); /***/ }), /***/ "./src/styled/StopButton.styled.js": /*!*****************************************!*\ !*** ./src/styled/StopButton.styled.js ***! \*****************************************/ /*! exports provided: Button, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return Button; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject3() { var data = _taggedTemplateLiteral(["\n color: #ff6e6e;\n background-color: #22272a;\n\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.9), 0 0 9px #ff6e6e;\n\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n\n display: block;\n box-sizing: border-box;\n border: none;\n border-radius: 2px;\n font-weight: bold;\n font-size: 12px;\n text-transform: uppercase;\n padding: 0;\n width: ", ";\n height: ", ";\n text-align: center;\n cursor: pointer;\n letter-spacing: 0.1;\n line-height: 1;\n\n background-color: #22272a;\n color: #ff1a1a;\n\n &::before,\n &::after {\n transition: all 0.1s ease-in;\n background-color: #e03a3a;\n }\n\n &:hover::before,\n &:hover::after {\n background-color: #e64545;\n }\n\n &:active::before,\n &:active::after {\n background-color: #c72121;\n }\n\n &:hover::after,\n &:active::after,\n &:focus::after {\n box-shadow: none;\n }\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n color: white;\n background-color: #ff5e5e;\n\n display: block;\n box-sizing: border-box;\n border: none;\n border-radius: 2px;\n font-weight: bold;\n font-size: 12px;\n text-transform: uppercase;\n padding: 0;\n width: ", ";\n min-height: ", ";\n text-align: center;\n cursor: pointer;\n letter-spacing: 0.1;\n line-height: 1;\n\n &:hover,\n &:focus,\n &:active {\n color: #fff;\n }\n\n &:hover {\n background-color: #ff8585;\n }\n\n &:active {\n background-color: #e64545;\n }\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n outline: none;\n transition: all 0.1s ease-in;\n ", ";\n\n &:disabled {\n opacity: ", ";\n cursor: not-allowed;\n }\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Button = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].button(_templateObject(), function (_ref) { var theme = _ref.theme; return theme.dark ? darkButton : lightButton; }, function (_ref2) { var theme = _ref2.theme; return theme.dark ? 1 : 0.65; }); Button.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var lightButton = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2(), function (_ref3) { var size = _ref3.size; return "".concat(size, "px"); }, function (_ref4) { var size = _ref4.size; return "".concat(size * 0.42, "px"); }); var darkButton = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3(), function (_ref5) { var size = _ref5.size; return "".concat(size, "px"); }, function (_ref6) { var size = _ref6.size; return "".concat(size * 0.42, "px"); }); /* harmony default export */ __webpack_exports__["default"] = (Button); /***/ }), /***/ "./src/styled/Tank.styled.js": /*!***********************************!*\ !*** ./src/styled/Tank.styled.js ***! \***********************************/ /*! exports provided: TankContainer, TankFill, TickContainer, Tick, Container, ExceededWarning */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TankContainer", function() { return TankContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TankFill", function() { return TankFill; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TickContainer", function() { return TickContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tick", function() { return Tick; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Container", function() { return Container; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExceededWarning", function() { return ExceededWarning; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! color */ "./node_modules/color/index.js"); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(color__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject13() { var data = _taggedTemplateLiteral(["\n color: #dc3545;\n font-size: 0.8rem;\n text-align: center;\n display: block;\n"]); _templateObject13 = function _templateObject13() { return data; }; return data; } function _templateObject12() { var data = _taggedTemplateLiteral(["\n margin-top: 8px;\n margin-left: ", ";\n "]); _templateObject12 = function _templateObject12() { return data; }; return data; } function _templateObject11() { var data = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n\n ", ";\n"]); _templateObject11 = function _templateObject11() { return data; }; return data; } function _templateObject10() { var data = _taggedTemplateLiteral(["\n position: absolute;\n bottom: ", ";\n "]); _templateObject10 = function _templateObject10() { return data; }; return data; } function _templateObject9() { var data = _taggedTemplateLiteral(["\n ", " display: flex;\n align-items: center;\n justify-content: flex-end;\n height: 18px;\n color: ", ";\n & .label {\n font-size: 12px;\n text-align: right;\n margin-right: 4px;\n white-space: nowrap;\n }\n\n & .tick {\n height: 1px;\n width: ", "px;\n background: ", ";\n }\n"]); _templateObject9 = function _templateObject9() { return data; }; return data; } function _templateObject8() { var data = _taggedTemplateLiteral(["\n direction: rtl;\n "]); _templateObject8 = function _templateObject8() { return data; }; return data; } function _templateObject7() { var data = _taggedTemplateLiteral(["\n position: relative;\n ", " display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin-right: 4px;\n margin-top: -6px;\n margin-bottom: -6px;\n"]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteral(["\n background: ", ";\n"]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n background: ", ";\n background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 30%, rgba(255, 255, 255, 0.7) 100%);\n background-blend-mode: overlay;\n box-shadow: 0 0 6px 1px\n ", ";\n"]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n position: absolute;\n bottom: 0;\n width: 100%;\n height: ", ";\n\n border-radius: ", ";\n border-radius: 0px;\n\n ", ";\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n background: ", ";\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n background-color: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n position: relative;\n width: ", ";\n height: ", ";\n z-index: 2;\n border-radius: ", ";\n\n ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var TankContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject(), function (_ref) { var width = _ref.width; return "".concat(width, "px"); }, function (_ref2) { var height = _ref2.height; return "".concat(height, "px"); }, function (_ref3) { var thermometer = _ref3.thermometer; return thermometer ? '40px' : '0'; }, function (_ref4) { var theme = _ref4.theme; return theme.dark ? darkTankContainer : lightTankContainer; }); TankContainer.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_2__["light"] }; var darkTankContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2()); var lightTankContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3(), function (props) { return props.theme.secondary; }); var TankFill = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject4(), function (_ref5) { var height = _ref5.height; return height || 0; }, function (_ref6) { var thermometer = _ref6.thermometer; return thermometer ? '40px' : '0'; }, function (_ref7) { var theme = _ref7.theme; return theme.dark ? darkTankFill : lightTankFill; }); TankFill.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_2__["light"] }; var darkTankFill = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject5(), function (_ref8) { var color = _ref8.color, theme = _ref8.theme; return color || theme.primary; }, function (_ref9) { var color = _ref9.color, theme = _ref9.theme; return color__WEBPACK_IMPORTED_MODULE_1___default()(color || theme.primary).alpha(0.7).string(); }); var lightTankFill = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject6(), function (_ref10) { var color = _ref10.color, theme = _ref10.theme; return color || theme.primary; }); var TickContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject7(), function (_ref11) { var xPositioned = _ref11.xPositioned; return xPositioned && Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject8()); }); var Tick = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject9(), function (_ref12) { var xPosition = _ref12.xPosition; return xPosition || xPosition === 0 ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject10(), "calc(".concat(xPosition, "% - ").concat(xPosition / 100.0 * 18, "px)")) : ''; }, function (props) { return props.color || (props.theme.dark ? '#ddd' : '#000'); }, function (props) { return props.width || 4; }, function (props) { return props.theme.detail; }); Tick.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_2__["light"] }; var Container = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject11(), function (_ref13) { var thermometer = _ref13.thermometer; return thermometer ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject12(), function (_ref14) { var xPositioned = _ref14.xPositioned; return xPositioned ? '-4px' : '-24px'; }) : ''; }); var ExceededWarning = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].span(_templateObject13()); /***/ }), /***/ "./src/styled/Thermometer.styled.js": /*!******************************************!*\ !*** ./src/styled/Thermometer.styled.js ***! \******************************************/ /*! exports provided: ThermometerContainer, Bulb, CurrentValueContainer */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThermometerContainer", function() { return ThermometerContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bulb", function() { return Bulb; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CurrentValueContainer", function() { return CurrentValueContainer; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); function _templateObject3() { var data = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n flex-direction: column;\n align-items: center;\n text-align: center;\n\n & > div {\n margin-top: 56px;\n line-height: 28px;\n }\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n border-radius: 50%;\n background-color: ", ";\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n bottom: -", "px;\n z-index: -1;\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var WIDTH = 20; var ThermometerContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject()); var Bulb = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject2(), 1.5 * WIDTH, 1.5 * WIDTH, function (props) { return props.on ? props.color || props.theme.primary : props.theme.secondary; }, WIDTH); Bulb.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var CurrentValueContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject3()); CurrentValueContainer.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; /***/ }), /***/ "./src/styled/ToggleSwitch.styled.js": /*!*******************************************!*\ !*** ./src/styled/ToggleSwitch.styled.js ***! \*******************************************/ /*! exports provided: Wrapper, ButtonContainer, Button, DarkSwitchContainer, DarkSwitch, RowContainer, RowLabel */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Wrapper", function() { return Wrapper; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonContainer", function() { return ButtonContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return Button; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DarkSwitchContainer", function() { return DarkSwitchContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DarkSwitch", function() { return DarkSwitch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowContainer", function() { return RowContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowLabel", function() { return RowLabel; }); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/styled/constants.js"); /* harmony import */ var _shared_Label_styled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shared/Label.styled */ "./src/styled/shared/Label.styled.js"); function _templateObject20() { var data = _taggedTemplateLiteral(["\n margin: 0;\n ", "\n ", "\n ", "\n ", "\n"]); _templateObject20 = function _templateObject20() { return data; }; return data; } function _templateObject19() { var data = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-around;\n flex-direction: ", ";\n"]); _templateObject19 = function _templateObject19() { return data; }; return data; } function _templateObject18() { var data = _taggedTemplateLiteral(["linear-gradient(135deg, rgba(0,0,0,0) 0%, rgba(255,255,255,1) 100%),\n linear-gradient(90deg, rgba(0,0,0,0.6) 40%, rgba(255,255,255,0) 100%)"]); _templateObject18 = function _templateObject18() { return data; }; return data; } function _templateObject17() { var data = _taggedTemplateLiteral(["linear-gradient(135deg, rgba(255,255,255,0.7) 20%, rgba(0,0,0,0) 100%),\n linear-gradient(90deg, rgba(255,255,255,0) 40%, rgba(0,0,0,0.8) 100%)"]); _templateObject17 = function _templateObject17() { return data; }; return data; } function _templateObject16() { var data = _taggedTemplateLiteral(["\n margin-right: ", "px;\n "]); _templateObject16 = function _templateObject16() { return data; }; return data; } function _templateObject15() { var data = _taggedTemplateLiteral(["\n margin-left: ", "px;\n "]); _templateObject15 = function _templateObject15() { return data; }; return data; } function _templateObject14() { var data = _taggedTemplateLiteral(["radial-gradient(farthest-corner at 0px 0px, rgba(256,255,255,1) 5%, rgba(0,0,0,0.6) 90%)"]); _templateObject14 = function _templateObject14() { return data; }; return data; } function _templateObject13() { var data = _taggedTemplateLiteral(["radial-gradient(farthest-corner at 0px 0px, rgba(256,255,255,1) 5%, rgba(0,0,0,0.6) 90%)"]); _templateObject13 = function _templateObject13() { return data; }; return data; } function _templateObject12() { var data = _taggedTemplateLiteral(["\n display: block;\n position: relative;\n margin: 0;\n transition: all 100ms ease-in-out;\n outline: none;\n background: #161616;\n height: ", ";\n width: ", ";\n background-blend-mode: overlay;\n background-color: #111;\n background-image: ;\n background-image: ", ";\n box-shadow: 1px 1px 3px 0px rgba(0, 0, 0, 0.9);\n border-radius: 2px;\n\n &:disabled {\n cursor: not-allowed;\n }\n\n &:hover::after,\n &:active::after,\n &:focus::after {\n box-shadow: none;\n }\n\n &::before {\n content: none;\n }\n\n &::after {\n transition: all 100ms ease-in-out;\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 4%;\n height: 92%;\n width: 92%;\n margin: 0 auto;\n ", " background-color: #161616;\n background-blend-mode: overlay;\n background-image: ", ";\n border-radius: 2px;\n }\n\n &:hover::after {\n background-color: #181818;\n }\n"]); _templateObject12 = function _templateObject12() { return data; }; return data; } function _templateObject11() { var data = _taggedTemplateLiteral(["\n display: flex;\n padding: 2px 4px;\n cursor: pointer;\n border-radius: 1px;\n margin: 0 8px;\n\n background: #22272a;\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.1) 100%);\n box-shadow: inset 0 0 8px -1px #000000, inset 0 0 8px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.9), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n"]); _templateObject11 = function _templateObject11() { return data; }; return data; } function _templateObject10() { var data = _taggedTemplateLiteral(["\n background-color: #141414;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.5) -20%, rgba(0, 0, 0, 0.7) 100%);\n box-shadow: inset 0 0 1px 0 rgba(52, 52, 52, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.2),\n 1px 1px 2px 0px rgba(0, 0, 0, 0.7);\n\n &:hover {\n background-color: rgba(0, 0, 0, 0.7);\n }\n\n &::before,\n &::after {\n content: none;\n }\n"]); _templateObject10 = function _templateObject10() { return data; }; return data; } function _templateObject9() { var data = _taggedTemplateLiteral(["\n border: none;\n border: 1px solid ", ";\n width: ", "px;\n height: ", "px;\n transform: translateX(", "px);\n "]); _templateObject9 = function _templateObject9() { return data; }; return data; } function _templateObject8() { var data = _taggedTemplateLiteral(["\n background: white;\n border-radius: 50%;\n display: block;\n padding: 0;\n margin: 0;\n transition: all 100ms ease-in-out;\n outline: none;\n ", " &:focus, &:active, &:hover {\n border: none;\n border: ", ";\n }\n\n &:disabled {\n opacity: ", ";\n cursor: not-allowed;\n }\n\n ", ";\n"]); _templateObject8 = function _templateObject8() { return data; }; return data; } function _templateObject7() { var data = _taggedTemplateLiteral(["\n background: ", ";\n background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.3) 100%);\n box-shadow: inset 0 0 8px -1px #000000, inset 0 0 8px 0 rgba(0, 0, 0, 0.8),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.9), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n"]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteral(["\n background: ", ";\n"]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n width: ", "px;\n cursor: pointer;\n padding: ", "px;\n border-radius: ", "px;\n margin-left: ", "px;\n margin-right: ", "px;\n "]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n height: auto;\n display: flex;\n transition: all 0.1s ease-in;\n\n ", " ", ";\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n height: ", "px;\n "]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n transform: rotate(", "deg);\n "]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-around;\n align-items: center;\n ", ";\n ", "\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Wrapper = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["default"])('div')(_templateObject(), function (_ref) { var rotate = _ref.rotate; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2(), parseInt(rotate, 10)); }, function (_ref2) { var rotate = _ref2.rotate, size = _ref2.size; return rotate == -90 ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3(), size) : ''; }); var ButtonContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["default"])('div')(_templateObject4(), function (_ref3) { var size = _ref3.size; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject5(), size, 0.05 * size, size, 0.05 * size, 0.05 * size); }, function (_ref4) { var theme = _ref4.theme; return theme.dark ? darkContainer : lightContainer; }); ButtonContainer.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var lightContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject6(), function (_ref5) { var on = _ref5.on, theme = _ref5.theme, color = _ref5.color; return on ? color || theme.secondary : theme.secondary; }); var darkContainer = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject7(), function (_ref6) { var on = _ref6.on, theme = _ref6.theme, color = _ref6.color; return on ? color || theme.secondary : '#22272a'; }); var Button = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].button(_templateObject8(), function (_ref7) { var size = _ref7.size, on = _ref7.on, theme = _ref7.theme; return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject9(), theme.dark ? 'none' : theme.detail, size / 2, size / 2, on ? size - size / 2 : 0); }, function (_ref8) { var theme = _ref8.theme; return theme.dark ? 'none' : "1px solid ".concat(theme.detail); }, function (_ref9) { var theme = _ref9.theme; return theme.dark ? 1 : 0.65; }, function (_ref10) { var theme = _ref10.theme; return theme.dark ? darkButton : null; }); Button.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; var darkButton = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject10()); var DarkSwitchContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject11()); var DarkSwitch = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].button(_templateObject12(), function (_ref11) { var size = _ref11.size; return "".concat(size * 0.72, "px"); }, function (_ref12) { var size = _ref12.size; return "".concat(size * 1.44, "px"); }, function (_ref13) { var on = _ref13.on; return on ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject13()) : Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject14()); }, function (_ref14) { var size = _ref14.size, on = _ref14.on; var margin = size * 0.08; return on ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject15(), margin) : Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject16(), margin); }, function (_ref15) { var on = _ref15.on; return on ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject17()) : Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject18()); }); var RowContainer = styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].div(_templateObject19(), function (props) { return props.vertical ? 'column-reverse' : 'row'; }); var RowLabel = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["default"])(_shared_Label_styled__WEBPACK_IMPORTED_MODULE_2__["default"])(_templateObject20(), function (_ref16) { var position = _ref16.position, theme = _ref16.theme; return position === 'right' ? "margin-left: ".concat(theme.dark ? 12 : 8, "px;") : ''; }, function (_ref17) { var position = _ref17.position, theme = _ref17.theme; return position === 'left' ? "margin-right: ".concat(theme.dark ? 12 : 8, "px;") : ''; }, function (_ref18) { var position = _ref18.position, theme = _ref18.theme; return position === 'top' ? "margin-bottom: ".concat(theme.dark ? 34 : 20, "px;") : ''; }, function (_ref19) { var position = _ref19.position, theme = _ref19.theme; return position === 'bottom' ? "margin-top: ".concat(theme.dark ? 34 : 20, "px;") : ''; }); RowLabel.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_1__["light"] }; /***/ }), /***/ "./src/styled/constants.js": /*!*********************************!*\ !*** ./src/styled/constants.js ***! \*********************************/ /*! exports provided: colors, TRACK_TOTAL_DEG, RADIAN, light, dark, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colors", function() { return colors; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TRACK_TOTAL_DEG", function() { return TRACK_TOTAL_DEG; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RADIAN", function() { return RADIAN; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "light", function() { return light; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dark", function() { return dark; }); var colors = { PRIMARY: '#ABE2FB', SECONDARY: '#E6E6E6', DARKER_PRIMARY: '#87ceeb', OFF_WHITE: '#15181A', GREY: '#D3D3D3', RED: '#FF5E5E', DARK_GREY: '#535D63' }; var TRACK_TOTAL_DEG = 270.0; var RADIAN = Math.PI / 180.0; var light = { primary: colors.PRIMARY, secondary: colors.SECONDARY, detail: colors.GREY, dark: false }; var dark = { primary: colors.PRIMARY, secondary: colors.DARK_GREY, detail: colors.DARK_GREY, dark: true }; /* harmony default export */ __webpack_exports__["default"] = ({ dark: dark, light: light, colors: colors }); /***/ }), /***/ "./src/styled/shared/DarkGradient.js": /*!*******************************************!*\ !*** ./src/styled/shared/DarkGradient.js ***! \*******************************************/ /*! exports provided: UnstyledDarkHandle, darkLEDDefs, DARK_SEGMENTS, darkDecimal, darkColon, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnstyledDarkHandle", function() { return UnstyledDarkHandle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darkLEDDefs", function() { return darkLEDDefs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DARK_SEGMENTS", function() { return DARK_SEGMENTS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darkDecimal", function() { return darkDecimal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darkColon", function() { return darkColon; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var UnstyledDarkHandle = function UnstyledDarkHandle(_ref) { var className = _ref.className; return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { className: className, xmlns: "http://www.w3.org/2000/svg", width: "10", height: "22" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fill: "none" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { filter: "url(#filter0_di)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { className: "dark-handle-custom-fill", fill: "#101010", d: "M4.886 1H3.114a2 2 0 0 0-1.997 2.11l.778 14A2 2 0 0 0 3.892 19h.216a2 2 0 0 0 1.997-1.89l.778-14A2 2 0 0 0 4.886 1z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { style: { mixBlendMode: 'overlay' }, fill: "url(#paint0_linear)", d: "M3.886 0H2.114A2 2 0 0 0 .117 2.11l.778 14A2 2 0 0 0 2.892 18h.216a2 2 0 0 0 1.997-1.89l.778-14A2 2 0 0 0 3.886 0z", transform: "translate(1 1)" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { style: { mixBlendMode: 'overlay' }, fill: "url(#paint1_radial)", d: "M3.886 0H2.114A2 2 0 0 0 .117 2.11l.778 14A2 2 0 0 0 2.892 18h.216a2 2 0 0 0 1.997-1.89l.778-14A2 2 0 0 0 3.886 0z", transform: "translate(1 1)" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fillRule: "evenodd", clipRule: "evenodd" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { className: "dark-handle-custom-fill", fill: "#101010", d: "M3.114 1h1.772a2 2 0 0 1 1.997 2.11l-.778 14A2 2 0 0 1 4.108 19h-.216a2 2 0 0 1-1.997-1.89l-.778-14A2 2 0 0 1 3.114 1zm.333 1h1.105A2 2 0 0 1 6.55 4.11l-.673 12.115a1.88 1.88 0 0 1-3.752 0L1.45 4.11A2 2 0 0 1 3.447 2z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { style: { mixBlendMode: 'overlay' }, fill: "url(#paint2_linear)", d: "M2 0h1.772a2 2 0 0 1 1.997 2.11l-.778 14A2 2 0 0 1 2.994 18h-.216A2 2 0 0 1 .78 16.11l-.778-14A2 2 0 0 1 2 0zm.333 1h1.105a2 2 0 0 1 1.997 2.11l-.673 12.115a1.88 1.88 0 0 1-3.753 0L.337 3.11A2 2 0 0 1 2.333 1z", transform: "translate(1.114 1)" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { fill: "url(#paint3_radial)", fillOpacity: ".4", d: "M2 0h1.772a2 2 0 0 1 1.997 2.11l-.778 14A2 2 0 0 1 2.994 18h-.216A2 2 0 0 1 .78 16.11l-.778-14A2 2 0 0 1 2 0zm.333 1h1.105a2 2 0 0 1 1.997 2.11l-.673 12.115a1.88 1.88 0 0 1-3.753 0L.337 3.11A2 2 0 0 1 2.333 1z", transform: "translate(1.114 1)" }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "filter0_di", width: "9.772", height: "22", x: ".114", y: "0", colorInterpolationFilters: "sRGB", filterUnits: "userSpaceOnUse" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "SourceAlpha", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: "1", dy: "1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { stdDeviation: "1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feBlend", { in2: "BackgroundImageFix", result: "effect1_dropShadow" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feBlend", { "in": "SourceGraphic", in2: "effect1_dropShadow", result: "shape" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "SourceAlpha", result: "hardAlpha", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { stdDeviation: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { in2: "hardAlpha", k2: "-1", k3: "1", operator: "arithmetic" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { values: "0 0 0 0 0.204294 0 0 0 0 0.204294 0 0 0 0 0.204294 0 0 0 0.395267 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feBlend", { in2: "shape", result: "effect2_innerShadow" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("linearGradient", { id: "paint0_linear", x2: "1", gradientTransform: "matrix(4.19709 12.8041 -4.26804 12.5913 .947 2.739)", gradientUnits: "userSpaceOnUse" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { stopColor: "#fff", stopOpacity: ".55" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "1", stopOpacity: ".01" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "paint1_radial", cx: ".5", cy: ".5", r: ".5", gradientTransform: "matrix(8.55956 25.5096 -8.50319 25.6787 .868 -23.103)", gradientUnits: "userSpaceOnUse" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { stopColor: "#fff", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "1", stopOpacity: ".5" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("linearGradient", { id: "paint2_linear", x2: "1", gradientTransform: "matrix(0 18 -5.77167 0 2.886 0)", gradientUnits: "userSpaceOnUse" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { stopColor: "#fff", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "1", stopOpacity: ".01" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "paint3_radial", cx: ".5", cy: ".5", r: ".5", gradientTransform: "matrix(0 36 -11.5433 0 8.658 -18)", gradientUnits: "userSpaceOnUse" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { stopColor: "#fff", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "1", stopOpacity: ".5" })))); }; var darkGradientDefs = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("linearGradient", { id: "l", x1: "15.78%", x2: "85.732%", y1: "15.214%", y2: "86.348%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".55" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopColor: "#000000", stopOpacity: "0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "m", cx: "14.944%", cy: "13.839%", r: "100.544%", fx: "14.944%", fy: "13.839%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopColor: "#000000", stopOpacity: ".5" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "n", width: "101.7%", height: "101.7%", x: "-.8%", y: "-.8%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { "in": "SourceAlpha", result: "shadowBlurInner1", stdDeviation: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "shadowBlurInner1", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 0.204294218 0 0 0 0 0.204294218 0 0 0 0 0.204294218 0 0 0 0.39526721 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "r", width: "550%", height: "218.8%", x: "-225%", y: "-56.2%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dy: ".5", "in": "SourceAlpha", result: "shadowOffsetOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowOffsetOuter1", result: "shadowMatrixOuter1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.46 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { "in": "SourceAlpha", result: "shadowOffsetOuter2" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { "in": "shadowOffsetOuter2", result: "shadowBlurOuter2", stdDeviation: "1.5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowBlurOuter2", result: "shadowMatrixOuter2", values: "0 0 0 0 0.529411765 0 0 0 0 0.807843137 0 0 0 0 0.921568627 0 0 0 0.4512851 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMerge", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMergeNode", { "in": "shadowMatrixOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMergeNode", { "in": "shadowMatrixOuter2" }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "t", width: "425%", height: "187.5%", x: "-162.5%", y: "-40.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dy: ".5", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("linearGradient", { id: "p", x1: "0%", x2: "0%", y1: "100%", y2: "100%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopColor: "#000000", stopOpacity: "0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "q", cy: "0%", r: "100%", fx: "0%", fy: "0%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopColor: "#000000", stopOpacity: ".5" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "a", width: "100.4%", height: "100.5%", x: "-.1%", y: "-.1%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMorphology", { "in": "SourceAlpha", operator: "dilate", radius: ".05", result: "shadowSpreadOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".1", dy: ".1", "in": "shadowSpreadOuter1", result: "shadowOffsetOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowOffsetOuter1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.11291327 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "d", width: "102.5%", height: "102.8%", x: "-1.1%", y: "-1.3%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { "in": "SourceAlpha", result: "shadowBlurInner1", stdDeviation: ".25" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { "in": "shadowBlurInner1", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", result: "shadowMatrixInner1", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { "in": "SourceAlpha", result: "shadowBlurInner2", stdDeviation: "1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { "in": "shadowBlurInner2", result: "shadowOffsetInner2" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner2", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner2" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner2", result: "shadowMatrixInner2", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMerge", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMergeNode", { "in": "shadowMatrixInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMergeNode", { "in": "shadowMatrixInner2" }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("linearGradient", { id: "c", x1: "50%", x2: "50%", y1: "0%", y2: "100%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopColor: "#323a3e", stopOpacity: ".2" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "e", width: "171%", height: "117.7%", x: "-35.5%", y: "-8.8%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { "in": "SourceAlpha", result: "shadowOffsetOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { "in": "shadowOffsetOuter1", result: "shadowBlurOuter1", stdDeviation: "2" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowBlurOuter1", values: "0 0 0 0 0.529411765 0 0 0 0 0.807843137 0 0 0 0 0.921568627 0 0 0 0.5 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "g", cx: "90.826%", cy: "1.233%", r: "154.848%", fx: "90.826%", fy: "1.233%", gradientTransform: "scale(1 .24903) rotate(72.947 .883 .03)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFFFFF", stopOpacity: ".7" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopColor: "#000000" }))); var darkLEDDefs = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("defs", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-a", width: "111.8%", height: "107.8%", x: "-2.9%", y: "-2%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: "1", dy: "1", "in": "SourceAlpha", result: "shadowOffsetOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feGaussianBlur", { "in": "shadowOffsetOuter1", result: "shadowBlurOuter1", stdDeviation: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowBlurOuter1", result: "shadowMatrixOuter1", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMerge", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMergeNode", { "in": "shadowMatrixOuter1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feMergeNode", { "in": "SourceGraphic" }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "darkLED-c", cx: "0%", cy: "0%", r: "141.421%", fx: "0%", fy: "0%", gradientTransform: "matrix(.22147 .22147 -.0503 .97517 0 0)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopOpacity: ".6" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("linearGradient", { id: "darkLED-d", x1: "0%", y1: "0%", y2: "100%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopOpacity: "0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-b", d: "M5.71 5.181L3.308 2.778 5.71.375h16.357l2.403 2.403-2.403 2.403z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-e", width: "101.2%", height: "105.2%", x: "-.6%", y: "-2.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "darkLED-g", cx: "0%", cy: "0%", r: "141.421%", fx: "0%", fy: "0%", gradientTransform: "matrix(.22147 .22147 -.97517 .0503 0 0)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopOpacity: ".6" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-f", d: "M22.597 5.71L25 3.308l2.403 2.402v16.357L25 24.47l-2.403-2.403z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-h", width: "105.2%", height: "101.2%", x: "-2.6%", y: "-.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "darkLED-j", cx: "0%", cy: "0%", r: "141.421%", fx: "0%", fy: "0%", gradientTransform: "scale(1 .22711) rotate(77.204)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopOpacity: ".6" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-i", d: "M22.597 27.933L25 25.53l2.403 2.403v16.356L25 46.692l-2.403-2.403z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-k", width: "105.2%", height: "101.2%", x: "-2.6%", y: "-.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-l", d: "M22.067 44.819l2.403 2.403-2.403 2.403H5.71l-2.402-2.403 2.402-2.403z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-m", width: "101.2%", height: "105.2%", x: "-.6%", y: "-2.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-n", d: "M5.181 44.289l-2.403 2.403-2.403-2.403V27.933l2.403-2.403 2.403 2.403z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-o", width: "105.2%", height: "101.2%", x: "-2.6%", y: "-.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-p", d: "M5.181 22.067L2.778 24.47.375 22.067V5.71l2.403-2.402L5.181 5.71z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-q", width: "105.2%", height: "101.2%", x: "-2.6%", y: "-.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-r", d: "M5.71 27.403L3.308 25l2.402-2.403h16.357L24.47 25l-2.403 2.403z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-s", width: "101.2%", height: "105.2%", x: "-.6%", y: "-2.6%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("radialGradient", { id: "darkLED-u", cx: "0%", cy: "0%", r: "141.421%", fx: "0%", fy: "0%" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "0%", stopColor: "#FFF", stopOpacity: ".5" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", { offset: "100%", stopOpacity: ".6" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-t", d: "M31 50.625a2.625 2.625 0 1 1 0-5.25 2.625 2.625 0 0 1 0 5.25z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-y", d: "M35,40.625 C33.5502525,40.625 32.375,39.4497475 32.375,38 C32.375,36.5502525 33.5502525,35.375 35,35.375 C36.4497475,35.375 37.625,36.5502525 37.625,38 C37.625,39.4497475 36.4497475,40.625 35,40.625 Z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-v", width: "104.8%", height: "104.8%", x: "-2.4%", y: "-2.4%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", { id: "darkLED-w", d: "M35,13.625 C33.5502525,13.625 32.375,12.4497475 32.375,11 C32.375,9.55025253 33.5502525,8.375 35,8.375 C36.4497475,8.375 37.625,9.55025253 37.625,11 C37.625,12.4497475 36.4497475,13.625 35,13.625 Z" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("filter", { id: "darkLED-x", width: "104.8%", height: "104.8%", x: "-2.4%", y: "-2.4%", filterUnits: "objectBoundingBox" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feOffset", { dx: ".25", dy: ".25", "in": "SourceAlpha", result: "shadowOffsetInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feComposite", { "in": "shadowOffsetInner1", in2: "SourceAlpha", k2: "-1", k3: "1", operator: "arithmetic", result: "shadowInnerInner1" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("feColorMatrix", { "in": "shadowInnerInner1", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.502604167 0" }))); var A = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-b" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-c)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-b" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-b" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-e)", xlinkHref: "#darkLED-b" })); var B = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-f" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-g)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-f" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-f" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-h)", xlinkHref: "#darkLED-f" })); var C = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-i" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-j)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-i" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-i" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-k)", xlinkHref: "#darkLED-i" })); var D = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-l" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-c)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-l" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-l" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-m)", xlinkHref: "#darkLED-l" })); var E = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-n" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-j)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-n" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-n" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-o)", xlinkHref: "#darkLED-n" })); var F = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-p" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-g)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-p" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-p" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-q)", xlinkHref: "#darkLED-p" })); var G = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", xlinkHref: "#darkLED-r" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-c)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-r" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-r" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-s)", xlinkHref: "#darkLED-r" })); // See the following link for segment mappings: // https://en.wikipedia.org/wiki/Seven-segment_display#/media/File:7_segment_display_labeled.svg var DARK_SEGMENTS = { A: A, B: B, C: C, D: D, E: E, F: F, G: G }; var darkDecimal = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fill: "none", fillRule: "evenodd", filter: "url(#darkLED-a)" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fillRule: "nonzero" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", fillRule: "evenodd", xlinkHref: "#darkLED-t" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-u)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-t" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-t" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "#000", filter: "url(#darkLED-v)", xlinkHref: "#darkLED-t" }))); var darkColon = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fillRule: "nonzero" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", fillRule: "evenodd", xlinkHref: "#darkLED-y" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-u)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-y" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-y" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "black", filter: "url(#darkLED-v)", xlinkHref: "#darkLED-y" })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", { fillRule: "nonzero" }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { className: "darkLED-fill", fillRule: "evenodd", xlinkHref: "#darkLED-w" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-u)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-w" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "url(#darkLED-d)", fillRule: "evenodd", style: { mixBlendMode: 'overlay' }, xlinkHref: "#darkLED-w" }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", { fill: "black", filter: "url(#darkLED-x)", xlinkHref: "#darkLED-w" }))); /* harmony default export */ __webpack_exports__["default"] = (darkGradientDefs); /***/ }), /***/ "./src/styled/shared/Indicator.styled.js": /*!***********************************************!*\ !*** ./src/styled/shared/Indicator.styled.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants */ "./src/styled/constants.js"); function _templateObject4() { var data = _taggedTemplateLiteral(["\n background-image: linear-gradient(\n 145deg,\n rgba(255, 255, 255, 0.1) 0%,\n rgba(0, 0, 0, 0.5) 100%\n );\n background-blend-mode: overlay;\n box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.5), inset 0 0 4px 0 rgba(0, 0, 0, 0.6),\n -1px -1px 0px 0px rgba(0, 0, 0, 0.9), 1px 1px 0px 0px rgba(255, 255, 255, 0.1);\n "]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n box-shadow: 0 0 8px 2px ", ", 1px 1px 0px 0px rgba(0, 0, 0, 0.9),\n -1px -1px 0px 0px rgba(255, 255, 255, 0.1);\n "]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n background-color: ", ";\n ", "\n ", "\n "]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n border-radius: ", ";\n transition: all 100ms ease-in-out;\n ", "\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Indicator = Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["default"])('div')(_templateObject(), function (_ref) { var rectangular = _ref.rectangular; return rectangular ? '0' : '50%'; }, function (props) { var color = props.main ? props.on ? props.primary || props.theme.primary : props.secondary || props.theme.secondary : props.on ? props.theme.secondary : props.primary || props.theme.primary; return Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject2(), props.width || props.height || props.size, props.height || props.width || props.size, color, props.border ? "border: 1px solid ".concat(props.on ? color : '#F8F4F4', ";") : '', props.theme.dark ? props.on && props.main || !props.on && !props.main ? Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject3(), color) : Object(styled_components__WEBPACK_IMPORTED_MODULE_1__["css"])(_templateObject4()) : ''); }); Indicator.defaultProps = { theme: _constants__WEBPACK_IMPORTED_MODULE_2__["light"] }; Indicator.propTypes = { /** * Size of the indicator */ size: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, /** * Theme for styling the component */ theme: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, /** * Add border for off */ border: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, /** * Color to display when on */ primary: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, /** * Color to display when off */ secondary: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string }; /* harmony default export */ __webpack_exports__["default"] = (Indicator); /***/ }), /***/ "./src/styled/shared/Label.styled.js": /*!*******************************************!*\ !*** ./src/styled/shared/Label.styled.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); function _templateObject4() { var data = _taggedTemplateLiteral(["\n ", "\n "]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n margin-top: 8px;\n "]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n margin-bottom: 8px;\n "]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: block;\n font-size: 14px;\n ", "\n ", "\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } /* harmony default export */ __webpack_exports__["default"] = (styled_components__WEBPACK_IMPORTED_MODULE_0__["default"].label(_templateObject(), function (_ref) { var position = _ref.position; return position === 'top' ? Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject2()) : Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject3()); }, function (props) { return Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(_templateObject4(), props.css); })); /***/ }), /***/ "./src/styled/shared/LabelContainer.styled.js": /*!****************************************************!*\ !*** ./src/styled/shared/LabelContainer.styled.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _Label_styled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Label.styled */ "./src/styled/shared/Label.styled.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _templateObject() { var data = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-around;\n flex-direction: column;\n ", "\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var Container = styled_components__WEBPACK_IMPORTED_MODULE_1__["default"].div(_templateObject(), function (_ref) { var fullSize = _ref.fullSize; if (fullSize) return 'width: 100%;'; return ''; }); function LabelContainer(props) { var labelText = props.label; var customLabelStyle = {}; if (_typeof(props.label) === 'object') { labelText = props.label.label; customLabelStyle = props.label.style; } var labelElement = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Label_styled__WEBPACK_IMPORTED_MODULE_2__["default"], { style: customLabelStyle, css: props.labelCSS, position: props.labelPosition }, labelText && labelText.length ? labelText : ''); // if (labelText && labelText.length) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Container, { className: props.className, id: props.id, labelPosition: props.labelPosition, fullSize: props.fullSize }, props.labelPosition == 'top' && labelElement, props.children, props.labelPosition != 'top' && labelElement); // } // return
{props.children}
; } LabelContainer.defaultProps = { labelPosition: 'bottom' }; /* harmony default export */ __webpack_exports__["default"] = (LabelContainer); /***/ }), /***/ "prop-types": /*!****************************!*\ !*** external "PropTypes" ***! \****************************/ /*! no static exports found */ /***/ (function(module, exports) { (function() { module.exports = window["PropTypes"]; }()); /***/ }), /***/ "react": /*!************************!*\ !*** external "React" ***! \************************/ /*! no static exports found */ /***/ (function(module, exports) { (function() { module.exports = window["React"]; }()); /***/ }), /***/ "react-dom": /*!***************************!*\ !*** external "ReactDOM" ***! \***************************/ /*! no static exports found */ /***/ (function(module, exports) { (function() { module.exports = window["ReactDOM"]; }()); /***/ }) /******/ }); //# sourceMappingURL=dash_daq.dev.js.map ================================================ FILE: man/daqBooleanSwitch.Rd ================================================ % Auto-generated: do not edit by hand \name{daqBooleanSwitch} \alias{daqBooleanSwitch} \title{BooleanSwitch component} \description{ A switch component that toggles between on and off. } \usage{ daqBooleanSwitch(id=NULL, className=NULL, color=NULL, disabled=NULL, label=NULL, labelPosition=NULL, on=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, size=NULL, style=NULL, theme=NULL, vertical=NULL) } \arguments{ \item{id}{Character. The ID used to identify this compnent in Dash callbacks} \item{className}{Character. Class to apply to the root component element.} \item{color}{Character. Color to highlight active switch background} \item{disabled}{Logical. If true, switch cannot be clicked} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the control. To control styling, pass an object with label and style properties.} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the component label is positioned.} \item{on}{Logical. Whether or not the switch is on} \item{persisted_props}{List of a value equal to: 'on's. Properties whose user interactions will persist after refreshing the component or the page. Since only `on` is allowed this prop can normally be ignored.} \item{persistence}{Logical | character | numeric. Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`.} \item{persistence_type}{A value equal to: 'local', 'session', 'memory'. Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit.} \item{size}{Numeric. size of the switch} \item{style}{Named list. Style to apply to the root object.} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} \item{vertical}{Logical. If true, switch will be vertical instead of horizontal} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqColorPicker.Rd ================================================ % Auto-generated: do not edit by hand \name{daqColorPicker} \alias{daqColorPicker} \title{ColorPicker component} \description{ A color picker. } \usage{ daqColorPicker(id=NULL, className=NULL, disabled=NULL, label=NULL, labelPosition=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, size=NULL, style=NULL, theme=NULL, value=NULL) } \arguments{ \item{id}{Character. The ID used to identify the color picker in Dash callbacks} \item{className}{Character. Class to apply to the root component element} \item{disabled}{Logical. If true, color cannot be picked.} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the control. To control styling, pass an object with label and style properties} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the indicator label is positioned} \item{persisted_props}{List of a value equal to: 'value's. Properties whose user interactions will persist after refreshing the component or the page. Since only `value` is allowed this prop can normally be ignored.} \item{persistence}{Logical | character | numeric. Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`.} \item{persistence_type}{A value equal to: 'local', 'session', 'memory'. Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit.} \item{size}{Numeric. Size (width) of the component in pixels} \item{style}{Named list. Style to apply to the root component element} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} \item{value}{Lists containing elements 'hex', 'rbg'. those elements have the following types: - hex (character; optional): hex string - rbg (optional): rgb/rgba object. rbg has the following type: lists containing elements 'r', 'g', 'b', 'a'. those elements have the following types: - r (numeric; optional) - g (numeric; optional) - b (numeric; optional) - a (numeric; optional). Color value of the picker} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqDarkThemeProvider.Rd ================================================ % Auto-generated: do not edit by hand \name{daqDarkThemeProvider} \alias{daqDarkThemeProvider} \title{DarkThemeProvider component} \description{ DarkThemeProvider is a component that is placed at the root of the component tree to make all components match the dark theme } \usage{ daqDarkThemeProvider(children=NULL, theme=NULL) } \arguments{ \item{children}{List of a list of or a singular dash component, string or numbers | a list of or a singular dash component, string or number. The children of this component} \item{theme}{Lists containing elements 'primary', 'secondary', 'detail', 'dark'. those elements have the following types: - primary (character; optional): highlight color - secondary (character; optional): supporting color - detail (character; optional): color used for ui details, like borders - dark (logical; optional): true for dark mode, false for light. Theme object to override with a custom theme} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqGauge.Rd ================================================ % Auto-generated: do not edit by hand \name{daqGauge} \alias{daqGauge} \title{Gauge component} \description{ A Gauge component that points to a value between some range. } \usage{ daqGauge(id=NULL, base=NULL, className=NULL, color=NULL, digits=NULL, exceedMessage=NULL, label=NULL, labelPosition=NULL, lagingMessage=NULL, logarithmic=NULL, max=NULL, min=NULL, scale=NULL, showCurrentValue=NULL, size=NULL, style=NULL, textColor=NULL, theme=NULL, units=NULL, value=NULL) } \arguments{ \item{id}{Character. The ID used to identify this compnent in Dash callbacks} \item{base}{Numeric. Base to be used in logarithmic scale.} \item{className}{Character. Class to apply to the root component element.} \item{color}{Character | lists containing elements 'default', 'gradient', 'ranges'. those elements have the following types: - default (character; optional): color used for current value text and other minor accents - gradient (logical; optional): display ranges as a gradient between given colors. - ranges (optional): define multiple color ranges on the gauge's track. the key determines the color of the range and the value is the start,end of the range itself. ranges must be contiguous along the entirety of the gauge's range of values.. ranges has the following type: lists containing elements 'color'. those elements have the following types: - color (list of numeric | list of numericss; optional). Color configuration for the gauge's track.} \item{digits}{Numeric. Number of digits for current value} \item{exceedMessage}{Character. Warning message when value exceed max} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the control. To control styling, pass an object with label and style properties.} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the component label is positioned.} \item{lagingMessage}{Character. Warning message when value is laging from min} \item{logarithmic}{Logical. If set to true, a logarithmic scale will be used.} \item{max}{Numeric. The maximum value of the gauge. If logarithmic, represents the maximum exponent.} \item{min}{Numeric. The minimum value of the gauge. If logarithmic, represents the minimum exponent.} \item{scale}{Lists containing elements 'start', 'interval', 'labelinterval', 'custom'. those elements have the following types: - start (numeric; optional): value to start the scale from. defaults to min. - interval (numeric; optional): interval by which the scale goes up. attempts to dynamically divide min-max range by default. - labelinterval (numeric; optional): interval by which labels are added to scale marks. defaults to 2 (every other mark has a label). - custom (optional): custom scale marks. the key determines the position and the value determines what will show. if you want to set the style of a specific mark point, the value should be an object which contains style and label properties. custom has the following type: numeric | lists containing elements 'style', 'label'. those elements have the following types: - style (character; optional) - label (character; optional). Configuration for the component scale.} \item{showCurrentValue}{Logical. If true, the current value of the gauge will be displayed} \item{size}{Numeric. The size (diameter) of the gauge in pixels} \item{style}{Named list. Style to apply to the root component element.} \item{textColor}{Character. text color for theme} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} \item{units}{Character. Label for the current value} \item{value}{Numeric. The value of gauge. If logarithmic, the displayed value will be the logarithm of the inputted value.} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqGraduatedBar.Rd ================================================ % Auto-generated: do not edit by hand \name{daqGraduatedBar} \alias{daqGraduatedBar} \title{GraduatedBar component} \description{ A graduated bar component that displays a value within some range as a percentage. } \usage{ daqGraduatedBar(id=NULL, className=NULL, color=NULL, label=NULL, labelPosition=NULL, max=NULL, min=NULL, showCurrentValue=NULL, size=NULL, step=NULL, style=NULL, theme=NULL, value=NULL, vertical=NULL) } \arguments{ \item{id}{Character. The ID used to identify this compnent in Dash callbacks} \item{className}{Character. Class to apply to the root component element.} \item{color}{Character | lists containing elements 'default', 'gradient', 'ranges'. those elements have the following types: - default (character; optional): fallback color to use when color.ranges has gaps. - gradient (logical; optional): display ranges as a gradient between given colors. requires color.ranges to be contiguous along the entirety of the graduated bar's range of values. - ranges (optional): define multiple color ranges on the graduated bar's track. the key determines the color of the range and the value is the start,end of the range itself.. ranges has the following type: lists containing elements 'color'. those elements have the following types: - color (list of numerics; optional). Color configuration for the graduated bar's progress blocks.} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the control. To control styling, pass an object with label and style properties.} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the component label is positioned.} \item{max}{Numeric. The maximum value of the graduated bar} \item{min}{Numeric. The minimum value of the graduated bar} \item{showCurrentValue}{Logical. If true, the current percentage of the bar will be displayed} \item{size}{Numeric. The size (length) of the graduated bar in pixels} \item{step}{Numeric. Value by which progress blocks appear} \item{style}{Named list. Style to apply to the root component element.} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} \item{value}{Numeric. The value of the graduated bar} \item{vertical}{Logical. If true, will display bar vertically instead of horizontally} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqIndicator.Rd ================================================ % Auto-generated: do not edit by hand \name{daqIndicator} \alias{daqIndicator} \title{Indicator component} \description{ A boolean indicator LED. } \usage{ daqIndicator(id=NULL, className=NULL, color=NULL, height=NULL, label=NULL, labelPosition=NULL, size=NULL, style=NULL, theme=NULL, value=NULL, width=NULL) } \arguments{ \item{id}{Character. The ID used to identify the indicator in Dash callbacks} \item{className}{Character. Class to apply to the root component element} \item{color}{Character. Color of the indicator} \item{height}{Numeric. Height of the component. Set both width and height for a rectangular indicator} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the control. To control styling, pass an object with label and style properties} \item{labelPosition}{A value equal to: 'top', 'bottom', 'right', 'left'. Where the indicator label is positioned} \item{size}{Numeric. Size of the component. Either use this or width and height} \item{style}{Named list. Style to apply to the root component element} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} \item{value}{Logical. If true, indicator is illuminated} \item{width}{Numeric. Width of the component. Set both width and height for a rectangular indicator} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqJoystick.Rd ================================================ % Auto-generated: do not edit by hand \name{daqJoystick} \alias{daqJoystick} \title{Joystick component} \description{ A joystick. } \usage{ daqJoystick(id=NULL, angle=NULL, className=NULL, force=NULL, label=NULL, labelPosition=NULL, size=NULL, style=NULL, theme=NULL) } \arguments{ \item{id}{Character. The ID used to identify the Joystick in Dash callbacks} \item{angle}{Numeric. Joystick angle in degrees, 0 = right, 90 = up, 180 = left, 270 = down} \item{className}{Character. Class to apply to the root component element} \item{force}{Numeric. Joystick force: distance between cursor and center in big-circle radii} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the control. To control styling, pass an object with label and style properties} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the indicator label is positioned} \item{size}{Numeric. Size (width) of the component in pixels} \item{style}{Named list. Style to apply to the root component element} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqKnob.Rd ================================================ % Auto-generated: do not edit by hand \name{daqKnob} \alias{daqKnob} \title{Knob component} \description{ A knob component that can be turned to a value between some range. } \usage{ daqKnob(id=NULL, className=NULL, color=NULL, digits=NULL, disabled=NULL, label=NULL, labelPosition=NULL, max=NULL, min=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, scale=NULL, showCurrentValue=NULL, size=NULL, style=NULL, textColor=NULL, theme=NULL, value=NULL) } \arguments{ \item{id}{Character. The ID used to identify this compnent in Dash callbacks} \item{className}{Character. Class to apply to the root component element.} \item{color}{Character | lists containing elements 'default', 'gradient', 'ranges'. those elements have the following types: - default (character; optional): color used for current value text and other minor accents - gradient (logical; optional): display ranges as a gradient between given colors. - ranges (optional): define multiple color ranges on the knob's track. the key determines the color of the range and the value is the start,end of the range itself. ranges must be contiguous along the entirety of the knob's range of values.. ranges has the following type: lists containing elements 'color'. those elements have the following types: - color (list of numerics; optional). Color configuration for the knob's track.} \item{digits}{Numeric. number of digits to show after decimal places} \item{disabled}{Logical. If true, knob cannot be moved.} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the control. To control styling, pass an object with label and style properties.} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the knob label is positioned.} \item{max}{Numeric. The maximum value of the knob} \item{min}{Numeric. The minimum value of the knob} \item{persisted_props}{List of a value equal to: 'value's. Properties whose user interactions will persist after refreshing the component or the page. Since only `value` is allowed this prop can normally be ignored.} \item{persistence}{Logical | character | numeric. Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`.} \item{persistence_type}{A value equal to: 'local', 'session', 'memory'. Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit.} \item{scale}{Lists containing elements 'start', 'interval', 'labelinterval', 'custom'. those elements have the following types: - start (numeric; optional): value to start the scale from. defaults to min. - interval (numeric; optional): interval by which the scale goes up. attempts to dynamically divide min-max range by default. - labelinterval (numeric; optional): interval by which labels are added to scale marks. defaults to 2 (every other mark has a label). - custom (optional): custom scale marks. the key determines the position and the value determines what will show. if you want to set the style of a specific mark point, the value should be an object which contains style and label properties. custom has the following type: numeric | lists containing elements 'style', 'label'. those elements have the following types: - style (character; optional) - label (character; optional). Configuration for the component scale.} \item{showCurrentValue}{Logical. show current value of knob} \item{size}{Numeric. The size (diameter) of the knob in pixels} \item{style}{Named list. Style to apply to the root component element.} \item{textColor}{Character. text color of scale} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} \item{value}{Numeric. The value of knob} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqLEDDisplay.Rd ================================================ % Auto-generated: do not edit by hand \name{daqLEDDisplay} \alias{daqLEDDisplay} \title{LEDDisplay component} \description{ A 7-bar LED display component. } \usage{ daqLEDDisplay(id=NULL, backgroundColor=NULL, className=NULL, color=NULL, label=NULL, labelPosition=NULL, size=NULL, style=NULL, theme=NULL, value=NULL) } \arguments{ \item{id}{Character. The ID used to identify the display in Dash callbacks} \item{backgroundColor}{Character. Color of the display's background} \item{className}{Character. Class to apply to the root component element} \item{color}{Character. Color of the display} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the control. To control styling, pass an object with label and style properties} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the display label is positioned} \item{size}{Numeric. Size of the display} \item{style}{Named list. Style to apply to the root component element} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} \item{value}{Numeric | character. Value to be displayed. A number or a string containing only digits (0-9), periods, and colons, and possibly starting with a minus sign.} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqNumericInput.Rd ================================================ % Auto-generated: do not edit by hand \name{daqNumericInput} \alias{daqNumericInput} \title{NumericInput component} \description{ A numeric input component that can be set to a value between some range. } \usage{ daqNumericInput(id=NULL, className=NULL, disabled=NULL, label=NULL, labelPosition=NULL, max=NULL, min=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, size=NULL, style=NULL, theme=NULL, value=NULL) } \arguments{ \item{id}{Character. The ID used to identify this compnent in Dash callbacks} \item{className}{Character. Class to apply to the root component element.} \item{disabled}{Logical. If true, numeric input cannot changed.} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the control. To control styling, pass an object with label and style properties.} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the numeric input label is positioned.} \item{max}{Numeric. The maximum value of the numeric input} \item{min}{Numeric. The minimum value of the numeric input} \item{persisted_props}{List of a value equal to: 'value's. Properties whose user interactions will persist after refreshing the component or the page. Since only `value` is allowed this prop can normally be ignored.} \item{persistence}{Logical | character | numeric. Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`.} \item{persistence_type}{A value equal to: 'local', 'session', 'memory'. Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit.} \item{size}{Numeric. The size (length) of the numeric input in pixels} \item{style}{Named list. Style to apply to the root component element.} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} \item{value}{Numeric. The value of numeric input} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqPowerButton.Rd ================================================ % Auto-generated: do not edit by hand \name{daqPowerButton} \alias{daqPowerButton} \title{PowerButton component} \description{ A power button component can be turned on and off. } \usage{ daqPowerButton(id=NULL, className=NULL, color=NULL, disabled=NULL, label=NULL, labelPosition=NULL, offButtonStyle=NULL, on=NULL, onButtonStyle=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, size=NULL, style=NULL, theme=NULL) } \arguments{ \item{id}{Character. The ID used to identify this compnent in Dash callbacks} \item{className}{Character. Class to apply to the root component element.} \item{color}{Character. The indicator color to display when power button is on} \item{disabled}{Logical. If true, power button cannot be clicked} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the button. To control styling, pass an object with label and style properties.} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the button label is positioned.} \item{offButtonStyle}{Named list. style to apply on switch off button} \item{on}{Logical. Whether or not the power button is on} \item{onButtonStyle}{Named list. style to apply on switch on button} \item{persisted_props}{List of a value equal to: 'on's. Properties whose user interactions will persist after refreshing the component or the page. Since only `on` is allowed this prop can normally be ignored.} \item{persistence}{Logical | character | numeric. Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`.} \item{persistence_type}{A value equal to: 'local', 'session', 'memory'. Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit.} \item{size}{Numeric. The size (diameter) of the power button in pixels} \item{style}{Named list. Style to apply to the root component element.} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqPrecisionInput.Rd ================================================ % Auto-generated: do not edit by hand \name{daqPrecisionInput} \alias{daqPrecisionInput} \title{PrecisionInput component} \description{ A numeric input component that converts an input value to the desired precision. } \usage{ daqPrecisionInput(id=NULL, className=NULL, disabled=NULL, label=NULL, labelPosition=NULL, max=NULL, min=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, precision=NULL, size=NULL, style=NULL, theme=NULL, value=NULL) } \arguments{ \item{id}{Character. The ID used to identify this compnent in Dash callbacks} \item{className}{Character. Class to apply to the root component element.} \item{disabled}{Logical. If true, numeric input cannot be changed.} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the scientific notation. To control styling, pass an object with label and style properties.} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the numeric input label is positioned.} \item{max}{Numeric. The maximum value of the numeric input} \item{min}{Numeric. The minimum value of the numeric input} \item{persisted_props}{List of a value equal to: 'value's. Properties whose user interactions will persist after refreshing the component or the page. Since only `value` is allowed this prop can normally be ignored.} \item{persistence}{Logical | character | numeric. Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`.} \item{persistence_type}{A value equal to: 'local', 'session', 'memory'. Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit.} \item{precision}{Numeric. Number of significant figures} \item{size}{Numeric. The size (length) of the numeric input in pixels} \item{style}{Named list. Style to apply to the root component element.} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} \item{value}{Numeric. The value of numeric input} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqSlider.Rd ================================================ % Auto-generated: do not edit by hand \name{daqSlider} \alias{daqSlider} \title{Slider component} \description{ A slider component with support for a target value. } \usage{ daqSlider(id=NULL, className=NULL, color=NULL, disabled=NULL, dots=NULL, fullSize=NULL, handleLabel=NULL, included=NULL, labelPosition=NULL, marks=NULL, max=NULL, min=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, size=NULL, step=NULL, style=NULL, targets=NULL, theme=NULL, updatemode=NULL, value=NULL, vertical=NULL) } \arguments{ \item{id}{Character. The ID used to identify this component in Dash callbacks} \item{className}{Character. Additional CSS class for the root DOM node.} \item{color}{Character | lists containing elements 'default', 'gradient', 'ranges'. those elements have the following types: - default (character; optional): fallback color to use when color.ranges has gaps. - gradient (logical; optional): display ranges as a gradient between given colors. requires color.ranges to be contiguous along the entirety of the gauge's range of values. - ranges (optional): define multiple color ranges on the slider's track. the key determines the color of the range and the value is the start,end of the range itself.. ranges has the following type: lists containing elements 'color'. those elements have the following types: - color (list of numerics; optional). Color configuration for the slider's track.} \item{disabled}{Logical. If true, the handles can't be moved.} \item{dots}{Logical. When the step value is greater than 1, you can set the dots to true if you want to render the slider with dots. Note: dots are disabled automatically when using color.ranges} \item{fullSize}{Logical. make slider same size of its parent} \item{handleLabel}{Character | lists containing elements 'showcurrentvalue', 'label', 'color', 'style'. those elements have the following types: - showcurrentvalue (logical; optional) - label (character; optional) - color (character; optional) - style (named list; optional). Configuration of the slider handle's label. Passing falsy value will disable the label.} \item{included}{Logical. If the value is true, it means a continuous value is included. Otherwise, it is an independent value.} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the component label is positioned.} \item{marks}{Lists containing elements 'number'. those elements have the following types: - number (optional): . number has the following type: character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Marks on the slider. The key determines the position, and the value determines what will show. If you want to set the style of a specific mark point, the value should be an object which contains style and label properties.} \item{max}{Numeric. Maximum allowed value of the slider.} \item{min}{Numeric. Minimum allowed value of the slider.} \item{persisted_props}{List of a value equal to: 'value's. Properties whose user interactions will persist after refreshing the component or the page. Since only `value` is allowed this prop can normally be ignored.} \item{persistence}{Logical | character | numeric. Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`.} \item{persistence_type}{A value equal to: 'local', 'session', 'memory'. Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit.} \item{size}{Numeric. Size of the slider in pixels.} \item{step}{Numeric. Value by which increments or decrements are made.} \item{style}{Named list. Style to apply to the root component element.} \item{targets}{Lists containing elements 'number'. those elements have the following types: - number (optional): . number has the following type: character | lists containing elements 'showcurrentvalue', 'label', 'color', 'style'. those elements have the following types: - showcurrentvalue (logical; optional) - label (character; optional) - color (character; optional) - style (named list; optional). Targets on the slider. The key determines the position, and the value determines what will show. If you want to set the style of a specific target point, the value should be an object which contains style and label properties.} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} \item{updatemode}{A value equal to: 'mouseup', 'drag'. Determines when the component should update its value. If `mouseup`, then the slider will only trigger its value when the user has finished dragging the slider. If `drag`, then the slider will update its value continuously as it is being dragged. Only use `drag` if your updates are fast.} \item{value}{Numeric. The value of the input.} \item{vertical}{Logical. If true, the slider will be vertical.} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqStopButton.Rd ================================================ % Auto-generated: do not edit by hand \name{daqStopButton} \alias{daqStopButton} \title{StopButton component} \description{ A Stop button component } \usage{ daqStopButton(children=NULL, id=NULL, buttonText=NULL, className=NULL, disabled=NULL, label=NULL, labelPosition=NULL, n_clicks=NULL, size=NULL, style=NULL, theme=NULL) } \arguments{ \item{children}{A list of or a singular dash component, string or number. The children of the button.} \item{id}{Character. The ID used to identify this compnent in Dash callbacks} \item{buttonText}{Character. Text displayed in the button} \item{className}{Character. Class to apply to the root component element.} \item{disabled}{Logical. If true, button cannot be pressesd.} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the button. To control styling, pass an object with label and style properties.} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the label is positioned.} \item{n_clicks}{Numeric. Number of times the button was clicked} \item{size}{Numeric. The size (width) of the stop button in pixels} \item{style}{Named list. Style to apply to the root component element.} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqTank.Rd ================================================ % Auto-generated: do not edit by hand \name{daqTank} \alias{daqTank} \title{Tank component} \description{ A Tank component that fills to a value between some range. } \usage{ daqTank(id=NULL, base=NULL, className=NULL, color=NULL, currentValueStyle=NULL, exceedMessage=NULL, height=NULL, label=NULL, labelPosition=NULL, lagingMessage=NULL, logarithmic=NULL, max=NULL, min=NULL, scale=NULL, showCurrentValue=NULL, style=NULL, textColor=NULL, theme=NULL, units=NULL, value=NULL, width=NULL) } \arguments{ \item{id}{Character. The ID used to identify this component in Dash callbacks} \item{base}{Numeric. Base to be used in logarithmic scale.} \item{className}{Character. Class to apply to the root component element.} \item{color}{Character. The color of tank fill} \item{currentValueStyle}{Named list. text style of current value} \item{exceedMessage}{Character. Warning message when value exceed max} \item{height}{Numeric. The height of the tank in pixels} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the control. To control styling, pass an object with label and style properties.} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the component label is positioned.} \item{lagingMessage}{Character. Warning message when value is laging from min} \item{logarithmic}{Logical. If set to true, a logarithmic scale will be used.} \item{max}{Numeric. The maximum value of the tank. If logarithmic, represents the maximum exponent.} \item{min}{Numeric. The minimum value of the tank. If logarithmic, represents minimum exponent.} \item{scale}{Lists containing elements 'start', 'interval', 'labelinterval', 'custom'. those elements have the following types: - start (numeric; optional): value to start the scale from. defaults to min. - interval (numeric; optional): interval by which the scale goes up. attempts to dynamically divide min-max range by default. - labelinterval (numeric; optional): interval by which labels are added to scale marks. defaults to 2 (every other mark has a label). - custom (optional): custom scale marks. the key determines the position and the value determines what will show. if you want to set the style of a specific mark point, the value should be an object which contains style and label properties. custom has the following type: numeric | lists containing elements 'style', 'label'. those elements have the following types: - style (character; optional) - label (character; optional). Configuration for the component scale.} \item{showCurrentValue}{Logical. If true, the current value of the tank will be displayed} \item{style}{Named list. Style to apply to the root component element.} \item{textColor}{Character. text color} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} \item{units}{Character. Label for the current value} \item{value}{Numeric. The value of tank. If logarithmic, the displayed value will be the logarithm of the inputted value.} \item{width}{Numeric. The width of the tank in pixels} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqThermometer.Rd ================================================ % Auto-generated: do not edit by hand \name{daqThermometer} \alias{daqThermometer} \title{Thermometer component} \description{ A thermometer component that fills to a value between some range } \usage{ daqThermometer(id=NULL, base=NULL, className=NULL, color=NULL, height=NULL, label=NULL, labelPosition=NULL, logarithmic=NULL, max=NULL, min=NULL, scale=NULL, showCurrentValue=NULL, style=NULL, theme=NULL, units=NULL, value=NULL, width=NULL) } \arguments{ \item{id}{Character. The ID used to identify this compnent in Dash callbacks} \item{base}{Numeric. Base to be used in logarithmic scale.} \item{className}{Character. Class to apply to the root component element.} \item{color}{Character. The color of the thermometer fill/current value text} \item{height}{Numeric. The height of the thermometer in pixels} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional). Description to be displayed alongside the control. To control styling, pass an object with label and style properties.} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the component label is positioned.} \item{logarithmic}{Logical. If set to true, a logarithmic scale will be used.} \item{max}{Numeric. The maximum value of the thermometer. If logarithmic, represents the maximum exponent.} \item{min}{Numeric. The minimum value of the thermometer. If logarithmic, represents the minimum exponent.} \item{scale}{Lists containing elements 'start', 'interval', 'labelinterval', 'custom'. those elements have the following types: - start (numeric; optional): value to start the scale from. defaults to min. - interval (numeric; optional): interval by which the scale goes up. attempts to dynamically divide min-max range by default. - labelinterval (numeric; optional): interval by which labels are added to scale marks. defaults to 2 (every other mark has a label). - custom (optional): custom scale marks. the key determines the position and the value determines what will show. if you want to set the style of a specific mark point, the value should be an object which contains style and label properties. custom has the following type: numeric | lists containing elements 'style', 'label'. those elements have the following types: - style (character; optional) - label (character; optional). Configuration for the component scale.} \item{showCurrentValue}{Logical. If true, the current value of the thermometer will be displayed} \item{style}{Named list. Style to apply to the root component element.} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} \item{units}{Character. Label for the current value} \item{value}{Numeric. The value of thermometer. If logarthmic, the value displayed will be the logarithm of the inputted value.} \item{width}{Numeric. The width of the thermometer in pixels} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/daqToggleSwitch.Rd ================================================ % Auto-generated: do not edit by hand \name{daqToggleSwitch} \alias{daqToggleSwitch} \title{ToggleSwitch component} \description{ A switch component that toggles between two values. } \usage{ daqToggleSwitch(id=NULL, className=NULL, color=NULL, disabled=NULL, label=NULL, labelPosition=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, size=NULL, style=NULL, theme=NULL, value=NULL, vertical=NULL) } \arguments{ \item{id}{Character. The ID used to identify this compnent in Dash callbacks} \item{className}{Character. Class to apply to the root component element.} \item{color}{Character. Color to highlight button/indicator} \item{disabled}{Logical. If true, switch cannot be clicked} \item{label}{Character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional) | list of character | lists containing elements 'style', 'label'. those elements have the following types: - style (named list; optional) - label (character; optional)s. Description to be displayed alongside the control. To control styling, pass an object with label and style properties.} \item{labelPosition}{A value equal to: 'top', 'bottom'. Where the component label is positioned.} \item{persisted_props}{List of a value equal to: 'value's. Properties whose user interactions will persist after refreshing the component or the page. Since only `value` is allowed this prop can normally be ignored.} \item{persistence}{Logical | character | numeric. Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If `persisted` is truthy and hasn't changed from its previous value, a `value` that the user has changed while using the app will keep that change, as long as the new `value` also matches what was given originally. Used in conjunction with `persistence_type`.} \item{persistence_type}{A value equal to: 'local', 'session', 'memory'. Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit.} \item{size}{Numeric. The size of the switch} \item{style}{Named list. Style to apply to the root object.} \item{theme}{Named list. Theme configuration to be set by a ThemeProvider} \item{value}{Logical. The state of the switch} \item{vertical}{Logical. If true, switch will be vertical instead of horizontal} } \value{named list of JSON elements corresponding to React.js properties and their values} ================================================ FILE: man/dashDaq-package.Rd ================================================ % Auto-generated: do not edit by hand \docType{package} \name{dashDaq-package} \alias{dashDaq} \title{Interactive Data Acquisition and Control Components for Dash } \description{ A robust set of controls that make it simpler to integrate data acquisition and controls into your Dash applications. } \author{ \strong{Maintainer}: Ryan Patrick Kyle } ================================================ FILE: package.json ================================================ { "name": "dash-daq", "version": "0.6.0", "engines": { "node": ">=8" }, "description": "DAQ components for Dash", "repository": { "type": "git", "url": "git://github.com/plotly/dash-daq.git" }, "bugs": { "url": "https://github.com/plotly/dash-daq/issues" }, "homepage": "https://github.com/plotly/dash-daq", "main": "dash_daq/dash_daq.min.js", "author": "The Plotly Team ", "maintainer": "The Plotly Team ", "license": "MIT", "scripts": { "copy-lib": "copyfiles -u 1 lib/* dash_daq", "dash-demo": "python demo.py", "install-local": "pip install -e .", "lint": "eslint --fix --ignore-path .eslintignore src/", "start": "npm run build:dev", "build:js": "webpack --mode production", "build:js-dev": "webpack --mode development", "build:py": "python get_version_info.py && yarn copy-lib && dash-generate-components ./src/components dash_daq -p package-info.json", "build:r": "dash-generate-components ./src/components dash_daq -p package-info.json --r-prefix='daq'", "build": "npm run test && npm run lint && npm run build:js && npm run build:py && npm run build:r", "postbuild": "es-check es5 dash_daq/*.js", "build:dev": "npm run build:js-dev && npm run build:py", "build-tarball": "npm run build && python setup.py sdist", "test": "jest src/components/__tests__", "test-gauge": "jest src/components/__tests__/Gauge.test.js", "test:frontend-cov": "jest --coverage --silent", "test:watch": "jest --watch", "uninstall-local": "pip uninstall dash_daq -y", "prettier": "yarn prettier-src && yarn prettier-tests", "prettier-src": "prettier --single-quote --print-width=100 --write src/**/*.js", "prettier-tests": "prettier --single-quote --print-width=100 --write src/components/__tests__/**/*.js", "prettier-restage": "git update-index --again" }, "dependencies": { "color": "^3.0.0", "conic-gradient": "^1.0.0", "copyfiles": "^1.2.0", "dash-components-archetype": "^0.2.11", "deep-equal": "^1.0.1", "nipplejs": "^0.7.1", "prop-types": "^15.5.9", "ramda": "^0.25.0", "rc-slider": "^9.1.0", "react": "16.13.0", "react-color": "^2.18.0", "react-dom": "16.13.0", "react-numeric-input": "^2.2.3", "styled-components": "^4.4.0", "tinygradient": "^0.4.0", "webpack": "^4.41.0", "yarn": "^1.22.11" }, "devDependencies": { "@babel/core": "^7.6.0", "@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/preset-env": "^7.6.0", "@babel/preset-react": "^7.0.0", "@plotly/webpack-dash-dynamic-import": "^1.1.4", "babel-eslint": "^10.0.3", "babel-loader": "^8.0.6", "chalk": "^2.3.1", "css-loader": "^3.4.2", "dash-components-archetype-dev": "^0.2.11", "enzyme": "^3.10.0", "enzyme-adapter-react-16": "^1.14.0", "es-check": "^5.0.0", "fs-extra": "^5.0.0", "identity-obj-proxy": "^3.0.0", "jest": "^24.9.0", "jest-canvas-mock": "^2.1.1", "pre-commit": "^1.2.2", "prettier": "^1.10.2", "react-docgen": "^3.0.0", "react-docgen-markdown-renderer": "^1.0.2", "react-test-renderer": "^16.8.6", "sinon": "^4.3.0", "style-loader": "^1.1.3", "webpack-cli": "^3.3.9" }, "jest": { "coveragePathIgnorePatterns": [ "/src/styled", "/src/helpers" ], "testURL": "http://localhost", "setupFiles": [ "jest-canvas-mock" ], "moduleNameMapper": { "\\.css": "identity-obj-proxy" } }, "files": [ "dash_daq/*{.js,.map}" ], "pre-commit": [ "test", "prettier", "prettier-restage" ], "keywords": [ "dash", "daq", "components" ] } ================================================ FILE: requirements.txt ================================================ --index-url https://pypi.python.org/simple/ -e . dash>=1.6.0 ================================================ FILE: setup.py ================================================ import json import os from setuptools import setup from io import open filepath = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.md') with open(filepath, encoding='utf-8') as f: long_description = f.read() with open(os.path.join('dash_daq', 'package-info.json'), encoding='utf-8') as f: package = json.load(f) package_name = package["name"].replace(" ", "_").replace("-", "_") setup( name=package_name, version=package["version"], url='http://github.com/plotly/{}'.format(package_name.replace('_', '-')), author=package['author'], author_email='dashdaq@plotly.com', packages=[package_name], include_package_data=True, description=package['description'] if 'description' in package else package_name, long_description=long_description, long_description_content_type='text/markdown', install_requires=[ 'dash>=1.6.1' ], classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], ) ================================================ FILE: src/components/BooleanSwitch.react.js ================================================ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { withTheme } from 'styled-components'; import { omit } from 'ramda'; import { light } from '../styled/constants'; import ToggleSwitch from './ToggleSwitch.react'; /** * A switch component that toggles * between on and off. */ class BooleanSwitch extends Component { constructor(props) { super(props); this.state = { on: props.persisted_props == 'on' ? localStorage.getItem(props.id) == null ? props.on : localStorage.getItem(props.id) == 'true' : props.on }; this.setPropsOverride = this.setPropsOverride.bind(this); } UNSAFE_componentWillReceiveProps(newProps) { if (newProps.on !== this.state.on) this.setState({ on: newProps.on }); } setPropsOverride({ value }) { this.setState({ on: value }); if (this.props.setProps) this.props.setProps({ on: value }); } render() { const { color, theme } = this.props; const filteredProps = omit(['persisted_props'], this.props); if (this.props.persisted_props == 'on' && this.props.id != null) { localStorage.setItem(this.props.id, this.state.on); } return ( ); } } BooleanSwitch.defaultProps = { on: false, vertical: false, theme: light, labelPosition: 'top', persisted_props: ['on'], persistence_type: 'local' }; BooleanSwitch.propTypes = { /** * The ID used to identify this component in Dash callbacks */ id: PropTypes.string, /** * Whether or not the switch is on */ on: PropTypes.bool, /** * Color to highlight active switch background */ color: PropTypes.string, /** * If true, switch will be vertical instead * of horizontal */ vertical: PropTypes.bool, /** * If true, switch cannot be clicked */ disabled: PropTypes.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root object. */ style: PropTypes.object, /** * Dash-assigned callback that gets fired when * switch is toggled. */ setProps: PropTypes.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `on` is allowed this prop can * normally be ignored. */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['on'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), /** * size of the switch */ size: PropTypes.number }; const ThemedBooleanSwitch = withTheme(BooleanSwitch); ThemedBooleanSwitch.defaultProps = BooleanSwitch.defaultProps; export default ThemedBooleanSwitch; ================================================ FILE: src/components/ColorPicker.react.js ================================================ import PropTypes from 'prop-types'; import React, { Component, lazy, Suspense } from 'react'; import { light } from '../styled/constants'; const RealColorPicker = lazy(() => import(/* webpackChunkName: "colorpicker" */ '../fragments/ColorPicker.react') ); /** * A color picker. */ export default class ColorPicker extends Component { render() { return ( ); } } ColorPicker.defaultProps = { size: 225, theme: light, labelPosition: 'top', persisted_props: ['value'], persistence_type: 'local' }; ColorPicker.propTypes = { /** * The ID used to identify the color picker in Dash callbacks */ id: PropTypes.string, /** * Color value of the picker */ value: PropTypes.shape({ /** * Hex string */ hex: PropTypes.string, /** * RGB/RGBA object */ rbg: PropTypes.shape({ r: PropTypes.number, g: PropTypes.number, b: PropTypes.number, a: PropTypes.number }) }), /** * If true, color cannot be picked. */ disabled: PropTypes.bool, /** * Size (width) of the component in pixels */ size: PropTypes.number, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the indicator label is positioned */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element */ className: PropTypes.string, /** * Dash-assigned callback that gets fired when * the color picker's value changes */ setProps: PropTypes.func, /** * Style to apply to the root component element */ style: PropTypes.object, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']) }; export const defaultProps = ColorPicker.defaultProps; export const propTypes = ColorPicker.propTypes; ================================================ FILE: src/components/DarkThemeProvider.react.js ================================================ import React from 'react'; import PropTypes from 'prop-types'; import { ThemeProvider } from 'styled-components'; import { dark } from '../styled/constants'; /** * DarkThemeProvider is a component that is placed at the root of * the component tree to make all components match the dark theme */ function DarkThemeProvider(props) { return (
{props.children}
); } DarkThemeProvider.propTypes = { /** * The children of this component */ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]), /** * Theme object to override with a custom theme */ theme: PropTypes.shape({ /** * Highlight color */ primary: PropTypes.string, /** * Supporting color */ secondary: PropTypes.string, /** * Color used for UI details, like borders */ detail: PropTypes.string, /** * True for Dark mode, false for Light */ dark: PropTypes.bool }) }; export default DarkThemeProvider; ================================================ FILE: src/components/Gauge.react.js ================================================ import React, { useRef, useEffect } from 'react'; import PropTypes from 'prop-types'; import { withTheme } from 'styled-components'; import GaugeSVG from '../helpers/GaugeSvg.react'; import Container from '../styled/Gauge.styled'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import CurrentValue from '../styled/CurrentValue.styled'; import { light } from '../styled/constants'; import { ExceededWarning } from '../styled/Tank.styled'; import { sanitizeRangeValue, computeProgress } from '../helpers/util'; import log from '../helpers/logarithm'; import generateScale from '../helpers/scale'; import { convertInRange, getColorValue } from '../helpers/colorRanges'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; import 'conic-gradient'; /** * A Gauge component that points to * a value between some range. */ const Gauge = props => { const { max, min, showCurrentValue, units, logarithmic, base, id, className, style, theme, digits } = props; const warningPara = useRef(null); const color = convertInRange(props.color, max, min ? min : 0); const colorValue = props.textColor || getColorValue(color); const rawValue = props.value != null ? props.value : min; const dirtyValue = logarithmic ? log.compute(rawValue) : rawValue; const currentDisplayValue = dirtyValue; const value = sanitizeRangeValue({ min, max, value: dirtyValue }); const formatter = logarithmic ? log.generateLogFormatter({ base, isSVG: true }) : null; const scale = generateScale({ ...props, formatter }); const progress = computeProgress({ min, max, value, progressionTarget: 1 }); const elementName = getClassName('gauge', theme); const currentValue = ( {logarithmic ? log.formatValue(currentDisplayValue, base) : currentDisplayValue.toFixed(digits)} ); const filteredProps = getFilteredProps(props); useEffect(() => { let currValue = logarithmic ? Math.pow(base || 10, currentDisplayValue) : currentDisplayValue; let maximum = logarithmic ? Math.pow(base || 10, max) : max; let minimum = logarithmic ? Math.pow(base || 10, min) : min; if (currValue > maximum) { let str = ''; warningPara.current.innerHTML = props.exceedMessage ? typeof props.exceedMessage == 'string' ? props.exceedMessage : props.exceedMessage(currValue, maximum) || str : str; } else if (currValue < minimum) { let str = ''; warningPara.current.innerHTML = props.lagingMessage ? typeof props.lagingMessage == 'string' ? props.lagingMessage : props.lagingMessage(currValue, minimum) || str : str; } else { warningPara.current.innerHTML = ''; } }, [currentDisplayValue]); return (
{showCurrentValue && currentValue}
); }; Gauge.defaultProps = { min: 0, max: 10, base: 10, theme: light, labelPosition: 'top', digits: 1, size: 208 }; Gauge.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The value of gauge. If logarithmic, the displayed * value will be the logarithm of the inputted value. */ value: PropTypes.number, /** * The size (diameter) of the gauge in pixels */ size: PropTypes.number, /** * The minimum value of the gauge. If logarithmic, * represents the minimum exponent. */ min: PropTypes.number, /** * The maximum value of the gauge. If logarithmic, * represents the maximum exponent. */ max: PropTypes.number, /** * Base to be used in logarithmic scale. */ base: PropTypes.number, /** * If set to true, a logarithmic scale will be * used. */ logarithmic: PropTypes.bool, /** * If true, the current value of the gauge * will be displayed */ showCurrentValue: PropTypes.bool, /** * Number of digits for current value */ digits: PropTypes.number, /** * Label for the current value */ units: PropTypes.string, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: PropTypes.shape({ /** * Value to start the scale from. Defaults * to min. */ start: PropTypes.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: PropTypes.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: PropTypes.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: PropTypes.oneOfType([ /** * Label for the mark */ PropTypes.number, /** * Style object with label */ PropTypes.shape({ style: PropTypes.string, label: PropTypes.string }) ]) }), /** * Color configuration for the gauge's track. */ color: PropTypes.oneOfType([ /** * Color used for gauge's track/indicator */ PropTypes.string, /** * Color ranges configuration. */ PropTypes.shape({ /** * Color used for current value text and other minor accents */ default: PropTypes.string, /** * Display ranges as a gradient between given colors. */ gradient: PropTypes.bool, /** * Define multiple color ranges on the gauge's track. * The key determines the color of the range and * the value is the start,end of the range itself. * Ranges must be contiguous along the entirety * of the gauge's range of values. */ ranges: PropTypes.shape({ color: PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]) ) }) }) ]), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object, /** * Warning message when value exceed max */ exceedMessage: PropTypes.oneOfType([PropTypes.string]), /** * Warning message when value is laging from min */ lagingMessage: PropTypes.oneOfType([PropTypes.string]), /** * text color for theme */ textColor: PropTypes.string }; export default withTheme(Gauge); ================================================ FILE: src/components/GraduatedBar.react.js ================================================ import React from 'react'; import PropTypes from 'prop-types'; import { withTheme } from 'styled-components'; import { light } from '../styled/constants'; import { getColorValue, isContiguous, getGradientObject } from '../helpers/colorRanges'; import { Container, Block, Value } from '../styled/GraduatedBar.styled'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; const valueColor = (value, color) => { const entry = Object.entries(color.ranges).filter( ([, range]) => value >= range[0] && value <= range[1] )[0]; return entry && entry[0]; }; /** * A graduated bar component that displays * a value within some range as a * percentage. */ const GraduatedBar = props => { const { step, min, max, label, labelPosition, id, className, color, size, style, showCurrentValue, vertical, theme } = props; const value = props.value || min; let gradient = null; const progressBlocks = []; const normalizedValue = Math.max(Math.min(max, value), min); if (color.gradient && isContiguous({ color, min, max })) { gradient = getGradientObject({ color, min, max }); } const elementName = getClassName('graduatedbar', theme); const filteredProps = getFilteredProps(props); for (let i = min; i < normalizedValue; i += step) { let blockProps = { ...filteredProps, color: getColorValue(color) }; if (color.ranges && valueColor(i, color)) { blockProps = { ...filteredProps, color: valueColor(i, color) }; } progressBlocks.push( ); } let percent = (normalizedValue / (max - min)) * 100; if (!isFinite(percent)) percent = 0; return (
{progressBlocks} {showCurrentValue && ( {percent.toFixed(0)}% )}
); }; GraduatedBar.defaultProps = { min: 0, max: 10, size: 250, step: 0.5, theme: light, labelPosition: 'top', color: light.primary }; GraduatedBar.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The value of the graduated bar */ value: PropTypes.number, /** * Color configuration for the graduated bar's * progress blocks. */ color: PropTypes.oneOfType([ /** * Color used for graduated bar's track/indicator */ PropTypes.string, /** * Color ranges configuration. */ PropTypes.shape({ /** * Fallback color to use when color.ranges * has gaps. */ default: PropTypes.string, /** * Display ranges as a gradient between given colors. * Requires color.ranges to be contiguous along * the entirety of the graduated bar's range of values. */ gradient: PropTypes.bool, /** * Define multiple color ranges on the graduated bar's track. * The key determines the color of the range and * the value is the start,end of the range itself. */ ranges: PropTypes.shape({ color: PropTypes.arrayOf(PropTypes.number) }) }) ]), /** * The size (length) of the graduated bar in pixels */ size: PropTypes.number, /** * If true, will display bar vertically instead of horizontally */ vertical: PropTypes.bool, /** * The minimum value of the graduated bar */ min: PropTypes.number, /** * The maximum value of the graduated bar */ max: PropTypes.number, /** * Value by which progress blocks appear */ step: PropTypes.number, /** * If true, the current percentage * of the bar will be displayed */ showCurrentValue: PropTypes.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object }; export default withTheme(GraduatedBar); ================================================ FILE: src/components/Indicator.react.js ================================================ import React from 'react'; import PropTypes from 'prop-types'; import convertColor from 'color'; import { withTheme } from 'styled-components'; import IndicatorLight from '../styled/shared/Indicator.styled'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import { colors, light } from '../styled/constants'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; /** * A boolean indicator LED. */ const Indicator = props => { const { id, className, color, size, width, height, value, style, theme } = props; const bg = convertColor(color) .desaturate(0.2) .lighten(0.2) .rgb() .toString(); const elementName = getClassName('indicator', theme); const filteredProps = getFilteredProps(props); return (
); }; Indicator.defaultProps = { color: colors.DARKER_PRIMARY, size: 15, theme: light, labelPosition: 'top' }; Indicator.propTypes = { /** * The ID used to identify the indicator in Dash callbacks */ id: PropTypes.string, /** * If true, indicator is illuminated */ value: PropTypes.bool, /** * Color of the indicator */ color: PropTypes.string, /** * Size of the component. Either use this or width and height */ size: PropTypes.number, /** * Width of the component. Set both width and height for a rectangular indicator */ width: PropTypes.number, /** * Height of the component. Set both width and height for a rectangular indicator */ height: PropTypes.number, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the indicator label is positioned */ labelPosition: PropTypes.oneOf(['top', 'bottom', 'right', 'left']), /** * Class to apply to the root component element */ className: PropTypes.string, /** * Style to apply to the root component element */ style: PropTypes.object }; export default withTheme(Indicator); ================================================ FILE: src/components/Joystick.react.js ================================================ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { withTheme } from 'styled-components'; import joystick from 'nipplejs'; import { light } from '../styled/constants'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; /** * A joystick. */ class Joystick extends Component { constructor(props) { super(props); this.lastAngle = 0; } componentDidMount() { const { size, setProps } = this.props; this.manager = joystick.create({ mode: 'static', color: 'grey', size: size, position: { left: '50%', top: '50%' }, zone: this.zoneRef }); this.manager.on('move', (e, data) => { const { angle: { degree }, force } = data; this.lastAngle = degree; if (setProps) { setProps({ angle: degree, force }); } }); this.manager.on('end', () => { if (setProps) { setProps({ angle: this.lastAngle, force: 0 }); } }); } componentWillUnmount() { this.manager.destroy(); } render() { const { id, className, style, size, theme } = this.props; const elementName = getClassName('joystick', theme); const filteredProps = getFilteredProps(this.props); return (
(this.zoneRef = ref)} style={{ position: 'relative', width: size + 'px', height: size + 'px' }} />
); } } Joystick.defaultProps = { size: 100, theme: light, labelPosition: 'top' }; Joystick.propTypes = { /** * The ID used to identify the Joystick in Dash callbacks */ id: PropTypes.string, /** * Joystick angle in degrees, 0 = right, 90 = up, 180 = left, 270 = down */ angle: PropTypes.number, /** * Joystick force: distance between cursor and center in big-circle radii */ force: PropTypes.number, /** * Size (width) of the component in pixels */ size: PropTypes.number, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the indicator label is positioned */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element */ className: PropTypes.string, /** * Dash-assigned callback that gets fired when * the color picker's value changes */ setProps: PropTypes.func, /** * Style to apply to the root component element */ style: PropTypes.object }; export default withTheme(Joystick); ================================================ FILE: src/components/Knob.react.js ================================================ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { withTheme } from 'styled-components'; import KnobSvg from '../helpers/KnobSvg.react'; import Container from '../styled/Knob.styled'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import CurrentValue from '../styled/CurrentValue.styled'; import { light, TRACK_TOTAL_DEG } from '../styled/constants'; import { computeProgress, roundToDecimal } from '../helpers/util'; import { getColorValue } from '../helpers/colorRanges'; import generateScale from '../helpers/scale'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; const RESET_START_ANGLE = -1; const valueToDeg = ({ min, max, value }) => computeProgress({ min, max, value, progressionTarget: TRACK_TOTAL_DEG }); const degToValue = ({ min, max, deg }) => computeProgress({ min: 0, max: TRACK_TOTAL_DEG, value: deg, progressionTarget: max - min }) + min; /** * A knob component that can be turned * to a value between some range. */ class Knob extends Component { constructor(props) { super(props); const currentDeg = valueToDeg({ min: props.min, max: props.max, value: props.value != null ? props.value : props.min }); this.state = { min: props.min, max: props.max, value: props.value || props.min, scale: generateScale(props), isDragging: false, startAngle: RESET_START_ANGLE, rotation: currentDeg, currentDeg }; this.onMouseDown = this.onMouseDown.bind(this); this.onMouseUp = this.onMouseUp.bind(this); this.onMouseMove = this.onMouseMove.bind(this); this.setValue = this.setValue.bind(this); this.getValue = this.getValue.bind(this); } noop() {} getValue(value) { return value > this.props.min && value < this.props.max ? value : this.props.min > value ? this.props.min : this.props.max; } UNSAFE_componentWillReceiveProps(newProps) { if (typeof newProps.value !== 'undefined') this.setState({ value: newProps.value }); if (this.state.max != newProps.max) { this.setState({ max: newProps.max instanceof Number ? newProps.max : this.state.max }); } if (this.state.min != newProps.min) { this.setState({ min: newProps.min instanceof Number ? newProps.min : this.state.min }); } } componentDidMount() { window.addEventListener('mouseup', this.onMouseUp, false); // eslint-disable-next-line require('conic-gradient'); } componentWillUnmount() { window.removeEventListener('mouseup', this.onMouseUp, false); } onMouseDown() { this.setState({ isDragging: true }); } onMouseUp() { if (this.state.isDragging) { this.setState(state => ({ rotation: state.currentDeg, isDragging: false, startAngle: RESET_START_ANGLE })); } } onMouseMove(e) { if (!this.state.isDragging) { return; } const { min, max } = this.props; const { rotation } = this.state; let { startAngle } = this.state; if (e.touches) { e = e.touches[0]; } const rect = this.knobElement.getBoundingClientRect(); const centerX = rect.width / 2 + rect.left; const centerY = rect.height / 2 + rect.top; const radians = Math.atan2(e.clientX - centerX, e.clientY - centerY); let angle = radians * (180 / Math.PI); if (e.clientX - centerX >= 0) { angle = Math.abs(360 - angle) + 180; } else { angle = angle - 180; } angle = Math.abs(angle); if (startAngle === RESET_START_ANGLE) { startAngle = angle; this.setState({ startAngle }); } let tmp = Math.floor(angle - startAngle + rotation); tmp = Math.min(tmp, TRACK_TOTAL_DEG); tmp = Math.max(tmp, 0); this.setState({ currentDeg: tmp }); this.setValue(roundToDecimal(degToValue({ min, max, deg: tmp }), 2)); } setValue(value) { this.setState({ value }); if (this.props.setProps) this.props.setProps({ value }); } render() { const { min, max, value = this.props.min } = this.props; const { id, className, labelPosition, color, style, disabled, theme, textColor } = this.props; const progress = computeProgress({ min, max, value: this.getValue(value), progressionTarget: 1 }); const colorValue = textColor || getColorValue(color); const elementName = getClassName('knob', theme); const filteredProps = getFilteredProps(this.props); const currentValue = ( <> {value.toFixed(this.props.digits)} ); return (
{this.props.showCurrentValue && currentValue} (this.knobElement = ele)} onMouseDown={disabled ? this.noop : this.onMouseDown} onMouseUp={disabled ? this.noop : this.onMouseUp} onMouseMove={disabled ? this.noop : this.onMouseMove} />
); } } Knob.defaultProps = { min: 0, max: 10, theme: light, labelPosition: 'top', persisted_props: ['value'], persistence_type: 'local', size: 114 }; Knob.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The value of knob */ value: PropTypes.number, /** * Color configuration for the knob's track. */ color: PropTypes.oneOfType([ /** * Color used for knob's track/indicator */ PropTypes.string, /** * Color ranges configuration. */ PropTypes.shape({ /** * Color used for current value text and other minor accents */ default: PropTypes.string, /** * Display ranges as a gradient between given colors. */ gradient: PropTypes.bool, /** * Define multiple color ranges on the knob's track. * The key determines the color of the range and * the value is the start,end of the range itself. * Ranges must be contiguous along the entirety * of the knob's range of values. */ ranges: PropTypes.shape({ color: PropTypes.arrayOf(PropTypes.number) }) }) ]), /** * The size (diameter) of the knob in pixels */ size: PropTypes.number, /** * The minimum value of the knob */ min: PropTypes.number, /** * The maximum value of the knob */ max: PropTypes.number, /** * If true, knob cannot be moved. */ disabled: PropTypes.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the knob label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: PropTypes.shape({ /** * Value to start the scale from. Defaults * to min. */ start: PropTypes.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: PropTypes.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: PropTypes.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: PropTypes.oneOfType([ /** * Label for the mark */ PropTypes.number, /** * Style object with label */ PropTypes.shape({ style: PropTypes.string, label: PropTypes.string }) ]) }), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object, /** * Dash-assigned callback that gets fired when selected * value changes. */ setProps: PropTypes.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), /** * show current value of knob */ showCurrentValue: PropTypes.bool, /** * text color of scale */ textColor: PropTypes.string, /** * number of digits to show after decimal places */ digits: PropTypes.number }; const ThemedKnob = withTheme(Knob); ThemedKnob.defaultProps = Knob.defaultProps; export default ThemedKnob; ================================================ FILE: src/components/LEDDisplay.react.js ================================================ import React from 'react'; import PropTypes from 'prop-types'; import { withTheme } from 'styled-components'; import { Digit } from '../helpers/LEDDisplaySvg.react'; import { LEDContainer } from '../styled/LEDDisplay.styled'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import { colors, light } from '../styled/constants'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; const VALID_INPUT = /^(\-)?((\.|:)?[0-9])*$/; const isValidInput = VALID_INPUT.test.bind(VALID_INPUT); /** * A 7-bar LED display component. */ const LEDDisplay = props => { const elementName = getClassName('leddisplay', props.theme); const digits = isValidInput(props.value) ? extractDigits(props, elementName) : null; const led = {digits}; const filteredProps = getFilteredProps(props); return (
{digits ? led : 'Invalid Input'}
); }; function extractDigits({ value, color, backgroundColor, theme, size }, elementName) { const digitStack = value .toString() .split('') .reverse(); const formattedDigits = []; addLeadingZeroIfNeeded(digitStack); let currKey = 0; while (digitStack.length) { const currDigit = digitStack.pop(); const nextDigit = digitStack.pop(); formattedDigits.push( ); if (nextDigit && nextDigit !== '.' && nextDigit !== ':') digitStack.push(nextDigit); } return formattedDigits; } function addLeadingZeroIfNeeded(digits) { let isNegative = false; if (digits[digits.length - 1] === '-') { isNegative = true; digits.pop(); } const leadingDigit = digits[digits.length - 1]; if (['.', ':'].includes(leadingDigit)) digits.push('0'); if (isNegative) digits.push('-'); } LEDDisplay.defaultProps = { color: colors.PRIMARY, backgroundColor: '#fff', size: 42, theme: light, labelPosition: 'top' }; LEDDisplay.propTypes = { /** * The ID used to identify the display in Dash callbacks */ id: PropTypes.string, /** * Value to be displayed. A number or a string * containing only digits (0-9), periods, and colons, * and possibly starting with a minus sign. */ value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * Color of the display */ color: PropTypes.string, /** * Color of the display's background */ backgroundColor: PropTypes.string, /** * Size of the display */ size: PropTypes.number, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the display label is positioned */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element */ className: PropTypes.string, /** * Style to apply to the root component element */ style: PropTypes.object }; export default withTheme(LEDDisplay); ================================================ FILE: src/components/NumericInput.react.js ================================================ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { withTheme } from 'styled-components'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import { light, colors } from '../styled/constants'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; import Input from './../helpers/NumericInput'; /** * A numeric input component that can be * set to a value between some range. */ class NumericInput extends Component { constructor(props) { super(props); this.state = { value: props.value || props.min }; this.setValue = this.setValue.bind(this); } UNSAFE_componentWillReceiveProps(newProps) { if (newProps.value !== this.state.value) this.setState({ value: newProps.value }); } setValue(value) { if (value != null && value >= this.props.min && value <= this.props.max) { this.setState({ value }); if (this.props.setProps) this.props.setProps({ value }); } } render() { const { size, theme, style, className, id, disabled, min, max } = this.props; const buttonStyle = { background: 'none', boxShadow: 'none', border: 'none', color: theme.secondary, cursor: 'pointer' }; const padding = Math.max( this.state.value ? 16 - 2 * this.state.value.toString().length : 16, 10 ); const inputStyle = { borderRadius: 3, border: theme.dark ? 'none' : `1px solid ${colors.GREY}`, outline: 'none', paddingRight: padding, paddingLeft: padding, paddingTop: 8, paddingBottom: 8, width: size || 56, color: theme.dark ? '#fff' : colors.OFF_WHITE, backgroundColor: theme.dark ? '#22272a' : '#fff', fontSize: 14, boxSizing: 'border-box' }; const elementName = getClassName('numericinput', theme); const filteredProps = getFilteredProps(this.props); return (
); } } NumericInput.defaultProps = { min: 0, max: 10, theme: light, labelPosition: 'top', persisted_props: ['value'], persistence_type: 'local', style: { display: 'flex', justifyContent: 'center' } }; NumericInput.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The value of numeric input */ value: PropTypes.number, /** * The size (length) of the numeric input in pixels */ size: PropTypes.number, /** * The minimum value of the numeric input */ min: PropTypes.number, /** * The maximum value of the numeric input */ max: PropTypes.number, /** * If true, numeric input cannot changed. */ disabled: PropTypes.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the numeric input label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object, /** * Dash-assigned callback that gets fired when selected * value changes. */ setProps: PropTypes.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']) }; const ThemedNumericInput = withTheme(NumericInput); ThemedNumericInput.defaultProps = NumericInput.defaultProps; export default ThemedNumericInput; ================================================ FILE: src/components/PowerButton.react.js ================================================ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { withTheme } from 'styled-components'; import { Container, Button } from '../styled/PowerButton.styled'; import PowerButtonSvg from '../helpers/PowerButtonSvg.react'; import Indicator from '../styled/shared/Indicator.styled'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import { light } from '../styled/constants'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; /** * A power button component can be * turned on and off. */ class PowerButton extends Component { constructor(props) { super(props); this.state = { on: this.props.on }; this.onClick = this.onClick.bind(this); } UNSAFE_componentWillReceiveProps(newProps) { if (newProps.on !== this.state.on) this.setState({ on: newProps.on }); } onClick() { const newOnValue = !this.state.on; this.setState({ on: newOnValue }); if (this.props.setProps) this.props.setProps({ on: newOnValue }); } render() { const { id, size, className, color, disabled, style, theme } = this.props; const INDICATOR_SIZE = (size / 10) * 1.25; const elementName = getClassName('powerbutton', theme); const filteredProps = getFilteredProps(this.props); return (
); } } PowerButton.defaultProps = { on: false, theme: light, size: 48, labelPosition: 'top', persisted_props: ['on'], persistence_type: 'local' }; PowerButton.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * Whether or not the power button is on */ on: PropTypes.bool, /** * The indicator color to display when power button is on */ color: PropTypes.string, /** * The size (diameter) of the power button in pixels */ size: PropTypes.number, /** * If true, power button cannot be clicked */ disabled: PropTypes.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the button. To control styling, pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the button label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object, /** * style to apply on switch on button */ onButtonStyle: PropTypes.object, /** * style to apply on switch off button */ offButtonStyle: PropTypes.object, /** * Dash-assigned callback that gets fired when * button is clicked. */ setProps: PropTypes.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `on` is allowed this prop can * normally be ignored. */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['on'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']) }; const ThemedPowerButton = withTheme(PowerButton); ThemedPowerButton.defaultProps = PowerButton.defaultProps; export default ThemedPowerButton; ================================================ FILE: src/components/PrecisionInput.react.js ================================================ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { withTheme } from 'styled-components'; import { Container, Digit, ExponentialDigit } from '../styled/PrecisionInput.styled'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import { light, colors } from '../styled/constants'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; import Input from './../helpers/NumericInput'; const defaultRootStyles = { display: 'flex', flexDirection: 'column', justifyContent: 'space-between', alignItems: 'center' }; /** * A numeric input component that converts * an input value to the desired precision. */ class PrecisionInput extends Component { constructor(props) { super(props); this.formatPrecision = this.formatPrecision.bind(this); this.setTempValue = this.setTempValue.bind(this); this.blur = this.blur.bind(this); this.setValue = this.setValue.bind(this); this.toggleInput = this.toggleInput.bind(this); this.state = { value: props.value != null ? this.formatPrecision(props.value) : this.formatPrecision(props.min), isInput: false, tempValue: null }; } UNSAFE_componentWillReceiveProps(newProps) { if (newProps.value != null && newProps.value !== this.state.value) this.setState({ value: this.formatPrecision(newProps.value) }); } formatPrecision(value) { return Number(Number(value.toPrecision(this.props.precision))); } setValue(value) { if (value != null && value >= this.props.min && value <= this.props.max) { const newValue = this.formatPrecision(value); this.setState({ value: newValue }); if (this.props.setProps) { this.props.setProps({ value: newValue }); } } } toggleInput() { if (this.props.disabled) return; const isInput = !this.state.isInput; this.setState({ isInput }); if (isInput) { this.setState({ tempValue: this.state.value }); } } setTempValue(tempValue) { this.setState({ tempValue }); } blur() { if (this.state.tempValue != null) { this.setValue(this.state.tempValue); } this.setState({ tempValue: null }); this.toggleInput(); } render() { const { id, className, style, size, theme, disabled, precision, min, max } = this.props; const buttonStyle = { background: 'none', boxShadow: 'none', border: 'none', color: theme.secondary, cursor: 'pointer' }; const MINIMUM_PADDING = 10; const dynamicPadding = this.state.value ? 16 - 2 * this.state.value.toString().length : 16; const padding = Math.max(dynamicPadding, MINIMUM_PADDING); const inputStyle = { borderRadius: 3, border: theme.dark ? 'none' : `1px solid ${colors.GREY}`, outline: 'none', paddingRight: padding, paddingLeft: padding, paddingTop: 4, paddingBottom: 4, width: size || 56 + precision * 20, height: 36, backgroundColor: theme.dark ? '#22272a' : '#fff', color: theme.dark ? '#fff' : '#000', fontSize: 14, lineHeight: 14, boxSizing: 'border-box' }; const elementName = getClassName('precisioninput', theme.dark); const filteredProps = getFilteredProps(this.props); let precisionElement; if (this.state.isInput) { precisionElement = ( ); } else { precisionElement = ( ); } return (
{precisionElement}
); } } const toScientificNotation = value => { const scientificNum = Number(value).toExponential(); return scientificNum.replace('+', ''); }; const mergeLeadingNegative = digits => { if (digits[0] === '-') { digits.shift(); const leading = digits.shift(); digits.unshift(`-${leading}`); } return digits; }; const PrecisionOutput = ({ value, onClick, size, elementName }) => { const [characteristic, mantissa] = toScientificNotation(value).split('e'); const characteristicDigits = mergeLeadingNegative(characteristic.split('')); const mantissaDigits = mergeLeadingNegative(mantissa.split('')); return ( {characteristicDigits.map((digit, i) => ( {digit} ))} E {mantissaDigits.map((digit, i) => ( {digit} ))} ); }; PrecisionInput.defaultProps = { min: 0, max: Number.MAX_SAFE_INTEGER, theme: light, labelPosition: 'top', precision: 2, persisted_props: ['value'], persistence_type: 'local' }; PrecisionInput.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The value of numeric input */ value: PropTypes.number, /** * The size (length) of the numeric input in pixels */ size: PropTypes.number, /** * The minimum value of the numeric input */ min: PropTypes.number, /** * The maximum value of the numeric input */ max: PropTypes.number, /** * Number of significant figures */ precision: PropTypes.number.isRequired, /** * If true, numeric input cannot be changed. */ disabled: PropTypes.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the scientific notation. To control styling, * pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the numeric input label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object, /** * Dash-assigned callback that gets fired when selected * value changes. */ setProps: PropTypes.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']) }; const ThemedPrecisionInput = withTheme(PrecisionInput); ThemedPrecisionInput.defaultProps = PrecisionInput.defaultProps; export default ThemedPrecisionInput; ================================================ FILE: src/components/Slider.react.js ================================================ import PropTypes from 'prop-types'; import React, { Component, Suspense } from 'react'; import { colors, light } from '../styled/constants'; import RealSlider from '../fragments/Slider.react'; // const RealSlider = lazy(() => import(/* webpackChunkName: "slider" */ '../fragments/Slider.react')); /** * A slider component with support for * a target value. */ export default class Slider extends Component { render() { return ( ); } } Slider.defaultProps = { theme: light, targets: {}, updatemode: 'mouseup', color: colors.DARKER_PRIMARY, min: 0, size: 265, labelPosition: 'bottom', persisted_props: ['value'], persistence_type: 'local', style: { display: 'flex', justifyContent: 'center' } }; Slider.propTypes = { /** * The ID used to identify this component in Dash callbacks */ id: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object, /** * Marks on the slider. * The key determines the position, * and the value determines what will show. * If you want to set the style of a specific mark point, * the value should be an object which * contains style and label properties. */ marks: PropTypes.shape({ number: PropTypes.oneOfType([ /** * The label of the mark */ PropTypes.string, /** * The style and label of the mark */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]) }), /** * Color configuration for the slider's track. */ color: PropTypes.oneOfType([ /** * Color used for slider's track/indicator */ PropTypes.string, /** * Color ranges configuration. */ PropTypes.shape({ /** * Fallback color to use when color.ranges * has gaps. */ default: PropTypes.string, /** * Display ranges as a gradient between given colors. * Requires color.ranges to be contiguous along * the entirety of the gauge's range of values. */ gradient: PropTypes.bool, /** * Define multiple color ranges on the slider's track. * The key determines the color of the range and * the value is the start,end of the range itself. */ ranges: PropTypes.shape({ color: PropTypes.arrayOf(PropTypes.number) }) }) ]), /** * The value of the input. */ value: PropTypes.number, /** * Additional CSS class for the root DOM node. */ className: PropTypes.string, /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * If true, the handles can't be moved. */ disabled: PropTypes.bool, /** * When the step value is greater than 1, * you can set the dots to true if you want to * render the slider with dots. * * Note: dots are disabled automatically when * using color.ranges */ dots: PropTypes.bool, /** * If the value is true, it means a continuous * value is included. Otherwise, it is an independent value. */ included: PropTypes.bool, /** * Minimum allowed value of the slider. */ min: PropTypes.number, /** * Maximum allowed value of the slider. */ max: PropTypes.number, /** * Value by which increments or decrements are made. */ step: PropTypes.number, /** * If true, the slider will be vertical. */ vertical: PropTypes.bool, /** * Size of the slider in pixels. */ size: PropTypes.number, /** * Targets on the slider. * The key determines the position, * and the value determines what will show. * If you want to set the style of a specific target point, * the value should be an object which * contains style and label properties. */ targets: PropTypes.shape({ number: PropTypes.oneOfType([ /** * The label of the mark */ PropTypes.string, /** * The style and label of the mark */ PropTypes.shape({ showCurrentValue: PropTypes.bool, label: PropTypes.string, color: PropTypes.string, style: PropTypes.object }) ]) }), /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Configuration of the slider handle's label. * Passing falsy value will disable the label. */ handleLabel: PropTypes.oneOfType([ /** * The label of the handle */ PropTypes.string, /** * The style and label of the handle */ PropTypes.shape({ showCurrentValue: PropTypes.bool, label: PropTypes.string, color: PropTypes.string, style: PropTypes.object }) ]), /** * Determines when the component should update * its value. If `mouseup`, then the slider * will only trigger its value when the user has * finished dragging the slider. If `drag`, then * the slider will update its value continuously * as it is being dragged. * Only use `drag` if your updates are fast. */ updatemode: PropTypes.oneOf(['mouseup', 'drag']), /** * Dash-assigned callback that gets fired when the value changes. */ setProps: PropTypes.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), /** * make slider same size of its parent */ fullSize: PropTypes.bool }; export const defaultProps = Slider.defaultProps; export const propTypes = Slider.propTypes; ================================================ FILE: src/components/StopButton.react.js ================================================ import React from 'react'; import PropTypes from 'prop-types'; import { withTheme } from 'styled-components'; import { Button } from '../styled/StopButton.styled'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; /** * A Stop button component */ const StopButton = props => { const { id, className, style, size, disabled, children, n_clicks, buttonText, theme } = props; const elementName = getClassName('stopbutton', theme); const filteredProps = getFilteredProps(props); return (
); }; StopButton.defaultProps = { buttonText: 'Stop', n_clicks: 0, size: 92, labelPosition: 'top' }; StopButton.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The size (width) of the stop button in pixels */ size: PropTypes.number, /** * Text displayed in the button */ buttonText: PropTypes.string, /** * Number of times the button was clicked */ n_clicks: PropTypes.number, /** * If true, button cannot be pressesd. */ disabled: PropTypes.bool, /** * The children of the button. */ children: PropTypes.node, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the button. * To control styling, pass an object with label and * style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object, /** * Dash-assigned callback that gets fired when the * button is clicked. */ setProps: PropTypes.func }; export default withTheme(StopButton); ================================================ FILE: src/components/Tank.react.js ================================================ import React, { useEffect, useRef } from 'react'; import PropTypes from 'prop-types'; import { withTheme } from 'styled-components'; import { TankContainer, TankFill, TickContainer, Tick, Container, ExceededWarning } from '../styled/Tank.styled'; import CurrentValue from '../styled/CurrentValue.styled'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import log from '../helpers/logarithm'; import { computeProgress, sanitizeRangeValue } from '../helpers/util'; import generateScale from '../helpers/scale'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; import { light } from '../styled/constants'; /** * A Tank component that fills to * a value between some range. */ const Tank = props => { const { min, max, showCurrentValue, units, className, id, style, color, logarithmic, base, height, width, theme } = props; const warningPara = useRef(null); const dirtyValue = logarithmic ? log.compute(props.value, base) : props.value; const currentDisplayValue = dirtyValue; const value = sanitizeRangeValue({ min, max, value: dirtyValue }); const colorValue = props.textColor || color; const percentageFill = computeProgress({ min, max, value }); const formatter = logarithmic ? log.generateLogFormatter({ base }) : null; const scale = generateScale({ ...props, formatter }); const elementName = getClassName('tank', theme); const currentValueStyle = props.currentValueStyle || (theme.dark ? { color: 'white' } : { color: 'black' }); const renderTicks = () => { return Object.entries(scale).map(([k, v]) => (
{(v && v.label) || v}
)); }; const scaleContainer = {renderTicks()}; const currentValue = ( {logarithmic ? log.formatValue(currentDisplayValue, base) : currentDisplayValue} ); const filteredProps = getFilteredProps(props); useEffect(() => { let currValue = logarithmic ? Math.pow(base || 10, currentDisplayValue) : currentDisplayValue; let maximum = logarithmic ? Math.pow(base || 10, max) : max; let minimum = logarithmic ? Math.pow(base || 10, min) : min; if (currValue > maximum) { let str = ''; warningPara.current.innerHTML = props.exceedMessage ? typeof props.exceedMessage == 'string' ? props.exceedMessage : props.exceedMessage(currValue, maximum) || str : str; } else if (currValue < minimum) { let str = ''; warningPara.current.innerHTML = props.lagingMessage ? typeof props.lagingMessage == 'string' ? props.lagingMessage : props.lagingMessage(currValue, minimum) || str : str; } else { warningPara.current.innerHTML = ''; } }, [currentDisplayValue]); return (
{scaleContainer} {showCurrentValue && currentValue}
); }; Tank.defaultProps = { min: 0, max: 10, height: 192, width: 112, base: 10, labelPosition: 'top', theme: light }; Tank.propTypes = { /** * The ID used to identify this component in Dash callbacks */ id: PropTypes.string, /** * The value of tank. If logarithmic, the displayed value * will be the logarithm of the inputted value. */ value: PropTypes.number, /** * The height of the tank in pixels */ height: PropTypes.number, /** * The width of the tank in pixels */ width: PropTypes.number, /** * The color of tank fill */ color: PropTypes.string, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * text style of current value */ currentValueStyle: PropTypes.object, /** * The minimum value of the tank. If logarithmic, * represents minimum exponent. */ min: PropTypes.number, /** * The maximum value of the tank. If logarithmic, * represents the maximum exponent. */ max: PropTypes.number, /** * Base to be used in logarithmic scale. */ base: PropTypes.number, /** * If set to true, a logarithmic scale will be * used. */ logarithmic: PropTypes.bool, /** * If true, the current value of the tank * will be displayed */ showCurrentValue: PropTypes.bool, /** * Label for the current value */ units: PropTypes.string, /** * Description to be displayed alongside the control. To control styling, * pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: PropTypes.shape({ /** * Value to start the scale from. Defaults * to min. */ start: PropTypes.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: PropTypes.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: PropTypes.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: PropTypes.oneOfType([ /** * Label for the mark */ PropTypes.number, /** * Style object with label */ PropTypes.shape({ style: PropTypes.string, label: PropTypes.string }) ]) }), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object, /** * Warning message when value exceed max */ exceedMessage: PropTypes.oneOfType([PropTypes.string]), /** * Warning message when value is laging from min */ lagingMessage: PropTypes.oneOfType([PropTypes.string]), /** * text color */ textColor: PropTypes.string }; export default withTheme(Tank); ================================================ FILE: src/components/Thermometer.react.js ================================================ import React from 'react'; import PropTypes from 'prop-types'; import { withTheme } from 'styled-components'; import { Bulb, CurrentValueContainer, ThermometerContainer } from '../styled/Thermometer.styled'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import { TankContainer, TankFill, TickContainer, Tick, Container } from '../styled/Tank.styled'; import CurrentValue from '../styled/CurrentValue.styled'; import { light } from '../styled/constants'; import log from '../helpers/logarithm'; import { sanitizeRangeValue, computeProgress } from '../helpers/util'; import generateScale from '../helpers/scale'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; /** * A thermometer component that * fills to a value between some * range */ const Thermometer = props => { const { min, max, id, className, style, logarithmic, base, showCurrentValue, units, theme, color, height, width } = props; const dirtyValue = logarithmic ? log.compute(props.value, base) : props.value; const value = sanitizeRangeValue({ min, max, value: dirtyValue }); const formatter = logarithmic ? log.generateLogFormatter({ base }) : null; const scale = generateScale({ ...props, formatter }); const elementName = getClassName('thermometer', theme); const renderTicks = () => { return Object.entries(scale).map(([k, v]) => (
{(v && v.label) || v}
)); }; const scaleContainer = {renderTicks()}; const currentValue = ( {logarithmic ? log.formatValue(value, base) : value.toFixed(1)} ); const filteredProps = getFilteredProps(props); return (
{scaleContainer} {theme.dark ? null : } {showCurrentValue && currentValue}
); }; Thermometer.defaultProps = { min: 0, max: 10, height: 192, width: 20, base: 10, labelPosition: 'top', theme: light }; Thermometer.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The value of thermometer. If logarthmic, the value * displayed will be the logarithm of the inputted value. */ value: PropTypes.number, /** * The height of the thermometer in pixels */ height: PropTypes.number, /** * The width of the thermometer in pixels */ width: PropTypes.number, /** * The color of the thermometer fill/current value text */ color: PropTypes.string, /** * The minimum value of the thermometer. If logarithmic, * represents the minimum exponent. */ min: PropTypes.number, /** * The maximum value of the thermometer. If logarithmic, * represents the maximum exponent. */ max: PropTypes.number, /** * Base to be used in logarithmic scale. */ base: PropTypes.number, /** * If set to true, a logarithmic scale will be * used. */ logarithmic: PropTypes.bool, /** * If true, the current value of the * thermometer will be displayed */ showCurrentValue: PropTypes.bool, /** * Label for the current value */ units: PropTypes.string, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]), /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Configuration for the component scale. */ scale: PropTypes.shape({ /** * Value to start the scale from. Defaults * to min. */ start: PropTypes.number, /** * Interval by which the scale goes up. Attempts * to dynamically divide min-max range by * default. */ interval: PropTypes.number, /** * Interval by which labels are added to * scale marks. Defaults to 2 (every other * mark has a label). */ labelInterval: PropTypes.number, /** * Custom scale marks. The key determines the position * and the value determines what will show. If you want * to set the style of a specific mark point, the value * should be an object which contains style and label * properties */ custom: PropTypes.oneOfType([ /** * Label for the mark */ PropTypes.number, /** * Style object with label */ PropTypes.shape({ style: PropTypes.string, label: PropTypes.string }) ]) }), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root component element. */ style: PropTypes.object }; export default withTheme(Thermometer); ================================================ FILE: src/components/ToggleSwitch.react.js ================================================ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { withTheme } from 'styled-components'; import Indicator from '../styled/shared/Indicator.styled'; import { Wrapper, ButtonContainer, Button, DarkSwitchContainer, DarkSwitch, RowContainer, RowLabel } from '../styled/ToggleSwitch.styled'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import { light } from '../styled/constants'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; function getLabelProps(label) { if (typeof label === 'object') { return { children: label.label, style: label.style }; } return { children: label, style: {} }; } /** * A switch component that toggles between * two values. */ class ToggleSwitch extends Component { constructor(props) { super(props); this.state = { value: props.value }; this.click = this.click.bind(this); } UNSAFE_componentWillReceiveProps(newProps) { if (newProps.value !== this.state.value) this.setState({ value: newProps.value }); } click() { if (!this.props.disabled) { const newValue = !this.state.value; this.setState({ value: newValue }); if (this.props.setProps) this.props.setProps({ value: newValue }); } } render() { const { id, className, style, label, labelPosition, booleanSwitch, theme, color, vertical, disabled } = this.props; const size = this.props.size || 45; let SwitchContainer = ButtonContainer; let Switch = Button; if (theme.dark && !booleanSwitch) { SwitchContainer = DarkSwitchContainer; Switch = DarkSwitch; } const indicatorSize = (size / 10) * 1.25; const doubleLabel = Array.isArray(label); const elementName = getClassName(booleanSwitch ? 'booleanswitch' : 'toggleswitch', theme.dark); const filteredProps = getFilteredProps(this.props); const switchCore = ( {!booleanSwitch && ( )} {!booleanSwitch && ( )} ); return (
{doubleLabel ? ( {switchCore} ) : ( {switchCore} )}
); } } ToggleSwitch.defaultProps = { value: false, vertical: false, theme: light, labelPosition: 'top', persisted_props: ['value'], persistence_type: 'local' }; ToggleSwitch.propTypes = { /** * The ID used to identify this compnent in Dash callbacks */ id: PropTypes.string, /** * The state of the switch */ value: PropTypes.bool, /** * The size of the switch */ size: PropTypes.number, /** * Color to highlight button/indicator */ color: PropTypes.string, /** * If true, switch will be vertical instead * of horizontal */ vertical: PropTypes.bool, /** * If true, switch cannot be clicked */ disabled: PropTypes.bool, /** * Theme configuration to be set by a ThemeProvider */ theme: PropTypes.object, /** * Description to be displayed alongside the control. To control styling, pass an object with label and style properties. */ label: PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }), /** * Multiple labels for both toggle states. The label at index 0 will be left * (or bottom if the switch is vertical), and the label at index 0 will be * on the right (or top if vertical) */ PropTypes.arrayOf( PropTypes.oneOfType([ /** * Label to be displayed */ PropTypes.string, /** * The style and label */ PropTypes.shape({ style: PropTypes.object, label: PropTypes.string }) ]) ) ]), /** * Where the component label is positioned. */ labelPosition: PropTypes.oneOf(['top', 'bottom']), /** * Class to apply to the root component element. */ className: PropTypes.string, /** * Style to apply to the root object. */ style: PropTypes.object, /** * Dash-assigned callback that gets fired when * switch is toggled. */ setProps: PropTypes.func, /** * Used to allow user interactions in this component to be persisted when * the component - or the page - is refreshed. If `persisted` is truthy and * hasn't changed from its previous value, a `value` that the user has * changed while using the app will keep that change, as long as * the new `value` also matches what was given originally. * Used in conjunction with `persistence_type`. */ persistence: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.number]), /** * Properties whose user interactions will persist after refreshing the * component or the page. Since only `value` is allowed this prop can * normally be ignored. */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * Where persisted user changes will be stored: * memory: only kept in memory, reset on page refresh. * local: window.localStorage, data is kept after the browser quit. * session: window.sessionStorage, data is cleared once the browser quit. */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']) }; const ThemedToggleSwitch = withTheme(ToggleSwitch); ThemedToggleSwitch.defaultProps = ToggleSwitch.defaultProps; export default ThemedToggleSwitch; ================================================ FILE: src/components/__tests__/.eslintrc ================================================ --- extends: ../../../node_modules/dash-components-archetype/config/eslint/eslintrc-test.json globals: expect: false ================================================ FILE: src/components/__tests__/BooleanSwitch.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { shallow, mount } from 'enzyme'; import sinon from 'sinon'; import BooleanSwitch from '../BooleanSwitch.react'; import Indicator from '../../styled/shared/Indicator.styled'; import { Wrapper, ButtonContainer, Button } from '../../styled/ToggleSwitch.styled'; import Label from '../../styled/shared/Label.styled'; import { dark } from '../../styled/constants'; describe('Boolean Switch', () => { it('renders', () => { const component = shallow(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount(); expect(component).toBeTruthy(); }); it('renders vertically if desired', () => { const component = mount(); expect(component.find(Wrapper).prop('rotate')).toBe(-90); }); it('calls setProps on click', () => { const setProps = sinon.spy(); const component = mount(); component.find('button').simulate('click'); expect(setProps.calledOnce).toBeTruthy(); expect(setProps.getCall(0).args[0].on).toBeTruthy(); }); it('does not change props when disabled and clicked', () => { const setProps = sinon.spy(); const component = mount(); expect(component.prop('on')).toBeFalsy(); component.find('button').simulate('click'); expect(component.prop('on')).toBeFalsy(); }); it('does not fire click event when disabled and clicked', () => { const eventReciever = sinon.spy(); const component = mount(); component.find('button').simulate('click'); expect(eventReciever.calledOnce).toBeFalsy(); }); it('handles absent setProps callbacks', () => { const component = mount(); component.find('button').simulate('click'); }); it('updates on when props change', () => { const component = mount(); expect(component.prop('on')).toBeFalsy(); component.setProps({ on: true }); expect(component.prop('on')).toBeTruthy(); }); it('does not update on when props change without on set', () => { const component = mount(shallow().get(0)); component.setProps(); expect(component.state('on')).toBeTruthy(); }); it('has assigned className', () => { const component = shallow(); expect(component.render().hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = shallow(); expect(component.render().prop('style')['width']).toBe(style['width']); }); it('has assigned id', () => { const component = shallow(); expect(component.render().prop('id')).toBe('testId'); }); it('positions label correctly', () => { const component = mount(); expect(component.find(Label).prop('position')).toBe('bottom'); }); it('displays indicators if desired', () => { const component = mount(); component.find(Indicator).forEach((node, index) => { if (index === 0) expect(node.prop('on')).toBeTruthy(); if (index === 1) expect(node.prop('on')).toBeTruthy(); // TODO: update when indicator API changed }); }); }); ================================================ FILE: src/components/__tests__/ColorPicker.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { shallow, mount } from 'enzyme'; import sinon from 'sinon'; import ColorPicker from '../../fragments/ColorPicker.react'; import Indicator from '../../styled/shared/Indicator.styled'; import { Wrapper, ButtonContainer, Button } from '../../styled/ToggleSwitch.styled'; import Label from '../../styled/shared/Label.styled'; import { dark } from '../../styled/constants'; describe('Color Picker', () => { it('renders', () => { const component = shallow(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount(); expect(component).toBeTruthy(); }); it('handles hex value', () => { const component = mount(shallow().get(0)); expect(component.state('value')).toEqual({ hex: '#ffffff' }); }); it('handles rgba value', () => { const component = mount( shallow().get(0) ); expect(component.state('value')).toEqual({ rgb: { r: 50, g: 100, b: 150, a: 0.8 } }); }); it('calls setProps callbacks', () => { const setProps = sinon.spy(); const component = mount(shallow().get(0)); component.instance().setValue({ hex: '#ffffff', rgb: '_' }); expect(setProps.calledOnce).toBeTruthy(); }); it('handles absent setProps callbacks', () => { const component = mount(shallow().get(0)); component.instance().setValue({ hex: '#ffffff', rgb: '_' }); expect(component).toBeTruthy(); }); it('does not explode when value set to null', () => { const component = mount(shallow().get(0)); component.instance().setValue(null); expect(component).toBeTruthy(); }); it('updates when props change', () => { const component = mount(shallow().get(0)); const oldColor = component.state('value'); component.setProps({ value: { hex: '#000000' } }); expect(component.render().prop('value')).not.toBe(oldColor); }); it('does not update on when props change without on set', () => { const component = mount(shallow().get(0)); component.setProps(); expect(component.state('value')).toEqual({ hex: '#ffffff' }); }); it('has assigned className', () => { const component = shallow(); expect(component.render().hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = shallow(); expect(component.render().prop('style')['width']).toBe(style['width']); }); it('has assigned id', () => { const component = shallow(); expect(component.render().prop('id')).toBe('testId'); }); it('positions label correctly', () => { const component = mount(); expect(component.find(Label).prop('position')).toBe('bottom'); }); }); ================================================ FILE: src/components/__tests__/Gauge.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { mount, shallow } from 'enzyme'; import Gauge from '../Gauge.react'; import GaugeSvg from '../../helpers/GaugeSvg.react'; import Label from '../../styled/shared/Label.styled'; import CurrentValue, { ValueLabel } from '../../styled/CurrentValue.styled'; import DarkThemeProvider from '../DarkThemeProvider.react'; describe.only('Gauge', () => { it('renders', () => { const component = mount(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount( ); expect(component).toBeTruthy(); }); describe('renders at multiple angles', () => { it('renders at min value', () => { const component = mount(shallow().get(0)); expect(component).toBeTruthy(); expect(component.find(GaugeSvg).prop('progress')).toBe(0); }); it('renders at small value', () => { const component = mount(shallow().get(0)); expect(component).toBeTruthy(); expect(component.find(GaugeSvg).prop('progress')).toBe(2.0 / 10); }); it('renders at medium value', () => { const component = mount(shallow().get(0)); expect(component).toBeTruthy(); expect(component.find(GaugeSvg).prop('progress')).toBe(5.0 / 10); }); it('renders at large value', () => { const component = mount(shallow().get(0)); expect(component).toBeTruthy(); expect(component.find(GaugeSvg).prop('progress')).toBe(7.0 / 10); }); it('renders at max value', () => { const component = mount(shallow().get(0)); expect(component).toBeTruthy(); expect(component.find(GaugeSvg).prop('progress')).toBe(1); }); }); it('has default marks', () => { const component = mount(shallow().get(0)); expect(component.find('line').hostNodes()).toHaveLength(12); }); it('has custom marks', () => { const scale = { custom: { 0: 'Low', 5: 'Medium', 10: 'High' } }; const component = mount(shallow().get(0)); expect(component.find('text').hostNodes()).toHaveLength(3); }); it('shows current value if set', () => { const component = mount(shallow().get(0)); const currValue = component.find(CurrentValue); expect(currValue).toHaveLength(1); expect(currValue.text()).toBe('5.0'); }); it('does not show current value if not set', () => { const component = mount(shallow().get(0)); expect(component.find(CurrentValue).hostNodes()).toHaveLength(0); }); it('shows current units if set', () => { const component = mount( shallow().get(0) ); const units = component.find(ValueLabel); expect(units).toHaveLength(1); expect(units.text()).toBe('testUnits'); }); it('does not show the current units if not set', () => { const component = mount(shallow().get(0)); expect(component.find(ValueLabel).hostNodes()).toHaveLength(0); }); it('handles logarithic mode', () => { const component = mount(shallow().get(0)); const currValue = component.find(CurrentValue); expect(currValue).toHaveLength(1); expect(currValue.text()).toBe('~104'); }); it('has assigned className', () => { const component = mount(); expect(component.hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = mount(); expect(component.prop('style')).toBe(style); }); it('has assigned id', () => { const component = mount(); expect(component.find('#testId').hostNodes()).toHaveLength(1); }); it('positions label correctly', () => { const component = mount(); expect(component.find(Label).prop('position')).toBe('bottom'); }); it('handles custom label style', () => { const component = mount(); const label = component.find(Label); expect(label).toHaveLength(1); expect(label.prop('style').color).toBe('blue'); }); it('custom test 2', () => { const component = mount( ); }); it('bug fix github issue 125', () => { const component = mount( shallow( ).get(0) ); expect(component).toBeTruthy(); expect(component.find(GaugeSvg).prop('color').ranges.red).toStrictEqual([8, 11]); }); }); ================================================ FILE: src/components/__tests__/GraduatedBar.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { mount, shallow } from 'enzyme'; import GraduatedBar from '../GraduatedBar.react'; import { Container, Block, Value } from '../../styled/GraduatedBar.styled'; import Label from '../../styled/shared/Label.styled'; import DarkThemeProvider from '../DarkThemeProvider.react'; import { light } from '../../styled/constants'; describe('Graduated Bar', () => { it('renders', () => { const component = mount(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount( ); expect(component).toBeTruthy(); }); it('renders with non finite percentage', () => { const component = mount(); expect(component).toBeTruthy(); }); it('renders correct amount of blocks', () => { const component = mount(); expect(component.find(Block)).toHaveLength(49); }); it('shows current value if set', () => { const component = mount(shallow().get(0)); const currValue = component.find(Value); expect(currValue).toHaveLength(1); expect(currValue.text()).toBe('50%'); }); it('does not show current value if not set', () => { const component = mount(shallow().get(0)); expect(component.find(Value).hostNodes()).toHaveLength(0); }); it('handles color scale correctly', () => { const colors = { ranges: { red: [0, 5], blue: [5, 10] } }; const hasCustomColor = block => block.prop('color') !== light.primary; const component = mount( shallow().get(0) ); const blocks = component.find(Block); blocks.forEach(block => { expect(hasCustomColor(block)).toBeTruthy(); }); }); it('has assigned className', () => { const component = mount(); expect(component.hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = mount(); expect(component.prop('style')).toBe(style); }); it('has assigned id', () => { const component = mount(); expect(component.find('#testId').hostNodes()).toHaveLength(1); }); it('positions label correctly', () => { const component = mount(); expect(component.find(Label).prop('position')).toBe('bottom'); }); it('handles custom label style', () => { const component = mount( ); const label = component.find(Label); expect(label).toHaveLength(1); expect(label.prop('style').color).toBe('blue'); }); it('handles gradient color scheme', () => { const gradient = { gradient: true, ranges: { green: [0, 5], yellow: [5, 7], red: [7, 10] } }; const component = mount(); const block = component.find(Block).first(); // we don't actually call `.css()` but this is an easy way to visualize the props being passed expect(block.prop('gradient').css()).toEqual( 'linear-gradient(to right, rgb(0, 128, 0) 0%, rgb(255, 255, 0) 50%, rgb(255, 0, 0) 70%, rgb(255, 0, 0) 100%)' ); }); }); ================================================ FILE: src/components/__tests__/Indicator.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { mount } from 'enzyme'; import Indicator from '../Indicator.react'; import IndicatorLight from '../../styled/shared/Indicator.styled'; import Label from '../../styled/shared/Label.styled'; import DarkThemeProvider from '../DarkThemeProvider.react'; describe.only('Thermometer', () => { it('renders', () => { const component = mount(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount( ); expect(component).toBeTruthy(); }); it('renders circular indicator if only height is set', () => { const component = mount(); expect(component.find(IndicatorLight).prop('rectangular')).toBeFalsy(); }); it('renders circular indicator if only width is set', () => { const component = mount(); expect(component.find(IndicatorLight).prop('rectangular')).toBeFalsy(); }); it('renders rectangular indicator if height and width are both set', () => { const component = mount(); expect(component.find(IndicatorLight).prop('rectangular')).toBeTruthy(); }); it('lights up when on', () => { const component = mount(); expect(component.find(IndicatorLight).prop('on')).toBeTruthy(); }); it('does not light up when off', () => { const component = mount(); expect(component.find(IndicatorLight).prop('on')).toBeFalsy(); }); it('has assigned className', () => { const component = mount(); expect(component.hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = mount(); expect(component.prop('style')).toBe(style); }); it('has assigned id', () => { const component = mount(); expect(component.find('#testId').hostNodes()).toHaveLength(1); }); it('positions label correctly', () => { const component = mount(); expect(component.find(Label).prop('position')).toBe('bottom'); }); it('handles custom label style', () => { const component = mount( ); const label = component.find(Label); expect(label).toHaveLength(1); expect(label.prop('style').color).toBe('blue'); }); }); ================================================ FILE: src/components/__tests__/Knob.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { mount, shallow } from 'enzyme'; import sinon from 'sinon'; import Knob from '../Knob.react'; import Container from '../../styled/Knob.styled'; import Label from '../../styled/shared/Label.styled'; import CurrentValue from '../../styled/CurrentValue.styled'; import DarkThemeProvider from '../DarkThemeProvider.react'; // mock mouseMove events const NEGATIVE_EVENT = { clientX: -10, clientY: -20 }; const ARBITRARY_START_X = 20, ARBITRARY_START_Y = 20; const MOCK_START_EVENT = { clientX: ARBITRARY_START_X, clientY: ARBITRARY_START_Y }; const ARBITRARY_END_X = 300, ARBITRARY_END_Y = 350; const MOCK_END_EVENT = { clientX: ARBITRARY_END_X, clientY: ARBITRARY_END_Y }; const MOCK_TOUCH_START_EVENT = { touches: [MOCK_START_EVENT] }; const MOCK_TOUCH_END_EVENT = { touches: [MOCK_END_EVENT] }; describe('Knob', () => { it('renders', () => { const component = mount(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount( ); expect(component).toBeTruthy(); }); it('renders disabled', () => { const component = mount(shallow().get(0)); expect(component).toBeTruthy(); }); it('does not allow noop to modify state', () => { const component = mount(shallow().get(0)); const stateBefore = component.state(); component.instance().noop(); expect(component.state()).toBe(stateBefore); }); it('updates value when props change', () => { const component = mount(); component.setProps({ value: 3 }); expect(component.prop('value')).toBe(3); }); it('does not update value on prop change with undefined value', () => { const component = mount(shallow().get(0)); component.setProps({ value: undefined }); expect(component.state('value')).toBe(2); }); it('updates value when setValue is called', () => { const component = mount(shallow().get(0)); component.instance().setValue(3); expect(component.state('value')).toBe(3); }); it('setProps is called when setValue is called', () => { const setProps = sinon.spy(); const component = mount(shallow().get(0)); component.instance().setValue(3); expect(setProps.calledOnce).toBeTruthy(); expect(setProps.getCall(0).args[0].value).toBe(3); }); it('setProps does not throw when not bound', () => { const component = mount(shallow().get(0)); component.instance().setValue(3); }); it('onMouseMove does not change state if not dragging', () => { const component = mount(shallow().get(0)); component.instance().onMouseMove(MOCK_START_EVENT); component.instance().onMouseMove(MOCK_END_EVENT); expect(component.state('value')).toBe(0); expect(component.state('currentDeg')).toBe(0); }); it('onMouseMove changes state if dragging', () => { const component = mount(shallow().get(0)); component.instance().onMouseDown(); component.instance().onMouseMove(MOCK_START_EVENT); component.instance().onMouseMove(MOCK_END_EVENT); component.instance().onMouseUp(); expect(component.state('value')).toBeGreaterThan(0); expect(component.state('currentDeg')).toBeGreaterThan(0); }); it('onMouseMove changes state if dragging (touch event)', () => { const component = mount(shallow().get(0)); component.instance().onMouseDown(); component.instance().onMouseMove(MOCK_TOUCH_START_EVENT); component.instance().onMouseMove(MOCK_TOUCH_END_EVENT); component.instance().onMouseUp(); expect(component.state('value')).toBeGreaterThan(0); expect(component.state('currentDeg')).toBeGreaterThan(0); }); it('onMouseMove does not change state if does not move (with double mouseUp simulation)', () => { const component = mount(shallow().get(0)); component.setState({ isDragging: true }); expect(component.state('isDragging')).toBeTruthy(); component.instance().onMouseDown(); component.instance().onMouseMove(NEGATIVE_EVENT); component.instance().onMouseMove(NEGATIVE_EVENT); component.instance().onMouseUp(); component.instance().onMouseUp(); expect(component.state('value')).toBe(0); expect(component.state('currentDeg')).toBe(0); }); it('unmount does not throw', () => { const component = mount(shallow().get(0)); component.instance().componentWillUnmount(); }); it('has default marks', () => { const component = mount(shallow().get(0)); expect(component.find('text').hostNodes()).toHaveLength(6); }); it('has custom marks', () => { const scale = { custom: { 0: 'Low', 5: 'Medium', 10: 'High' } }; const component = mount(shallow().get(0)); expect(component.find('text').hostNodes()).toHaveLength(3); }); it('has assigned className', () => { const component = mount(); expect(component.hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = mount(); expect(component.prop('style')).toBe(style); }); it('has assigned id', () => { const component = mount(); expect(component.find('#testId').hostNodes()).toHaveLength(1); }); it('positions label correctly', () => { const component = mount(); expect(component.find(Label).prop('position')).toBe('bottom'); }); it('handles custom label style', () => { const component = mount(); const label = component.find(Label); expect(label).toHaveLength(1); expect(label.prop('style').color).toBe('blue'); }); }); ================================================ FILE: src/components/__tests__/LEDDisplay.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { shallow, mount } from 'enzyme'; import LEDDisplay from '../LEDDisplay.react'; import Digit from '../../helpers/LEDDisplaySvg.react'; import Label from '../../styled/shared/Label.styled'; import DarkThemeProvider from '../DarkThemeProvider.react'; describe('LEDDisplay', () => { it('renders', () => { const component = shallow(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount( ); expect(component).toBeTruthy(); }); it('renders number correctly', () => { const component = mount(); const digits = component.find(Digit); expect(digits).toHaveLength(3); expect(digits.get(0).props.value).toBe('1'); expect(digits.get(1).props.value).toBe('2'); expect(digits.get(2).props.value).toBe('3'); }); it('renders strings correctly', () => { const component = mount(); const digits = component.find(Digit); expect(digits).toHaveLength(3); expect(digits.get(0).props.value).toBe('1'); expect(digits.get(1).props.value).toBe('2'); expect(digits.get(2).props.value).toBe('3'); }); it('renders decimal values correctly', () => { const component = mount(); const digits = component.find(Digit); expect(digits).toHaveLength(3); expect(digits.get(0).props.value).toBe('1'); expect(digits.get(0).props.hasDecimal).toBeTruthy(); expect(digits.get(1).props.value).toBe('2'); expect(digits.get(2).props.value).toBe('3'); }); it('renders colon values correctly', () => { const component = mount(); const digits = component.find(Digit); expect(digits).toHaveLength(3); expect(digits.get(0).props.value).toBe('1'); expect(digits.get(0).props.hasColon).toBeTruthy(); expect(digits.get(1).props.value).toBe('2'); expect(digits.get(2).props.value).toBe('3'); }); it('renders negative values correctly', () => { const component = mount(); const digits = component.find(Digit); expect(digits).toHaveLength(4); expect(digits.get(0).props.value).toBe('-'); expect(digits.get(1).props.value).toBe('1'); expect(digits.get(1).props.hasDecimal).toBeTruthy(); expect(digits.get(2).props.value).toBe('2'); expect(digits.get(3).props.value).toBe('3'); }); it('renders negative values without leading zeros correctly', () => { const component = mount(); const digits = component.find(Digit); expect(digits).toHaveLength(4); expect(digits.get(0).props.value).toBe('-'); expect(digits.get(1).props.value).toBe('0'); expect(digits.get(1).props.hasDecimal).toBeTruthy(); expect(digits.get(2).props.value).toBe('1'); expect(digits.get(3).props.value).toBe('2'); }); it('raise invalid input if minus sign is not in first position', () => { const component = mount(); expect(component.text()).toEqual(expect.stringContaining('Invalid Input')); }); it('handles bad input', () => { const component = mount(); expect(component.text()).toEqual(expect.stringContaining('Invalid Input')); }); it('adds leading zero if needed', () => { const component = mount(); const digits = component.find(Digit); expect(digits).toHaveLength(3); expect(digits.get(0).props.value).toBe('0'); expect(digits.get(0).props.hasDecimal).toBeTruthy(); expect(digits.get(1).props.value).toBe('1'); expect(digits.get(2).props.value).toBe('2'); }); it('has assigned className', () => { const component = shallow(); expect(component.render().hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = shallow(); expect(component.render().prop('style')['width']).toBe(style['width']); }); it('has assigned id', () => { const component = mount(); expect(component.find('#testId').hostNodes()).toHaveLength(1); }); it('positions label correctly', () => { const component = mount(); expect(component.find(Label).prop('position')).toBe('bottom'); }); it('handles custom label style', () => { const component = mount( ); const label = component.find(Label); expect(label).toHaveLength(1); expect(label.prop('style').color).toBe('blue'); }); }); ================================================ FILE: src/components/__tests__/NumericInput.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { mount, shallow } from 'enzyme'; import sinon from 'sinon'; import NumericInput from '../NumericInput.react'; import Label from '../../styled/shared/Label.styled'; import DarkThemeProvider from '../DarkThemeProvider.react'; describe.only('Numeric Input', () => { it('renders', () => { const component = mount(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount( ); expect(component).toBeTruthy(); }); it('updates value when props change', () => { const component = mount(); component.setProps({ value: 3 }); expect(component.prop('value')).toBe(3); }); it('does not update value on prop change without value set', () => { const component = mount(shallow().get(0)); component.setProps({}); expect(component.state('value')).toBe(2); }); it('updates value when setValue is called', () => { const component = mount(shallow().get(0)); component.instance().setValue(3); expect(component.state('value')).toBe(3); }); it('does not update value when setValue is called with null', () => { const component = mount(shallow().get(0)); component.instance().setValue(null); expect(component.state('value')).toBe(2); }); it('setProps is called when setValue is called', () => { const setProps = sinon.spy(); const component = mount(shallow().get(0)); component.instance().setValue(3); expect(setProps.calledOnce).toBeTruthy(); expect(setProps.getCall(0).args[0].value).toBe(3); }); it('setProps does not throw when not bound', () => { const component = mount(shallow().get(0)); component.instance().setValue(3); }); it('has assigned className', () => { const component = mount(); expect(component.hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = mount(); expect(component.prop('style')).toBe(style); }); it('has assigned id', () => { const component = mount(); expect(component.find('#testId').hostNodes()).toHaveLength(1); }); it('positions label correctly', () => { const component = mount(); expect(component.find(Label).prop('position')).toBe('bottom'); }); it('handles custom label style', () => { const component = mount( ); const label = component.find(Label); expect(label).toHaveLength(1); expect(label.prop('style').color).toBe('blue'); }); }); ================================================ FILE: src/components/__tests__/PowerButton.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { mount, shallow } from 'enzyme'; import sinon from 'sinon'; import PowerButton from '../PowerButton.react'; import Indicator from '../../styled/shared/Indicator.styled'; import LabelContainer from '../../styled/shared/LabelContainer.styled'; import Label from '../../styled/shared/Label.styled'; import DarkThemeProvider from '../DarkThemeProvider.react'; describe('Power Button', () => { it('renders', () => { const component = mount(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount( ); expect(component).toBeTruthy(); }); it('updates on when props change', () => { const component = mount(); expect(component.prop('on')).toBeFalsy(); component.setProps({ on: true }); expect(component.prop('on')).toBeTruthy(); }); it('does not update on value when props change without on set', () => { const component = mount(shallow().get(0)); component.setProps({}); expect(component.state('on')).toBeTruthy(); }); it('calls setProps on click', () => { const setProps = sinon.spy(); const component = mount(); component.find('button').simulate('click'); expect(setProps.calledOnce).toBeTruthy(); expect(setProps.getCall(0).args[0].on).toBeTruthy(); }); it('handles absent setProps callbacks', () => { const component = mount(); component.find('button').simulate('click'); }); it('has assigned className', () => { const component = mount(); expect(component.hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = mount(); expect(component.prop('style')).toBe(style); }); it('has assigned id', () => { const component = mount(); expect(component.find('#testId').hostNodes()).toHaveLength(1); }); it('positions label correctly', () => { const component = mount(); expect(component.find(LabelContainer).prop('labelPosition')).toBe('bottom'); }); it('handles custom label style', () => { const component = mount( ); const label = component.find(Label); expect(label).toHaveLength(1); expect(label.prop('style').color).toBe('blue'); }); }); ================================================ FILE: src/components/__tests__/PrecisionInput.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { mount, shallow } from 'enzyme'; import sinon from 'sinon'; import PrecisionInput from '../PrecisionInput.react'; import { Container, Digit, ExponentialDigit } from '../../styled/PrecisionInput.styled'; import Label from '../../styled/shared/Label.styled'; import DarkThemeProvider from '../DarkThemeProvider.react'; describe.only('Precision Input', () => { it('renders', () => { const component = mount(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount( ); expect(component).toBeTruthy(); }); it('displays correct value', () => { const component = mount(shallow().get(0)); let digits = component.find(Digit); let exponentials = component.find(ExponentialDigit); expect(digits.length).toBe(3); expect(exponentials.length).toBe(2); expect(digits.at(0).text()).toBe('1'); expect(digits.at(2).text()).toBe('2'); expect(exponentials.at(1).text()).toBe('2'); }); it('displays updates with correct value', () => { let component = mount(shallow().get(0)); const componentInstance = component.instance(); componentInstance.toggleInput(); componentInstance.setValue(12300); componentInstance.toggleInput(); component = component.update(); let digits = component.find(Digit); let exponentials = component.find(ExponentialDigit); expect(digits.length).toBe(4); expect(exponentials.length).toBe(2); expect(digits.at(0).text()).toBe('1'); expect(digits.at(2).text()).toBe('2'); expect(digits.at(3).text()).toBe('3'); expect(exponentials.at(1).text()).toBe('4'); }); it('updates value when props change', () => { const component = mount(); component.setProps({ value: 3 }); expect(component.prop('value')).toBe(3); }); it('does not update value on prop change without value set', () => { const component = mount(shallow().get(0)); component.setProps({}); expect(component.state('value')).toBe(2); }); it('updates value when setValue is called', () => { const component = mount(shallow().get(0)); component.instance().setValue(3); expect(component.state('value')).toBe(3); }); it('does not update value when setValue is called with null', () => { const component = mount(shallow().get(0)); component.instance().setValue(null); expect(component.state('value')).toBe(2); }); it('setProps is called when setValue is called', () => { const setProps = sinon.spy(); const component = mount(shallow().get(0)); component.instance().setValue(3); expect(setProps.calledOnce).toBeTruthy(); expect(setProps.getCall(0).args[0].value).toEqual(3); }); it('setProps is called when setValue with corrected decimal value', () => { const setProps = sinon.spy(); const component = mount( shallow().get(0) ); component.instance().setValue(1234); expect(setProps.calledOnce).toBeTruthy(); expect(setProps.getCall(0).args[0].value).toEqual(1200); }); it('setProps does not throw when not bound', () => { const component = mount(shallow().get(0)); component.instance().setValue(3); }); it('if tempValue is set, state is updated to tempValue on blur', () => { const setProps = sinon.spy(); const component = mount( shallow().get(0) ); component.instance().setTempValue(123); component.instance().blur(); expect(component.state('value')).toEqual(120); }); it('does not change value when blur is called with tempValue set to null', () => { const component = mount(shallow().get(0)); component.instance().setTempValue(null); component.instance().blur(); expect(component.state('value')).toEqual(2); }); it('has assigned className', () => { const component = mount(); expect(component.hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = mount(); expect(component.prop('style')).toBe(style); }); it('has assigned id', () => { const component = mount(); expect(component.find('#testId').hostNodes()).toHaveLength(1); }); it('positions label correctly', () => { const component = mount(); expect(component.find(Label).prop('position')).toBe('bottom'); }); it('handles custom label style', () => { const component = mount( ); const label = component.find(Label); expect(label.length).toBe(1); expect(label.prop('style').color).toBe('blue'); }); }); ================================================ FILE: src/components/__tests__/Slider.test.js ================================================ /* eslint-disable */ import React from 'react'; import ReactSlider from 'rc-slider'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { shallow, mount } from 'enzyme'; import sinon from 'sinon'; import Slider from '../../fragments/Slider.react'; import { SliderContainer, Handle, HandleContainer, targetStyles, Label as SliderLabel } from '../../styled/Slider.styled'; import Label from '../../styled/shared/Label.styled'; import { dark } from '../../styled/constants'; describe('Slider', () => { it('renders', () => { const component = shallow(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount(); expect(component).toBeTruthy(); }); it('renders contiguous range', () => { const color = { default: 'ffffff', ranges: { blue: [0, 5], red: [5, 10] } }; const component = mount(shallow().get(0)); expect(component).toBeTruthy(); }); it('renders contiguous range with gradient', () => { const color = { default: 'ffffff', ranges: { blue: [0, 5], red: [5, 10] } }; const component = mount(shallow().get(0)); expect(component).toBeTruthy(); }); it('renders non-contiguous range', () => { const color = { default: 'ffffff', ranges: { blue: [1, 5], red: [7, 9] } }; const component = mount(shallow().get(0)); expect(component).toBeTruthy(); }); it('renders contiguous range in dark mode', () => { const color = { default: 'ffffff', ranges: { blue: [0, 5], red: [5, 10] } }; const component = mount( shallow().get(0) ); expect(component).toBeTruthy(); }); it('renders non-contiguous range in dark mode', () => { const color = { default: 'ffffff', ranges: { blue: [1, 5], red: [7, 9] } }; const component = mount(shallow().get(0)); expect(component).toBeTruthy(); }); it('assigns correct value to slider', () => { const component = mount(); const slider = component.find(ReactSlider); expect(slider.prop('value')).toBe(10); }); it('renders custom handle label if desired', () => { const handleLabel = { showCurrentValue: true, label: 'test_title' }; const component = mount( ); const handle = component.find(HandleContainer); const label = component.find(SliderLabel); expect(handle).toHaveLength(1); expect(handle.prop('isTarget')).toBeFalsy(); expect(label).toHaveLength(1); expect(label.text()).toBe('test_title10'); }); it('correctly calculates label offset', () => { const component = mount(shallow().get(0)); expect(component.instance().calcLabelOffset({ vertical: true })).toBe(null); expect(component.instance().calcLabelOffset({ marks: {}, labelPosition: 'bottom' })).toBe( 'transform: translateY(20px);' ); }); it('renders simple handle label', () => { const component = mount(); const label = component.find(SliderLabel); expect(label).toHaveLength(1); expect(label.text()).toBe('test_label'); }); it('calls setprops correclty on mouseup mode', () => { const setProps = sinon.spy(); const component = mount(shallow().get(0)); component.instance().onChange(11); expect(setProps.notCalled).toBeTruthy(); component.instance().onAfterChange(11); expect(setProps.calledOnce).toBeTruthy(); expect(setProps.getCall(0).args[0].value).toBe(11); }); it('calls setprops correclty on drag mode', () => { const setProps = sinon.spy(); const component = mount(shallow().get(0)); component.instance().onChange(11); expect(setProps.calledOnce).toBeTruthy(); expect(setProps.getCall(0).args[0].value).toBe(11); component.instance().onAfterChange(12); expect(setProps.calledOnce).toBeTruthy(); }); it('does not explode when setprops is not passed', () => { const component = mount(shallow().get(0)); component.instance().onChange(11); component.instance().onAfterChange(11); expect(component).toBeTruthy(); const dragComponent = mount(shallow().get(0)); dragComponent.instance().onChange(11); dragComponent.instance().onAfterChange(11); expect(dragComponent).toBeTruthy(); }); it('handles updated props', () => { const color = { default: 'ffffff', ranges: { blue: [0, 5], red: [5, 10] } }; const component = mount(shallow().get(0)); const beforeState = { value: component.state('value'), trackStyle: component.state('trackStyle') }; component.setProps({}); expect(component.state('value')).toBe(beforeState.value); expect(component.state('trackStyle')).toEqual(beforeState.trackStyle); const newValue = 2; const newColor = { default: '000000', ranges: { blue: [0, 6], red: [6, 10] } }; component.setProps({ value: newValue, color: newColor }); expect(component.render().prop('value')).not.toBe(beforeState.value); expect(component.render().prop('trackStyle')).not.toEqual(beforeState.trackStyle); }); it('renders custom targets', () => { const component = mount( ); const target = component.find(SliderLabel).filterWhere(label => label.prop('isTarget')); expect(target).toHaveLength(3); expect(target.at(0).text()).toBe('test_target'); expect(target.at(1).text()).toBe('other_target60'); expect(target.at(2).text()).toBe('one_more_target'); }); it('has assigned className', () => { const component = shallow(); expect(component.render().hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = shallow(); expect(component.render().prop('style')['width']).toBe(style['width']); }); it('has assigned id', () => { const component = shallow(); expect(component.render().prop('id')).toBe('testId'); }); it('positions label correctly', () => { const component = mount(); expect(component.find(Label).prop('position')).toBe('bottom'); }); }); ================================================ FILE: src/components/__tests__/StopButton.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { mount } from 'enzyme'; import sinon from 'sinon'; import StopButton from '../StopButton.react'; import LabelContainer from '../../styled/shared/LabelContainer.styled'; import Label from '../../styled/shared/Label.styled'; import DarkThemeProvider from '../DarkThemeProvider.react'; describe('Stop Button', () => { it('renders', () => { const component = mount(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount( {' '} ); expect(component).toBeTruthy(); }); it('sets custom button text', () => { const component = mount(custom_text); expect(component.render().text()).toBe('custom_text'); }); it('calls setProps with n_clicks', () => { const setProps = sinon.spy(); const component = mount(); component.find('button').simulate('click'); expect(setProps.calledOnce).toBeTruthy(); expect(setProps.getCall(0).args[0].n_clicks).toBe(1); }); it('handles unbound setProps prop', () => { const component = mount(); component.find('button').simulate('click'); }); it('has assigned id', () => { const component = mount(); expect(component.find('#testId').hostNodes()).toHaveLength(1); }); it('has assigned className', () => { const component = mount(); expect(component.hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = mount(); expect(component.prop('style')).toBe(style); }); it('positions label correctly', () => { const component = mount(); expect(component.find(LabelContainer).prop('labelPosition')).toBe('bottom'); }); it('handles custom label style', () => { const component = mount( ); const label = component.find(Label); expect(label).toHaveLength(1); expect(label.prop('style').color).toBe('blue'); }); }); ================================================ FILE: src/components/__tests__/Tank.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { shallow, mount } from 'enzyme'; import Tank from '../Tank.react'; import { Tick } from '../../styled/Tank.styled'; import Label from '../../styled/shared/Label.styled'; import CurrentValue, { ValueLabel } from '../../styled/CurrentValue.styled'; import DarkThemeProvider from '../DarkThemeProvider.react'; describe('Tank', () => { it('renders', () => { const component = shallow(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount( ); expect(component).toBeTruthy(); }); it('shows current value if set', () => { const component = mount(shallow().get(0)); const currValue = component.find(CurrentValue); expect(currValue).toHaveLength(1); expect(currValue.text()).toBe('5'); }); it('does not show current value if not set', () => { const component = mount(shallow().get(0)); expect(component.find(CurrentValue)).toHaveLength(0); }); it('shows current units if set', () => { const component = mount( shallow().get(0) ); const units = component.find(ValueLabel); expect(units).toHaveLength(1); expect(units.text()).toBe('testUnits'); }); it('does not show the current units if not set', () => { const component = mount(shallow().get(0)); expect(component.find(ValueLabel)).toHaveLength(0); }); it('has default marks', () => { const component = mount(); expect(component.find(Tick)).toHaveLength(11); }); it('has custom scale', () => { const scale = { custom: { 0: 'Low', 5: 'Medium', 10: 'High' } }; const component = mount(); expect(component.find(Tick)).toHaveLength(3); }); it('has custom mark styling', () => { const scale = { custom: { 0: { style: { color: 'blue' }, label: '_' } } }; const component = mount(); const tickText = component .find(Tick) .render() .children('.label') .children(); expect(tickText).toHaveLength(1); expect(tickText.prop('style').color).toBe('blue'); }); it('handles logarithmic scale', () => { const component = mount(); const currValue = component.find(CurrentValue); expect(currValue).toHaveLength(1); expect(currValue.text()).toBe('~104'); }); it('has assigned className', () => { const component = mount(); expect(component.hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = mount(); expect(component.prop('style')).toBe(style); }); it('has assigned id', () => { const component = mount(); expect(component.find('#testId').hostNodes()).toHaveLength(1); }); it('positions label correctly', () => { const component = mount(); expect(component.find(Label).prop('position')).toBe('bottom'); }); it('handles custom label style', () => { const component = mount(); const label = component.find(Label); expect(label).toHaveLength(1); expect(label.prop('style').color).toBe('blue'); }); }); ================================================ FILE: src/components/__tests__/Thermometer.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { mount, shallow } from 'enzyme'; import Thermometer from '../Thermometer.react'; import { Bulb } from '../../styled/Thermometer.styled'; import { Tick } from '../../styled/Tank.styled'; import CurrentValue, { ValueLabel } from '../../styled/CurrentValue.styled'; import Label from '../../styled/shared/Label.styled'; import DarkThemeProvider from '../DarkThemeProvider.react'; describe.only('Thermometer', () => { it('renders', () => { const component = mount(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount( ); expect(component).toBeTruthy(); }); it('shows current value if set', () => { const component = mount(shallow().get(0)); const currValue = component.find(CurrentValue); expect(currValue).toHaveLength(1); expect(currValue.text()).toBe('5.0'); }); it('does not show current value if not set', () => { const component = mount(shallow().get(0)); expect(component.find(CurrentValue).hostNodes()).toHaveLength(0); }); it('shows current units if set', () => { const component = mount( shallow().get(0) ); const units = component.find(ValueLabel); expect(units).toHaveLength(1); expect(units.text()).toBe('testUnits'); }); it('does not show the current units if not set', () => { const component = mount(shallow().get(0)); expect(component.find(ValueLabel).hostNodes()).toHaveLength(0); }); it('has default marks', () => { const component = mount(); expect(component.find(Tick)).toHaveLength(11); }); it('has custom marks', () => { const scale = { custom: { 0: 'Low', 5: 'Medium', 10: 'High' } }; const component = mount(); expect(component.find(Tick)).toHaveLength(3); }); it('fills the bulb on non min value', () => { const component = mount(); expect(component.find(Bulb).prop('on')).toBeTruthy(); }); it('does not fill the bulb on min value', () => { const component = mount(); expect(component.find(Bulb).prop('on')).toBeFalsy(); }); it('has custom mark styling', () => { const scale = { custom: { 0: { style: { color: 'blue' }, label: '_' } } }; const component = mount(); const tickText = component .find(Tick) .render() .children('.label'); expect(tickText).toHaveLength(1); expect(tickText.prop('style').color).toBe('blue'); }); it('handles logarithmic scale', () => { const component = mount(); const currValue = component.find(CurrentValue); expect(currValue).toHaveLength(1); expect(currValue.text()).toBe('~104'); }); it('has assigned className', () => { const component = mount(); expect(component.hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = mount(); expect(component.prop('style')).toBe(style); }); it('has assigned id', () => { const component = mount(); expect(component.find('#testId').hostNodes()).toHaveLength(1); }); it('positions label correctly', () => { const component = mount(); expect(component.find(Label).prop('position')).toBe('bottom'); }); it('handles custom label style', () => { const component = mount( ); const label = component.find(Label); expect(label).toHaveLength(1); expect(label.prop('style').color).toBe('blue'); }); }); ================================================ FILE: src/components/__tests__/ToggleSwitch.test.js ================================================ /* eslint-disable */ import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; Enzyme.configure({ adapter: new Adapter() }); import { shallow, mount } from 'enzyme'; import sinon from 'sinon'; import ToggleSwitch from '../ToggleSwitch.react'; import Indicator from '../../styled/shared/Indicator.styled'; import { Wrapper, ButtonContainer, Button, RowLabel } from '../../styled/ToggleSwitch.styled'; import Label from '../../styled/shared/Label.styled'; import { dark } from '../../styled/constants'; describe('Toggle Switch', () => { it('renders', () => { const component = shallow(); expect(component).toBeTruthy(); }); it('renders dark theme', () => { const component = mount(); expect(component).toBeTruthy(); }); it('renders vertically if desired', () => { const component = mount(); expect(component.find(Wrapper).prop('rotate')).toBe(-90); }); it('calls setProps on click', () => { const setProps = sinon.spy(); const component = mount(); component.find('button').simulate('click'); expect(setProps.calledOnce).toBeTruthy(); expect(setProps.getCall(0).args[0].value).toBeTruthy(); }); it('handles absent setProps callbacks', () => { const component = mount(); component.find('button').simulate('click'); }); it('updates value when props change', () => { const component = mount(); expect(component.prop('value')).toBeFalsy(); component.setProps({ value: true }); expect(component.prop('value')).toBeTruthy(); }); it('does not update value when props change if value not set', () => { const component = mount(shallow().get(0)); component.setProps({}); expect(component.state('value')).toBeTruthy(); }); it('has assigned className', () => { const component = shallow(); expect(component.render().hasClass('testClass')).toBeTruthy(); }); it('has assigned styles', () => { const style = { width: '600px' }; const component = shallow(); expect(component.render().prop('style')['width']).toBe(style['width']); }); it('has assigned id', () => { const component = shallow(); expect(component.render().prop('id')).toBe('testId'); }); it('positions label correctly', () => { const component = mount(); expect(component.find(Label).prop('position')).toBe('bottom'); }); it('displays indicators if desired', () => { const component = mount(); component.find(Indicator).forEach((node, index) => { if (index === 0) expect(node.prop('on')).toBeTruthy(); if (index === 1) expect(node.prop('on')).toBeTruthy(); // TODO: update when indicator API changed }); }); it('displays multiple labels if desired', () => { const component = mount( ); component.find(RowLabel).forEach((node, index) => { if (index === 0) expect(node.prop('children')).toBeTruthy(); if (index === 1) expect(node.prop('children')).toBeTruthy(); }); const verticalComponent = mount( ); verticalComponent.find(RowLabel).forEach((node, index) => { if (index === 0) expect(node.prop('children')).toBeTruthy(); if (index === 1) expect(node.prop('children')).toBeTruthy(); }); }); }); ================================================ FILE: src/fragments/ColorPicker.react.js ================================================ import React, { Component } from 'react'; import { ChromePicker } from 'react-color'; import { withTheme } from 'styled-components'; import Color from 'color'; import { colors } from '../styled/constants'; import { Container } from '../styled/ColorPicker.styled'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import { defaultProps, propTypes } from '../components/ColorPicker.react'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; const DEFAULT_COLOR = colors.PRIMARY; const parseValue = value => { value = value || {}; if (value.rgb) { const rgba = Object.values(value.rgb); return `rgba(${rgba[0]}, ${rgba[1]}, ${rgba[2]}, ${rgba[3]})`; } if (value.hex) return Color(value.hex) .rgb() .string(); return DEFAULT_COLOR; }; /** * A color picker. */ class ColorPicker extends Component { constructor(props) { super(props); this.state = { value: props.value }; this.calcHandleGlow = this.calcHandleGlow.bind(this); this.setValue = this.setValue.bind(this); } UNSAFE_componentWillReceiveProps(newProps) { if (newProps.value !== this.state.value) this.setState({ value: newProps.value }); } calcHandleGlow() { return Color(parseValue(this.state.value)) .fade(0.5) .string(); } setValue(value) { if (value != null) { const { hex, rgb } = value; const newValue = { hex, rgb }; this.setState({ value: newValue }); if (this.props.setProps) this.props.setProps({ value: newValue }); } } render() { const { id, className, style, theme } = this.props; const elementName = getClassName('colorpicker', theme); const filteredProps = getFilteredProps(this.props); return (
); } } ColorPicker.defaultProps = defaultProps; ColorPicker.propTypes = propTypes; export default withTheme(ColorPicker); ================================================ FILE: src/fragments/Slider.react.js ================================================ import React, { Component } from 'react'; import ReactSlider from 'rc-slider'; import { withTheme } from 'styled-components'; import { omit } from 'ramda'; import deepEqual from 'deep-equal'; import { getLinearGradientCSS, isContiguous, getColorValue } from '../helpers/colorRanges'; import LabelContainer from '../styled/shared/LabelContainer.styled'; import 'rc-slider/assets/index.css'; import { SliderContainer, Handle, HandleContainer, targetStyles, Label } from '../styled/Slider.styled'; import { defaultProps, propTypes } from '../components/Slider.react'; import { getClassName, getFilteredProps } from '../helpers/classNameGenerator'; const renderHandle = (props, { isTarget, showLabel } = {}) => { const label = ( ); return ( {showLabel && label} ); }; const getTrackStyle = props => { if (!props.color.ranges || !isContiguous(props)) { const colorValue = getColorValue(props.color); return { trackStyle: { backgroundColor: colorValue }, activeDotStyle: props.theme.dark ? { background: colorValue, boxShadow: `0 0 6px 1px ${colorValue}` } : { borderColor: colorValue } }; } return { railStyle: { backgroundImage: `${getLinearGradientCSS(props)}, linear-gradient(0deg, #000, #000)`, backgroundBlendMode: props.theme.dark ? 'none' : 'overlay' }, trackStyle: { mixBlendMode: 'overlay', background: props.theme.dark ? '#fff' : '#000' }, dotStyle: { display: 'none' } }; }; /** * A slider component with support for * a target value. */ class Slider extends Component { constructor(props) { super(props); this.state = { value: props.value != null ? props.value : props.min, trackStyle: getTrackStyle(props) }; this.onChange = this.onChange.bind(this); this.onAfterChange = this.onAfterChange.bind(this); this.renderSliderHandle = this.renderSliderHandle.bind(this); this.renderTargets = this.renderTargets.bind(this); this.calcLabelOffset = this.calcLabelOffset.bind(this); } UNSAFE_componentWillReceiveProps(newProps) { const updates = {}; const filteredProps = getFilteredProps(this.props); if (typeof newProps.value !== 'undefined' && newProps.value !== this.state.value) { updates.value = newProps.value; } if (!deepEqual(newProps.color, this.props.color)) { updates.trackStyle = getTrackStyle({ ...filteredProps, ...newProps }); } this.setState(updates); } onChange(value) { const { updatemode, setProps } = this.props; if (!this.props.value || updatemode !== 'drag') { this.setState({ value }); } if (updatemode === 'drag') { if (setProps) setProps({ value }); } } onAfterChange(value) { const { updatemode, setProps } = this.props; if (updatemode === 'mouseup') { if (setProps) setProps({ value }); } } renderSliderHandle(props) { const { handleLabel } = this.props; const filteredProps = getFilteredProps(this.props); let handleProps = { ...filteredProps, ...props }; if (!handleLabel) { return renderHandle(handleProps); } const value = handleLabel.showCurrentValue && this.state.value; handleProps = { ...handleProps, value, label: handleLabel.label || (handleLabel instanceof Object ? ' ' : handleLabel), color: handleLabel.color || getColorValue(this.props.color), style: handleLabel.style }; return renderHandle(handleProps, { showLabel: true }); } renderTargets() { const filteredProps = getFilteredProps(this.props); return Object.entries(this.props.targets).reduce((acc, [k, v]) => { const props = { ...filteredProps, label: v.label || v, value: v.showCurrentValue && k, color: v.color, style: v.style }; const Handle = renderHandle(props, { isTarget: true, showLabel: !!v }); // use rc-slider's props.marks format acc[k] = { style: targetStyles, label: Handle }; return acc; }, {}); } calcLabelOffset({ vertical, labelPosition, marks, targets, handleLabel }) { if (vertical) return null; if (labelPosition === 'bottom') { return `transform: translateY(${marks ? 20 : 0}px);`; } let showingCurrentValue = false; Object.values(targets).map(target => { if (target.showCurrentValue) showingCurrentValue = true; }); if (handleLabel && handleLabel.showCurrentValue) { showingCurrentValue = true; } return `transform: translateY(${showingCurrentValue ? -38 : -16}px);`; } render() { const { value } = this.state; const { className, id, theme, label, size, vertical, style, marks } = this.props; const elementName = getClassName('slider', theme.dark); const filteredProps = getFilteredProps(this.props); let cssStyle = this.props.vertical ? { ...style, marginLeft: '45px' } : { ...style, marginTop: '45px' }; cssStyle = this.props.fullSize ? this.props.vertical ? { ...cssStyle, height: '100%' } : { ...cssStyle, width: '100%' } : cssStyle; return (
); } } Slider.defaultProps = defaultProps; Slider.propTypes = propTypes; export default withTheme(Slider); ================================================ FILE: src/helpers/GaugeSvg.react.js ================================================ import React from 'react'; import { light } from '../styled/constants'; import darkGradientDefs from '../styled/shared/DarkGradient'; import { getRandomInt } from '../helpers/util'; import { drawScale, colorRangesTrack, lightTrack } from './shared/TrackSvg'; const lightNeedleKnob = ({ CX, CY }) => ( ); const darkNeedleKnob = ({ CX, CY }) => { const id = getRandomInt(); return ( ); }; const darkTrack = (props, dimensions) => { const { progress } = props; const { CX, CY, GAUGE_RAD, CIRCLE_CIR, GAP_ARC_LENGTH, TRACK_ARC_LENGTH } = dimensions; const id = getRandomInt(); const colorValue = props.color && (typeof props.color === 'string' ? props.color : props.color.default); return ( {props.color && props.color.ranges && ( )} {props.color && props.color.ranges && colorRangesTrack(props, dimensions)} ); }; const needle = (needleRotation, { CX, CY, SCALE_RAD }) => ( ); const defs = {darkGradientDefs}; const GaugeSvg = props => { const { progress, min, max, step, scale } = props; const dimensions = calcDimensions(props); const scaleItems = drawScale({ min, max, step, scale }, dimensions); const knob = props.theme.dark ? darkNeedleKnob(dimensions) : lightNeedleKnob(dimensions); const track = props.theme.dark ? darkTrack(props, dimensions) : lightTrack(props, dimensions); const needleRotation = 270 * progress - 225; return ( {props.theme.dark && defs} {scaleItems} {needle(needleRotation, dimensions)} {knob} {track} ); }; GaugeSvg.defaultProps = { theme: light, size: 208 }; export default GaugeSvg; // private helpers function calcDimensions({ size }) { const OFFSET = 8; const d = {}; d.SVG_WIDTH = size + 32; d.CY = ~~(d.SVG_WIDTH / 2); d.CX = ~~(d.SVG_WIDTH / 2); d.GAUGE_RAD = size / 2; d.SCALE_RAD = d.GAUGE_RAD - OFFSET; d.CIRCLE_CIR = 2 * Math.PI * d.GAUGE_RAD; d.GAP_ARC_LENGTH = (90 / 360) * (2 * Math.PI * d.GAUGE_RAD); d.TRACK_ARC_LENGTH = d.CIRCLE_CIR - d.GAP_ARC_LENGTH; d.SCALE_TICK_OUTER_RAD = d.SCALE_RAD; d.SCALE_TICK_INNER_RAD = d.SCALE_TICK_OUTER_RAD - 6; d.SCALE_TEXT_RAD = d.SCALE_TICK_INNER_RAD - 8; d.IS_GAUGE = true; return d; } ================================================ FILE: src/helpers/KnobSvg.react.js ================================================ import React from 'react'; import { light } from '../styled/constants'; import darkGradientDefs from '../styled/shared/DarkGradient'; import { getRandomInt } from './util'; import { drawScale, colorRangesTrack, lightTrack } from './shared/TrackSvg'; import { getColorValue } from './colorRanges'; const START_ANGLE_OFFSET = -225; const lightKnob = (newAngle, { CX, CY, KNOB_RAD }) => ( ); const darkKnob = (color, newAngle, { CX, CY, KNOB_RAD }) => { const id = getRandomInt(); return ( ); }; const darkTrack = (props, dimensions) => { const { progress } = props; const { CX, CY, GAUGE_RAD, CIRCLE_CIR, GAP_ARC_LENGTH, TRACK_ARC_LENGTH } = dimensions; const id = getRandomInt(); const hasColorRanges = props.color && props.color.ranges; return ( {hasColorRanges && } {!hasColorRanges && ( )} {props.color && props.color.ranges && colorRangesTrack(props, dimensions)} ); }; const KnobSvg = props => { const { theme, currentDeg, disabled, color } = props; const newAngle = currentDeg + START_ANGLE_OFFSET; const dimensions = calcDimensions(props); const knob = theme.dark ? darkKnob(color, newAngle, dimensions) : lightKnob(newAngle, dimensions); const track = theme.dark ? darkTrack(props, dimensions) : lightTrack(props, dimensions); const scaleElements = drawScale(props, dimensions); return ( {theme.dark && darkGradientDefs} {scaleElements} {knob} {track} ); }; KnobSvg.defaultProps = { theme: light, size: 144 }; export default KnobSvg; // private helpers function calcDimensions({ size }) { const OFFSET = 36; const d = {}; d.SVG_WIDTH = size + 80; d.CY = ~~(d.SVG_WIDTH / 2); d.CX = ~~(d.SVG_WIDTH / 2); d.GAUGE_RAD = size / 2; d.SCALE_RAD = d.GAUGE_RAD + OFFSET; d.KNOB_RAD = d.GAUGE_RAD - 12; d.CIRCLE_CIR = 2 * Math.PI * d.GAUGE_RAD; d.GAP_ARC_LENGTH = (90 / 360) * (2 * Math.PI * d.GAUGE_RAD); d.TRACK_ARC_LENGTH = d.CIRCLE_CIR - d.GAP_ARC_LENGTH; d.SCALE_TICK_OUTER_RAD = d.SCALE_RAD - 27; d.SCALE_TICK_INNER_RAD = d.SCALE_TICK_OUTER_RAD - 0.5; d.SCALE_TEXT_RAD = d.SCALE_RAD - 20; return d; } ================================================ FILE: src/helpers/LEDDisplaySvg.react.js ================================================ import React from 'react'; import Color from 'color'; import { DarkDigitContainer } from '../styled/LEDDisplay.styled'; import { darkLEDDefs, DARK_SEGMENTS, darkColon, darkDecimal } from '../styled/shared/DarkGradient'; const DIGITS = { 0: ['A', 'B', 'C', 'D', 'E', 'F'], 1: ['B', 'C'], 2: ['A', 'B', 'G', 'E', 'D'], 3: ['A', 'B', 'G', 'C', 'D'], 4: ['F', 'G', 'B', 'C'], 5: ['A', 'F', 'G', 'C', 'D'], 6: ['A', 'F', 'G', 'C', 'D', 'E'], 7: ['A', 'B', 'C'], 8: ['A', 'B', 'C', 'D', 'E', 'F', 'G'], 9: ['A', 'B', 'C', 'D', 'F', 'G'], '-': ['G'] }; // See the following link for segment mappings: // https://en.wikipedia.org/wiki/Seven-segment_display#/media/File:7_segment_display_labeled.svg const LIGHT_SEGMENTS = { A: { base: 'M3.778 3.778L6.555 1h16.667L26 3.778l-2.778 2.778H6.555L3.778 3.778z', stroke: 'M3.778 3.778L6.555 1h16.667L26 3.778l-2.778 2.778H6.555L3.778 3.778z' }, B: { base: 'M26 3.778l2.778 2.777v16.667L26 26l-2.778-2.778V6.555L26 3.778z', stroke: 'M26 3.778l2.778 2.777v16.667L26 26l-2.778-2.778V6.555L26 3.778z' }, C: { base: 'M26 26l2.778 2.778v16.666L26 48.222l-2.778-2.778V28.778L26 26z', stroke: 'M26 26l2.778 2.778v16.666L26 48.222l-2.778-2.778V28.778L26 26z' }, D: { base: 'M26 48.222L23.222 51H6.555l-2.777-2.778 2.777-2.778h16.667L26 48.222z', stroke: 'M26 48.222L23.222 51H6.555l-2.777-2.778 2.777-2.778h16.667L26 48.222z' }, E: { base: 'M3.778 48.222L1 45.444V28.778L3.778 26l2.778 2.778v16.666l-2.778 2.778z', stroke: 'M3.778 48.222L1 45.444V28.778L3.778 26l2.778 2.778v16.666l-2.778 2.778z' }, F: { base: 'M3.778 26L1 23.222V6.555l2.778-2.777 2.778 2.777v16.667L3.778 26z', stroke: 'M3.778 26L1 23.222V6.555l2.778-2.777 2.778 2.777v16.667L3.778 26z' }, G: { base: 'M3.778 26l2.777-2.778h16.667L26 26l-2.778 2.778H6.555L3.778 26z', stroke: 'M3.778 26l2.777-2.778h16.667L26 26l-2.778 2.778H6.555L3.778 26z' } }; const LightSegment = ({ paths: { base, stroke }, fillColor, strokeColor }) => ( ); const LightDecimal = ({ fillColor, strokeColor }) => ( ); const LightColon = ({ fillColor, strokeColor }) => ( ); const LightDigit = ({ value, hasColon, hasDecimal, color, backgroundColor, size, className }) => { const inactiveSegmentFill = Color(backgroundColor) .darken(0.2) .fade(0.85); const activeSegments = DIGITS[value].map(letter => ( )); const inactiveSegments = ['A', 'B', 'C', 'D', 'E', 'F', 'G'].map(letter => ( )); const width = hasColon ? size : size * (6 / 7); const height = size * (9 / 7); return (
{inactiveSegments} {activeSegments} {hasColon && } {hasDecimal && }
); }; const DarkDigit = ({ value, hasColon, hasDecimal, color, size, className }) => { const segments = DIGITS[value].map(letter => DARK_SEGMENTS[letter]); const width = hasColon ? size : size * (6 / 7); const height = size * (9 / 7); return ( {darkLEDDefs} {segments} {hasColon && darkColon} {hasDecimal && darkDecimal} ); }; export const Digit = props => props.theme.dark ? : ; export default Digit; ================================================ FILE: src/helpers/NumericInput.js ================================================ import { default as Input } from 'react-numeric-input'; Input.prototype.UNSAFE_componentWillMount = Input.prototype.componentWillMount; Input.prototype.UNSAFE_componentWillReceiveProps = Input.prototype.componentWillReceiveProps; Input.prototype.UNSAFE_componentWillUpdate = Input.prototype.componentWillUpdate; delete Input.prototype.componentWillMount; delete Input.prototype.componentWillReceiveProps; delete Input.prototype.componentWillUpdate; export default Input; ================================================ FILE: src/helpers/PowerButtonSvg.react.js ================================================ import React from 'react'; import { light } from '../styled/constants'; const PowerButtonSvg = ({ color, theme, on, size }) => ( ); PowerButtonSvg.defaultProps = { theme: light }; export default PowerButtonSvg; ================================================ FILE: src/helpers/classNameGenerator.js ================================================ import { omit } from 'ramda'; export const getClassName = (componentName, theme) => { return 'daq-' + componentName + (theme && theme.dark ? '--dark' : '--light'); }; export const getFilteredProps = props => omit(['className', 'id', 'setProps', 'style'], props); ================================================ FILE: src/helpers/colorRanges.js ================================================ import tinygradient from 'tinygradient'; export const isContiguous = ({ color, min, max }) => { const ranges = toOneDArray(Object.values(color.ranges)); ranges.sort((r1, r2) => r1[0] - r2[0]); // color ranges start at min and end at max if (ranges[0][0] !== min || ranges[ranges.length - 1][1] !== max) return false; // color ranges are contiguous for (let i = 0; i < ranges.length - 1; i++) { if (ranges[i][1] !== ranges[i + 1][0]) return false; } return true; }; export const toOneDArray = ranges => { let arr = []; for (let i = 0; i < ranges.length; i++) { if (ranges[i][0] instanceof Array) { for (let j = 0; j < ranges[i].length; j++) { arr.push(ranges[i][j]); } } else { arr.push(ranges[i]); } } return arr; }; export const convertInRange = (color, max, min) => { /* * The function will check color and range attribute. * if range attribute is provided, it will check for unequal range values. * args: color, max and min props from the gauge component * example 1: * input: color -> {"red":[1, 10], "green":[10, 50]}, max -> 40, min -> 0 * output: {"red":[0, 10], "green":[10, 40]} * if color is underfined */ if (!color) { return color; } // if ranges is not passed with color if (color.ranges == null) { return color; } else { let ranges = { ...color.ranges }; // get a flat array of ranges let rangeArr = getRangeArray(ranges); rangeArr.sort((a1, a2) => a1 - a2); let maxArr = []; let minArr = []; manageRange({ ranges: ranges, max: max, min: min, rangeArr: rangeArr, minArr: minArr, maxArr: maxArr }); for (let i = 0; i < minArr.length; i++) { if (minArr[i]['subKey']) { ranges[minArr[i]['subKey']][minArr[i]['key']][minArr[i]['index']] = min; } else { ranges[minArr[i]['key']][minArr[i]['index']] = min; } } for (let i = 0; i < maxArr.length; i++) { if (maxArr[i]['subKey']) { ranges[maxArr[i]['subKey']][maxArr[i]['key']][maxArr[i]['index']] = max; } else { ranges[maxArr[i]['key']][maxArr[i]['index']] = max; } } color.ranges = ranges; return { ...color }; } }; const manageRange = ({ ranges, subKey = undefined, max, min, rangeArr, minArr = [], maxArr = [] }) => { for (let i in ranges) { if (ranges[i][0] instanceof Array) { manageRange({ ranges: ranges[i], subKey: i, max: max, min: min, rangeArr: rangeArr, minArr: minArr, maxArr: maxArr }); continue; } if (ranges[i][0] > max) { maxArr.push({ key: i, subKey: subKey, index: 0 }); } if (ranges[i][1] > max) { maxArr.push({ key: i, subKey: subKey, index: 1 }); } if (ranges[i][0] < min) { minArr.push({ key: i, subKey: subKey, index: 0 }); } if (ranges[i][1] < min) { minArr.push({ key: i, subKey: subKey, index: 1 }); } if (rangeArr[0] == ranges[i][0] && ranges[i][0] > min) { ranges[i][0] = min; } if (rangeArr[0] == ranges[i][1] && ranges[i][1] > min) { ranges[i][1] = min; } if (rangeArr[rangeArr.length - 1] == ranges[i][0] && ranges[i][0] < max) { ranges[i][0] = max; } if (rangeArr[rangeArr.length - 1] == ranges[i][1] && ranges[i][1] < max) { ranges[i][1] = max; } } }; const getRangeArray = ranges => { /* * convert range passed in colors to flat array * example -> ranges = {"red":[0, 1], "green":[1, 10]} * output -> arr = [0, 1, 1, 10] */ let arr = []; for (let i in ranges) { if (ranges[i][0] instanceof Array) { for (let j in ranges[i]) { arr = [...arr, ...ranges[i][j]]; } } else { arr = [...arr, ...ranges[i]]; } } return arr; }; export const getSortedEntries = scale => { let arr = Object.entries(scale); let arr1 = []; for (let i = 0; i < arr.length; i++) { let key = arr[i][0]; if (arr[i][1][0] instanceof Array) { for (let j = 0; j < arr[i][1].length; j++) { arr1.push([key, arr[i][1][j]]); } } else { arr1.push([key, arr[i][1]]); } } const entries = arr1; entries.sort(([, r1], [, r2]) => r1[0] - r2[0]); return entries; }; export const getGradientObject = ({ color, min, max }) => { let currentPos = 0; const stops = getSortedEntries(color.ranges).map(([colorValue, range]) => { const rangeLength = ((range[1] - range[0]) * 1.0) / (max - min); const start = currentPos; const end = currentPos + rangeLength; currentPos = end; return { color: colorValue, pos: start }; }); return tinygradient(stops); }; export const getLinearGradientCSS = ({ color, min, max, vertical = false }) => { let currentPercentage = 0; const stops = getSortedEntries(color.ranges).map(([colorValue, range], i) => { const rangeLength = (((range[1] - range[0]) * 1.0) / (max - min)) * 100; const start = currentPercentage; const end = currentPercentage + rangeLength; currentPercentage = end; if (color.gradient) { return i === 0 ? colorValue : `${colorValue} ${start}%`; } return i === 0 ? `${colorValue}, ${colorValue} ${end}%` : `${colorValue} ${start}%, ${colorValue} ${end}%`; }); stops.unshift(vertical ? 'to top' : 'to right'); return `linear-gradient(${stops.join(', ')})`; }; export const getColorValue = color => color && (typeof color === 'string' ? color : color.default); export default { isContiguous, getSortedEntries, getLinearGradientCSS, getColorValue }; ================================================ FILE: src/helpers/logarithm.js ================================================ import React from 'react'; import styled from 'styled-components'; import { roundToDecimal } from './util'; function compute(value, base = 10) { if (base === 'e') base = Math.exp(1); return Math.log(value) / Math.log(base); } function generateLogFormatter({ base = 10, isSVG = false }) { return value => isSVG ? ( {base} {value} ) : ( {base} {value} ); } function genLogMarks({ min, max, step = 1, base = 10, marks }, isSVG) { // if no marks given, compute default marks if (!marks) { let curr = min; marks = {}; while (curr <= max) { marks[curr] = true; curr += step; } } Object.keys(marks).forEach(key => { if (typeof marks[key] !== 'boolean') { // custom mark label, do not format return; } marks[key] = isSVG ? ( {base} {key} ) : ( {base} {key} ); }); return marks; } function formatValue(value, base) { return ( ~{base} {roundToDecimal(value, 2)} ); } const Value = styled.div` font-size: 0.9em; margin-left: -10px; & sup { font-size: 0.6em; } `; export default { compute, generateLogFormatter, formatValue, genLogMarks }; ================================================ FILE: src/helpers/scale.js ================================================ import { decimalify } from './util'; // magic numbers const DEFAULT_NUM_INTERVALS = 10; const DEFAULT_LABEL_INTERVAL = 2; export default function generateScale(input) { const config = processInput(input); const scale = { ...config.custom }; if (config.onlyRenderCustom) { return scale; } scale[config.min] = config.formatter(config.min); scale[config.max] = config.formatter(config.max); let curr = config.start; let markCount = 0; while (curr <= config.max) { const needsLabel = markCount % config.labelInterval === 0; const currValue = Number(decimalify(curr, config.interval)); const alreadyMarked = typeof scale[currValue] !== 'undefined'; curr += config.interval; markCount++; if (alreadyMarked) continue; const label = needsLabel ? config.formatter(currValue) : null; scale[currValue] = label; } return scale; } // private function processInput({ min, max, scale = {}, formatter }) { const config = {}; const START_FLAG = scale.start != null; const INTERVAL_FLAG = scale.interval != null; const LABEL_INTERVAL_FLAG = scale.labelInterval != null; config.min = min; config.max = max; config.start = START_FLAG ? scale.start : min; config.interval = INTERVAL_FLAG ? scale.interval : computeInterval(config.start, max); config.labelInterval = LABEL_INTERVAL_FLAG ? scale.labelInterval : DEFAULT_LABEL_INTERVAL; config.custom = scale.custom || {}; config.formatter = formatter || identityFunc; const noConfigPassed = !START_FLAG && !INTERVAL_FLAG && !LABEL_INTERVAL_FLAG; const customTicks = Object.keys(config.custom).length; config.onlyRenderCustom = customTicks && noConfigPassed; config.start = config.start != min ? min : config.start; return config; } function identityFunc(x) { return x; } function computeInterval(min, max) { const ROUND_TO_WHOLE = Math.ceil; const ROUND_TO_FRACTION = x => Number(x.toFixed(2)); const range = Math.abs(max - min) * 1.0; const intervalEstimate = range / DEFAULT_NUM_INTERVALS; const interval = intervalEstimate > 1 ? ROUND_TO_WHOLE(intervalEstimate) : ROUND_TO_FRACTION(intervalEstimate); return interval; } ================================================ FILE: src/helpers/shared/TrackSvg.js ================================================ import React from 'react'; import { longestString, getRandomInt, computeProgress } from '../../helpers/util'; import { isContiguous, getSortedEntries } from '../../helpers/colorRanges'; import { RADIAN, TRACK_TOTAL_DEG } from '../../styled/constants'; export const colorRangesTrack = (props, dimensions) => { // const { max } = props; const { CX, CY, GAUGE_RAD, CIRCLE_CIR, GAP_ARC_LENGTH } = dimensions; const TRACK_ARC_DEG = 270; const GAP_ARC_DEG = 90; const GRADIENT_BLEND = 25; if (!isContiguous(props)) return null; // set colors start from 0 if negative value is present let deepColorCopy = JSON.parse(JSON.stringify(props.color)); const { color, max } = setColorRangeStartFromZero({ ...deepColorCopy }, props.max); // calculate stops const stops = getSortedEntries(color.ranges).map(([colorValue, range], i) => { const startDeg = ((range[0] * 1.0) / max) * TRACK_ARC_DEG + GAP_ARC_DEG; const endDeg = ((range[1] * 1.0) / max) * TRACK_ARC_DEG + GAP_ARC_DEG; if (color.gradient) { // no transition between black band and first color if (i === 0) { return `${colorValue} 0`; } return `${colorValue} ${startDeg + GRADIENT_BLEND}deg, ${colorValue} ${endDeg - GRADIENT_BLEND}deg`; } return `${colorValue} ${startDeg}deg, ${colorValue} ${endDeg}deg`; }); stops.unshift([`black ${GAP_ARC_DEG}deg`]); // add black band for bottom gap if (typeof window === 'undefined') { return null; } if (!window.ConicGradient) { // eslint-disable-next-line require('conic-gradient'); // globally sets ConicGradient } const ConicGradient = window.ConicGradient; const gradient = new ConicGradient({ stops: stops.join(', '), size: 400 }); // unique id for each track const id = `colorRangesImage-${getRandomInt()}`; return ( ); }; export const lightTrack = (props, dimensions) => { const { color, progress } = props; const { CX, CY, GAUGE_RAD, CIRCLE_CIR, GAP_ARC_LENGTH, TRACK_ARC_LENGTH } = dimensions; return ( {color && color.ranges && colorRangesTrack(props, dimensions)} ); }; const getScaleString = v => { if (!v) return ''; // is jsx element? if (v.props) return v.props.children[0] + ' '; return (v && v.label) || v; }; export const drawScale = ( { min, max, step, scale }, { CX, CY, SCALE_TICK_OUTER_RAD, SCALE_TICK_INNER_RAD, SCALE_TEXT_RAD, IS_GAUGE } ) => { const START_ANGLE_OFFSET = -225; const DEFAULT_LONGEST_STRING = 3; const scaleItems = []; let count = 0; const offset = (Math.max( longestString(Object.values(scale).map(getScaleString)).length, DEFAULT_LONGEST_STRING ) || DEFAULT_LONGEST_STRING) * 2; const sr1 = SCALE_TICK_OUTER_RAD; const sr2 = SCALE_TICK_INNER_RAD; const srT = IS_GAUGE ? SCALE_TEXT_RAD - offset : SCALE_TEXT_RAD + offset; Object.keys(scale).forEach(key => { const markValue = scale[key]; const degreesProgressed = computeProgress({ min, max, value: key, progressionTarget: TRACK_TOTAL_DEG }); const markAngle = START_ANGLE_OFFSET + degreesProgressed; if (markValue !== null) { // draw full mark let sx1 = CX + sr1 * Math.cos(markAngle * RADIAN); let sy1 = CY + sr1 * Math.sin(markAngle * RADIAN); let sx2 = CX + sr2 * Math.cos(markAngle * RADIAN); let sy2 = CY + sr2 * Math.sin(markAngle * RADIAN); let sxT = CX + srT * Math.cos(markAngle * RADIAN); let syT = CY + srT * Math.sin(markAngle * RADIAN) + 4; scaleItems.push( , {(markValue && markValue.label) || markValue} ); } else { // draw mini mark let sx1 = CX + sr1 * Math.cos(markAngle * RADIAN); let sy1 = CY + sr1 * Math.sin(markAngle * RADIAN); let sx2 = CX + (sr2 + 3) * Math.cos(markAngle * RADIAN); let sy2 = CY + (sr2 + 3) * Math.sin(markAngle * RADIAN); scaleItems.push( ); } count++; }); return scaleItems; }; const setColorRangeStartFromZero = (color, max) => { let ranges = { ...color.ranges }; let minimum = Infinity; for (let i in ranges) { if (ranges[i][0] instanceof Array) { for (let j = 0; j < ranges[i].length; j++) { if (ranges[i][j][0] < minimum) { minimum = ranges[i][j][0]; } if (ranges[i][j][1] < minimum) { minimum = ranges[i][j][1]; } } continue; } if (ranges[i][0] < minimum) { minimum = ranges[i][0]; } if (ranges[i][1] < minimum) { minimum = ranges[i][1]; } } if (minimum < 0) { for (let i in ranges) { if (ranges[i][0] instanceof Array) { for (let j = 0; j < ranges[i].length; j++) { ranges[i][j][0] = ranges[i][j][0] - minimum; ranges[i][j][1] = ranges[i][j][1] - minimum; } continue; } ranges[i][0] = ranges[i][0] - minimum; ranges[i][1] = ranges[i][1] - minimum; } max = max - minimum; } color = { ...color, ranges }; return { color, max }; }; ================================================ FILE: src/helpers/util.js ================================================ export const longestString = arr => arr.sort(function(a, b) { return b.length - a.length; })[0]; export const decimalify = (num = 0, step) => { if (isNaN(num)) { return num; } // eslint-disable-next-line const [characteristic, mantissa] = step.toString().split('.'); const numDecimalPoints = mantissa ? mantissa.length : 0; return num.toFixed(numDecimalPoints); }; export const sanitizeRangeValue = ({ min, max, value }) => { if (value == null) return min; if (value < min) { return min; } else if (value > max) { return max; } else { return value; } }; export const computeProgress = ({ min, max, value, progressionTarget = 100 }) => { value = Number(value); const adjustedValue = Math.abs(value - min) * 1.0; const range = Math.abs(max - min); return (adjustedValue / range) * progressionTarget; }; export const roundToDecimal = (value, decimals) => Number(Math.round(value + 'e' + decimals) + 'e-' + decimals); export const getRandomInt = (min = 0, max = 9999) => Math.floor(Math.random() * (max - min + 1)) + min; export default { decimalify, sanitizeRangeValue, computeProgress, longestString, roundToDecimal, getRandomInt }; ================================================ FILE: src/index.js ================================================ /* eslint-disable import/prefer-default-export */ export { default as BooleanSwitch } from './components/BooleanSwitch.react'; export { default as ColorPicker } from './components/ColorPicker.react'; export { default as Gauge } from './components/Gauge.react'; export { default as GraduatedBar } from './components/GraduatedBar.react'; export { default as Indicator } from './components/Indicator.react'; export { default as Knob } from './components/Knob.react'; export { default as LEDDisplay } from './components/LEDDisplay.react'; export { default as NumericInput } from './components/NumericInput.react'; export { default as PowerButton } from './components/PowerButton.react'; export { default as PrecisionInput } from './components/PrecisionInput.react'; export { default as StopButton } from './components/StopButton.react'; export { default as Slider } from './components/Slider.react'; export { default as Tank } from './components/Tank.react'; export { default as Thermometer } from './components/Thermometer.react'; export { default as ToggleSwitch } from './components/ToggleSwitch.react'; export { default as DarkThemeProvider } from './components/DarkThemeProvider.react'; export { default as Joystick } from './components/Joystick.react'; ================================================ FILE: src/styled/ColorPicker.styled.js ================================================ import styled, { css } from 'styled-components'; import { light } from './constants'; export const Container = styled.div` ${({ disabled, theme }) => disabled && css` opacity: ${theme.dark ? 1 : 0.65}; cursor: not-allowed !important; & .chrome-picker { pointer-events: none !important; } `} & .chrome-picker { font-family: unset !important; box-shadow: none !important; ${({ size }) => css` width: ${size}px !important; `}; } & .chrome-picker svg { background: unset !important; } & .chrome-picker svg:hover path { fill: ${({ theme, color }) => color || theme.primary}; } ${({ theme }) => (theme.dark ? darkContainer : lightContainer)}; `; const lightKnobs = css` & .chrome-picker .hue-horizontal > div > div, .chrome-picker > div:nth-child(2) > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(3) > div > div { box-shadow: none !important; background-color: #fff; border-radius: 100% !important; ${({ theme }) => css` border: 1px solid ${theme.detail} !important; `}; } `; const lightContainer = css` border-radius: 3px !important; ${lightKnobs} ${({ theme }) => css` border: 1px solid ${theme.detail}; `}; `; const darkKnobs = css` & .chrome-picker .hue-horizontal > div > div, .chrome-picker > div:nth-child(2) > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(3) > div > div { border-radius: 100% !important; border: none !important; background: #101010 !important; background-image: linear-gradient( 135deg, rgba(255, 255, 255, 0.3) -50%, rgba(0, 0, 0, 0.7) 100% ) !important; transition: all 0.3s ease-in !important; ${({ glow }) => css` box-shadow: inset 0 0 1px 0 rgba(52, 52, 52, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.2), 0 0 12px 4px ${glow} !important; `}; } `; const darkAlpha = css` .chrome-picker .flexbox-fix div:nth-child(2) > div:nth-child(2) > div { background: #fff !important; } `; const darkInput = css` & .chrome-picker input { font-family: unset !important; color: #fff !important; border-radius: 0px !important; background-color: #22272a !important; background-image: linear-gradient( 145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100% ) !important; box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8), -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1) !important; } & .chrome-picker input:focus { outline: 0 !important; border: none !important; background-image: linear-gradient( 145deg, rgba(255, 255, 255, 0.2) 0%, rgba(0, 0, 0, 0.4) 100% ) !important; box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.6), inset 0 0 4px 0 rgba(0, 0, 0, 0.6), -1px -1px 0px 0px rgba(0, 0, 0, 0.6), 1px 1px 0px 0px rgba(255, 255, 255, 0.1) !important; } `; const darkContainer = css` box-shadow: 0px 0px 8px 2px rgba(100,100,100,0.075), 0px 0px 32px 2px rgba(255,255,255,0.05), 1px 1px 0px 0px rgba(25,25,25,0.6), -1px -1px 0px 0px rgba(255,255,255,0.2) !important; & .chrome-picker > div:first-child { border-radius: 0 !important; } & .chrome-picker > div:nth-child(2) { background: #0a0a0a !important; border-top: 1px solid rgba(255,255,255,0.075); } ${darkKnobs} ${darkInput} ${darkAlpha} `; Container.defaultProps = { theme: light }; export default Container; ================================================ FILE: src/styled/CurrentValue.styled.js ================================================ import React from 'react'; import styled, { css } from 'styled-components'; import { light } from './constants'; const ValueContainer = styled.div` position: relative; display: flex; flex-direction: column; justify-content: space-around; align-items: center; top: 50%; transform: translateY(-50%); text-align: center; font-size: 32px; ${props => props.css ? css` ${props.css}; ` : ''}; `; export const Value = styled.div` font-size: 1em; color: ${({ theme, color }) => color || (theme.dark ? '#000' : color || theme.primary)}; ${({ theme }) => theme.dark ? css` text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.4); ` : ''}; ${({ fontSize }) => { return fontSize ? css` font-size: ${fontSize}px; ` : ''; }} `; Value.defaultProps = { theme: light }; export const ValueLabel = styled.label` margin-top: -4px; text-transform: uppercase; font-size: 8px; color: #535d63; `; export default props => ( {props.children} {props.units ? {props.units} : null} ); ================================================ FILE: src/styled/Gauge.styled.js ================================================ import styled, { css } from 'styled-components'; import { light } from '../styled/constants'; const Container = styled.div` & svg { text-align: center; } & circle { user-select: none; } & .scale { font-size: 12px; fill: ${({ theme, color }) => color || (theme.dark ? '#000' : '#5b6268')}; user-select: none; } & .tick { stroke: ${props => props.theme.detail}; stroke-width: 2; } & .tick.small { stroke: #2b2f32; } & .needle { stroke: ${({ theme }) => (theme.dark ? '#000' : '#5b6268')}; stroke-width: 3; } ${({ theme }) => !theme.dark && lightTheme}; `; const lightTheme = css` & .needle-knob { stroke: ${({ theme }) => theme.secondary}; stroke-width: 2; } & .track { stroke: ${props => props.theme.secondary}; } & .track.progress { stroke: ${({ color, theme }) => color || theme.primary}; } `; Container.defaultProps = { theme: light }; export default Container; ================================================ FILE: src/styled/GraduatedBar.styled.js ================================================ import styled, { css } from 'styled-components'; import { light } from './constants'; export const Container = styled.div` position: relative; display: flex; align-items: center; justify-content: flex-start; ${({ vertical }) => (vertical ? verticalContainer : horizontalContainer)}; ${({ theme }) => (theme.dark ? darkContainer : lightContainer)}; `; Container.defaultProps = { theme: light }; const verticalContainer = css` flex-direction: column-reverse; width: 30px; height: ${({ size }) => `${size}px`}; `; const horizontalContainer = css` flex-direction: row; width: ${({ size }) => `${size}px`}; height: 30px; `; const darkContainer = css` text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); padding: 3px; color: #fff; border: none; border-radius: 0px; background-color: #22272a; background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%); box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8), -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1); `; const lightContainer = css` background-color: ${props => props.theme.secondary}; `; export const Block = styled.div` display: block; box-sizing: border-box; ${({ gradient, progress, color, theme, max, min, step, size, vertical }) => { if (gradient) { const TOTAL_STEPS = (max - min) / step; const STEP_SIZE = size / TOTAL_STEPS; const STEP_SIZE_PERCENT = STEP_SIZE / size; const start = gradient.rgbAt(progress).toString(); const end = gradient.rgbAt(progress + STEP_SIZE_PERCENT).toString(); return css` background-image: linear-gradient(${vertical ? 'to top' : 'to right'}, ${start}, ${end}); `; } return css` background-color: ${color || theme.primary}; `; }} ${props => { const TOTAL_STEPS = (props.max - props.min) / props.step; const STEP_SIZE = props.size / TOTAL_STEPS; const MARGIN = STEP_SIZE >= 10 ? STEP_SIZE * 0.05 : 0.5; const BOX_SIZE = STEP_SIZE - 2 * MARGIN; return css` height: ${props.vertical ? `${BOX_SIZE}px` : '100%'}; width: ${props.vertical ? '100%' : `${BOX_SIZE}px`}; margin: ${props.vertical ? `${MARGIN}px 0` : `0 ${MARGIN}px`}; `; }} ${({ theme }) => theme.dark && darkBlock}; `; Block.defaultProps = { theme: light }; const darkBlock = css` ${({ color, theme, gradient }) => { if (gradient) return; return css` background-color: ${color || theme.primary}; background-image: linear-gradient( 145deg, rgba(255, 255, 255, 0.5) 0%, rgba(0, 0, 0, 0.4) 100% ); background-blend-mode: overlay; `; }} box-shadow: ${({ color, theme }) => `2px 2px 6px 1px rgba(0, 0, 0, 0.45), inset 1px 1px 2px 0 rgba(255, 255, 255, 0.3), 1px 1px 1px 0px rgba(0, 0, 0, 0.6), 0 0 3px 0px ${color || theme.primary}`}; `; export const Value = styled.div` position: absolute; right: 4%; top: 50%; transform: translateY(-50%); ${({ vertical }) => vertical ? css` font-size: 11px; right: auto; ` : ''}; `; ================================================ FILE: src/styled/Knob.styled.js ================================================ import styled, { css } from 'styled-components'; import { light } from './constants'; const Container = styled.div` display: flex; align-items: center; flex-direction: column; & svg { text-align: center; } & circle { user-select: none; } & .scale { font-size: 12px; user-select: none; fill: ${({ colorValue }) => colorValue || 'black'} !important; } & .tick { stroke: ${props => props.theme.detail}; stroke-width: 2; } & .knob { cursor: pointer; } & .disabled { opacity: ${({ theme }) => (theme.dark ? 1 : 0.65)}; cursor: not-allowed; } & .track.progress { stroke: ${({ color, theme }) => color || theme.primary}; } ${({ theme }) => (theme.dark ? darkTheme : lightTheme)}; `; const lightTheme = css` & .scale { fill: #5b6268; } & .track { stroke: #e6e6e6; } & .knob .base, .knob .indent { stroke: #e6e6e6; stroke-width: 2; } `; const darkTheme = css` & .scale { fill: #fff; } `; Container.defaultProps = { theme: light }; export default Container; ================================================ FILE: src/styled/LEDDisplay.styled.js ================================================ import styled, { css } from 'styled-components'; import { light } from './constants'; export const LEDContainer = styled.div` display: inline-flex; flex-direction: row; ${({ theme }) => (theme.dark ? darkLEDContainer : lightLEDContainer)}; ${({ backgroundColor }) => css` background-color: ${backgroundColor}; `} `; const darkLEDContainer = css` padding: 12px 8px 4px 16px; background-color: #22272a; background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%); box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8), -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1); `; const lightLEDContainer = css` border-radius: 3px; padding: 12px 8px 12px 14px; border: 1px solid ${({ theme }) => theme.detail}; background: ${({ backgroundColor }) => backgroundColor}; `; LEDContainer.defaultProps = { theme: light }; export const DarkDigitContainer = styled.div` & .darkLED-fill { fill: ${({ color }) => color}; } `; export default LEDContainer; ================================================ FILE: src/styled/PowerButton.styled.js ================================================ import styled, { css } from 'styled-components'; import { light } from '../styled/constants'; export const Container = styled('div')` display: flex; flex-direction: column; justify-content: space-between; align-items: center; & svg { margin: 0 auto; } `; export const Button = styled.button` cursor: pointer; outline: none; display: flex; justify-content: center; align-items: center; &:disabled { opacity: ${({ theme }) => (theme.dark ? 1 : 0.65)}; cursor: not-allowed; } ${({ theme }) => (theme.dark ? darkTheme : lightTheme)}; `; const lightTheme = css` border-radius: 50%; box-sizing: border-box; background: #fff; border: 1px solid ${props => props.theme.secondary}; ${({ size }) => css` width: ${size}px; height: ${size}px; `} margin-bottom: ${({ size }) => `${size * 0.0625}px`}; padding: 0; &:focus, &:hover { border-color: ${props => props.theme.secondary}; } `; const darkTheme = css` ${({ size }) => css` width: ${size}px; height: ${size}px; `} border-radius: 100%; padding: 0; margin-bottom: 8px; &::before, &::after { left: 4%; border-radius: 100%; transition: all 0.1s ease-in; } &::before { top: 8%; width: 86%; height: 86%; } &::after { top: 4%; width: 92%; height: 92%; ${({ on, color, theme }) => on ? css` box-shadow: 0 0 8px 2px ${color || theme.primary}; ` : ''}; } &:hover::before { background-color: rgba(0, 0, 0, 0.8); } &:hover::after { box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.66); } &:focus::after, &:active::after { box-shadow: ${({ on, color, theme }) => on ? `0 0 8px 2px ${color || theme.primary}` : '0 0 3px 0 rgba(0,0,0,0.66)'}; } `; Button.defaultProps = { theme: light }; ================================================ FILE: src/styled/PrecisionInput.styled.js ================================================ import styled, { css } from 'styled-components'; export const Container = styled.div` margin: 0 auto; display: flex; justify-content: flex-end; width: ${({ size }) => `${size}px` || 'auto'}; cursor: text; ${({ theme }) => (theme.dark ? darkContainer : lightContainer)}; `; const darkContainer = css` background-color: #22272a; background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%); box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8), -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1); `; const lightContainer = css` background: #ffffff; border-radius: 2px; border: 1px solid #d3d3d3; `; export const Digit = styled.div` padding: 8px 6px; box-sizing: border-box; display: inline-block; font-size: 14px; line-height: 16px; text-align: center; ${({ theme }) => (theme.dark ? darkDigit : lightDigit)}; `; const darkDigit = css` border-right: 1px solid rgba(0, 0, 0, 0.4); color: #fff; `; const lightDigit = css` color: #15181a; border-right: 1px solid #f2f2f2; `; export const ExponentialDigit = styled(Digit)` border: none; ${({ theme }) => theme.dark ? css` color: ${({ color, theme }) => color || theme.primary}; text-shadow: 0 0 2px rgba(0, 0, 0, 0.9), 0 0 9px ${({ color, theme }) => color || theme.primary}; ` : css` background: #f2f2f2; `}; `; ================================================ FILE: src/styled/Slider.styled.js ================================================ import React from 'react'; import styled, { css } from 'styled-components'; import { UnstyledDarkHandle } from './shared/DarkGradient'; import { colors } from './constants'; export const SliderContainer = styled.div` ${({ vertical, size, fullSize }) => { if (fullSize) return vertical ? 'height: 100%;' : 'width: 100%;'; if (size) return vertical ? `height: ${size}px;` : `width: ${size}px`; }}; & .rc-slider-disabled, .rc-slider-disabled .rc-slider-handle { background-color: unset !important; } & .rc-slider-track { ${({ theme }) => theme.dark && css` box-shadow: none !important; `}; } /* remove rc-slider-dot styles, which overlap with the marker */ & .rc-slider-dot { background: none !important; border: none; height: unset !important; width: unset !important; } `; export const HandleContainer = styled.div` position: absolute; /* remove rc-slider-handle styles */ width: auto; height: auto; border-radius: unset; border: none; background: none; margin: 0 !important; ${({ isTarget }) => (isTarget ? targetHandleContainer : sliderHandleContainer)}; `; const targetHandleContainer = css` ${({ vertical }) => vertical ? css` right: 9px; ` : css` bottom: 12px; `}; `; const sliderHandleContainer = css` z-index: 1; ${({ vertical, offset }) => vertical ? css` left: 3px; bottom: ${offset}%; ` : css` left: ${offset}%; `}; `; const UnstyledLightHandle = ({ className }) => ( ); export const Handle = props => props.theme.dark ? : ; const LightHandle = styled(UnstyledLightHandle)` /* remove rc-slider-handle styles */ width: auto; height: auto; border-radius: unset; border: none; background: none; margin: 0 !important; ${({ isTarget }) => (isTarget ? targetHandle : sliderHandle)}; `; const DarkHandle = styled(UnstyledDarkHandle)` /* remove rc-slider-handle styles */ width: auto; height: auto; border-radius: unset; border: none; background: none !important; margin: 0 !important; /* remove rc-slider-handle styles */ box-shadow: none !important; ${({ isTarget }) => (isTarget ? targetHandle : sliderHandle)}; `; const targetHandle = css` position: absolute; ${({ theme, color }) => theme.dark ? css` & .dark-handle-custom-fill { fill: ${color || theme.detail}; } ` : css` & path { stroke: ${color || theme.detail}; } `} ${({ vertical }) => vertical ? css` top: 0; right: 0; ` : css` bottom: 0; left: 0; `} ${({ vertical, theme }) => { let deltaX = -50; let deltaY = 55; let rotation = 0; if (vertical) { deltaX = theme.dark ? 40 : 0; deltaY = -50; rotation = 270; } return css` transform: translate(${deltaX}%, ${deltaY}%) rotate(${rotation}deg); `; }}; `; const sliderHandle = css` ${({ theme, color }) => theme.dark ? css` & .dark-handle-custom-fill { fill: ${color || theme.primary}; } ` : css` & path { stroke: ${color || theme.primary}; } `} ${({ vertical }) => { let deltaX = -50; let deltaY = -40; let rotation = 0; if (vertical) { deltaX = -2; deltaY = -50; rotation = 270; } return css` transform: translate(${deltaX}%, ${deltaY}%) rotate(${rotation}deg); `; }}; `; export const targetStyles = { width: 'auto', marginLeft: 0, marginBottom: 0, textAlign: 'center', border: 'none', boxShadow: 'none' }; export const Label = styled.div` /* remove rc-slider-handle styles */ margin: 0 !important; width: auto; height: auto; user-select: none; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; font-size: 12px; padding: 2px 4px; border-radius: 3px; & .label { font-size: 8px; font-weight: 600; } & .value { font-size: 20px; line-height: 1.1; } ${({ theme }) => (theme.dark ? darkLabel : lightLabel)} ${({ isTarget }) => isTarget ? targetLabel : sliderLabel}; `; const darkLabel = css` /* remove dark-gradient.css styles */ box-shadow: none !important; background: #101010; background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.3) -50%, rgba(0, 0, 0, 0.7) 100%); `; const lightLabel = css` border: 1px solid ${colors.GREY}; &:hover { border: 1px solid ${colors.GREY}; } `; const targetLabel = css` color: ${({ color, theme }) => color || theme.detail}; ${({ vertical }) => { let offset = vertical ? -9 : -5; return vertical ? css` transform: translate(${offset}px, -50%); ` : css` transform: translate(-50%, ${offset}px); `; }}; `; const sliderLabel = css` color: ${({ color, theme }) => color || theme.primary}; ${({ vertical }) => vertical ? css` right: 0; ` : css` top: 0; `} ${({ vertical, label, value }) => { let offset = label && (value || value === 0) ? -44 : -22; if (vertical) { offset = -3; } return vertical ? css` transform: translate(${offset}px, -50%); ` : css` transform: translate(-50%, ${offset}px); `; }}; `; export default { SliderContainer, Handle, targetStyles, Label }; ================================================ FILE: src/styled/StopButton.styled.js ================================================ import styled, { css } from 'styled-components'; import { light } from './constants'; export const Button = styled.button` outline: none; transition: all 0.1s ease-in; ${({ theme }) => (theme.dark ? darkButton : lightButton)}; &:disabled { opacity: ${({ theme }) => (theme.dark ? 1 : 0.65)}; cursor: not-allowed; } `; Button.defaultProps = { theme: light }; const lightButton = css` color: white; background-color: #ff5e5e; display: block; box-sizing: border-box; border: none; border-radius: 2px; font-weight: bold; font-size: 12px; text-transform: uppercase; padding: 0; width: ${({ size }) => `${size}px`}; min-height: ${({ size }) => `${size * 0.42}px`}; text-align: center; cursor: pointer; letter-spacing: 0.1; line-height: 1; &:hover, &:focus, &:active { color: #fff; } &:hover { background-color: #ff8585; } &:active { background-color: #e64545; } `; const darkButton = css` color: #ff6e6e; background-color: #22272a; text-shadow: 0 0 2px rgba(0, 0, 0, 0.9), 0 0 9px #ff6e6e; background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%); box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8), -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1); display: block; box-sizing: border-box; border: none; border-radius: 2px; font-weight: bold; font-size: 12px; text-transform: uppercase; padding: 0; width: ${({ size }) => `${size}px`}; height: ${({ size }) => `${size * 0.42}px`}; text-align: center; cursor: pointer; letter-spacing: 0.1; line-height: 1; background-color: #22272a; color: #ff1a1a; &::before, &::after { transition: all 0.1s ease-in; background-color: #e03a3a; } &:hover::before, &:hover::after { background-color: #e64545; } &:active::before, &:active::after { background-color: #c72121; } &:hover::after, &:active::after, &:focus::after { box-shadow: none; } `; export default Button; ================================================ FILE: src/styled/Tank.styled.js ================================================ import styled, { css } from 'styled-components'; import Color from 'color'; import { light } from './constants'; export const TankContainer = styled.div` position: relative; width: ${({ width }) => `${width}px`}; height: ${({ height }) => `${height}px`}; z-index: 2; border-radius: ${({ thermometer }) => (thermometer ? '40px' : '0')}; ${({ theme }) => (theme.dark ? darkTankContainer : lightTankContainer)}; `; TankContainer.defaultProps = { theme: light }; const darkTankContainer = css` background-color: #22272a; background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%); box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.7), inset 0 0 4px 0 rgba(0, 0, 0, 0.8), -1px -1px 0px 0px rgba(0, 0, 0, 0.8), 1px 1px 0px 0px rgba(255, 255, 255, 0.1); `; const lightTankContainer = css` background: ${props => props.theme.secondary}; `; export const TankFill = styled.div` position: absolute; bottom: 0; width: 100%; height: ${({ height }) => height || 0}; border-radius: ${({ thermometer }) => (thermometer ? '40px' : '0')}; border-radius: 0px; ${({ theme }) => (theme.dark ? darkTankFill : lightTankFill)}; `; TankFill.defaultProps = { theme: light }; const darkTankFill = css` background: ${({ color, theme }) => color || theme.primary}; background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 30%, rgba(255, 255, 255, 0.7) 100%); background-blend-mode: overlay; box-shadow: 0 0 6px 1px ${({ color, theme }) => Color(color || theme.primary) .alpha(0.7) .string()}; `; const lightTankFill = css` background: ${({ color, theme }) => color || theme.primary}; `; export const TickContainer = styled.div` position: relative; ${({ xPositioned }) => xPositioned && css` direction: rtl; `} display: flex; flex-direction: column; justify-content: space-between; margin-right: 4px; margin-top: -6px; margin-bottom: -6px; `; export const Tick = styled.div` ${({ xPosition }) => xPosition || xPosition === 0 ? css` position: absolute; bottom: ${`calc(${xPosition}% - ${(xPosition / 100.0) * 18}px)`}; ` : ''} display: flex; align-items: center; justify-content: flex-end; height: 18px; color: ${props => props.color || (props.theme.dark ? '#ddd' : '#000')}; & .label { font-size: 12px; text-align: right; margin-right: 4px; white-space: nowrap; } & .tick { height: 1px; width: ${props => props.width || 4}px; background: ${props => props.theme.detail}; } `; Tick.defaultProps = { theme: light }; export const Container = styled.div` display: flex; flex-direction: row; justify-content: center; ${({ thermometer }) => thermometer ? css` margin-top: 8px; margin-left: ${({ xPositioned }) => (xPositioned ? '-4px' : '-24px')}; ` : ''}; `; export const ExceededWarning = styled.span` color: #dc3545; font-size: 0.8rem; text-align: center; display: block; `; ================================================ FILE: src/styled/Thermometer.styled.js ================================================ import styled from 'styled-components'; import { light } from './constants'; const WIDTH = 20; export const ThermometerContainer = styled.div` display: flex; flex-direction: column; align-items: center; `; export const Bulb = styled.div` width: ${1.5 * WIDTH}px; height: ${1.5 * WIDTH}px; border-radius: 50%; background-color: ${props => props.on ? props.color || props.theme.primary : props.theme.secondary}; position: absolute; left: 50%; transform: translateX(-50%); bottom: -${WIDTH}px; z-index: -1; `; Bulb.defaultProps = { theme: light }; export const CurrentValueContainer = styled.div` display: flex; width: 100%; flex-direction: column; align-items: center; text-align: center; & > div { margin-top: 56px; line-height: 28px; } `; CurrentValueContainer.defaultProps = { theme: light }; ================================================ FILE: src/styled/ToggleSwitch.styled.js ================================================ import styled, { css } from 'styled-components'; import { light } from './constants'; import Label from './shared/Label.styled'; export const Wrapper = styled('div')` display: flex; justify-content: space-around; align-items: center; ${({ rotate }) => css` transform: rotate(${parseInt(rotate, 10)}deg); `}; ${({ rotate, size }) => { return rotate == -90 ? css` height: ${size}px; ` : ''; }} `; export const ButtonContainer = styled('div')` height: auto; display: flex; transition: all 0.1s ease-in; ${({ size }) => css` width: ${size}px; cursor: pointer; padding: ${0.05 * size}px; border-radius: ${size}px; margin-left: ${0.05 * size}px; margin-right: ${0.05 * size}px; `} ${({ theme }) => (theme.dark ? darkContainer : lightContainer)}; `; ButtonContainer.defaultProps = { theme: light }; const lightContainer = css` background: ${({ on, theme, color }) => (on ? color || theme.secondary : theme.secondary)}; `; const darkContainer = css` background: ${({ on, theme, color }) => (on ? color || theme.secondary : '#22272a')}; background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.3) 100%); box-shadow: inset 0 0 8px -1px #000000, inset 0 0 8px 0 rgba(0, 0, 0, 0.8), -1px -1px 0px 0px rgba(0, 0, 0, 0.9), 1px 1px 0px 0px rgba(255, 255, 255, 0.1); `; export const Button = styled.button` background: white; border-radius: 50%; display: block; padding: 0; margin: 0; transition: all 100ms ease-in-out; outline: none; ${({ size, on, theme }) => css` border: none; border: 1px solid ${theme.dark ? 'none' : theme.detail}; width: ${size / 2}px; height: ${size / 2}px; transform: translateX(${on ? size - size / 2 : 0}px); `} &:focus, &:active, &:hover { border: none; border: ${({ theme }) => (theme.dark ? 'none' : `1px solid ${theme.detail}`)}; } &:disabled { opacity: ${({ theme }) => (theme.dark ? 1 : 0.65)}; cursor: not-allowed; } ${({ theme }) => (theme.dark ? darkButton : null)}; `; Button.defaultProps = { theme: light }; const darkButton = css` background-color: #141414; background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.5) -20%, rgba(0, 0, 0, 0.7) 100%); box-shadow: inset 0 0 1px 0 rgba(52, 52, 52, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.2), 1px 1px 2px 0px rgba(0, 0, 0, 0.7); &:hover { background-color: rgba(0, 0, 0, 0.7); } &::before, &::after { content: none; } `; export const DarkSwitchContainer = styled.div` display: flex; padding: 2px 4px; cursor: pointer; border-radius: 1px; margin: 0 8px; background: #22272a; background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.1) 100%); box-shadow: inset 0 0 8px -1px #000000, inset 0 0 8px 0 rgba(0, 0, 0, 0.8), -1px -1px 0px 0px rgba(0, 0, 0, 0.9), 1px 1px 0px 0px rgba(255, 255, 255, 0.1); `; export const DarkSwitch = styled.button` display: block; position: relative; margin: 0; transition: all 100ms ease-in-out; outline: none; background: #161616; height: ${({ size }) => `${size * 0.72}px`}; width: ${({ size }) => `${size * 1.44}px`}; background-blend-mode: overlay; background-color: #111; background-image: ; background-image: ${({ on }) => on ? css`radial-gradient(farthest-corner at 0px 0px, rgba(256,255,255,1) 5%, rgba(0,0,0,0.6) 90%)` : css`radial-gradient(farthest-corner at 0px 0px, rgba(256,255,255,1) 5%, rgba(0,0,0,0.6) 90%)`}; box-shadow: 1px 1px 3px 0px rgba(0, 0, 0, 0.9); border-radius: 2px; &:disabled { cursor: not-allowed; } &:hover::after, &:active::after, &:focus::after { box-shadow: none; } &::before { content: none; } &::after { transition: all 100ms ease-in-out; content: ''; position: absolute; left: 0; right: 0; top: 4%; height: 92%; width: 92%; margin: 0 auto; ${({ size, on }) => { const margin = size * 0.08; return on ? css` margin-left: ${margin}px; ` : css` margin-right: ${margin}px; `; }} background-color: #161616; background-blend-mode: overlay; background-image: ${({ on }) => on ? css`linear-gradient(135deg, rgba(255,255,255,0.7) 20%, rgba(0,0,0,0) 100%), linear-gradient(90deg, rgba(255,255,255,0) 40%, rgba(0,0,0,0.8) 100%)` : css`linear-gradient(135deg, rgba(0,0,0,0) 0%, rgba(255,255,255,1) 100%), linear-gradient(90deg, rgba(0,0,0,0.6) 40%, rgba(255,255,255,0) 100%)`}; border-radius: 2px; } &:hover::after { background-color: #181818; } `; export const RowContainer = styled.div` display: flex; align-items: center; justify-content: space-around; flex-direction: ${props => (props.vertical ? 'column-reverse' : 'row')}; `; export const RowLabel = styled(Label)` margin: 0; ${({ position, theme }) => (position === 'right' ? `margin-left: ${theme.dark ? 12 : 8}px;` : '')} ${({ position, theme }) => (position === 'left' ? `margin-right: ${theme.dark ? 12 : 8}px;` : '')} ${({ position, theme }) => position === 'top' ? `margin-bottom: ${theme.dark ? 34 : 20}px;` : ''} ${({ position, theme }) => position === 'bottom' ? `margin-top: ${theme.dark ? 34 : 20}px;` : ''} `; RowLabel.defaultProps = { theme: light }; ================================================ FILE: src/styled/constants.js ================================================ export const colors = { PRIMARY: '#ABE2FB', SECONDARY: '#E6E6E6', DARKER_PRIMARY: '#87ceeb', OFF_WHITE: '#15181A', GREY: '#D3D3D3', RED: '#FF5E5E', DARK_GREY: '#535D63' }; export const TRACK_TOTAL_DEG = 270.0; export const RADIAN = Math.PI / 180.0; export const light = { primary: colors.PRIMARY, secondary: colors.SECONDARY, detail: colors.GREY, dark: false }; export const dark = { primary: colors.PRIMARY, secondary: colors.DARK_GREY, detail: colors.DARK_GREY, dark: true }; export default { dark, light, colors }; ================================================ FILE: src/styled/shared/DarkGradient.js ================================================ import React from 'react'; export const UnstyledDarkHandle = ({ className }) => ( ); const darkGradientDefs = ( ); export const darkLEDDefs = ( ); const A = ( ); const B = ( ); const C = ( ); const D = ( ); const E = ( ); const F = ( ); const G = ( ); // See the following link for segment mappings: // https://en.wikipedia.org/wiki/Seven-segment_display#/media/File:7_segment_display_labeled.svg export const DARK_SEGMENTS = { A, B, C, D, E, F, G }; export const darkDecimal = ( ); export const darkColon = ( ); export default darkGradientDefs; ================================================ FILE: src/styled/shared/Indicator.styled.js ================================================ import PropTypes from 'prop-types'; import styled, { css } from 'styled-components'; import { light } from '../constants'; const Indicator = styled('div')` border-radius: ${({ rectangular }) => (rectangular ? '0' : '50%')}; transition: all 100ms ease-in-out; ${props => { const color = props.main ? props.on ? props.primary || props.theme.primary : props.secondary || props.theme.secondary : props.on ? props.theme.secondary : props.primary || props.theme.primary; return css` width: ${props.width || props.height || props.size}px; height: ${props.height || props.width || props.size}px; background-color: ${color}; ${props.border ? `border: 1px solid ${props.on ? color : '#F8F4F4'};` : ''} ${props.theme.dark ? (props.on && props.main) || (!props.on && !props.main) ? css` box-shadow: 0 0 8px 2px ${color}, 1px 1px 0px 0px rgba(0, 0, 0, 0.9), -1px -1px 0px 0px rgba(255, 255, 255, 0.1); ` : css` background-image: linear-gradient( 145deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.5) 100% ); background-blend-mode: overlay; box-shadow: inset 0 0 8px -1px rgba(0, 0, 0, 0.5), inset 0 0 4px 0 rgba(0, 0, 0, 0.6), -1px -1px 0px 0px rgba(0, 0, 0, 0.9), 1px 1px 0px 0px rgba(255, 255, 255, 0.1); ` : ''} `; }} `; Indicator.defaultProps = { theme: light }; Indicator.propTypes = { /** * Size of the indicator */ size: PropTypes.number, /** * Theme for styling the component */ theme: PropTypes.object, /** * Add border for off */ border: PropTypes.bool, /** * Color to display when on */ primary: PropTypes.string, /** * Color to display when off */ secondary: PropTypes.string }; export default Indicator; ================================================ FILE: src/styled/shared/Label.styled.js ================================================ import styled, { css } from 'styled-components'; export default styled.label` display: block; font-size: 14px; ${({ position }) => position === 'top' ? css` margin-bottom: 8px; ` : css` margin-top: 8px; `} ${props => css` ${props.css} `} `; ================================================ FILE: src/styled/shared/LabelContainer.styled.js ================================================ import React from 'react'; import styled from 'styled-components'; import Label from './Label.styled'; const Container = styled.div` display: flex; align-items: center; justify-content: space-around; flex-direction: column; ${({ fullSize }) => { if (fullSize) return 'width: 100%;'; return ''; }} `; function LabelContainer(props) { let labelText = props.label; let customLabelStyle = {}; if (typeof props.label === 'object') { labelText = props.label.label; customLabelStyle = props.label.style; } const labelElement = // if (labelText && labelText.length) { return ( {props.labelPosition == 'top' && labelElement} {props.children} {props.labelPosition != 'top' && labelElement} ); // } // return
{props.children}
; } LabelContainer.defaultProps = { labelPosition: 'bottom' }; export default LabelContainer; ================================================ FILE: webpack.config.js ================================================ const path = require('path'); const WebpackDashDynamicImport = require('@plotly/webpack-dash-dynamic-import'); const packagejson = require('./package.json'); const dashLibraryName = packagejson.name.replace(/-/, '_'); module.exports = (env, argv) => { let mode; const overrides = module.exports || {}; // if user specified mode flag take that value if (argv && argv.mode) { mode = argv.mode; } // else if configuration object is already set (module.exports) use that value else if (overrides.mode) { mode = overrides.mode; } // else take webpack default (production) else { mode = 'production'; } let filename = (overrides.output || {}).filename; if (!filename) { const modeSuffix = mode === 'development' ? 'dev' : 'min'; filename = `${dashLibraryName}.${modeSuffix}.js`; } const entry = overrides.entry || { main: './src/index.js' }; const devtool = overrides.devtool || 'source-map'; const externals = ('externals' in overrides) ? overrides.externals : ({ react: 'React', 'react-dom': 'ReactDOM', 'plotly.js': 'Plotly', 'prop-types': 'PropTypes' }); return { mode, entry, output: { path: path.resolve(__dirname, dashLibraryName), chunkFilename: '[name].js', filename, library: dashLibraryName, libraryTarget: 'window' }, externals, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { loader: 'babel-loader' } }, { test: /\.css$/, use: [ { loader: 'style-loader', options: { insert: function insertAtTop(element) { document.head.insertBefore(element, document.head.firstElementChild); }, }, }, { loader: 'css-loader' } ] } ] }, devtool, optimization: { splitChunks: { name: true, cacheGroups: { async: { chunks: 'async', minSize: 0, name(module, chunks, cacheGroupKey) { return `${cacheGroupKey}-${chunks[0].name}`; } } } } }, plugins: [ new WebpackDashDynamicImport() ] } };