WIP
This commit is contained in:
parent
3293ece0d1
commit
00a0e57784
1634 changed files with 78324 additions and 0 deletions
BIN
node_modules/redux/.DS_Store
generated
vendored
Normal file
BIN
node_modules/redux/.DS_Store
generated
vendored
Normal file
Binary file not shown.
4
node_modules/redux/CHANGELOG.md
generated
vendored
Normal file
4
node_modules/redux/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Change Log
|
||||||
|
|
||||||
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
Every release, along with the migration instructions, is documented on the Github [Releases](https://github.com/reactjs/redux/releases) page.
|
21
node_modules/redux/LICENSE.md
generated
vendored
Normal file
21
node_modules/redux/LICENSE.md
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2015-present Dan Abramov
|
||||||
|
|
||||||
|
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.
|
215
node_modules/redux/README.md
generated
vendored
Normal file
215
node_modules/redux/README.md
generated
vendored
Normal file
|
@ -0,0 +1,215 @@
|
||||||
|
# [Redux](http://redux.js.org)
|
||||||
|
|
||||||
|
Redux is a predictable state container for JavaScript apps.
|
||||||
|
|
||||||
|
It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as [live code editing combined with a time traveling debugger](https://github.com/gaearon/redux-devtools).
|
||||||
|
|
||||||
|
You can use Redux together with [React](https://facebook.github.io/react/), or with any other view library.
|
||||||
|
It is tiny (2kB, including dependencies).
|
||||||
|
|
||||||
|
[](https://travis-ci.org/reactjs/redux)
|
||||||
|
[](https://www.npmjs.com/package/redux)
|
||||||
|
[](https://www.npmjs.com/package/redux)
|
||||||
|
[](https://discord.gg/0ZcbPKXt5bZ6au5t)
|
||||||
|
[](https://webchat.freenode.net/)
|
||||||
|
[](https://changelog.com/187)
|
||||||
|
|
||||||
|
>**New! Learn Redux from its creator:
|
||||||
|
>[Getting Started with Redux](https://egghead.io/series/getting-started-with-redux) (30 free videos)**
|
||||||
|
|
||||||
|
### Testimonials
|
||||||
|
|
||||||
|
>[“Love what you’re doing with Redux”](https://twitter.com/jingc/status/616608251463909376)
|
||||||
|
>Jing Chen, creator of Flux
|
||||||
|
|
||||||
|
>[“I asked for comments on Redux in FB's internal JS discussion group, and it was universally praised. Really awesome work.”](https://twitter.com/fisherwebdev/status/616286955693682688)
|
||||||
|
>Bill Fisher, author of Flux documentation
|
||||||
|
|
||||||
|
>[“It's cool that you are inventing a better Flux by not doing Flux at all.”](https://twitter.com/andrestaltz/status/616271392930201604)
|
||||||
|
>André Staltz, creator of Cycle
|
||||||
|
|
||||||
|
### Developer Experience
|
||||||
|
|
||||||
|
I wrote Redux while working on my React Europe talk called [“Hot Reloading with Time Travel”](https://www.youtube.com/watch?v=xsSnOQynTHs). My goal was to create a state management library with minimal API but completely predictable behavior, so it is possible to implement logging, hot reloading, time travel, universal apps, record and replay, without any buy-in from the developer.
|
||||||
|
|
||||||
|
### Influences
|
||||||
|
|
||||||
|
Redux evolves the ideas of [Flux](http://facebook.github.io/flux/), but avoids its complexity by taking cues from [Elm](https://github.com/evancz/elm-architecture-tutorial/).
|
||||||
|
Whether you have used them or not, Redux only takes a few minutes to get started with.
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
To install the stable version:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install --save redux
|
||||||
|
```
|
||||||
|
|
||||||
|
This assumes you are using [npm](https://www.npmjs.com/) as your package manager.
|
||||||
|
If you don’t, you can [access these files on npmcdn](https://npmcdn.com/redux/), download them, or point your package manager to them.
|
||||||
|
|
||||||
|
Most commonly people consume Redux as a collection of [CommonJS](http://webpack.github.io/docs/commonjs.html) modules. These modules are what you get when you import `redux` in a [Webpack](http://webpack.github.io), [Browserify](http://browserify.org/), or a Node environment. If you like to live on the edge and use [Rollup](http://rollupjs.org), we support that as well.
|
||||||
|
|
||||||
|
If you don’t use a module bundler, it’s also fine. The `redux` npm package includes precompiled production and development [UMD](https://github.com/umdjs/umd) builds in the [`dist` folder](https://npmcdn.com/redux/dist/). They can be used directly without a bundler and are thus compatible with many popular JavaScript module loaders and environments. For example, you can drop a UMD build as a [`<script>` tag](https://npmcdn.com/redux/dist/redux.js) on the page, or [tell Bower to install it](https://github.com/reactjs/redux/pull/1181#issuecomment-167361975). The UMD builds make Redux available as a `window.Redux` global variable.
|
||||||
|
|
||||||
|
The Redux source code is written in ES2015 but we precompile both CommonJS and UMD builds to ES5 so they work in [any modern browser](http://caniuse.com/#feat=es5). You don’t need to use Babel or a module bundler to [get started with Redux](https://github.com/reactjs/redux/blob/master/examples/counter-vanilla/index.html).
|
||||||
|
|
||||||
|
#### Complementary Packages
|
||||||
|
|
||||||
|
Most likely, you’ll also need [the React bindings](https://github.com/reactjs/react-redux) and [the developer tools](https://github.com/gaearon/redux-devtools).
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install --save react-redux
|
||||||
|
npm install --save-dev redux-devtools
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that unlike Redux itself, many packages in the Redux ecosystem don’t provide UMD builds, so we recommend using CommonJS module bundlers like [Webpack](http://webpack.github.io) and [Browserify](http://browserify.org/) for the most comfortable development experience.
|
||||||
|
|
||||||
|
### The Gist
|
||||||
|
|
||||||
|
The whole state of your app is stored in an object tree inside a single *store*.
|
||||||
|
The only way to change the state tree is to emit an *action*, an object describing what happened.
|
||||||
|
To specify how the actions transform the state tree, you write pure *reducers*.
|
||||||
|
|
||||||
|
That’s it!
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { createStore } from 'redux'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a reducer, a pure function with (state, action) => state signature.
|
||||||
|
* It describes how an action transforms the state into the next state.
|
||||||
|
*
|
||||||
|
* The shape of the state is up to you: it can be a primitive, an array, an object,
|
||||||
|
* or even an Immutable.js data structure. The only important part is that you should
|
||||||
|
* not mutate the state object, but return a new object if the state changes.
|
||||||
|
*
|
||||||
|
* In this example, we use a `switch` statement and strings, but you can use a helper that
|
||||||
|
* follows a different convention (such as function maps) if it makes sense for your
|
||||||
|
* project.
|
||||||
|
*/
|
||||||
|
function counter(state = 0, action) {
|
||||||
|
switch (action.type) {
|
||||||
|
case 'INCREMENT':
|
||||||
|
return state + 1
|
||||||
|
case 'DECREMENT':
|
||||||
|
return state - 1
|
||||||
|
default:
|
||||||
|
return state
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a Redux store holding the state of your app.
|
||||||
|
// Its API is { subscribe, dispatch, getState }.
|
||||||
|
let store = createStore(counter)
|
||||||
|
|
||||||
|
// You can subscribe to the updates manually, or use bindings to your view layer.
|
||||||
|
store.subscribe(() =>
|
||||||
|
console.log(store.getState())
|
||||||
|
)
|
||||||
|
|
||||||
|
// The only way to mutate the internal state is to dispatch an action.
|
||||||
|
// The actions can be serialized, logged or stored and later replayed.
|
||||||
|
store.dispatch({ type: 'INCREMENT' })
|
||||||
|
// 1
|
||||||
|
store.dispatch({ type: 'INCREMENT' })
|
||||||
|
// 2
|
||||||
|
store.dispatch({ type: 'DECREMENT' })
|
||||||
|
// 1
|
||||||
|
```
|
||||||
|
|
||||||
|
Instead of mutating the state directly, you specify the mutations you want to happen with plain objects called *actions*. Then you write a special function called a *reducer* to decide how every action transforms the entire application’s state.
|
||||||
|
|
||||||
|
If you’re coming from Flux, there is a single important difference you need to understand. Redux doesn’t have a Dispatcher or support many stores. Instead, there is just a single store with a single root reducing function. As your app grows, instead of adding stores, you split the root reducer into smaller reducers independently operating on the different parts of the state tree. This is exactly like there is just one root component in a React app, but it is composed out of many small components.
|
||||||
|
|
||||||
|
This architecture might seem like an overkill for a counter app, but the beauty of this pattern is how well it scales to large and complex apps. It also enables very powerful developer tools, because it is possible to trace every mutation to the action that caused it. You can record user sessions and reproduce them just by replaying every action.
|
||||||
|
|
||||||
|
### Learn Redux from Its Creator
|
||||||
|
|
||||||
|
[Getting Started with Redux](https://egghead.io/series/getting-started-with-redux) is a video course consisting of 30 videos narrated by Dan Abramov, author of Redux. It is designed to complement the “Basics” part of the docs while bringing additional insights about immutability, testing, Redux best practices, and using Redux with React. **This course is free and will always be.**
|
||||||
|
|
||||||
|
>[“Great course on egghead.io by @dan_abramov - instead of just showing you how to use #redux, it also shows how and why redux was built!”](https://twitter.com/sandrinodm/status/670548531422326785)
|
||||||
|
>Sandrino Di Mattia
|
||||||
|
|
||||||
|
>[“Plowing through @dan_abramov 'Getting Started with Redux' - its amazing how much simpler concepts get with video.”](https://twitter.com/chrisdhanaraj/status/670328025553219584)
|
||||||
|
>Chris Dhanaraj
|
||||||
|
|
||||||
|
>[“This video series on Redux by @dan_abramov on @eggheadio is spectacular!”](https://twitter.com/eddiezane/status/670333133242408960)
|
||||||
|
>Eddie Zaneski
|
||||||
|
|
||||||
|
>[“Come for the name hype. Stay for the rock solid fundamentals. (Thanks, and great job @dan_abramov and @eggheadio!)”](https://twitter.com/danott/status/669909126554607617)
|
||||||
|
>Dan
|
||||||
|
|
||||||
|
>[“This series of videos on Redux by @dan_abramov is repeatedly blowing my mind - gunna do some serious refactoring”](https://twitter.com/gelatindesign/status/669658358643892224)
|
||||||
|
>Laurence Roberts
|
||||||
|
|
||||||
|
So, what are you waiting for?
|
||||||
|
|
||||||
|
#### [Watch the 30 Free Videos!](https://egghead.io/series/getting-started-with-redux)
|
||||||
|
|
||||||
|
If you enjoyed my course, consider supporting Egghead by [buying a subscription](https://egghead.io/pricing). Subscribers have access to the source code for the example in every one of my videos, as well as to tons of advanced lessons on other topics, including JavaScript in depth, React, Angular, and more. Many [Egghead instructors](https://egghead.io/instructors) are also open source library authors, so buying a subscription is a nice way to thank them for the work that they’ve done.
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
* [Introduction](http://redux.js.org/docs/introduction/index.html)
|
||||||
|
* [Basics](http://redux.js.org/docs/basics/index.html)
|
||||||
|
* [Advanced](http://redux.js.org/docs/advanced/index.html)
|
||||||
|
* [Recipes](http://redux.js.org/docs/recipes/index.html)
|
||||||
|
* [Troubleshooting](http://redux.js.org/docs/Troubleshooting.html)
|
||||||
|
* [Glossary](http://redux.js.org/docs/Glossary.html)
|
||||||
|
* [API Reference](http://redux.js.org/docs/api/index.html)
|
||||||
|
|
||||||
|
For PDF, ePub, and MOBI exports for offline reading, and instructions on how to create them, please see: [paulkogel/redux-offline-docs](https://github.com/paulkogel/redux-offline-docs).
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
* [Counter Vanilla](http://redux.js.org/docs/introduction/Examples.html#counter-vanilla) ([source](https://github.com/reactjs/redux/tree/master/examples/counter-vanilla))
|
||||||
|
* [Counter](http://redux.js.org/docs/introduction/Examples.html#counter) ([source](https://github.com/reactjs/redux/tree/master/examples/counter))
|
||||||
|
* [Todos](http://redux.js.org/docs/introduction/Examples.html#todos) ([source](https://github.com/reactjs/redux/tree/master/examples/todos))
|
||||||
|
* [Todos with Undo](http://redux.js.org/docs/introduction/Examples.html#todos-with-undo) ([source](https://github.com/reactjs/redux/tree/master/examples/todos-with-undo))
|
||||||
|
* [TodoMVC](http://redux.js.org/docs/introduction/Examples.html#todomvc) ([source](https://github.com/reactjs/redux/tree/master/examples/todomvc))
|
||||||
|
* [Shopping Cart](http://redux.js.org/docs/introduction/Examples.html#shopping-cart) ([source](https://github.com/reactjs/redux/tree/master/examples/shopping-cart))
|
||||||
|
* [Tree View](http://redux.js.org/docs/introduction/Examples.html#tree-view) ([source](https://github.com/reactjs/redux/tree/master/examples/tree-view))
|
||||||
|
* [Async](http://redux.js.org/docs/introduction/Examples.html#async) ([source](https://github.com/reactjs/redux/tree/master/examples/async))
|
||||||
|
* [Universal](http://redux.js.org/docs/introduction/Examples.html#universal) ([source](https://github.com/reactjs/redux/tree/master/examples/universal))
|
||||||
|
* [Real World](http://redux.js.org/docs/introduction/Examples.html#real-world) ([source](https://github.com/reactjs/redux/tree/master/examples/real-world))
|
||||||
|
|
||||||
|
If you’re new to the NPM ecosystem and have troubles getting a project up and running, or aren’t sure where to paste the gist above, check out [simplest-redux-example](https://github.com/jackielii/simplest-redux-example) that uses Redux together with React and Browserify.
|
||||||
|
|
||||||
|
### Discussion
|
||||||
|
|
||||||
|
Join the [#redux](https://discord.gg/0ZcbPKXt5bZ6au5t) channel of the [Reactiflux](http://www.reactiflux.com) Discord community.
|
||||||
|
|
||||||
|
### Thanks
|
||||||
|
|
||||||
|
* [The Elm Architecture](https://github.com/evancz/elm-architecture-tutorial) for a great intro to modeling state updates with reducers;
|
||||||
|
* [Turning the database inside-out](http://www.confluent.io/blog/turning-the-database-inside-out-with-apache-samza/) for blowing my mind;
|
||||||
|
* [Developing ClojureScript with Figwheel](https://www.youtube.com/watch?v=j-kj2qwJa_E) for convincing me that re-evaluation should “just work”;
|
||||||
|
* [Webpack](https://github.com/webpack/docs/wiki/hot-module-replacement-with-webpack) for Hot Module Replacement;
|
||||||
|
* [Flummox](https://github.com/acdlite/flummox) for teaching me to approach Flux without boilerplate or singletons;
|
||||||
|
* [disto](https://github.com/threepointone/disto) for a proof of concept of hot reloadable Stores;
|
||||||
|
* [NuclearJS](https://github.com/optimizely/nuclear-js) for proving this architecture can be performant;
|
||||||
|
* [Om](https://github.com/omcljs/om) for popularizing the idea of a single state atom;
|
||||||
|
* [Cycle](https://github.com/cyclejs/cycle-core) for showing how often a function is the best tool;
|
||||||
|
* [React](https://github.com/facebook/react) for the pragmatic innovation.
|
||||||
|
|
||||||
|
Special thanks to [Jamie Paton](http://jdpaton.github.io) for handing over the `redux` NPM package name.
|
||||||
|
|
||||||
|
### Change Log
|
||||||
|
|
||||||
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
Every release, along with the migration instructions, is documented on the Github [Releases](https://github.com/reactjs/redux/releases) page.
|
||||||
|
|
||||||
|
### Patrons
|
||||||
|
|
||||||
|
The work on Redux was [funded by the community](https://www.patreon.com/reactdx).
|
||||||
|
Meet some of the outstanding companies that made it possible:
|
||||||
|
|
||||||
|
* [Webflow](https://github.com/webflow)
|
||||||
|
* [Ximedes](https://www.ximedes.com/)
|
||||||
|
|
||||||
|
[See the full list of Redux patrons.](PATRONS.md)
|
||||||
|
|
||||||
|
### License
|
||||||
|
|
||||||
|
MIT
|
898
node_modules/redux/dist/redux.js
generated
vendored
Normal file
898
node_modules/redux/dist/redux.js
generated
vendored
Normal file
|
@ -0,0 +1,898 @@
|
||||||
|
(function webpackUniversalModuleDefinition(root, factory) {
|
||||||
|
if(typeof exports === 'object' && typeof module === 'object')
|
||||||
|
module.exports = factory();
|
||||||
|
else if(typeof define === 'function' && define.amd)
|
||||||
|
define([], factory);
|
||||||
|
else if(typeof exports === 'object')
|
||||||
|
exports["Redux"] = factory();
|
||||||
|
else
|
||||||
|
root["Redux"] = factory();
|
||||||
|
})(this, function() {
|
||||||
|
return /******/ (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';
|
||||||
|
|
||||||
|
exports.__esModule = true;
|
||||||
|
exports.compose = exports.applyMiddleware = exports.bindActionCreators = exports.combineReducers = exports.createStore = undefined;
|
||||||
|
|
||||||
|
var _createStore = __webpack_require__(2);
|
||||||
|
|
||||||
|
var _createStore2 = _interopRequireDefault(_createStore);
|
||||||
|
|
||||||
|
var _combineReducers = __webpack_require__(7);
|
||||||
|
|
||||||
|
var _combineReducers2 = _interopRequireDefault(_combineReducers);
|
||||||
|
|
||||||
|
var _bindActionCreators = __webpack_require__(6);
|
||||||
|
|
||||||
|
var _bindActionCreators2 = _interopRequireDefault(_bindActionCreators);
|
||||||
|
|
||||||
|
var _applyMiddleware = __webpack_require__(5);
|
||||||
|
|
||||||
|
var _applyMiddleware2 = _interopRequireDefault(_applyMiddleware);
|
||||||
|
|
||||||
|
var _compose = __webpack_require__(1);
|
||||||
|
|
||||||
|
var _compose2 = _interopRequireDefault(_compose);
|
||||||
|
|
||||||
|
var _warning = __webpack_require__(3);
|
||||||
|
|
||||||
|
var _warning2 = _interopRequireDefault(_warning);
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is a dummy function to check if the function name has been altered by minification.
|
||||||
|
* If the function has been minified and NODE_ENV !== 'production', warn the user.
|
||||||
|
*/
|
||||||
|
function isCrushed() {}
|
||||||
|
|
||||||
|
if (("development") !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
|
||||||
|
(0, _warning2["default"])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.createStore = _createStore2["default"];
|
||||||
|
exports.combineReducers = _combineReducers2["default"];
|
||||||
|
exports.bindActionCreators = _bindActionCreators2["default"];
|
||||||
|
exports.applyMiddleware = _applyMiddleware2["default"];
|
||||||
|
exports.compose = _compose2["default"];
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 1 */
|
||||||
|
/***/ function(module, exports) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
exports.__esModule = true;
|
||||||
|
exports["default"] = compose;
|
||||||
|
/**
|
||||||
|
* Composes single-argument functions from right to left. The rightmost
|
||||||
|
* function can take multiple arguments as it provides the signature for
|
||||||
|
* the resulting composite function.
|
||||||
|
*
|
||||||
|
* @param {...Function} funcs The functions to compose.
|
||||||
|
* @returns {Function} A function obtained by composing the argument functions
|
||||||
|
* from right to left. For example, compose(f, g, h) is identical to doing
|
||||||
|
* (...args) => f(g(h(...args))).
|
||||||
|
*/
|
||||||
|
|
||||||
|
function compose() {
|
||||||
|
for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
|
||||||
|
funcs[_key] = arguments[_key];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (funcs.length === 0) {
|
||||||
|
return function (arg) {
|
||||||
|
return arg;
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
var _ret = function () {
|
||||||
|
var last = funcs[funcs.length - 1];
|
||||||
|
var rest = funcs.slice(0, -1);
|
||||||
|
return {
|
||||||
|
v: function v() {
|
||||||
|
return rest.reduceRight(function (composed, f) {
|
||||||
|
return f(composed);
|
||||||
|
}, last.apply(undefined, arguments));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}();
|
||||||
|
|
||||||
|
if (typeof _ret === "object") return _ret.v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 2 */
|
||||||
|
/***/ function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
exports.__esModule = true;
|
||||||
|
exports.ActionTypes = undefined;
|
||||||
|
exports["default"] = createStore;
|
||||||
|
|
||||||
|
var _isPlainObject = __webpack_require__(4);
|
||||||
|
|
||||||
|
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
|
||||||
|
|
||||||
|
var _symbolObservable = __webpack_require__(11);
|
||||||
|
|
||||||
|
var _symbolObservable2 = _interopRequireDefault(_symbolObservable);
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These are private action types reserved by Redux.
|
||||||
|
* For any unknown actions, you must return the current state.
|
||||||
|
* If the current state is undefined, you must return the initial state.
|
||||||
|
* Do not reference these action types directly in your code.
|
||||||
|
*/
|
||||||
|
var ActionTypes = exports.ActionTypes = {
|
||||||
|
INIT: '@@redux/INIT'
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a Redux store that holds the state tree.
|
||||||
|
* The only way to change the data in the store is to call `dispatch()` on it.
|
||||||
|
*
|
||||||
|
* There should only be a single store in your app. To specify how different
|
||||||
|
* parts of the state tree respond to actions, you may combine several reducers
|
||||||
|
* into a single reducer function by using `combineReducers`.
|
||||||
|
*
|
||||||
|
* @param {Function} reducer A function that returns the next state tree, given
|
||||||
|
* the current state tree and the action to handle.
|
||||||
|
*
|
||||||
|
* @param {any} [initialState] The initial state. You may optionally specify it
|
||||||
|
* to hydrate the state from the server in universal apps, or to restore a
|
||||||
|
* previously serialized user session.
|
||||||
|
* If you use `combineReducers` to produce the root reducer function, this must be
|
||||||
|
* an object with the same shape as `combineReducers` keys.
|
||||||
|
*
|
||||||
|
* @param {Function} enhancer The store enhancer. You may optionally specify it
|
||||||
|
* to enhance the store with third-party capabilities such as middleware,
|
||||||
|
* time travel, persistence, etc. The only store enhancer that ships with Redux
|
||||||
|
* is `applyMiddleware()`.
|
||||||
|
*
|
||||||
|
* @returns {Store} A Redux store that lets you read the state, dispatch actions
|
||||||
|
* and subscribe to changes.
|
||||||
|
*/
|
||||||
|
function createStore(reducer, initialState, enhancer) {
|
||||||
|
var _ref2;
|
||||||
|
|
||||||
|
if (typeof initialState === 'function' && typeof enhancer === 'undefined') {
|
||||||
|
enhancer = initialState;
|
||||||
|
initialState = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof enhancer !== 'undefined') {
|
||||||
|
if (typeof enhancer !== 'function') {
|
||||||
|
throw new Error('Expected the enhancer to be a function.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return enhancer(createStore)(reducer, initialState);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof reducer !== 'function') {
|
||||||
|
throw new Error('Expected the reducer to be a function.');
|
||||||
|
}
|
||||||
|
|
||||||
|
var currentReducer = reducer;
|
||||||
|
var currentState = initialState;
|
||||||
|
var currentListeners = [];
|
||||||
|
var nextListeners = currentListeners;
|
||||||
|
var isDispatching = false;
|
||||||
|
|
||||||
|
function ensureCanMutateNextListeners() {
|
||||||
|
if (nextListeners === currentListeners) {
|
||||||
|
nextListeners = currentListeners.slice();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads the state tree managed by the store.
|
||||||
|
*
|
||||||
|
* @returns {any} The current state tree of your application.
|
||||||
|
*/
|
||||||
|
function getState() {
|
||||||
|
return currentState;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a change listener. It will be called any time an action is dispatched,
|
||||||
|
* and some part of the state tree may potentially have changed. You may then
|
||||||
|
* call `getState()` to read the current state tree inside the callback.
|
||||||
|
*
|
||||||
|
* You may call `dispatch()` from a change listener, with the following
|
||||||
|
* caveats:
|
||||||
|
*
|
||||||
|
* 1. The subscriptions are snapshotted just before every `dispatch()` call.
|
||||||
|
* If you subscribe or unsubscribe while the listeners are being invoked, this
|
||||||
|
* will not have any effect on the `dispatch()` that is currently in progress.
|
||||||
|
* However, the next `dispatch()` call, whether nested or not, will use a more
|
||||||
|
* recent snapshot of the subscription list.
|
||||||
|
*
|
||||||
|
* 2. The listener should not expect to see all state changes, as the state
|
||||||
|
* might have been updated multiple times during a nested `dispatch()` before
|
||||||
|
* the listener is called. It is, however, guaranteed that all subscribers
|
||||||
|
* registered before the `dispatch()` started will be called with the latest
|
||||||
|
* state by the time it exits.
|
||||||
|
*
|
||||||
|
* @param {Function} listener A callback to be invoked on every dispatch.
|
||||||
|
* @returns {Function} A function to remove this change listener.
|
||||||
|
*/
|
||||||
|
function subscribe(listener) {
|
||||||
|
if (typeof listener !== 'function') {
|
||||||
|
throw new Error('Expected listener to be a function.');
|
||||||
|
}
|
||||||
|
|
||||||
|
var isSubscribed = true;
|
||||||
|
|
||||||
|
ensureCanMutateNextListeners();
|
||||||
|
nextListeners.push(listener);
|
||||||
|
|
||||||
|
return function unsubscribe() {
|
||||||
|
if (!isSubscribed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
isSubscribed = false;
|
||||||
|
|
||||||
|
ensureCanMutateNextListeners();
|
||||||
|
var index = nextListeners.indexOf(listener);
|
||||||
|
nextListeners.splice(index, 1);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dispatches an action. It is the only way to trigger a state change.
|
||||||
|
*
|
||||||
|
* The `reducer` function, used to create the store, will be called with the
|
||||||
|
* current state tree and the given `action`. Its return value will
|
||||||
|
* be considered the **next** state of the tree, and the change listeners
|
||||||
|
* will be notified.
|
||||||
|
*
|
||||||
|
* The base implementation only supports plain object actions. If you want to
|
||||||
|
* dispatch a Promise, an Observable, a thunk, or something else, you need to
|
||||||
|
* wrap your store creating function into the corresponding middleware. For
|
||||||
|
* example, see the documentation for the `redux-thunk` package. Even the
|
||||||
|
* middleware will eventually dispatch plain object actions using this method.
|
||||||
|
*
|
||||||
|
* @param {Object} action A plain object representing “what changed”. It is
|
||||||
|
* a good idea to keep actions serializable so you can record and replay user
|
||||||
|
* sessions, or use the time travelling `redux-devtools`. An action must have
|
||||||
|
* a `type` property which may not be `undefined`. It is a good idea to use
|
||||||
|
* string constants for action types.
|
||||||
|
*
|
||||||
|
* @returns {Object} For convenience, the same action object you dispatched.
|
||||||
|
*
|
||||||
|
* Note that, if you use a custom middleware, it may wrap `dispatch()` to
|
||||||
|
* return something else (for example, a Promise you can await).
|
||||||
|
*/
|
||||||
|
function dispatch(action) {
|
||||||
|
if (!(0, _isPlainObject2["default"])(action)) {
|
||||||
|
throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof action.type === 'undefined') {
|
||||||
|
throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isDispatching) {
|
||||||
|
throw new Error('Reducers may not dispatch actions.');
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
isDispatching = true;
|
||||||
|
currentState = currentReducer(currentState, action);
|
||||||
|
} finally {
|
||||||
|
isDispatching = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var listeners = currentListeners = nextListeners;
|
||||||
|
for (var i = 0; i < listeners.length; i++) {
|
||||||
|
listeners[i]();
|
||||||
|
}
|
||||||
|
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replaces the reducer currently used by the store to calculate the state.
|
||||||
|
*
|
||||||
|
* You might need this if your app implements code splitting and you want to
|
||||||
|
* load some of the reducers dynamically. You might also need this if you
|
||||||
|
* implement a hot reloading mechanism for Redux.
|
||||||
|
*
|
||||||
|
* @param {Function} nextReducer The reducer for the store to use instead.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
function replaceReducer(nextReducer) {
|
||||||
|
if (typeof nextReducer !== 'function') {
|
||||||
|
throw new Error('Expected the nextReducer to be a function.');
|
||||||
|
}
|
||||||
|
|
||||||
|
currentReducer = nextReducer;
|
||||||
|
dispatch({ type: ActionTypes.INIT });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interoperability point for observable/reactive libraries.
|
||||||
|
* @returns {observable} A minimal observable of state changes.
|
||||||
|
* For more information, see the observable proposal:
|
||||||
|
* https://github.com/zenparsing/es-observable
|
||||||
|
*/
|
||||||
|
function observable() {
|
||||||
|
var _ref;
|
||||||
|
|
||||||
|
var outerSubscribe = subscribe;
|
||||||
|
return _ref = {
|
||||||
|
/**
|
||||||
|
* The minimal observable subscription method.
|
||||||
|
* @param {Object} observer Any object that can be used as an observer.
|
||||||
|
* The observer object should have a `next` method.
|
||||||
|
* @returns {subscription} An object with an `unsubscribe` method that can
|
||||||
|
* be used to unsubscribe the observable from the store, and prevent further
|
||||||
|
* emission of values from the observable.
|
||||||
|
*/
|
||||||
|
|
||||||
|
subscribe: function subscribe(observer) {
|
||||||
|
if (typeof observer !== 'object') {
|
||||||
|
throw new TypeError('Expected the observer to be an object.');
|
||||||
|
}
|
||||||
|
|
||||||
|
function observeState() {
|
||||||
|
if (observer.next) {
|
||||||
|
observer.next(getState());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
observeState();
|
||||||
|
var unsubscribe = outerSubscribe(observeState);
|
||||||
|
return { unsubscribe: unsubscribe };
|
||||||
|
}
|
||||||
|
}, _ref[_symbolObservable2["default"]] = function () {
|
||||||
|
return this;
|
||||||
|
}, _ref;
|
||||||
|
}
|
||||||
|
|
||||||
|
// When a store is created, an "INIT" action is dispatched so that every
|
||||||
|
// reducer returns their initial state. This effectively populates
|
||||||
|
// the initial state tree.
|
||||||
|
dispatch({ type: ActionTypes.INIT });
|
||||||
|
|
||||||
|
return _ref2 = {
|
||||||
|
dispatch: dispatch,
|
||||||
|
subscribe: subscribe,
|
||||||
|
getState: getState,
|
||||||
|
replaceReducer: replaceReducer
|
||||||
|
}, _ref2[_symbolObservable2["default"]] = observable, _ref2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 3 */
|
||||||
|
/***/ function(module, exports) {
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
exports.__esModule = true;
|
||||||
|
exports["default"] = warning;
|
||||||
|
/**
|
||||||
|
* Prints a warning in the console if it exists.
|
||||||
|
*
|
||||||
|
* @param {String} message The warning message.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
function warning(message) {
|
||||||
|
/* eslint-disable no-console */
|
||||||
|
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
||||||
|
console.error(message);
|
||||||
|
}
|
||||||
|
/* eslint-enable no-console */
|
||||||
|
try {
|
||||||
|
// This error was thrown as a convenience so that if you enable
|
||||||
|
// "break on all exceptions" in your console,
|
||||||
|
// it would pause the execution at this line.
|
||||||
|
throw new Error(message);
|
||||||
|
/* eslint-disable no-empty */
|
||||||
|
} catch (e) {}
|
||||||
|
/* eslint-enable no-empty */
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 4 */
|
||||||
|
/***/ function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
var getPrototype = __webpack_require__(8),
|
||||||
|
isHostObject = __webpack_require__(9),
|
||||||
|
isObjectLike = __webpack_require__(10);
|
||||||
|
|
||||||
|
/** `Object#toString` result references. */
|
||||||
|
var objectTag = '[object Object]';
|
||||||
|
|
||||||
|
/** Used for built-in method references. */
|
||||||
|
var objectProto = Object.prototype;
|
||||||
|
|
||||||
|
/** Used to resolve the decompiled source of functions. */
|
||||||
|
var funcToString = Function.prototype.toString;
|
||||||
|
|
||||||
|
/** Used to check objects for own properties. */
|
||||||
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||||
|
|
||||||
|
/** Used to infer the `Object` constructor. */
|
||||||
|
var objectCtorString = funcToString.call(Object);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to resolve the
|
||||||
|
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||||
|
* of values.
|
||||||
|
*/
|
||||||
|
var objectToString = objectProto.toString;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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) ||
|
||||||
|
objectToString.call(value) != objectTag || isHostObject(value)) {
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 5 */
|
||||||
|
/***/ function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
exports.__esModule = 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"] = applyMiddleware;
|
||||||
|
|
||||||
|
var _compose = __webpack_require__(1);
|
||||||
|
|
||||||
|
var _compose2 = _interopRequireDefault(_compose);
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a store enhancer that applies middleware to the dispatch method
|
||||||
|
* of the Redux store. This is handy for a variety of tasks, such as expressing
|
||||||
|
* asynchronous actions in a concise manner, or logging every action payload.
|
||||||
|
*
|
||||||
|
* See `redux-thunk` package as an example of the Redux middleware.
|
||||||
|
*
|
||||||
|
* Because middleware is potentially asynchronous, this should be the first
|
||||||
|
* store enhancer in the composition chain.
|
||||||
|
*
|
||||||
|
* Note that each middleware will be given the `dispatch` and `getState` functions
|
||||||
|
* as named arguments.
|
||||||
|
*
|
||||||
|
* @param {...Function} middlewares The middleware chain to be applied.
|
||||||
|
* @returns {Function} A store enhancer applying the middleware.
|
||||||
|
*/
|
||||||
|
function applyMiddleware() {
|
||||||
|
for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
|
||||||
|
middlewares[_key] = arguments[_key];
|
||||||
|
}
|
||||||
|
|
||||||
|
return function (createStore) {
|
||||||
|
return function (reducer, initialState, enhancer) {
|
||||||
|
var store = createStore(reducer, initialState, enhancer);
|
||||||
|
var _dispatch = store.dispatch;
|
||||||
|
var chain = [];
|
||||||
|
|
||||||
|
var middlewareAPI = {
|
||||||
|
getState: store.getState,
|
||||||
|
dispatch: function dispatch(action) {
|
||||||
|
return _dispatch(action);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
chain = middlewares.map(function (middleware) {
|
||||||
|
return middleware(middlewareAPI);
|
||||||
|
});
|
||||||
|
_dispatch = _compose2["default"].apply(undefined, chain)(store.dispatch);
|
||||||
|
|
||||||
|
return _extends({}, store, {
|
||||||
|
dispatch: _dispatch
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 6 */
|
||||||
|
/***/ function(module, exports) {
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
exports.__esModule = true;
|
||||||
|
exports["default"] = bindActionCreators;
|
||||||
|
function bindActionCreator(actionCreator, dispatch) {
|
||||||
|
return function () {
|
||||||
|
return dispatch(actionCreator.apply(undefined, arguments));
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turns an object whose values are action creators, into an object with the
|
||||||
|
* same keys, but with every function wrapped into a `dispatch` call so they
|
||||||
|
* may be invoked directly. This is just a convenience method, as you can call
|
||||||
|
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
|
||||||
|
*
|
||||||
|
* For convenience, you can also pass a single function as the first argument,
|
||||||
|
* and get a function in return.
|
||||||
|
*
|
||||||
|
* @param {Function|Object} actionCreators An object whose values are action
|
||||||
|
* creator functions. One handy way to obtain it is to use ES6 `import * as`
|
||||||
|
* syntax. You may also pass a single function.
|
||||||
|
*
|
||||||
|
* @param {Function} dispatch The `dispatch` function available on your Redux
|
||||||
|
* store.
|
||||||
|
*
|
||||||
|
* @returns {Function|Object} The object mimicking the original object, but with
|
||||||
|
* every action creator wrapped into the `dispatch` call. If you passed a
|
||||||
|
* function as `actionCreators`, the return value will also be a single
|
||||||
|
* function.
|
||||||
|
*/
|
||||||
|
function bindActionCreators(actionCreators, dispatch) {
|
||||||
|
if (typeof actionCreators === 'function') {
|
||||||
|
return bindActionCreator(actionCreators, dispatch);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof actionCreators !== 'object' || actionCreators === null) {
|
||||||
|
throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
|
||||||
|
}
|
||||||
|
|
||||||
|
var keys = Object.keys(actionCreators);
|
||||||
|
var boundActionCreators = {};
|
||||||
|
for (var i = 0; i < keys.length; i++) {
|
||||||
|
var key = keys[i];
|
||||||
|
var actionCreator = actionCreators[key];
|
||||||
|
if (typeof actionCreator === 'function') {
|
||||||
|
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return boundActionCreators;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 7 */
|
||||||
|
/***/ function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
exports.__esModule = true;
|
||||||
|
exports["default"] = combineReducers;
|
||||||
|
|
||||||
|
var _createStore = __webpack_require__(2);
|
||||||
|
|
||||||
|
var _isPlainObject = __webpack_require__(4);
|
||||||
|
|
||||||
|
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
|
||||||
|
|
||||||
|
var _warning = __webpack_require__(3);
|
||||||
|
|
||||||
|
var _warning2 = _interopRequireDefault(_warning);
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
|
function getUndefinedStateErrorMessage(key, action) {
|
||||||
|
var actionType = action && action.type;
|
||||||
|
var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
|
||||||
|
|
||||||
|
return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.';
|
||||||
|
}
|
||||||
|
|
||||||
|
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action) {
|
||||||
|
var reducerKeys = Object.keys(reducers);
|
||||||
|
var argumentName = action && action.type === _createStore.ActionTypes.INIT ? 'initialState argument passed to createStore' : 'previous state received by the reducer';
|
||||||
|
|
||||||
|
if (reducerKeys.length === 0) {
|
||||||
|
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(0, _isPlainObject2["default"])(inputState)) {
|
||||||
|
return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
|
||||||
|
}
|
||||||
|
|
||||||
|
var unexpectedKeys = Object.keys(inputState).filter(function (key) {
|
||||||
|
return !reducers.hasOwnProperty(key);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (unexpectedKeys.length > 0) {
|
||||||
|
return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function assertReducerSanity(reducers) {
|
||||||
|
Object.keys(reducers).forEach(function (key) {
|
||||||
|
var reducer = reducers[key];
|
||||||
|
var initialState = reducer(undefined, { type: _createStore.ActionTypes.INIT });
|
||||||
|
|
||||||
|
if (typeof initialState === 'undefined') {
|
||||||
|
throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.');
|
||||||
|
}
|
||||||
|
|
||||||
|
var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
|
||||||
|
if (typeof reducer(undefined, { type: type }) === 'undefined') {
|
||||||
|
throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + _createStore.ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turns an object whose values are different reducer functions, into a single
|
||||||
|
* reducer function. It will call every child reducer, and gather their results
|
||||||
|
* into a single state object, whose keys correspond to the keys of the passed
|
||||||
|
* reducer functions.
|
||||||
|
*
|
||||||
|
* @param {Object} reducers An object whose values correspond to different
|
||||||
|
* reducer functions that need to be combined into one. One handy way to obtain
|
||||||
|
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
|
||||||
|
* undefined for any action. Instead, they should return their initial state
|
||||||
|
* if the state passed to them was undefined, and the current state for any
|
||||||
|
* unrecognized action.
|
||||||
|
*
|
||||||
|
* @returns {Function} A reducer function that invokes every reducer inside the
|
||||||
|
* passed object, and builds a state object with the same shape.
|
||||||
|
*/
|
||||||
|
function combineReducers(reducers) {
|
||||||
|
var reducerKeys = Object.keys(reducers);
|
||||||
|
var finalReducers = {};
|
||||||
|
for (var i = 0; i < reducerKeys.length; i++) {
|
||||||
|
var key = reducerKeys[i];
|
||||||
|
if (typeof reducers[key] === 'function') {
|
||||||
|
finalReducers[key] = reducers[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var finalReducerKeys = Object.keys(finalReducers);
|
||||||
|
|
||||||
|
var sanityError;
|
||||||
|
try {
|
||||||
|
assertReducerSanity(finalReducers);
|
||||||
|
} catch (e) {
|
||||||
|
sanityError = e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return function combination() {
|
||||||
|
var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
||||||
|
var action = arguments[1];
|
||||||
|
|
||||||
|
if (sanityError) {
|
||||||
|
throw sanityError;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (true) {
|
||||||
|
var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action);
|
||||||
|
if (warningMessage) {
|
||||||
|
(0, _warning2["default"])(warningMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var hasChanged = false;
|
||||||
|
var nextState = {};
|
||||||
|
for (var i = 0; i < finalReducerKeys.length; i++) {
|
||||||
|
var key = finalReducerKeys[i];
|
||||||
|
var reducer = finalReducers[key];
|
||||||
|
var previousStateForKey = state[key];
|
||||||
|
var nextStateForKey = reducer(previousStateForKey, action);
|
||||||
|
if (typeof nextStateForKey === 'undefined') {
|
||||||
|
var errorMessage = getUndefinedStateErrorMessage(key, action);
|
||||||
|
throw new Error(errorMessage);
|
||||||
|
}
|
||||||
|
nextState[key] = nextStateForKey;
|
||||||
|
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
|
||||||
|
}
|
||||||
|
return hasChanged ? nextState : state;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 8 */
|
||||||
|
/***/ function(module, exports) {
|
||||||
|
|
||||||
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||||
|
var nativeGetPrototype = Object.getPrototypeOf;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the `[[Prototype]]` of `value`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to query.
|
||||||
|
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||||
|
*/
|
||||||
|
function getPrototype(value) {
|
||||||
|
return nativeGetPrototype(Object(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = getPrototype;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 9 */
|
||||||
|
/***/ function(module, exports) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is a host object in IE < 9.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
||||||
|
*/
|
||||||
|
function isHostObject(value) {
|
||||||
|
// Many host objects are `Object` objects that can coerce to strings
|
||||||
|
// despite having improperly defined `toString` methods.
|
||||||
|
var result = false;
|
||||||
|
if (value != null && typeof value.toString != 'function') {
|
||||||
|
try {
|
||||||
|
result = !!(value + '');
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = isHostObject;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 10 */
|
||||||
|
/***/ 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 && typeof value == 'object';
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = isObjectLike;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 11 */
|
||||||
|
/***/ function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
/* WEBPACK VAR INJECTION */(function(global) {/* global window */
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = __webpack_require__(12)(global || window || this);
|
||||||
|
|
||||||
|
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 12 */
|
||||||
|
/***/ function(module, exports) {
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = function symbolObservablePonyfill(root) {
|
||||||
|
var result;
|
||||||
|
var Symbol = root.Symbol;
|
||||||
|
|
||||||
|
if (typeof Symbol === 'function') {
|
||||||
|
if (Symbol.observable) {
|
||||||
|
result = Symbol.observable;
|
||||||
|
} else {
|
||||||
|
if (typeof Symbol['for'] === 'function') {
|
||||||
|
result = Symbol['for']('observable');
|
||||||
|
} else {
|
||||||
|
result = Symbol('observable');
|
||||||
|
}
|
||||||
|
Symbol.observable = result;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
result = '@@observable';
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }
|
||||||
|
/******/ ])
|
||||||
|
});
|
||||||
|
;
|
1
node_modules/redux/dist/redux.min.js
generated
vendored
Normal file
1
node_modules/redux/dist/redux.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
48
node_modules/redux/es/applyMiddleware.js
generated
vendored
Normal file
48
node_modules/redux/es/applyMiddleware.js
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
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; };
|
||||||
|
|
||||||
|
import compose from './compose';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a store enhancer that applies middleware to the dispatch method
|
||||||
|
* of the Redux store. This is handy for a variety of tasks, such as expressing
|
||||||
|
* asynchronous actions in a concise manner, or logging every action payload.
|
||||||
|
*
|
||||||
|
* See `redux-thunk` package as an example of the Redux middleware.
|
||||||
|
*
|
||||||
|
* Because middleware is potentially asynchronous, this should be the first
|
||||||
|
* store enhancer in the composition chain.
|
||||||
|
*
|
||||||
|
* Note that each middleware will be given the `dispatch` and `getState` functions
|
||||||
|
* as named arguments.
|
||||||
|
*
|
||||||
|
* @param {...Function} middlewares The middleware chain to be applied.
|
||||||
|
* @returns {Function} A store enhancer applying the middleware.
|
||||||
|
*/
|
||||||
|
export default function applyMiddleware() {
|
||||||
|
for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
|
||||||
|
middlewares[_key] = arguments[_key];
|
||||||
|
}
|
||||||
|
|
||||||
|
return function (createStore) {
|
||||||
|
return function (reducer, initialState, enhancer) {
|
||||||
|
var store = createStore(reducer, initialState, enhancer);
|
||||||
|
var _dispatch = store.dispatch;
|
||||||
|
var chain = [];
|
||||||
|
|
||||||
|
var middlewareAPI = {
|
||||||
|
getState: store.getState,
|
||||||
|
dispatch: function dispatch(action) {
|
||||||
|
return _dispatch(action);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
chain = middlewares.map(function (middleware) {
|
||||||
|
return middleware(middlewareAPI);
|
||||||
|
});
|
||||||
|
_dispatch = compose.apply(undefined, chain)(store.dispatch);
|
||||||
|
|
||||||
|
return _extends({}, store, {
|
||||||
|
dispatch: _dispatch
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
47
node_modules/redux/es/bindActionCreators.js
generated
vendored
Normal file
47
node_modules/redux/es/bindActionCreators.js
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
function bindActionCreator(actionCreator, dispatch) {
|
||||||
|
return function () {
|
||||||
|
return dispatch(actionCreator.apply(undefined, arguments));
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turns an object whose values are action creators, into an object with the
|
||||||
|
* same keys, but with every function wrapped into a `dispatch` call so they
|
||||||
|
* may be invoked directly. This is just a convenience method, as you can call
|
||||||
|
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
|
||||||
|
*
|
||||||
|
* For convenience, you can also pass a single function as the first argument,
|
||||||
|
* and get a function in return.
|
||||||
|
*
|
||||||
|
* @param {Function|Object} actionCreators An object whose values are action
|
||||||
|
* creator functions. One handy way to obtain it is to use ES6 `import * as`
|
||||||
|
* syntax. You may also pass a single function.
|
||||||
|
*
|
||||||
|
* @param {Function} dispatch The `dispatch` function available on your Redux
|
||||||
|
* store.
|
||||||
|
*
|
||||||
|
* @returns {Function|Object} The object mimicking the original object, but with
|
||||||
|
* every action creator wrapped into the `dispatch` call. If you passed a
|
||||||
|
* function as `actionCreators`, the return value will also be a single
|
||||||
|
* function.
|
||||||
|
*/
|
||||||
|
export default function bindActionCreators(actionCreators, dispatch) {
|
||||||
|
if (typeof actionCreators === 'function') {
|
||||||
|
return bindActionCreator(actionCreators, dispatch);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof actionCreators !== 'object' || actionCreators === null) {
|
||||||
|
throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
|
||||||
|
}
|
||||||
|
|
||||||
|
var keys = Object.keys(actionCreators);
|
||||||
|
var boundActionCreators = {};
|
||||||
|
for (var i = 0; i < keys.length; i++) {
|
||||||
|
var key = keys[i];
|
||||||
|
var actionCreator = actionCreators[key];
|
||||||
|
if (typeof actionCreator === 'function') {
|
||||||
|
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return boundActionCreators;
|
||||||
|
}
|
114
node_modules/redux/es/combineReducers.js
generated
vendored
Normal file
114
node_modules/redux/es/combineReducers.js
generated
vendored
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
import { ActionTypes } from './createStore';
|
||||||
|
import isPlainObject from 'lodash-es/isPlainObject';
|
||||||
|
import warning from './utils/warning';
|
||||||
|
|
||||||
|
function getUndefinedStateErrorMessage(key, action) {
|
||||||
|
var actionType = action && action.type;
|
||||||
|
var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
|
||||||
|
|
||||||
|
return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.';
|
||||||
|
}
|
||||||
|
|
||||||
|
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action) {
|
||||||
|
var reducerKeys = Object.keys(reducers);
|
||||||
|
var argumentName = action && action.type === ActionTypes.INIT ? 'initialState argument passed to createStore' : 'previous state received by the reducer';
|
||||||
|
|
||||||
|
if (reducerKeys.length === 0) {
|
||||||
|
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isPlainObject(inputState)) {
|
||||||
|
return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
|
||||||
|
}
|
||||||
|
|
||||||
|
var unexpectedKeys = Object.keys(inputState).filter(function (key) {
|
||||||
|
return !reducers.hasOwnProperty(key);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (unexpectedKeys.length > 0) {
|
||||||
|
return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function assertReducerSanity(reducers) {
|
||||||
|
Object.keys(reducers).forEach(function (key) {
|
||||||
|
var reducer = reducers[key];
|
||||||
|
var initialState = reducer(undefined, { type: ActionTypes.INIT });
|
||||||
|
|
||||||
|
if (typeof initialState === 'undefined') {
|
||||||
|
throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.');
|
||||||
|
}
|
||||||
|
|
||||||
|
var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
|
||||||
|
if (typeof reducer(undefined, { type: type }) === 'undefined') {
|
||||||
|
throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turns an object whose values are different reducer functions, into a single
|
||||||
|
* reducer function. It will call every child reducer, and gather their results
|
||||||
|
* into a single state object, whose keys correspond to the keys of the passed
|
||||||
|
* reducer functions.
|
||||||
|
*
|
||||||
|
* @param {Object} reducers An object whose values correspond to different
|
||||||
|
* reducer functions that need to be combined into one. One handy way to obtain
|
||||||
|
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
|
||||||
|
* undefined for any action. Instead, they should return their initial state
|
||||||
|
* if the state passed to them was undefined, and the current state for any
|
||||||
|
* unrecognized action.
|
||||||
|
*
|
||||||
|
* @returns {Function} A reducer function that invokes every reducer inside the
|
||||||
|
* passed object, and builds a state object with the same shape.
|
||||||
|
*/
|
||||||
|
export default function combineReducers(reducers) {
|
||||||
|
var reducerKeys = Object.keys(reducers);
|
||||||
|
var finalReducers = {};
|
||||||
|
for (var i = 0; i < reducerKeys.length; i++) {
|
||||||
|
var key = reducerKeys[i];
|
||||||
|
if (typeof reducers[key] === 'function') {
|
||||||
|
finalReducers[key] = reducers[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var finalReducerKeys = Object.keys(finalReducers);
|
||||||
|
|
||||||
|
var sanityError;
|
||||||
|
try {
|
||||||
|
assertReducerSanity(finalReducers);
|
||||||
|
} catch (e) {
|
||||||
|
sanityError = e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return function combination() {
|
||||||
|
var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
||||||
|
var action = arguments[1];
|
||||||
|
|
||||||
|
if (sanityError) {
|
||||||
|
throw sanityError;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
|
var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action);
|
||||||
|
if (warningMessage) {
|
||||||
|
warning(warningMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var hasChanged = false;
|
||||||
|
var nextState = {};
|
||||||
|
for (var i = 0; i < finalReducerKeys.length; i++) {
|
||||||
|
var key = finalReducerKeys[i];
|
||||||
|
var reducer = finalReducers[key];
|
||||||
|
var previousStateForKey = state[key];
|
||||||
|
var nextStateForKey = reducer(previousStateForKey, action);
|
||||||
|
if (typeof nextStateForKey === 'undefined') {
|
||||||
|
var errorMessage = getUndefinedStateErrorMessage(key, action);
|
||||||
|
throw new Error(errorMessage);
|
||||||
|
}
|
||||||
|
nextState[key] = nextStateForKey;
|
||||||
|
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
|
||||||
|
}
|
||||||
|
return hasChanged ? nextState : state;
|
||||||
|
};
|
||||||
|
}
|
36
node_modules/redux/es/compose.js
generated
vendored
Normal file
36
node_modules/redux/es/compose.js
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
/**
|
||||||
|
* Composes single-argument functions from right to left. The rightmost
|
||||||
|
* function can take multiple arguments as it provides the signature for
|
||||||
|
* the resulting composite function.
|
||||||
|
*
|
||||||
|
* @param {...Function} funcs The functions to compose.
|
||||||
|
* @returns {Function} A function obtained by composing the argument functions
|
||||||
|
* from right to left. For example, compose(f, g, h) is identical to doing
|
||||||
|
* (...args) => f(g(h(...args))).
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default function compose() {
|
||||||
|
for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
|
||||||
|
funcs[_key] = arguments[_key];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (funcs.length === 0) {
|
||||||
|
return function (arg) {
|
||||||
|
return arg;
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
var _ret = function () {
|
||||||
|
var last = funcs[funcs.length - 1];
|
||||||
|
var rest = funcs.slice(0, -1);
|
||||||
|
return {
|
||||||
|
v: function v() {
|
||||||
|
return rest.reduceRight(function (composed, f) {
|
||||||
|
return f(composed);
|
||||||
|
}, last.apply(undefined, arguments));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}();
|
||||||
|
|
||||||
|
if (typeof _ret === "object") return _ret.v;
|
||||||
|
}
|
||||||
|
}
|
249
node_modules/redux/es/createStore.js
generated
vendored
Normal file
249
node_modules/redux/es/createStore.js
generated
vendored
Normal file
|
@ -0,0 +1,249 @@
|
||||||
|
import isPlainObject from 'lodash-es/isPlainObject';
|
||||||
|
import $$observable from 'symbol-observable';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These are private action types reserved by Redux.
|
||||||
|
* For any unknown actions, you must return the current state.
|
||||||
|
* If the current state is undefined, you must return the initial state.
|
||||||
|
* Do not reference these action types directly in your code.
|
||||||
|
*/
|
||||||
|
export var ActionTypes = {
|
||||||
|
INIT: '@@redux/INIT'
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a Redux store that holds the state tree.
|
||||||
|
* The only way to change the data in the store is to call `dispatch()` on it.
|
||||||
|
*
|
||||||
|
* There should only be a single store in your app. To specify how different
|
||||||
|
* parts of the state tree respond to actions, you may combine several reducers
|
||||||
|
* into a single reducer function by using `combineReducers`.
|
||||||
|
*
|
||||||
|
* @param {Function} reducer A function that returns the next state tree, given
|
||||||
|
* the current state tree and the action to handle.
|
||||||
|
*
|
||||||
|
* @param {any} [initialState] The initial state. You may optionally specify it
|
||||||
|
* to hydrate the state from the server in universal apps, or to restore a
|
||||||
|
* previously serialized user session.
|
||||||
|
* If you use `combineReducers` to produce the root reducer function, this must be
|
||||||
|
* an object with the same shape as `combineReducers` keys.
|
||||||
|
*
|
||||||
|
* @param {Function} enhancer The store enhancer. You may optionally specify it
|
||||||
|
* to enhance the store with third-party capabilities such as middleware,
|
||||||
|
* time travel, persistence, etc. The only store enhancer that ships with Redux
|
||||||
|
* is `applyMiddleware()`.
|
||||||
|
*
|
||||||
|
* @returns {Store} A Redux store that lets you read the state, dispatch actions
|
||||||
|
* and subscribe to changes.
|
||||||
|
*/
|
||||||
|
export default function createStore(reducer, initialState, enhancer) {
|
||||||
|
var _ref2;
|
||||||
|
|
||||||
|
if (typeof initialState === 'function' && typeof enhancer === 'undefined') {
|
||||||
|
enhancer = initialState;
|
||||||
|
initialState = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof enhancer !== 'undefined') {
|
||||||
|
if (typeof enhancer !== 'function') {
|
||||||
|
throw new Error('Expected the enhancer to be a function.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return enhancer(createStore)(reducer, initialState);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof reducer !== 'function') {
|
||||||
|
throw new Error('Expected the reducer to be a function.');
|
||||||
|
}
|
||||||
|
|
||||||
|
var currentReducer = reducer;
|
||||||
|
var currentState = initialState;
|
||||||
|
var currentListeners = [];
|
||||||
|
var nextListeners = currentListeners;
|
||||||
|
var isDispatching = false;
|
||||||
|
|
||||||
|
function ensureCanMutateNextListeners() {
|
||||||
|
if (nextListeners === currentListeners) {
|
||||||
|
nextListeners = currentListeners.slice();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads the state tree managed by the store.
|
||||||
|
*
|
||||||
|
* @returns {any} The current state tree of your application.
|
||||||
|
*/
|
||||||
|
function getState() {
|
||||||
|
return currentState;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a change listener. It will be called any time an action is dispatched,
|
||||||
|
* and some part of the state tree may potentially have changed. You may then
|
||||||
|
* call `getState()` to read the current state tree inside the callback.
|
||||||
|
*
|
||||||
|
* You may call `dispatch()` from a change listener, with the following
|
||||||
|
* caveats:
|
||||||
|
*
|
||||||
|
* 1. The subscriptions are snapshotted just before every `dispatch()` call.
|
||||||
|
* If you subscribe or unsubscribe while the listeners are being invoked, this
|
||||||
|
* will not have any effect on the `dispatch()` that is currently in progress.
|
||||||
|
* However, the next `dispatch()` call, whether nested or not, will use a more
|
||||||
|
* recent snapshot of the subscription list.
|
||||||
|
*
|
||||||
|
* 2. The listener should not expect to see all state changes, as the state
|
||||||
|
* might have been updated multiple times during a nested `dispatch()` before
|
||||||
|
* the listener is called. It is, however, guaranteed that all subscribers
|
||||||
|
* registered before the `dispatch()` started will be called with the latest
|
||||||
|
* state by the time it exits.
|
||||||
|
*
|
||||||
|
* @param {Function} listener A callback to be invoked on every dispatch.
|
||||||
|
* @returns {Function} A function to remove this change listener.
|
||||||
|
*/
|
||||||
|
function subscribe(listener) {
|
||||||
|
if (typeof listener !== 'function') {
|
||||||
|
throw new Error('Expected listener to be a function.');
|
||||||
|
}
|
||||||
|
|
||||||
|
var isSubscribed = true;
|
||||||
|
|
||||||
|
ensureCanMutateNextListeners();
|
||||||
|
nextListeners.push(listener);
|
||||||
|
|
||||||
|
return function unsubscribe() {
|
||||||
|
if (!isSubscribed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
isSubscribed = false;
|
||||||
|
|
||||||
|
ensureCanMutateNextListeners();
|
||||||
|
var index = nextListeners.indexOf(listener);
|
||||||
|
nextListeners.splice(index, 1);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dispatches an action. It is the only way to trigger a state change.
|
||||||
|
*
|
||||||
|
* The `reducer` function, used to create the store, will be called with the
|
||||||
|
* current state tree and the given `action`. Its return value will
|
||||||
|
* be considered the **next** state of the tree, and the change listeners
|
||||||
|
* will be notified.
|
||||||
|
*
|
||||||
|
* The base implementation only supports plain object actions. If you want to
|
||||||
|
* dispatch a Promise, an Observable, a thunk, or something else, you need to
|
||||||
|
* wrap your store creating function into the corresponding middleware. For
|
||||||
|
* example, see the documentation for the `redux-thunk` package. Even the
|
||||||
|
* middleware will eventually dispatch plain object actions using this method.
|
||||||
|
*
|
||||||
|
* @param {Object} action A plain object representing “what changed”. It is
|
||||||
|
* a good idea to keep actions serializable so you can record and replay user
|
||||||
|
* sessions, or use the time travelling `redux-devtools`. An action must have
|
||||||
|
* a `type` property which may not be `undefined`. It is a good idea to use
|
||||||
|
* string constants for action types.
|
||||||
|
*
|
||||||
|
* @returns {Object} For convenience, the same action object you dispatched.
|
||||||
|
*
|
||||||
|
* Note that, if you use a custom middleware, it may wrap `dispatch()` to
|
||||||
|
* return something else (for example, a Promise you can await).
|
||||||
|
*/
|
||||||
|
function dispatch(action) {
|
||||||
|
if (!isPlainObject(action)) {
|
||||||
|
throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof action.type === 'undefined') {
|
||||||
|
throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isDispatching) {
|
||||||
|
throw new Error('Reducers may not dispatch actions.');
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
isDispatching = true;
|
||||||
|
currentState = currentReducer(currentState, action);
|
||||||
|
} finally {
|
||||||
|
isDispatching = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var listeners = currentListeners = nextListeners;
|
||||||
|
for (var i = 0; i < listeners.length; i++) {
|
||||||
|
listeners[i]();
|
||||||
|
}
|
||||||
|
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replaces the reducer currently used by the store to calculate the state.
|
||||||
|
*
|
||||||
|
* You might need this if your app implements code splitting and you want to
|
||||||
|
* load some of the reducers dynamically. You might also need this if you
|
||||||
|
* implement a hot reloading mechanism for Redux.
|
||||||
|
*
|
||||||
|
* @param {Function} nextReducer The reducer for the store to use instead.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
function replaceReducer(nextReducer) {
|
||||||
|
if (typeof nextReducer !== 'function') {
|
||||||
|
throw new Error('Expected the nextReducer to be a function.');
|
||||||
|
}
|
||||||
|
|
||||||
|
currentReducer = nextReducer;
|
||||||
|
dispatch({ type: ActionTypes.INIT });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interoperability point for observable/reactive libraries.
|
||||||
|
* @returns {observable} A minimal observable of state changes.
|
||||||
|
* For more information, see the observable proposal:
|
||||||
|
* https://github.com/zenparsing/es-observable
|
||||||
|
*/
|
||||||
|
function observable() {
|
||||||
|
var _ref;
|
||||||
|
|
||||||
|
var outerSubscribe = subscribe;
|
||||||
|
return _ref = {
|
||||||
|
/**
|
||||||
|
* The minimal observable subscription method.
|
||||||
|
* @param {Object} observer Any object that can be used as an observer.
|
||||||
|
* The observer object should have a `next` method.
|
||||||
|
* @returns {subscription} An object with an `unsubscribe` method that can
|
||||||
|
* be used to unsubscribe the observable from the store, and prevent further
|
||||||
|
* emission of values from the observable.
|
||||||
|
*/
|
||||||
|
|
||||||
|
subscribe: function subscribe(observer) {
|
||||||
|
if (typeof observer !== 'object') {
|
||||||
|
throw new TypeError('Expected the observer to be an object.');
|
||||||
|
}
|
||||||
|
|
||||||
|
function observeState() {
|
||||||
|
if (observer.next) {
|
||||||
|
observer.next(getState());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
observeState();
|
||||||
|
var unsubscribe = outerSubscribe(observeState);
|
||||||
|
return { unsubscribe: unsubscribe };
|
||||||
|
}
|
||||||
|
}, _ref[$$observable] = function () {
|
||||||
|
return this;
|
||||||
|
}, _ref;
|
||||||
|
}
|
||||||
|
|
||||||
|
// When a store is created, an "INIT" action is dispatched so that every
|
||||||
|
// reducer returns their initial state. This effectively populates
|
||||||
|
// the initial state tree.
|
||||||
|
dispatch({ type: ActionTypes.INIT });
|
||||||
|
|
||||||
|
return _ref2 = {
|
||||||
|
dispatch: dispatch,
|
||||||
|
subscribe: subscribe,
|
||||||
|
getState: getState,
|
||||||
|
replaceReducer: replaceReducer
|
||||||
|
}, _ref2[$$observable] = observable, _ref2;
|
||||||
|
}
|
18
node_modules/redux/es/index.js
generated
vendored
Normal file
18
node_modules/redux/es/index.js
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import createStore from './createStore';
|
||||||
|
import combineReducers from './combineReducers';
|
||||||
|
import bindActionCreators from './bindActionCreators';
|
||||||
|
import applyMiddleware from './applyMiddleware';
|
||||||
|
import compose from './compose';
|
||||||
|
import warning from './utils/warning';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is a dummy function to check if the function name has been altered by minification.
|
||||||
|
* If the function has been minified and NODE_ENV !== 'production', warn the user.
|
||||||
|
*/
|
||||||
|
function isCrushed() {}
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
|
||||||
|
warning('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');
|
||||||
|
}
|
||||||
|
|
||||||
|
export { createStore, combineReducers, bindActionCreators, applyMiddleware, compose };
|
21
node_modules/redux/es/utils/warning.js
generated
vendored
Normal file
21
node_modules/redux/es/utils/warning.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/**
|
||||||
|
* Prints a warning in the console if it exists.
|
||||||
|
*
|
||||||
|
* @param {String} message The warning message.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
export default function warning(message) {
|
||||||
|
/* eslint-disable no-console */
|
||||||
|
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
||||||
|
console.error(message);
|
||||||
|
}
|
||||||
|
/* eslint-enable no-console */
|
||||||
|
try {
|
||||||
|
// This error was thrown as a convenience so that if you enable
|
||||||
|
// "break on all exceptions" in your console,
|
||||||
|
// it would pause the execution at this line.
|
||||||
|
throw new Error(message);
|
||||||
|
/* eslint-disable no-empty */
|
||||||
|
} catch (e) {}
|
||||||
|
/* eslint-enable no-empty */
|
||||||
|
}
|
393
node_modules/redux/index.d.ts
generated
vendored
Normal file
393
node_modules/redux/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,393 @@
|
||||||
|
/**
|
||||||
|
* An *action* is a plain object that represents an intention to change the
|
||||||
|
* state. Actions are the only way to get data into the store. Any data,
|
||||||
|
* whether from UI events, network callbacks, or other sources such as
|
||||||
|
* WebSockets needs to eventually be dispatched as actions.
|
||||||
|
*
|
||||||
|
* Actions must have a `type` field that indicates the type of action being
|
||||||
|
* performed. Types can be defined as constants and imported from another
|
||||||
|
* module. It’s better to use strings for `type` than Symbols because strings
|
||||||
|
* are serializable.
|
||||||
|
*
|
||||||
|
* Other than `type`, the structure of an action object is really up to you.
|
||||||
|
* If you’re interested, check out Flux Standard Action for recommendations on
|
||||||
|
* how actions should be constructed.
|
||||||
|
*/
|
||||||
|
export interface Action {
|
||||||
|
type: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* reducers */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A *reducer* (also called a *reducing function*) is a function that accepts
|
||||||
|
* an accumulation and a value and returns a new accumulation. They are used
|
||||||
|
* to reduce a collection of values down to a single value
|
||||||
|
*
|
||||||
|
* Reducers are not unique to Redux—they are a fundamental concept in
|
||||||
|
* functional programming. Even most non-functional languages, like
|
||||||
|
* JavaScript, have a built-in API for reducing. In JavaScript, it's
|
||||||
|
* `Array.prototype.reduce()`.
|
||||||
|
*
|
||||||
|
* In Redux, the accumulated value is the state object, and the values being
|
||||||
|
* accumulated are actions. Reducers calculate a new state given the previous
|
||||||
|
* state and an action. They must be *pure functions*—functions that return
|
||||||
|
* the exact same output for given inputs. They should also be free of
|
||||||
|
* side-effects. This is what enables exciting features like hot reloading and
|
||||||
|
* time travel.
|
||||||
|
*
|
||||||
|
* Reducers are the most important concept in Redux.
|
||||||
|
*
|
||||||
|
* *Do not put API calls into reducers.*
|
||||||
|
*
|
||||||
|
* @template S State object type.
|
||||||
|
*/
|
||||||
|
export type Reducer<S> = <A extends Action>(state: S, action: A) => S;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object whose values correspond to different reducer functions.
|
||||||
|
*/
|
||||||
|
export interface ReducersMapObject {
|
||||||
|
[key: string]: Reducer<any>;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turns an object whose values are different reducer functions, into a single
|
||||||
|
* reducer function. It will call every child reducer, and gather their results
|
||||||
|
* into a single state object, whose keys correspond to the keys of the passed
|
||||||
|
* reducer functions.
|
||||||
|
*
|
||||||
|
* @template S Combined state object type.
|
||||||
|
*
|
||||||
|
* @param reducers An object whose values correspond to different reducer
|
||||||
|
* functions that need to be combined into one. One handy way to obtain it
|
||||||
|
* is to use ES6 `import * as reducers` syntax. The reducers may never
|
||||||
|
* return undefined for any action. Instead, they should return their
|
||||||
|
* initial state if the state passed to them was undefined, and the current
|
||||||
|
* state for any unrecognized action.
|
||||||
|
*
|
||||||
|
* @returns A reducer function that invokes every reducer inside the passed
|
||||||
|
* object, and builds a state object with the same shape.
|
||||||
|
*/
|
||||||
|
export function combineReducers<S>(reducers: ReducersMapObject): Reducer<S>;
|
||||||
|
|
||||||
|
|
||||||
|
/* store */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A *dispatching function* (or simply *dispatch function*) is a function that
|
||||||
|
* accepts an action or an async action; it then may or may not dispatch one
|
||||||
|
* or more actions to the store.
|
||||||
|
*
|
||||||
|
* We must distinguish between dispatching functions in general and the base
|
||||||
|
* `dispatch` function provided by the store instance without any middleware.
|
||||||
|
*
|
||||||
|
* The base dispatch function *always* synchronously sends an action to the
|
||||||
|
* store’s reducer, along with the previous state returned by the store, to
|
||||||
|
* calculate a new state. It expects actions to be plain objects ready to be
|
||||||
|
* consumed by the reducer.
|
||||||
|
*
|
||||||
|
* Middleware wraps the base dispatch function. It allows the dispatch
|
||||||
|
* function to handle async actions in addition to actions. Middleware may
|
||||||
|
* transform, delay, ignore, or otherwise interpret actions or async actions
|
||||||
|
* before passing them to the next middleware.
|
||||||
|
*/
|
||||||
|
export interface Dispatch<S> {
|
||||||
|
<A extends Action>(action: A): A;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function to remove listener added by `Store.subscribe()`.
|
||||||
|
*/
|
||||||
|
export interface Unsubscribe {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A store is an object that holds the application’s state tree.
|
||||||
|
* There should only be a single store in a Redux app, as the composition
|
||||||
|
* happens on the reducer level.
|
||||||
|
*
|
||||||
|
* @template S State object type.
|
||||||
|
*/
|
||||||
|
export interface Store<S> {
|
||||||
|
/**
|
||||||
|
* Dispatches an action. It is the only way to trigger a state change.
|
||||||
|
*
|
||||||
|
* The `reducer` function, used to create the store, will be called with the
|
||||||
|
* current state tree and the given `action`. Its return value will be
|
||||||
|
* considered the **next** state of the tree, and the change listeners will
|
||||||
|
* be notified.
|
||||||
|
*
|
||||||
|
* The base implementation only supports plain object actions. If you want
|
||||||
|
* to dispatch a Promise, an Observable, a thunk, or something else, you
|
||||||
|
* need to wrap your store creating function into the corresponding
|
||||||
|
* middleware. For example, see the documentation for the `redux-thunk`
|
||||||
|
* package. Even the middleware will eventually dispatch plain object
|
||||||
|
* actions using this method.
|
||||||
|
*
|
||||||
|
* @param action A plain object representing “what changed”. It is a good
|
||||||
|
* idea to keep actions serializable so you can record and replay user
|
||||||
|
* sessions, or use the time travelling `redux-devtools`. An action must
|
||||||
|
* have a `type` property which may not be `undefined`. It is a good idea
|
||||||
|
* to use string constants for action types.
|
||||||
|
*
|
||||||
|
* @returns For convenience, the same action object you dispatched.
|
||||||
|
*
|
||||||
|
* Note that, if you use a custom middleware, it may wrap `dispatch()` to
|
||||||
|
* return something else (for example, a Promise you can await).
|
||||||
|
*/
|
||||||
|
dispatch: Dispatch<S>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads the state tree managed by the store.
|
||||||
|
*
|
||||||
|
* @returns The current state tree of your application.
|
||||||
|
*/
|
||||||
|
getState(): S;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a change listener. It will be called any time an action is
|
||||||
|
* dispatched, and some part of the state tree may potentially have changed.
|
||||||
|
* You may then call `getState()` to read the current state tree inside the
|
||||||
|
* callback.
|
||||||
|
*
|
||||||
|
* You may call `dispatch()` from a change listener, with the following
|
||||||
|
* caveats:
|
||||||
|
*
|
||||||
|
* 1. The subscriptions are snapshotted just before every `dispatch()` call.
|
||||||
|
* If you subscribe or unsubscribe while the listeners are being invoked,
|
||||||
|
* this will not have any effect on the `dispatch()` that is currently in
|
||||||
|
* progress. However, the next `dispatch()` call, whether nested or not,
|
||||||
|
* will use a more recent snapshot of the subscription list.
|
||||||
|
*
|
||||||
|
* 2. The listener should not expect to see all states changes, as the state
|
||||||
|
* might have been updated multiple times during a nested `dispatch()` before
|
||||||
|
* the listener is called. It is, however, guaranteed that all subscribers
|
||||||
|
* registered before the `dispatch()` started will be called with the latest
|
||||||
|
* state by the time it exits.
|
||||||
|
*
|
||||||
|
* @param listener A callback to be invoked on every dispatch.
|
||||||
|
* @returns A function to remove this change listener.
|
||||||
|
*/
|
||||||
|
subscribe(listener: () => void): Unsubscribe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replaces the reducer currently used by the store to calculate the state.
|
||||||
|
*
|
||||||
|
* You might need this if your app implements code splitting and you want to
|
||||||
|
* load some of the reducers dynamically. You might also need this if you
|
||||||
|
* implement a hot reloading mechanism for Redux.
|
||||||
|
*
|
||||||
|
* @param nextReducer The reducer for the store to use instead.
|
||||||
|
*/
|
||||||
|
replaceReducer(nextReducer: Reducer<S>): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A store creator is a function that creates a Redux store. Like with
|
||||||
|
* dispatching function, we must distinguish the base store creator,
|
||||||
|
* `createStore(reducer, initialState)` exported from the Redux package, from
|
||||||
|
* store creators that are returned from the store enhancers.
|
||||||
|
*
|
||||||
|
* @template S State object type.
|
||||||
|
*/
|
||||||
|
export interface StoreCreator {
|
||||||
|
<S>(reducer: Reducer<S>, enhancer?: StoreEnhancer<S>): Store<S>;
|
||||||
|
<S>(reducer: Reducer<S>, initialState: S, enhancer?: StoreEnhancer<S>): Store<S>;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A store enhancer is a higher-order function that composes a store creator
|
||||||
|
* to return a new, enhanced store creator. This is similar to middleware in
|
||||||
|
* that it allows you to alter the store interface in a composable way.
|
||||||
|
*
|
||||||
|
* Store enhancers are much the same concept as higher-order components in
|
||||||
|
* React, which are also occasionally called “component enhancers”.
|
||||||
|
*
|
||||||
|
* Because a store is not an instance, but rather a plain-object collection of
|
||||||
|
* functions, copies can be easily created and modified without mutating the
|
||||||
|
* original store. There is an example in `compose` documentation
|
||||||
|
* demonstrating that.
|
||||||
|
*
|
||||||
|
* Most likely you’ll never write a store enhancer, but you may use the one
|
||||||
|
* provided by the developer tools. It is what makes time travel possible
|
||||||
|
* without the app being aware it is happening. Amusingly, the Redux
|
||||||
|
* middleware implementation is itself a store enhancer.
|
||||||
|
*/
|
||||||
|
export type StoreEnhancer<S> = (next: StoreEnhancerStoreCreator<S>) => StoreEnhancerStoreCreator<S>;
|
||||||
|
export type GenericStoreEnhancer = <S>(next: StoreEnhancerStoreCreator<S>) => StoreEnhancerStoreCreator<S>;
|
||||||
|
export type StoreEnhancerStoreCreator<S> = (reducer: Reducer<S>, initialState: S) => Store<S>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a Redux store that holds the state tree.
|
||||||
|
* The only way to change the data in the store is to call `dispatch()` on it.
|
||||||
|
*
|
||||||
|
* There should only be a single store in your app. To specify how different
|
||||||
|
* parts of the state tree respond to actions, you may combine several
|
||||||
|
* reducers
|
||||||
|
* into a single reducer function by using `combineReducers`.
|
||||||
|
*
|
||||||
|
* @template S State object type.
|
||||||
|
*
|
||||||
|
* @param reducer A function that returns the next state tree, given the
|
||||||
|
* current state tree and the action to handle.
|
||||||
|
*
|
||||||
|
* @param [initialState] The initial state. You may optionally specify it to
|
||||||
|
* hydrate the state from the server in universal apps, or to restore a
|
||||||
|
* previously serialized user session. If you use `combineReducers` to
|
||||||
|
* produce the root reducer function, this must be an object with the same
|
||||||
|
* shape as `combineReducers` keys.
|
||||||
|
*
|
||||||
|
* @param [enhancer] The store enhancer. You may optionally specify it to
|
||||||
|
* enhance the store with third-party capabilities such as middleware, time
|
||||||
|
* travel, persistence, etc. The only store enhancer that ships with Redux
|
||||||
|
* is `applyMiddleware()`.
|
||||||
|
*
|
||||||
|
* @returns A Redux store that lets you read the state, dispatch actions and
|
||||||
|
* subscribe to changes.
|
||||||
|
*/
|
||||||
|
export const createStore: StoreCreator;
|
||||||
|
|
||||||
|
|
||||||
|
/* middleware */
|
||||||
|
|
||||||
|
export interface MiddlewareAPI<S> {
|
||||||
|
dispatch: Dispatch<S>;
|
||||||
|
getState(): S;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A middleware is a higher-order function that composes a dispatch function
|
||||||
|
* to return a new dispatch function. It often turns async actions into
|
||||||
|
* actions.
|
||||||
|
*
|
||||||
|
* Middleware is composable using function composition. It is useful for
|
||||||
|
* logging actions, performing side effects like routing, or turning an
|
||||||
|
* asynchronous API call into a series of synchronous actions.
|
||||||
|
*/
|
||||||
|
export interface Middleware {
|
||||||
|
<S>(api: MiddlewareAPI<S>): (next: Dispatch<S>) => Dispatch<S>;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a store enhancer that applies middleware to the dispatch method
|
||||||
|
* of the Redux store. This is handy for a variety of tasks, such as
|
||||||
|
* expressing asynchronous actions in a concise manner, or logging every
|
||||||
|
* action payload.
|
||||||
|
*
|
||||||
|
* See `redux-thunk` package as an example of the Redux middleware.
|
||||||
|
*
|
||||||
|
* Because middleware is potentially asynchronous, this should be the first
|
||||||
|
* store enhancer in the composition chain.
|
||||||
|
*
|
||||||
|
* Note that each middleware will be given the `dispatch` and `getState`
|
||||||
|
* functions as named arguments.
|
||||||
|
*
|
||||||
|
* @param middlewares The middleware chain to be applied.
|
||||||
|
* @returns A store enhancer applying the middleware.
|
||||||
|
*/
|
||||||
|
export function applyMiddleware(...middlewares: Middleware[]): GenericStoreEnhancer;
|
||||||
|
|
||||||
|
|
||||||
|
/* action creators */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An *action creator* is, quite simply, a function that creates an action. Do
|
||||||
|
* not confuse the two terms—again, an action is a payload of information, and
|
||||||
|
* an action creator is a factory that creates an action.
|
||||||
|
*
|
||||||
|
* Calling an action creator only produces an action, but does not dispatch
|
||||||
|
* it. You need to call the store’s `dispatch` function to actually cause the
|
||||||
|
* mutation. Sometimes we say *bound action creators* to mean functions that
|
||||||
|
* call an action creator and immediately dispatch its result to a specific
|
||||||
|
* store instance.
|
||||||
|
*
|
||||||
|
* If an action creator needs to read the current state, perform an API call,
|
||||||
|
* or cause a side effect, like a routing transition, it should return an
|
||||||
|
* async action instead of an action.
|
||||||
|
*
|
||||||
|
* @template A Returned action type.
|
||||||
|
*/
|
||||||
|
export interface ActionCreator<A> {
|
||||||
|
(...args: any[]): A;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object whose values are action creator functions.
|
||||||
|
*/
|
||||||
|
export interface ActionCreatorsMapObject {
|
||||||
|
[key: string]: ActionCreator<any>;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turns an object whose values are action creators, into an object with the
|
||||||
|
* same keys, but with every function wrapped into a `dispatch` call so they
|
||||||
|
* may be invoked directly. This is just a convenience method, as you can call
|
||||||
|
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
|
||||||
|
*
|
||||||
|
* For convenience, you can also pass a single function as the first argument,
|
||||||
|
* and get a function in return.
|
||||||
|
*
|
||||||
|
* @param actionCreator An object whose values are action creator functions.
|
||||||
|
* One handy way to obtain it is to use ES6 `import * as` syntax. You may
|
||||||
|
* also pass a single function.
|
||||||
|
*
|
||||||
|
* @param dispatch The `dispatch` function available on your Redux store.
|
||||||
|
*
|
||||||
|
* @returns The object mimicking the original object, but with every action
|
||||||
|
* creator wrapped into the `dispatch` call. If you passed a function as
|
||||||
|
* `actionCreator`, the return value will also be a single function.
|
||||||
|
*/
|
||||||
|
export function bindActionCreators<A extends ActionCreator<any>>(actionCreator: A, dispatch: Dispatch<any>): A;
|
||||||
|
|
||||||
|
export function bindActionCreators<
|
||||||
|
A extends ActionCreator<any>,
|
||||||
|
B extends ActionCreator<any>
|
||||||
|
>(actionCreator: A, dispatch: Dispatch<any>): B;
|
||||||
|
|
||||||
|
export function bindActionCreators<M extends ActionCreatorsMapObject>(actionCreators: M, dispatch: Dispatch<any>): M;
|
||||||
|
|
||||||
|
export function bindActionCreators<
|
||||||
|
M extends ActionCreatorsMapObject,
|
||||||
|
N extends ActionCreatorsMapObject
|
||||||
|
>(actionCreators: M, dispatch: Dispatch<any>): N;
|
||||||
|
|
||||||
|
|
||||||
|
/* compose */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Composes single-argument functions from right to left. The rightmost
|
||||||
|
* function can take multiple arguments as it provides the signature for the
|
||||||
|
* resulting composite function.
|
||||||
|
*
|
||||||
|
* @param funcs The functions to compose.
|
||||||
|
* @returns R function obtained by composing the argument functions from right
|
||||||
|
* to left. For example, `compose(f, g, h)` is identical to doing
|
||||||
|
* `(...args) => f(g(h(...args)))`.
|
||||||
|
*/
|
||||||
|
export function compose(): <R>(a: R, ...args: any[]) => R;
|
||||||
|
|
||||||
|
export function compose<A, R>(
|
||||||
|
f1: (b: A) => R,
|
||||||
|
f2: (...args: any[]) => A
|
||||||
|
): (...args: any[]) => R;
|
||||||
|
|
||||||
|
export function compose<A, B, R>(
|
||||||
|
f1: (b: B) => R,
|
||||||
|
f2: (a: A) => B,
|
||||||
|
f3: (...args: any[]) => A
|
||||||
|
): (...args: any[]) => R;
|
||||||
|
|
||||||
|
export function compose<A, B, C, R>(
|
||||||
|
f1: (b: C) => R,
|
||||||
|
f2: (a: B) => C,
|
||||||
|
f3: (a: A) => B,
|
||||||
|
f4: (...args: any[]) => A
|
||||||
|
): (...args: any[]) => R;
|
||||||
|
|
||||||
|
export function compose<R>(
|
||||||
|
f1: (a: any) => R,
|
||||||
|
...funcs: Function[]
|
||||||
|
): (...args: any[]) => R;
|
58
node_modules/redux/lib/applyMiddleware.js
generated
vendored
Normal file
58
node_modules/redux/lib/applyMiddleware.js
generated
vendored
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
exports.__esModule = 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"] = applyMiddleware;
|
||||||
|
|
||||||
|
var _compose = require('./compose');
|
||||||
|
|
||||||
|
var _compose2 = _interopRequireDefault(_compose);
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a store enhancer that applies middleware to the dispatch method
|
||||||
|
* of the Redux store. This is handy for a variety of tasks, such as expressing
|
||||||
|
* asynchronous actions in a concise manner, or logging every action payload.
|
||||||
|
*
|
||||||
|
* See `redux-thunk` package as an example of the Redux middleware.
|
||||||
|
*
|
||||||
|
* Because middleware is potentially asynchronous, this should be the first
|
||||||
|
* store enhancer in the composition chain.
|
||||||
|
*
|
||||||
|
* Note that each middleware will be given the `dispatch` and `getState` functions
|
||||||
|
* as named arguments.
|
||||||
|
*
|
||||||
|
* @param {...Function} middlewares The middleware chain to be applied.
|
||||||
|
* @returns {Function} A store enhancer applying the middleware.
|
||||||
|
*/
|
||||||
|
function applyMiddleware() {
|
||||||
|
for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
|
||||||
|
middlewares[_key] = arguments[_key];
|
||||||
|
}
|
||||||
|
|
||||||
|
return function (createStore) {
|
||||||
|
return function (reducer, initialState, enhancer) {
|
||||||
|
var store = createStore(reducer, initialState, enhancer);
|
||||||
|
var _dispatch = store.dispatch;
|
||||||
|
var chain = [];
|
||||||
|
|
||||||
|
var middlewareAPI = {
|
||||||
|
getState: store.getState,
|
||||||
|
dispatch: function dispatch(action) {
|
||||||
|
return _dispatch(action);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
chain = middlewares.map(function (middleware) {
|
||||||
|
return middleware(middlewareAPI);
|
||||||
|
});
|
||||||
|
_dispatch = _compose2["default"].apply(undefined, chain)(store.dispatch);
|
||||||
|
|
||||||
|
return _extends({}, store, {
|
||||||
|
dispatch: _dispatch
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
51
node_modules/redux/lib/bindActionCreators.js
generated
vendored
Normal file
51
node_modules/redux/lib/bindActionCreators.js
generated
vendored
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
exports.__esModule = true;
|
||||||
|
exports["default"] = bindActionCreators;
|
||||||
|
function bindActionCreator(actionCreator, dispatch) {
|
||||||
|
return function () {
|
||||||
|
return dispatch(actionCreator.apply(undefined, arguments));
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turns an object whose values are action creators, into an object with the
|
||||||
|
* same keys, but with every function wrapped into a `dispatch` call so they
|
||||||
|
* may be invoked directly. This is just a convenience method, as you can call
|
||||||
|
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
|
||||||
|
*
|
||||||
|
* For convenience, you can also pass a single function as the first argument,
|
||||||
|
* and get a function in return.
|
||||||
|
*
|
||||||
|
* @param {Function|Object} actionCreators An object whose values are action
|
||||||
|
* creator functions. One handy way to obtain it is to use ES6 `import * as`
|
||||||
|
* syntax. You may also pass a single function.
|
||||||
|
*
|
||||||
|
* @param {Function} dispatch The `dispatch` function available on your Redux
|
||||||
|
* store.
|
||||||
|
*
|
||||||
|
* @returns {Function|Object} The object mimicking the original object, but with
|
||||||
|
* every action creator wrapped into the `dispatch` call. If you passed a
|
||||||
|
* function as `actionCreators`, the return value will also be a single
|
||||||
|
* function.
|
||||||
|
*/
|
||||||
|
function bindActionCreators(actionCreators, dispatch) {
|
||||||
|
if (typeof actionCreators === 'function') {
|
||||||
|
return bindActionCreator(actionCreators, dispatch);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof actionCreators !== 'object' || actionCreators === null) {
|
||||||
|
throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
|
||||||
|
}
|
||||||
|
|
||||||
|
var keys = Object.keys(actionCreators);
|
||||||
|
var boundActionCreators = {};
|
||||||
|
for (var i = 0; i < keys.length; i++) {
|
||||||
|
var key = keys[i];
|
||||||
|
var actionCreator = actionCreators[key];
|
||||||
|
if (typeof actionCreator === 'function') {
|
||||||
|
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return boundActionCreators;
|
||||||
|
}
|
127
node_modules/redux/lib/combineReducers.js
generated
vendored
Normal file
127
node_modules/redux/lib/combineReducers.js
generated
vendored
Normal file
|
@ -0,0 +1,127 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
exports.__esModule = true;
|
||||||
|
exports["default"] = combineReducers;
|
||||||
|
|
||||||
|
var _createStore = require('./createStore');
|
||||||
|
|
||||||
|
var _isPlainObject = require('lodash/isPlainObject');
|
||||||
|
|
||||||
|
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
|
||||||
|
|
||||||
|
var _warning = require('./utils/warning');
|
||||||
|
|
||||||
|
var _warning2 = _interopRequireDefault(_warning);
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
|
function getUndefinedStateErrorMessage(key, action) {
|
||||||
|
var actionType = action && action.type;
|
||||||
|
var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
|
||||||
|
|
||||||
|
return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.';
|
||||||
|
}
|
||||||
|
|
||||||
|
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action) {
|
||||||
|
var reducerKeys = Object.keys(reducers);
|
||||||
|
var argumentName = action && action.type === _createStore.ActionTypes.INIT ? 'initialState argument passed to createStore' : 'previous state received by the reducer';
|
||||||
|
|
||||||
|
if (reducerKeys.length === 0) {
|
||||||
|
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(0, _isPlainObject2["default"])(inputState)) {
|
||||||
|
return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
|
||||||
|
}
|
||||||
|
|
||||||
|
var unexpectedKeys = Object.keys(inputState).filter(function (key) {
|
||||||
|
return !reducers.hasOwnProperty(key);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (unexpectedKeys.length > 0) {
|
||||||
|
return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function assertReducerSanity(reducers) {
|
||||||
|
Object.keys(reducers).forEach(function (key) {
|
||||||
|
var reducer = reducers[key];
|
||||||
|
var initialState = reducer(undefined, { type: _createStore.ActionTypes.INIT });
|
||||||
|
|
||||||
|
if (typeof initialState === 'undefined') {
|
||||||
|
throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.');
|
||||||
|
}
|
||||||
|
|
||||||
|
var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
|
||||||
|
if (typeof reducer(undefined, { type: type }) === 'undefined') {
|
||||||
|
throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + _createStore.ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turns an object whose values are different reducer functions, into a single
|
||||||
|
* reducer function. It will call every child reducer, and gather their results
|
||||||
|
* into a single state object, whose keys correspond to the keys of the passed
|
||||||
|
* reducer functions.
|
||||||
|
*
|
||||||
|
* @param {Object} reducers An object whose values correspond to different
|
||||||
|
* reducer functions that need to be combined into one. One handy way to obtain
|
||||||
|
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
|
||||||
|
* undefined for any action. Instead, they should return their initial state
|
||||||
|
* if the state passed to them was undefined, and the current state for any
|
||||||
|
* unrecognized action.
|
||||||
|
*
|
||||||
|
* @returns {Function} A reducer function that invokes every reducer inside the
|
||||||
|
* passed object, and builds a state object with the same shape.
|
||||||
|
*/
|
||||||
|
function combineReducers(reducers) {
|
||||||
|
var reducerKeys = Object.keys(reducers);
|
||||||
|
var finalReducers = {};
|
||||||
|
for (var i = 0; i < reducerKeys.length; i++) {
|
||||||
|
var key = reducerKeys[i];
|
||||||
|
if (typeof reducers[key] === 'function') {
|
||||||
|
finalReducers[key] = reducers[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var finalReducerKeys = Object.keys(finalReducers);
|
||||||
|
|
||||||
|
var sanityError;
|
||||||
|
try {
|
||||||
|
assertReducerSanity(finalReducers);
|
||||||
|
} catch (e) {
|
||||||
|
sanityError = e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return function combination() {
|
||||||
|
var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
||||||
|
var action = arguments[1];
|
||||||
|
|
||||||
|
if (sanityError) {
|
||||||
|
throw sanityError;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
|
var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action);
|
||||||
|
if (warningMessage) {
|
||||||
|
(0, _warning2["default"])(warningMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var hasChanged = false;
|
||||||
|
var nextState = {};
|
||||||
|
for (var i = 0; i < finalReducerKeys.length; i++) {
|
||||||
|
var key = finalReducerKeys[i];
|
||||||
|
var reducer = finalReducers[key];
|
||||||
|
var previousStateForKey = state[key];
|
||||||
|
var nextStateForKey = reducer(previousStateForKey, action);
|
||||||
|
if (typeof nextStateForKey === 'undefined') {
|
||||||
|
var errorMessage = getUndefinedStateErrorMessage(key, action);
|
||||||
|
throw new Error(errorMessage);
|
||||||
|
}
|
||||||
|
nextState[key] = nextStateForKey;
|
||||||
|
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
|
||||||
|
}
|
||||||
|
return hasChanged ? nextState : state;
|
||||||
|
};
|
||||||
|
}
|
40
node_modules/redux/lib/compose.js
generated
vendored
Normal file
40
node_modules/redux/lib/compose.js
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
exports.__esModule = true;
|
||||||
|
exports["default"] = compose;
|
||||||
|
/**
|
||||||
|
* Composes single-argument functions from right to left. The rightmost
|
||||||
|
* function can take multiple arguments as it provides the signature for
|
||||||
|
* the resulting composite function.
|
||||||
|
*
|
||||||
|
* @param {...Function} funcs The functions to compose.
|
||||||
|
* @returns {Function} A function obtained by composing the argument functions
|
||||||
|
* from right to left. For example, compose(f, g, h) is identical to doing
|
||||||
|
* (...args) => f(g(h(...args))).
|
||||||
|
*/
|
||||||
|
|
||||||
|
function compose() {
|
||||||
|
for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
|
||||||
|
funcs[_key] = arguments[_key];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (funcs.length === 0) {
|
||||||
|
return function (arg) {
|
||||||
|
return arg;
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
var _ret = function () {
|
||||||
|
var last = funcs[funcs.length - 1];
|
||||||
|
var rest = funcs.slice(0, -1);
|
||||||
|
return {
|
||||||
|
v: function v() {
|
||||||
|
return rest.reduceRight(function (composed, f) {
|
||||||
|
return f(composed);
|
||||||
|
}, last.apply(undefined, arguments));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}();
|
||||||
|
|
||||||
|
if (typeof _ret === "object") return _ret.v;
|
||||||
|
}
|
||||||
|
}
|
262
node_modules/redux/lib/createStore.js
generated
vendored
Normal file
262
node_modules/redux/lib/createStore.js
generated
vendored
Normal file
|
@ -0,0 +1,262 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
exports.__esModule = true;
|
||||||
|
exports.ActionTypes = undefined;
|
||||||
|
exports["default"] = createStore;
|
||||||
|
|
||||||
|
var _isPlainObject = require('lodash/isPlainObject');
|
||||||
|
|
||||||
|
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
|
||||||
|
|
||||||
|
var _symbolObservable = require('symbol-observable');
|
||||||
|
|
||||||
|
var _symbolObservable2 = _interopRequireDefault(_symbolObservable);
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These are private action types reserved by Redux.
|
||||||
|
* For any unknown actions, you must return the current state.
|
||||||
|
* If the current state is undefined, you must return the initial state.
|
||||||
|
* Do not reference these action types directly in your code.
|
||||||
|
*/
|
||||||
|
var ActionTypes = exports.ActionTypes = {
|
||||||
|
INIT: '@@redux/INIT'
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a Redux store that holds the state tree.
|
||||||
|
* The only way to change the data in the store is to call `dispatch()` on it.
|
||||||
|
*
|
||||||
|
* There should only be a single store in your app. To specify how different
|
||||||
|
* parts of the state tree respond to actions, you may combine several reducers
|
||||||
|
* into a single reducer function by using `combineReducers`.
|
||||||
|
*
|
||||||
|
* @param {Function} reducer A function that returns the next state tree, given
|
||||||
|
* the current state tree and the action to handle.
|
||||||
|
*
|
||||||
|
* @param {any} [initialState] The initial state. You may optionally specify it
|
||||||
|
* to hydrate the state from the server in universal apps, or to restore a
|
||||||
|
* previously serialized user session.
|
||||||
|
* If you use `combineReducers` to produce the root reducer function, this must be
|
||||||
|
* an object with the same shape as `combineReducers` keys.
|
||||||
|
*
|
||||||
|
* @param {Function} enhancer The store enhancer. You may optionally specify it
|
||||||
|
* to enhance the store with third-party capabilities such as middleware,
|
||||||
|
* time travel, persistence, etc. The only store enhancer that ships with Redux
|
||||||
|
* is `applyMiddleware()`.
|
||||||
|
*
|
||||||
|
* @returns {Store} A Redux store that lets you read the state, dispatch actions
|
||||||
|
* and subscribe to changes.
|
||||||
|
*/
|
||||||
|
function createStore(reducer, initialState, enhancer) {
|
||||||
|
var _ref2;
|
||||||
|
|
||||||
|
if (typeof initialState === 'function' && typeof enhancer === 'undefined') {
|
||||||
|
enhancer = initialState;
|
||||||
|
initialState = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof enhancer !== 'undefined') {
|
||||||
|
if (typeof enhancer !== 'function') {
|
||||||
|
throw new Error('Expected the enhancer to be a function.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return enhancer(createStore)(reducer, initialState);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof reducer !== 'function') {
|
||||||
|
throw new Error('Expected the reducer to be a function.');
|
||||||
|
}
|
||||||
|
|
||||||
|
var currentReducer = reducer;
|
||||||
|
var currentState = initialState;
|
||||||
|
var currentListeners = [];
|
||||||
|
var nextListeners = currentListeners;
|
||||||
|
var isDispatching = false;
|
||||||
|
|
||||||
|
function ensureCanMutateNextListeners() {
|
||||||
|
if (nextListeners === currentListeners) {
|
||||||
|
nextListeners = currentListeners.slice();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads the state tree managed by the store.
|
||||||
|
*
|
||||||
|
* @returns {any} The current state tree of your application.
|
||||||
|
*/
|
||||||
|
function getState() {
|
||||||
|
return currentState;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a change listener. It will be called any time an action is dispatched,
|
||||||
|
* and some part of the state tree may potentially have changed. You may then
|
||||||
|
* call `getState()` to read the current state tree inside the callback.
|
||||||
|
*
|
||||||
|
* You may call `dispatch()` from a change listener, with the following
|
||||||
|
* caveats:
|
||||||
|
*
|
||||||
|
* 1. The subscriptions are snapshotted just before every `dispatch()` call.
|
||||||
|
* If you subscribe or unsubscribe while the listeners are being invoked, this
|
||||||
|
* will not have any effect on the `dispatch()` that is currently in progress.
|
||||||
|
* However, the next `dispatch()` call, whether nested or not, will use a more
|
||||||
|
* recent snapshot of the subscription list.
|
||||||
|
*
|
||||||
|
* 2. The listener should not expect to see all state changes, as the state
|
||||||
|
* might have been updated multiple times during a nested `dispatch()` before
|
||||||
|
* the listener is called. It is, however, guaranteed that all subscribers
|
||||||
|
* registered before the `dispatch()` started will be called with the latest
|
||||||
|
* state by the time it exits.
|
||||||
|
*
|
||||||
|
* @param {Function} listener A callback to be invoked on every dispatch.
|
||||||
|
* @returns {Function} A function to remove this change listener.
|
||||||
|
*/
|
||||||
|
function subscribe(listener) {
|
||||||
|
if (typeof listener !== 'function') {
|
||||||
|
throw new Error('Expected listener to be a function.');
|
||||||
|
}
|
||||||
|
|
||||||
|
var isSubscribed = true;
|
||||||
|
|
||||||
|
ensureCanMutateNextListeners();
|
||||||
|
nextListeners.push(listener);
|
||||||
|
|
||||||
|
return function unsubscribe() {
|
||||||
|
if (!isSubscribed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
isSubscribed = false;
|
||||||
|
|
||||||
|
ensureCanMutateNextListeners();
|
||||||
|
var index = nextListeners.indexOf(listener);
|
||||||
|
nextListeners.splice(index, 1);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dispatches an action. It is the only way to trigger a state change.
|
||||||
|
*
|
||||||
|
* The `reducer` function, used to create the store, will be called with the
|
||||||
|
* current state tree and the given `action`. Its return value will
|
||||||
|
* be considered the **next** state of the tree, and the change listeners
|
||||||
|
* will be notified.
|
||||||
|
*
|
||||||
|
* The base implementation only supports plain object actions. If you want to
|
||||||
|
* dispatch a Promise, an Observable, a thunk, or something else, you need to
|
||||||
|
* wrap your store creating function into the corresponding middleware. For
|
||||||
|
* example, see the documentation for the `redux-thunk` package. Even the
|
||||||
|
* middleware will eventually dispatch plain object actions using this method.
|
||||||
|
*
|
||||||
|
* @param {Object} action A plain object representing “what changed”. It is
|
||||||
|
* a good idea to keep actions serializable so you can record and replay user
|
||||||
|
* sessions, or use the time travelling `redux-devtools`. An action must have
|
||||||
|
* a `type` property which may not be `undefined`. It is a good idea to use
|
||||||
|
* string constants for action types.
|
||||||
|
*
|
||||||
|
* @returns {Object} For convenience, the same action object you dispatched.
|
||||||
|
*
|
||||||
|
* Note that, if you use a custom middleware, it may wrap `dispatch()` to
|
||||||
|
* return something else (for example, a Promise you can await).
|
||||||
|
*/
|
||||||
|
function dispatch(action) {
|
||||||
|
if (!(0, _isPlainObject2["default"])(action)) {
|
||||||
|
throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof action.type === 'undefined') {
|
||||||
|
throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isDispatching) {
|
||||||
|
throw new Error('Reducers may not dispatch actions.');
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
isDispatching = true;
|
||||||
|
currentState = currentReducer(currentState, action);
|
||||||
|
} finally {
|
||||||
|
isDispatching = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var listeners = currentListeners = nextListeners;
|
||||||
|
for (var i = 0; i < listeners.length; i++) {
|
||||||
|
listeners[i]();
|
||||||
|
}
|
||||||
|
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replaces the reducer currently used by the store to calculate the state.
|
||||||
|
*
|
||||||
|
* You might need this if your app implements code splitting and you want to
|
||||||
|
* load some of the reducers dynamically. You might also need this if you
|
||||||
|
* implement a hot reloading mechanism for Redux.
|
||||||
|
*
|
||||||
|
* @param {Function} nextReducer The reducer for the store to use instead.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
function replaceReducer(nextReducer) {
|
||||||
|
if (typeof nextReducer !== 'function') {
|
||||||
|
throw new Error('Expected the nextReducer to be a function.');
|
||||||
|
}
|
||||||
|
|
||||||
|
currentReducer = nextReducer;
|
||||||
|
dispatch({ type: ActionTypes.INIT });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interoperability point for observable/reactive libraries.
|
||||||
|
* @returns {observable} A minimal observable of state changes.
|
||||||
|
* For more information, see the observable proposal:
|
||||||
|
* https://github.com/zenparsing/es-observable
|
||||||
|
*/
|
||||||
|
function observable() {
|
||||||
|
var _ref;
|
||||||
|
|
||||||
|
var outerSubscribe = subscribe;
|
||||||
|
return _ref = {
|
||||||
|
/**
|
||||||
|
* The minimal observable subscription method.
|
||||||
|
* @param {Object} observer Any object that can be used as an observer.
|
||||||
|
* The observer object should have a `next` method.
|
||||||
|
* @returns {subscription} An object with an `unsubscribe` method that can
|
||||||
|
* be used to unsubscribe the observable from the store, and prevent further
|
||||||
|
* emission of values from the observable.
|
||||||
|
*/
|
||||||
|
|
||||||
|
subscribe: function subscribe(observer) {
|
||||||
|
if (typeof observer !== 'object') {
|
||||||
|
throw new TypeError('Expected the observer to be an object.');
|
||||||
|
}
|
||||||
|
|
||||||
|
function observeState() {
|
||||||
|
if (observer.next) {
|
||||||
|
observer.next(getState());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
observeState();
|
||||||
|
var unsubscribe = outerSubscribe(observeState);
|
||||||
|
return { unsubscribe: unsubscribe };
|
||||||
|
}
|
||||||
|
}, _ref[_symbolObservable2["default"]] = function () {
|
||||||
|
return this;
|
||||||
|
}, _ref;
|
||||||
|
}
|
||||||
|
|
||||||
|
// When a store is created, an "INIT" action is dispatched so that every
|
||||||
|
// reducer returns their initial state. This effectively populates
|
||||||
|
// the initial state tree.
|
||||||
|
dispatch({ type: ActionTypes.INIT });
|
||||||
|
|
||||||
|
return _ref2 = {
|
||||||
|
dispatch: dispatch,
|
||||||
|
subscribe: subscribe,
|
||||||
|
getState: getState,
|
||||||
|
replaceReducer: replaceReducer
|
||||||
|
}, _ref2[_symbolObservable2["default"]] = observable, _ref2;
|
||||||
|
}
|
46
node_modules/redux/lib/index.js
generated
vendored
Normal file
46
node_modules/redux/lib/index.js
generated
vendored
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
exports.__esModule = true;
|
||||||
|
exports.compose = exports.applyMiddleware = exports.bindActionCreators = exports.combineReducers = exports.createStore = undefined;
|
||||||
|
|
||||||
|
var _createStore = require('./createStore');
|
||||||
|
|
||||||
|
var _createStore2 = _interopRequireDefault(_createStore);
|
||||||
|
|
||||||
|
var _combineReducers = require('./combineReducers');
|
||||||
|
|
||||||
|
var _combineReducers2 = _interopRequireDefault(_combineReducers);
|
||||||
|
|
||||||
|
var _bindActionCreators = require('./bindActionCreators');
|
||||||
|
|
||||||
|
var _bindActionCreators2 = _interopRequireDefault(_bindActionCreators);
|
||||||
|
|
||||||
|
var _applyMiddleware = require('./applyMiddleware');
|
||||||
|
|
||||||
|
var _applyMiddleware2 = _interopRequireDefault(_applyMiddleware);
|
||||||
|
|
||||||
|
var _compose = require('./compose');
|
||||||
|
|
||||||
|
var _compose2 = _interopRequireDefault(_compose);
|
||||||
|
|
||||||
|
var _warning = require('./utils/warning');
|
||||||
|
|
||||||
|
var _warning2 = _interopRequireDefault(_warning);
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is a dummy function to check if the function name has been altered by minification.
|
||||||
|
* If the function has been minified and NODE_ENV !== 'production', warn the user.
|
||||||
|
*/
|
||||||
|
function isCrushed() {}
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
|
||||||
|
(0, _warning2["default"])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.createStore = _createStore2["default"];
|
||||||
|
exports.combineReducers = _combineReducers2["default"];
|
||||||
|
exports.bindActionCreators = _bindActionCreators2["default"];
|
||||||
|
exports.applyMiddleware = _applyMiddleware2["default"];
|
||||||
|
exports.compose = _compose2["default"];
|
25
node_modules/redux/lib/utils/warning.js
generated
vendored
Normal file
25
node_modules/redux/lib/utils/warning.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
exports.__esModule = true;
|
||||||
|
exports["default"] = warning;
|
||||||
|
/**
|
||||||
|
* Prints a warning in the console if it exists.
|
||||||
|
*
|
||||||
|
* @param {String} message The warning message.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
function warning(message) {
|
||||||
|
/* eslint-disable no-console */
|
||||||
|
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
||||||
|
console.error(message);
|
||||||
|
}
|
||||||
|
/* eslint-enable no-console */
|
||||||
|
try {
|
||||||
|
// This error was thrown as a convenience so that if you enable
|
||||||
|
// "break on all exceptions" in your console,
|
||||||
|
// it would pause the execution at this line.
|
||||||
|
throw new Error(message);
|
||||||
|
/* eslint-disable no-empty */
|
||||||
|
} catch (e) {}
|
||||||
|
/* eslint-enable no-empty */
|
||||||
|
}
|
1
node_modules/redux/node_modules/.bin/loose-envify
generated
vendored
Symbolic link
1
node_modules/redux/node_modules/.bin/loose-envify
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../loose-envify/cli.js
|
47
node_modules/redux/node_modules/lodash-es/LICENSE
generated
vendored
Normal file
47
node_modules/redux/node_modules/lodash-es/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||||
|
|
||||||
|
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||||
|
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||||
|
|
||||||
|
This software consists of voluntary contributions made by many
|
||||||
|
individuals. For exact contribution history, see the revision history
|
||||||
|
available at https://github.com/lodash/lodash
|
||||||
|
|
||||||
|
The following license applies to all parts of this software except as
|
||||||
|
documented below:
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Copyright and related rights for sample code are waived via CC0. Sample
|
||||||
|
code is defined as all source code displayed within the prose of the
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Files located in the node_modules and vendor directories are externally
|
||||||
|
maintained libraries used by this software which have their own
|
||||||
|
licenses; we recommend you read them, as their terms may differ from the
|
||||||
|
terms above.
|
10
node_modules/redux/node_modules/lodash-es/README.md
generated
vendored
Normal file
10
node_modules/redux/node_modules/lodash-es/README.md
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# lodash-es v4.13.1
|
||||||
|
|
||||||
|
The [Lodash](https://lodash.com/) library exported as [ES](http://www.ecma-international.org/ecma-262/6.0/) modules.
|
||||||
|
|
||||||
|
Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
|
||||||
|
```bash
|
||||||
|
$ lodash modularize exports=es -o ./
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [package source](https://github.com/lodash/lodash/tree/4.13.1-es) for more details.
|
7
node_modules/redux/node_modules/lodash-es/_DataView.js
generated
vendored
Normal file
7
node_modules/redux/node_modules/lodash-es/_DataView.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
import getNative from './_getNative.js';
|
||||||
|
import root from './_root.js';
|
||||||
|
|
||||||
|
/* Built-in method references that are verified to be native. */
|
||||||
|
var DataView = getNative(root, 'DataView');
|
||||||
|
|
||||||
|
export default DataView;
|
32
node_modules/redux/node_modules/lodash-es/_Hash.js
generated
vendored
Normal file
32
node_modules/redux/node_modules/lodash-es/_Hash.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
import hashClear from './_hashClear.js';
|
||||||
|
import hashDelete from './_hashDelete.js';
|
||||||
|
import hashGet from './_hashGet.js';
|
||||||
|
import hashHas from './_hashHas.js';
|
||||||
|
import hashSet from './_hashSet.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a hash object.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @constructor
|
||||||
|
* @param {Array} [entries] The key-value pairs to cache.
|
||||||
|
*/
|
||||||
|
function Hash(entries) {
|
||||||
|
var index = -1,
|
||||||
|
length = entries ? entries.length : 0;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
export default Hash;
|
28
node_modules/redux/node_modules/lodash-es/_LazyWrapper.js
generated
vendored
Normal file
28
node_modules/redux/node_modules/lodash-es/_LazyWrapper.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
import baseCreate from './_baseCreate.js';
|
||||||
|
import baseLodash from './_baseLodash.js';
|
||||||
|
|
||||||
|
/** Used as references for the maximum length and index of an array. */
|
||||||
|
var MAX_ARRAY_LENGTH = 4294967295;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @constructor
|
||||||
|
* @param {*} value The value to wrap.
|
||||||
|
*/
|
||||||
|
function LazyWrapper(value) {
|
||||||
|
this.__wrapped__ = value;
|
||||||
|
this.__actions__ = [];
|
||||||
|
this.__dir__ = 1;
|
||||||
|
this.__filtered__ = false;
|
||||||
|
this.__iteratees__ = [];
|
||||||
|
this.__takeCount__ = MAX_ARRAY_LENGTH;
|
||||||
|
this.__views__ = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure `LazyWrapper` is an instance of `baseLodash`.
|
||||||
|
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
|
||||||
|
LazyWrapper.prototype.constructor = LazyWrapper;
|
||||||
|
|
||||||
|
export default LazyWrapper;
|
32
node_modules/redux/node_modules/lodash-es/_ListCache.js
generated
vendored
Normal file
32
node_modules/redux/node_modules/lodash-es/_ListCache.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
import listCacheClear from './_listCacheClear.js';
|
||||||
|
import listCacheDelete from './_listCacheDelete.js';
|
||||||
|
import listCacheGet from './_listCacheGet.js';
|
||||||
|
import listCacheHas from './_listCacheHas.js';
|
||||||
|
import listCacheSet from './_listCacheSet.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an list cache object.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @constructor
|
||||||
|
* @param {Array} [entries] The key-value pairs to cache.
|
||||||
|
*/
|
||||||
|
function ListCache(entries) {
|
||||||
|
var index = -1,
|
||||||
|
length = entries ? entries.length : 0;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
export default ListCache;
|
22
node_modules/redux/node_modules/lodash-es/_LodashWrapper.js
generated
vendored
Normal file
22
node_modules/redux/node_modules/lodash-es/_LodashWrapper.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
import baseCreate from './_baseCreate.js';
|
||||||
|
import baseLodash from './_baseLodash.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base constructor for creating `lodash` wrapper objects.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to wrap.
|
||||||
|
* @param {boolean} [chainAll] Enable explicit method chain sequences.
|
||||||
|
*/
|
||||||
|
function LodashWrapper(value, chainAll) {
|
||||||
|
this.__wrapped__ = value;
|
||||||
|
this.__actions__ = [];
|
||||||
|
this.__chain__ = !!chainAll;
|
||||||
|
this.__index__ = 0;
|
||||||
|
this.__values__ = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
LodashWrapper.prototype = baseCreate(baseLodash.prototype);
|
||||||
|
LodashWrapper.prototype.constructor = LodashWrapper;
|
||||||
|
|
||||||
|
export default LodashWrapper;
|
7
node_modules/redux/node_modules/lodash-es/_Map.js
generated
vendored
Normal file
7
node_modules/redux/node_modules/lodash-es/_Map.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
import getNative from './_getNative.js';
|
||||||
|
import root from './_root.js';
|
||||||
|
|
||||||
|
/* Built-in method references that are verified to be native. */
|
||||||
|
var Map = getNative(root, 'Map');
|
||||||
|
|
||||||
|
export default Map;
|
32
node_modules/redux/node_modules/lodash-es/_MapCache.js
generated
vendored
Normal file
32
node_modules/redux/node_modules/lodash-es/_MapCache.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
import mapCacheClear from './_mapCacheClear.js';
|
||||||
|
import mapCacheDelete from './_mapCacheDelete.js';
|
||||||
|
import mapCacheGet from './_mapCacheGet.js';
|
||||||
|
import mapCacheHas from './_mapCacheHas.js';
|
||||||
|
import mapCacheSet from './_mapCacheSet.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 ? entries.length : 0;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
export default MapCache;
|
7
node_modules/redux/node_modules/lodash-es/_Promise.js
generated
vendored
Normal file
7
node_modules/redux/node_modules/lodash-es/_Promise.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
import getNative from './_getNative.js';
|
||||||
|
import root from './_root.js';
|
||||||
|
|
||||||
|
/* Built-in method references that are verified to be native. */
|
||||||
|
var Promise = getNative(root, 'Promise');
|
||||||
|
|
||||||
|
export default Promise;
|
6
node_modules/redux/node_modules/lodash-es/_Reflect.js
generated
vendored
Normal file
6
node_modules/redux/node_modules/lodash-es/_Reflect.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import root from './_root.js';
|
||||||
|
|
||||||
|
/** Built-in value references. */
|
||||||
|
var Reflect = root.Reflect;
|
||||||
|
|
||||||
|
export default Reflect;
|
7
node_modules/redux/node_modules/lodash-es/_Set.js
generated
vendored
Normal file
7
node_modules/redux/node_modules/lodash-es/_Set.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
import getNative from './_getNative.js';
|
||||||
|
import root from './_root.js';
|
||||||
|
|
||||||
|
/* Built-in method references that are verified to be native. */
|
||||||
|
var Set = getNative(root, 'Set');
|
||||||
|
|
||||||
|
export default Set;
|
27
node_modules/redux/node_modules/lodash-es/_SetCache.js
generated
vendored
Normal file
27
node_modules/redux/node_modules/lodash-es/_SetCache.js
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import MapCache from './_MapCache.js';
|
||||||
|
import setCacheAdd from './_setCacheAdd.js';
|
||||||
|
import setCacheHas from './_setCacheHas.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 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 ? values.length : 0;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
export default SetCache;
|
26
node_modules/redux/node_modules/lodash-es/_Stack.js
generated
vendored
Normal file
26
node_modules/redux/node_modules/lodash-es/_Stack.js
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
import ListCache from './_ListCache.js';
|
||||||
|
import stackClear from './_stackClear.js';
|
||||||
|
import stackDelete from './_stackDelete.js';
|
||||||
|
import stackGet from './_stackGet.js';
|
||||||
|
import stackHas from './_stackHas.js';
|
||||||
|
import stackSet from './_stackSet.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a stack cache object to store key-value pairs.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @constructor
|
||||||
|
* @param {Array} [entries] The key-value pairs to cache.
|
||||||
|
*/
|
||||||
|
function Stack(entries) {
|
||||||
|
this.__data__ = new ListCache(entries);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add methods to `Stack`.
|
||||||
|
Stack.prototype.clear = stackClear;
|
||||||
|
Stack.prototype['delete'] = stackDelete;
|
||||||
|
Stack.prototype.get = stackGet;
|
||||||
|
Stack.prototype.has = stackHas;
|
||||||
|
Stack.prototype.set = stackSet;
|
||||||
|
|
||||||
|
export default Stack;
|
6
node_modules/redux/node_modules/lodash-es/_Symbol.js
generated
vendored
Normal file
6
node_modules/redux/node_modules/lodash-es/_Symbol.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import root from './_root.js';
|
||||||
|
|
||||||
|
/** Built-in value references. */
|
||||||
|
var Symbol = root.Symbol;
|
||||||
|
|
||||||
|
export default Symbol;
|
6
node_modules/redux/node_modules/lodash-es/_Uint8Array.js
generated
vendored
Normal file
6
node_modules/redux/node_modules/lodash-es/_Uint8Array.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import root from './_root.js';
|
||||||
|
|
||||||
|
/** Built-in value references. */
|
||||||
|
var Uint8Array = root.Uint8Array;
|
||||||
|
|
||||||
|
export default Uint8Array;
|
7
node_modules/redux/node_modules/lodash-es/_WeakMap.js
generated
vendored
Normal file
7
node_modules/redux/node_modules/lodash-es/_WeakMap.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
import getNative from './_getNative.js';
|
||||||
|
import root from './_root.js';
|
||||||
|
|
||||||
|
/* Built-in method references that are verified to be native. */
|
||||||
|
var WeakMap = getNative(root, 'WeakMap');
|
||||||
|
|
||||||
|
export default WeakMap;
|
15
node_modules/redux/node_modules/lodash-es/_addMapEntry.js
generated
vendored
Normal file
15
node_modules/redux/node_modules/lodash-es/_addMapEntry.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
/**
|
||||||
|
* Adds the key-value `pair` to `map`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} map The map to modify.
|
||||||
|
* @param {Array} pair The key-value pair to add.
|
||||||
|
* @returns {Object} Returns `map`.
|
||||||
|
*/
|
||||||
|
function addMapEntry(map, pair) {
|
||||||
|
// Don't return `Map#set` because it doesn't return the map instance in IE 11.
|
||||||
|
map.set(pair[0], pair[1]);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default addMapEntry;
|
14
node_modules/redux/node_modules/lodash-es/_addSetEntry.js
generated
vendored
Normal file
14
node_modules/redux/node_modules/lodash-es/_addSetEntry.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
/**
|
||||||
|
* Adds `value` to `set`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} set The set to modify.
|
||||||
|
* @param {*} value The value to add.
|
||||||
|
* @returns {Object} Returns `set`.
|
||||||
|
*/
|
||||||
|
function addSetEntry(set, value) {
|
||||||
|
set.add(value);
|
||||||
|
return set;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default addSetEntry;
|
22
node_modules/redux/node_modules/lodash-es/_apply.js
generated
vendored
Normal file
22
node_modules/redux/node_modules/lodash-es/_apply.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
* 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) {
|
||||||
|
var length = args.length;
|
||||||
|
switch (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);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default apply;
|
22
node_modules/redux/node_modules/lodash-es/_arrayAggregator.js
generated
vendored
Normal file
22
node_modules/redux/node_modules/lodash-es/_arrayAggregator.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
* A specialized version of `baseAggregator` for arrays.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} [array] The array to iterate over.
|
||||||
|
* @param {Function} setter The function to set `accumulator` values.
|
||||||
|
* @param {Function} iteratee The iteratee to transform keys.
|
||||||
|
* @param {Object} accumulator The initial aggregated object.
|
||||||
|
* @returns {Function} Returns `accumulator`.
|
||||||
|
*/
|
||||||
|
function arrayAggregator(array, setter, iteratee, accumulator) {
|
||||||
|
var index = -1,
|
||||||
|
length = array ? array.length : 0;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var value = array[index];
|
||||||
|
setter(accumulator, value, iteratee(value), array);
|
||||||
|
}
|
||||||
|
return accumulator;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default arrayAggregator;
|
22
node_modules/redux/node_modules/lodash-es/_arrayEach.js
generated
vendored
Normal file
22
node_modules/redux/node_modules/lodash-es/_arrayEach.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
* 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 ? array.length : 0;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
if (iteratee(array[index], index, array) === false) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default arrayEach;
|
21
node_modules/redux/node_modules/lodash-es/_arrayEachRight.js
generated
vendored
Normal file
21
node_modules/redux/node_modules/lodash-es/_arrayEachRight.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.forEachRight` 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 arrayEachRight(array, iteratee) {
|
||||||
|
var length = array ? array.length : 0;
|
||||||
|
|
||||||
|
while (length--) {
|
||||||
|
if (iteratee(array[length], length, array) === false) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default arrayEachRight;
|
23
node_modules/redux/node_modules/lodash-es/_arrayEvery.js
generated
vendored
Normal file
23
node_modules/redux/node_modules/lodash-es/_arrayEvery.js
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.every` 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 all elements pass the predicate check,
|
||||||
|
* else `false`.
|
||||||
|
*/
|
||||||
|
function arrayEvery(array, predicate) {
|
||||||
|
var index = -1,
|
||||||
|
length = array ? array.length : 0;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
if (!predicate(array[index], index, array)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default arrayEvery;
|
25
node_modules/redux/node_modules/lodash-es/_arrayFilter.js
generated
vendored
Normal file
25
node_modules/redux/node_modules/lodash-es/_arrayFilter.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
/**
|
||||||
|
* 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 ? array.length : 0,
|
||||||
|
resIndex = 0,
|
||||||
|
result = [];
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var value = array[index];
|
||||||
|
if (predicate(value, index, array)) {
|
||||||
|
result[resIndex++] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default arrayFilter;
|
17
node_modules/redux/node_modules/lodash-es/_arrayIncludes.js
generated
vendored
Normal file
17
node_modules/redux/node_modules/lodash-es/_arrayIncludes.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import baseIndexOf from './_baseIndexOf.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.includes` for arrays without support for
|
||||||
|
* specifying an index to search from.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} [array] The array to search.
|
||||||
|
* @param {*} target The value to search for.
|
||||||
|
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||||||
|
*/
|
||||||
|
function arrayIncludes(array, value) {
|
||||||
|
var length = array ? array.length : 0;
|
||||||
|
return !!length && baseIndexOf(array, value, 0) > -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default arrayIncludes;
|
22
node_modules/redux/node_modules/lodash-es/_arrayIncludesWith.js
generated
vendored
Normal file
22
node_modules/redux/node_modules/lodash-es/_arrayIncludesWith.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
* This function is like `arrayIncludes` except that it accepts a comparator.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} [array] The array to search.
|
||||||
|
* @param {*} target The value to search for.
|
||||||
|
* @param {Function} comparator The comparator invoked per element.
|
||||||
|
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||||||
|
*/
|
||||||
|
function arrayIncludesWith(array, value, comparator) {
|
||||||
|
var index = -1,
|
||||||
|
length = array ? array.length : 0;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
if (comparator(value, array[index])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default arrayIncludesWith;
|
21
node_modules/redux/node_modules/lodash-es/_arrayMap.js
generated
vendored
Normal file
21
node_modules/redux/node_modules/lodash-es/_arrayMap.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/**
|
||||||
|
* 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 ? array.length : 0,
|
||||||
|
result = Array(length);
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
result[index] = iteratee(array[index], index, array);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default arrayMap;
|
20
node_modules/redux/node_modules/lodash-es/_arrayPush.js
generated
vendored
Normal file
20
node_modules/redux/node_modules/lodash-es/_arrayPush.js
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default arrayPush;
|
26
node_modules/redux/node_modules/lodash-es/_arrayReduce.js
generated
vendored
Normal file
26
node_modules/redux/node_modules/lodash-es/_arrayReduce.js
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.reduce` for arrays without support for
|
||||||
|
* iteratee shorthands.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} [array] The array to iterate over.
|
||||||
|
* @param {Function} iteratee The function invoked per iteration.
|
||||||
|
* @param {*} [accumulator] The initial value.
|
||||||
|
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
||||||
|
* the initial value.
|
||||||
|
* @returns {*} Returns the accumulated value.
|
||||||
|
*/
|
||||||
|
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
||||||
|
var index = -1,
|
||||||
|
length = array ? array.length : 0;
|
||||||
|
|
||||||
|
if (initAccum && length) {
|
||||||
|
accumulator = array[++index];
|
||||||
|
}
|
||||||
|
while (++index < length) {
|
||||||
|
accumulator = iteratee(accumulator, array[index], index, array);
|
||||||
|
}
|
||||||
|
return accumulator;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default arrayReduce;
|
24
node_modules/redux/node_modules/lodash-es/_arrayReduceRight.js
generated
vendored
Normal file
24
node_modules/redux/node_modules/lodash-es/_arrayReduceRight.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.reduceRight` for arrays without support for
|
||||||
|
* iteratee shorthands.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} [array] The array to iterate over.
|
||||||
|
* @param {Function} iteratee The function invoked per iteration.
|
||||||
|
* @param {*} [accumulator] The initial value.
|
||||||
|
* @param {boolean} [initAccum] Specify using the last element of `array` as
|
||||||
|
* the initial value.
|
||||||
|
* @returns {*} Returns the accumulated value.
|
||||||
|
*/
|
||||||
|
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
|
||||||
|
var length = array ? array.length : 0;
|
||||||
|
if (initAccum && length) {
|
||||||
|
accumulator = array[--length];
|
||||||
|
}
|
||||||
|
while (length--) {
|
||||||
|
accumulator = iteratee(accumulator, array[length], length, array);
|
||||||
|
}
|
||||||
|
return accumulator;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default arrayReduceRight;
|
23
node_modules/redux/node_modules/lodash-es/_arraySome.js
generated
vendored
Normal file
23
node_modules/redux/node_modules/lodash-es/_arraySome.js
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/**
|
||||||
|
* 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 ? array.length : 0;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
if (predicate(array[index], index, array)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default arraySome;
|
27
node_modules/redux/node_modules/lodash-es/_assignInDefaults.js
generated
vendored
Normal file
27
node_modules/redux/node_modules/lodash-es/_assignInDefaults.js
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import eq from './eq.js';
|
||||||
|
|
||||||
|
/** Used for built-in method references. */
|
||||||
|
var objectProto = Object.prototype;
|
||||||
|
|
||||||
|
/** Used to check objects for own properties. */
|
||||||
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used by `_.defaults` to customize its `_.assignIn` use.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} objValue The destination value.
|
||||||
|
* @param {*} srcValue The source value.
|
||||||
|
* @param {string} key The key of the property to assign.
|
||||||
|
* @param {Object} object The parent object of `objValue`.
|
||||||
|
* @returns {*} Returns the value to assign.
|
||||||
|
*/
|
||||||
|
function assignInDefaults(objValue, srcValue, key, object) {
|
||||||
|
if (objValue === undefined ||
|
||||||
|
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
|
||||||
|
return srcValue;
|
||||||
|
}
|
||||||
|
return objValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default assignInDefaults;
|
19
node_modules/redux/node_modules/lodash-es/_assignMergeValue.js
generated
vendored
Normal file
19
node_modules/redux/node_modules/lodash-es/_assignMergeValue.js
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
import eq from './eq.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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)) ||
|
||||||
|
(typeof key == 'number' && value === undefined && !(key in object))) {
|
||||||
|
object[key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default assignMergeValue;
|
27
node_modules/redux/node_modules/lodash-es/_assignValue.js
generated
vendored
Normal file
27
node_modules/redux/node_modules/lodash-es/_assignValue.js
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import eq from './eq.js';
|
||||||
|
|
||||||
|
/** 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/6.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))) {
|
||||||
|
object[key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default assignValue;
|
21
node_modules/redux/node_modules/lodash-es/_assocIndexOf.js
generated
vendored
Normal file
21
node_modules/redux/node_modules/lodash-es/_assocIndexOf.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
import eq from './eq.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to search.
|
||||||
|
* @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;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default assocIndexOf;
|
21
node_modules/redux/node_modules/lodash-es/_baseAggregator.js
generated
vendored
Normal file
21
node_modules/redux/node_modules/lodash-es/_baseAggregator.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
import baseEach from './_baseEach.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Aggregates elements of `collection` on `accumulator` with keys transformed
|
||||||
|
* by `iteratee` and values set by `setter`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array|Object} collection The collection to iterate over.
|
||||||
|
* @param {Function} setter The function to set `accumulator` values.
|
||||||
|
* @param {Function} iteratee The iteratee to transform keys.
|
||||||
|
* @param {Object} accumulator The initial aggregated object.
|
||||||
|
* @returns {Function} Returns `accumulator`.
|
||||||
|
*/
|
||||||
|
function baseAggregator(collection, setter, iteratee, accumulator) {
|
||||||
|
baseEach(collection, function(value, key, collection) {
|
||||||
|
setter(accumulator, value, iteratee(value), collection);
|
||||||
|
});
|
||||||
|
return accumulator;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseAggregator;
|
17
node_modules/redux/node_modules/lodash-es/_baseAssign.js
generated
vendored
Normal file
17
node_modules/redux/node_modules/lodash-es/_baseAssign.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import copyObject from './_copyObject.js';
|
||||||
|
import keys from './keys.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseAssign;
|
23
node_modules/redux/node_modules/lodash-es/_baseAt.js
generated
vendored
Normal file
23
node_modules/redux/node_modules/lodash-es/_baseAt.js
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
import get from './get.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.at` without support for individual paths.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to iterate over.
|
||||||
|
* @param {string[]} paths The property paths of elements to pick.
|
||||||
|
* @returns {Array} Returns the picked elements.
|
||||||
|
*/
|
||||||
|
function baseAt(object, paths) {
|
||||||
|
var index = -1,
|
||||||
|
isNil = object == null,
|
||||||
|
length = paths.length,
|
||||||
|
result = Array(length);
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
result[index] = isNil ? undefined : get(object, paths[index]);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseAt;
|
22
node_modules/redux/node_modules/lodash-es/_baseClamp.js
generated
vendored
Normal file
22
node_modules/redux/node_modules/lodash-es/_baseClamp.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.clamp` which doesn't coerce arguments to numbers.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {number} number The number to clamp.
|
||||||
|
* @param {number} [lower] The lower bound.
|
||||||
|
* @param {number} upper The upper bound.
|
||||||
|
* @returns {number} Returns the clamped number.
|
||||||
|
*/
|
||||||
|
function baseClamp(number, lower, upper) {
|
||||||
|
if (number === number) {
|
||||||
|
if (upper !== undefined) {
|
||||||
|
number = number <= upper ? number : upper;
|
||||||
|
}
|
||||||
|
if (lower !== undefined) {
|
||||||
|
number = number >= lower ? number : lower;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseClamp;
|
139
node_modules/redux/node_modules/lodash-es/_baseClone.js
generated
vendored
Normal file
139
node_modules/redux/node_modules/lodash-es/_baseClone.js
generated
vendored
Normal file
|
@ -0,0 +1,139 @@
|
||||||
|
import Stack from './_Stack.js';
|
||||||
|
import arrayEach from './_arrayEach.js';
|
||||||
|
import assignValue from './_assignValue.js';
|
||||||
|
import baseAssign from './_baseAssign.js';
|
||||||
|
import cloneBuffer from './_cloneBuffer.js';
|
||||||
|
import copyArray from './_copyArray.js';
|
||||||
|
import copySymbols from './_copySymbols.js';
|
||||||
|
import getAllKeys from './_getAllKeys.js';
|
||||||
|
import getTag from './_getTag.js';
|
||||||
|
import initCloneArray from './_initCloneArray.js';
|
||||||
|
import initCloneByTag from './_initCloneByTag.js';
|
||||||
|
import initCloneObject from './_initCloneObject.js';
|
||||||
|
import isArray from './isArray.js';
|
||||||
|
import isBuffer from './isBuffer.js';
|
||||||
|
import isHostObject from './_isHostObject.js';
|
||||||
|
import isObject from './isObject.js';
|
||||||
|
import keys from './keys.js';
|
||||||
|
|
||||||
|
/** `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} [isDeep] Specify a deep clone.
|
||||||
|
* @param {boolean} [isFull] Specify a clone including 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, isDeep, isFull, customizer, key, object, stack) {
|
||||||
|
var result;
|
||||||
|
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)) {
|
||||||
|
if (isHostObject(value)) {
|
||||||
|
return object ? value : {};
|
||||||
|
}
|
||||||
|
result = initCloneObject(isFunc ? {} : value);
|
||||||
|
if (!isDeep) {
|
||||||
|
return copySymbols(value, baseAssign(result, value));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!cloneableTags[tag]) {
|
||||||
|
return object ? value : {};
|
||||||
|
}
|
||||||
|
result = initCloneByTag(value, tag, baseClone, 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 (!isArr) {
|
||||||
|
var props = isFull ? getAllKeys(value) : keys(value);
|
||||||
|
}
|
||||||
|
// Recursively populate clone (susceptible to call stack limits).
|
||||||
|
arrayEach(props || value, function(subValue, key) {
|
||||||
|
if (props) {
|
||||||
|
key = subValue;
|
||||||
|
subValue = value[key];
|
||||||
|
}
|
||||||
|
assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseClone;
|
33
node_modules/redux/node_modules/lodash-es/_baseConforms.js
generated
vendored
Normal file
33
node_modules/redux/node_modules/lodash-es/_baseConforms.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
import keys from './keys.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.conforms` which doesn't clone `source`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} source The object of property predicates to conform to.
|
||||||
|
* @returns {Function} Returns the new spec function.
|
||||||
|
*/
|
||||||
|
function baseConforms(source) {
|
||||||
|
var props = keys(source),
|
||||||
|
length = props.length;
|
||||||
|
|
||||||
|
return function(object) {
|
||||||
|
if (object == null) {
|
||||||
|
return !length;
|
||||||
|
}
|
||||||
|
var index = length;
|
||||||
|
while (index--) {
|
||||||
|
var key = props[index],
|
||||||
|
predicate = source[key],
|
||||||
|
value = object[key];
|
||||||
|
|
||||||
|
if ((value === undefined &&
|
||||||
|
!(key in Object(object))) || !predicate(value)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseConforms;
|
18
node_modules/redux/node_modules/lodash-es/_baseCreate.js
generated
vendored
Normal file
18
node_modules/redux/node_modules/lodash-es/_baseCreate.js
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import isObject from './isObject.js';
|
||||||
|
|
||||||
|
/** 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} prototype The object to inherit from.
|
||||||
|
* @returns {Object} Returns the new object.
|
||||||
|
*/
|
||||||
|
function baseCreate(proto) {
|
||||||
|
return isObject(proto) ? objectCreate(proto) : {};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseCreate;
|
21
node_modules/redux/node_modules/lodash-es/_baseDelay.js
generated
vendored
Normal file
21
node_modules/redux/node_modules/lodash-es/_baseDelay.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/** Used as the `TypeError` message for "Functions" methods. */
|
||||||
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.delay` and `_.defer` which accepts an array
|
||||||
|
* of `func` arguments.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Function} func The function to delay.
|
||||||
|
* @param {number} wait The number of milliseconds to delay invocation.
|
||||||
|
* @param {Object} args The arguments to provide to `func`.
|
||||||
|
* @returns {number} Returns the timer id.
|
||||||
|
*/
|
||||||
|
function baseDelay(func, wait, args) {
|
||||||
|
if (typeof func != 'function') {
|
||||||
|
throw new TypeError(FUNC_ERROR_TEXT);
|
||||||
|
}
|
||||||
|
return setTimeout(function() { func.apply(undefined, args); }, wait);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseDelay;
|
67
node_modules/redux/node_modules/lodash-es/_baseDifference.js
generated
vendored
Normal file
67
node_modules/redux/node_modules/lodash-es/_baseDifference.js
generated
vendored
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
import SetCache from './_SetCache.js';
|
||||||
|
import arrayIncludes from './_arrayIncludes.js';
|
||||||
|
import arrayIncludesWith from './_arrayIncludesWith.js';
|
||||||
|
import arrayMap from './_arrayMap.js';
|
||||||
|
import baseUnary from './_baseUnary.js';
|
||||||
|
import cacheHas from './_cacheHas.js';
|
||||||
|
|
||||||
|
/** Used as the size to enable large array optimizations. */
|
||||||
|
var LARGE_ARRAY_SIZE = 200;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of methods like `_.difference` without support
|
||||||
|
* for excluding multiple arrays or iteratee shorthands.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to inspect.
|
||||||
|
* @param {Array} values The values to exclude.
|
||||||
|
* @param {Function} [iteratee] The iteratee invoked per element.
|
||||||
|
* @param {Function} [comparator] The comparator invoked per element.
|
||||||
|
* @returns {Array} Returns the new array of filtered values.
|
||||||
|
*/
|
||||||
|
function baseDifference(array, values, iteratee, comparator) {
|
||||||
|
var index = -1,
|
||||||
|
includes = arrayIncludes,
|
||||||
|
isCommon = true,
|
||||||
|
length = array.length,
|
||||||
|
result = [],
|
||||||
|
valuesLength = values.length;
|
||||||
|
|
||||||
|
if (!length) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
if (iteratee) {
|
||||||
|
values = arrayMap(values, baseUnary(iteratee));
|
||||||
|
}
|
||||||
|
if (comparator) {
|
||||||
|
includes = arrayIncludesWith;
|
||||||
|
isCommon = false;
|
||||||
|
}
|
||||||
|
else if (values.length >= LARGE_ARRAY_SIZE) {
|
||||||
|
includes = cacheHas;
|
||||||
|
isCommon = false;
|
||||||
|
values = new SetCache(values);
|
||||||
|
}
|
||||||
|
outer:
|
||||||
|
while (++index < length) {
|
||||||
|
var value = array[index],
|
||||||
|
computed = iteratee ? iteratee(value) : value;
|
||||||
|
|
||||||
|
value = (comparator || value !== 0) ? value : 0;
|
||||||
|
if (isCommon && computed === computed) {
|
||||||
|
var valuesIndex = valuesLength;
|
||||||
|
while (valuesIndex--) {
|
||||||
|
if (values[valuesIndex] === computed) {
|
||||||
|
continue outer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.push(value);
|
||||||
|
}
|
||||||
|
else if (!includes(values, computed, comparator)) {
|
||||||
|
result.push(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseDifference;
|
14
node_modules/redux/node_modules/lodash-es/_baseEach.js
generated
vendored
Normal file
14
node_modules/redux/node_modules/lodash-es/_baseEach.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import baseForOwn from './_baseForOwn.js';
|
||||||
|
import createBaseEach from './_createBaseEach.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
|
||||||
|
export default baseEach;
|
14
node_modules/redux/node_modules/lodash-es/_baseEachRight.js
generated
vendored
Normal file
14
node_modules/redux/node_modules/lodash-es/_baseEachRight.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import baseForOwnRight from './_baseForOwnRight.js';
|
||||||
|
import createBaseEach from './_createBaseEach.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.forEachRight` 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 baseEachRight = createBaseEach(baseForOwnRight, true);
|
||||||
|
|
||||||
|
export default baseEachRight;
|
21
node_modules/redux/node_modules/lodash-es/_baseEvery.js
generated
vendored
Normal file
21
node_modules/redux/node_modules/lodash-es/_baseEvery.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
import baseEach from './_baseEach.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.every` without support for iteratee shorthands.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array|Object} collection The collection to iterate over.
|
||||||
|
* @param {Function} predicate The function invoked per iteration.
|
||||||
|
* @returns {boolean} Returns `true` if all elements pass the predicate check,
|
||||||
|
* else `false`
|
||||||
|
*/
|
||||||
|
function baseEvery(collection, predicate) {
|
||||||
|
var result = true;
|
||||||
|
baseEach(collection, function(value, index, collection) {
|
||||||
|
result = !!predicate(value, index, collection);
|
||||||
|
return result;
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseEvery;
|
32
node_modules/redux/node_modules/lodash-es/_baseExtremum.js
generated
vendored
Normal file
32
node_modules/redux/node_modules/lodash-es/_baseExtremum.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
import isSymbol from './isSymbol.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of methods like `_.max` and `_.min` which accepts a
|
||||||
|
* `comparator` to determine the extremum value.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to iterate over.
|
||||||
|
* @param {Function} iteratee The iteratee invoked per iteration.
|
||||||
|
* @param {Function} comparator The comparator used to compare values.
|
||||||
|
* @returns {*} Returns the extremum value.
|
||||||
|
*/
|
||||||
|
function baseExtremum(array, iteratee, comparator) {
|
||||||
|
var index = -1,
|
||||||
|
length = array.length;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var value = array[index],
|
||||||
|
current = iteratee(value);
|
||||||
|
|
||||||
|
if (current != null && (computed === undefined
|
||||||
|
? (current === current && !isSymbol(current))
|
||||||
|
: comparator(current, computed)
|
||||||
|
)) {
|
||||||
|
var computed = current,
|
||||||
|
result = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseExtremum;
|
32
node_modules/redux/node_modules/lodash-es/_baseFill.js
generated
vendored
Normal file
32
node_modules/redux/node_modules/lodash-es/_baseFill.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
import toInteger from './toInteger.js';
|
||||||
|
import toLength from './toLength.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.fill` without an iteratee call guard.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to fill.
|
||||||
|
* @param {*} value The value to fill `array` with.
|
||||||
|
* @param {number} [start=0] The start position.
|
||||||
|
* @param {number} [end=array.length] The end position.
|
||||||
|
* @returns {Array} Returns `array`.
|
||||||
|
*/
|
||||||
|
function baseFill(array, value, start, end) {
|
||||||
|
var length = array.length;
|
||||||
|
|
||||||
|
start = toInteger(start);
|
||||||
|
if (start < 0) {
|
||||||
|
start = -start > length ? 0 : (length + start);
|
||||||
|
}
|
||||||
|
end = (end === undefined || end > length) ? length : toInteger(end);
|
||||||
|
if (end < 0) {
|
||||||
|
end += length;
|
||||||
|
}
|
||||||
|
end = start > end ? 0 : toLength(end);
|
||||||
|
while (start < end) {
|
||||||
|
array[start++] = value;
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseFill;
|
21
node_modules/redux/node_modules/lodash-es/_baseFilter.js
generated
vendored
Normal file
21
node_modules/redux/node_modules/lodash-es/_baseFilter.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
import baseEach from './_baseEach.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.filter` without support for iteratee shorthands.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array|Object} collection The collection to iterate over.
|
||||||
|
* @param {Function} predicate The function invoked per iteration.
|
||||||
|
* @returns {Array} Returns the new filtered array.
|
||||||
|
*/
|
||||||
|
function baseFilter(collection, predicate) {
|
||||||
|
var result = [];
|
||||||
|
baseEach(collection, function(value, index, collection) {
|
||||||
|
if (predicate(value, index, collection)) {
|
||||||
|
result.push(value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseFilter;
|
24
node_modules/redux/node_modules/lodash-es/_baseFindIndex.js
generated
vendored
Normal file
24
node_modules/redux/node_modules/lodash-es/_baseFindIndex.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
||||||
|
* support for iteratee shorthands.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to search.
|
||||||
|
* @param {Function} predicate The function invoked per iteration.
|
||||||
|
* @param {number} fromIndex The index to search from.
|
||||||
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||||
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||||
|
*/
|
||||||
|
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
||||||
|
var length = array.length,
|
||||||
|
index = fromIndex + (fromRight ? 1 : -1);
|
||||||
|
|
||||||
|
while ((fromRight ? index-- : ++index < length)) {
|
||||||
|
if (predicate(array[index], index, array)) {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseFindIndex;
|
23
node_modules/redux/node_modules/lodash-es/_baseFindKey.js
generated
vendored
Normal file
23
node_modules/redux/node_modules/lodash-es/_baseFindKey.js
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/**
|
||||||
|
* The base implementation of methods like `_.findKey` and `_.findLastKey`,
|
||||||
|
* without support for iteratee shorthands, which iterates over `collection`
|
||||||
|
* using `eachFunc`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array|Object} collection The collection to search.
|
||||||
|
* @param {Function} predicate The function invoked per iteration.
|
||||||
|
* @param {Function} eachFunc The function to iterate over `collection`.
|
||||||
|
* @returns {*} Returns the found element or its key, else `undefined`.
|
||||||
|
*/
|
||||||
|
function baseFindKey(collection, predicate, eachFunc) {
|
||||||
|
var result;
|
||||||
|
eachFunc(collection, function(value, key, collection) {
|
||||||
|
if (predicate(value, key, collection)) {
|
||||||
|
result = key;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseFindKey;
|
38
node_modules/redux/node_modules/lodash-es/_baseFlatten.js
generated
vendored
Normal file
38
node_modules/redux/node_modules/lodash-es/_baseFlatten.js
generated
vendored
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
import arrayPush from './_arrayPush.js';
|
||||||
|
import isFlattenable from './_isFlattenable.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.flatten` with support for restricting flattening.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to flatten.
|
||||||
|
* @param {number} depth The maximum recursion depth.
|
||||||
|
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
|
||||||
|
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
|
||||||
|
* @param {Array} [result=[]] The initial result value.
|
||||||
|
* @returns {Array} Returns the new flattened array.
|
||||||
|
*/
|
||||||
|
function baseFlatten(array, depth, predicate, isStrict, result) {
|
||||||
|
var index = -1,
|
||||||
|
length = array.length;
|
||||||
|
|
||||||
|
predicate || (predicate = isFlattenable);
|
||||||
|
result || (result = []);
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var value = array[index];
|
||||||
|
if (depth > 0 && predicate(value)) {
|
||||||
|
if (depth > 1) {
|
||||||
|
// Recursively flatten arrays (susceptible to call stack limits).
|
||||||
|
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
||||||
|
} else {
|
||||||
|
arrayPush(result, value);
|
||||||
|
}
|
||||||
|
} else if (!isStrict) {
|
||||||
|
result[result.length] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseFlatten;
|
16
node_modules/redux/node_modules/lodash-es/_baseFor.js
generated
vendored
Normal file
16
node_modules/redux/node_modules/lodash-es/_baseFor.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
import createBaseFor from './_createBaseFor.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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();
|
||||||
|
|
||||||
|
export default baseFor;
|
16
node_modules/redux/node_modules/lodash-es/_baseForOwn.js
generated
vendored
Normal file
16
node_modules/redux/node_modules/lodash-es/_baseForOwn.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
import baseFor from './_baseFor.js';
|
||||||
|
import keys from './keys.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseForOwn;
|
16
node_modules/redux/node_modules/lodash-es/_baseForOwnRight.js
generated
vendored
Normal file
16
node_modules/redux/node_modules/lodash-es/_baseForOwnRight.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
import baseForRight from './_baseForRight.js';
|
||||||
|
import keys from './keys.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.forOwnRight` 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 baseForOwnRight(object, iteratee) {
|
||||||
|
return object && baseForRight(object, iteratee, keys);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseForOwnRight;
|
15
node_modules/redux/node_modules/lodash-es/_baseForRight.js
generated
vendored
Normal file
15
node_modules/redux/node_modules/lodash-es/_baseForRight.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import createBaseFor from './_createBaseFor.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is like `baseFor` except that it iterates over properties
|
||||||
|
* in the opposite order.
|
||||||
|
*
|
||||||
|
* @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 baseForRight = createBaseFor(true);
|
||||||
|
|
||||||
|
export default baseForRight;
|
19
node_modules/redux/node_modules/lodash-es/_baseFunctions.js
generated
vendored
Normal file
19
node_modules/redux/node_modules/lodash-es/_baseFunctions.js
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
import arrayFilter from './_arrayFilter.js';
|
||||||
|
import isFunction from './isFunction.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.functions` which creates an array of
|
||||||
|
* `object` function property names filtered from `props`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to inspect.
|
||||||
|
* @param {Array} props The property names to filter.
|
||||||
|
* @returns {Array} Returns the function names.
|
||||||
|
*/
|
||||||
|
function baseFunctions(object, props) {
|
||||||
|
return arrayFilter(props, function(key) {
|
||||||
|
return isFunction(object[key]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseFunctions;
|
25
node_modules/redux/node_modules/lodash-es/_baseGet.js
generated
vendored
Normal file
25
node_modules/redux/node_modules/lodash-es/_baseGet.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
import castPath from './_castPath.js';
|
||||||
|
import isKey from './_isKey.js';
|
||||||
|
import toKey from './_toKey.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 = isKey(path, object) ? [path] : castPath(path);
|
||||||
|
|
||||||
|
var index = 0,
|
||||||
|
length = path.length;
|
||||||
|
|
||||||
|
while (object != null && index < length) {
|
||||||
|
object = object[toKey(path[index++])];
|
||||||
|
}
|
||||||
|
return (index && index == length) ? object : undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseGet;
|
20
node_modules/redux/node_modules/lodash-es/_baseGetAllKeys.js
generated
vendored
Normal file
20
node_modules/redux/node_modules/lodash-es/_baseGetAllKeys.js
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
import arrayPush from './_arrayPush.js';
|
||||||
|
import isArray from './isArray.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseGetAllKeys;
|
14
node_modules/redux/node_modules/lodash-es/_baseGt.js
generated
vendored
Normal file
14
node_modules/redux/node_modules/lodash-es/_baseGt.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.gt` which doesn't coerce arguments to numbers.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to compare.
|
||||||
|
* @param {*} other The other value to compare.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is greater than `other`,
|
||||||
|
* else `false`.
|
||||||
|
*/
|
||||||
|
function baseGt(value, other) {
|
||||||
|
return value > other;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseGt;
|
26
node_modules/redux/node_modules/lodash-es/_baseHas.js
generated
vendored
Normal file
26
node_modules/redux/node_modules/lodash-es/_baseHas.js
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
import getPrototype from './_getPrototype.js';
|
||||||
|
|
||||||
|
/** 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 `_.has` 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 baseHas(object, key) {
|
||||||
|
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||||
|
// that are composed entirely of index properties, return `false` for
|
||||||
|
// `hasOwnProperty` checks of them.
|
||||||
|
return object != null &&
|
||||||
|
(hasOwnProperty.call(object, key) ||
|
||||||
|
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseHas;
|
13
node_modules/redux/node_modules/lodash-es/_baseHasIn.js
generated
vendored
Normal file
13
node_modules/redux/node_modules/lodash-es/_baseHasIn.js
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseHasIn;
|
18
node_modules/redux/node_modules/lodash-es/_baseInRange.js
generated
vendored
Normal file
18
node_modules/redux/node_modules/lodash-es/_baseInRange.js
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||||
|
var nativeMax = Math.max,
|
||||||
|
nativeMin = Math.min;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.inRange` which doesn't coerce arguments to numbers.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {number} number The number to check.
|
||||||
|
* @param {number} start The start of the range.
|
||||||
|
* @param {number} end The end of the range.
|
||||||
|
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
|
||||||
|
*/
|
||||||
|
function baseInRange(number, start, end) {
|
||||||
|
return number >= nativeMin(start, end) && number < nativeMax(start, end);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseInRange;
|
27
node_modules/redux/node_modules/lodash-es/_baseIndexOf.js
generated
vendored
Normal file
27
node_modules/redux/node_modules/lodash-es/_baseIndexOf.js
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import indexOfNaN from './_indexOfNaN.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to search.
|
||||||
|
* @param {*} value The value to search for.
|
||||||
|
* @param {number} fromIndex The index to search from.
|
||||||
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||||
|
*/
|
||||||
|
function baseIndexOf(array, value, fromIndex) {
|
||||||
|
if (value !== value) {
|
||||||
|
return indexOfNaN(array, fromIndex);
|
||||||
|
}
|
||||||
|
var index = fromIndex - 1,
|
||||||
|
length = array.length;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
if (array[index] === value) {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseIndexOf;
|
23
node_modules/redux/node_modules/lodash-es/_baseIndexOfWith.js
generated
vendored
Normal file
23
node_modules/redux/node_modules/lodash-es/_baseIndexOfWith.js
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/**
|
||||||
|
* This function is like `baseIndexOf` except that it accepts a comparator.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to search.
|
||||||
|
* @param {*} value The value to search for.
|
||||||
|
* @param {number} fromIndex The index to search from.
|
||||||
|
* @param {Function} comparator The comparator invoked per element.
|
||||||
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||||
|
*/
|
||||||
|
function baseIndexOfWith(array, value, fromIndex, comparator) {
|
||||||
|
var index = fromIndex - 1,
|
||||||
|
length = array.length;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
if (comparator(array[index], value)) {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseIndexOfWith;
|
74
node_modules/redux/node_modules/lodash-es/_baseIntersection.js
generated
vendored
Normal file
74
node_modules/redux/node_modules/lodash-es/_baseIntersection.js
generated
vendored
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
import SetCache from './_SetCache.js';
|
||||||
|
import arrayIncludes from './_arrayIncludes.js';
|
||||||
|
import arrayIncludesWith from './_arrayIncludesWith.js';
|
||||||
|
import arrayMap from './_arrayMap.js';
|
||||||
|
import baseUnary from './_baseUnary.js';
|
||||||
|
import cacheHas from './_cacheHas.js';
|
||||||
|
|
||||||
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||||
|
var nativeMin = Math.min;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of methods like `_.intersection`, without support
|
||||||
|
* for iteratee shorthands, that accepts an array of arrays to inspect.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} arrays The arrays to inspect.
|
||||||
|
* @param {Function} [iteratee] The iteratee invoked per element.
|
||||||
|
* @param {Function} [comparator] The comparator invoked per element.
|
||||||
|
* @returns {Array} Returns the new array of shared values.
|
||||||
|
*/
|
||||||
|
function baseIntersection(arrays, iteratee, comparator) {
|
||||||
|
var includes = comparator ? arrayIncludesWith : arrayIncludes,
|
||||||
|
length = arrays[0].length,
|
||||||
|
othLength = arrays.length,
|
||||||
|
othIndex = othLength,
|
||||||
|
caches = Array(othLength),
|
||||||
|
maxLength = Infinity,
|
||||||
|
result = [];
|
||||||
|
|
||||||
|
while (othIndex--) {
|
||||||
|
var array = arrays[othIndex];
|
||||||
|
if (othIndex && iteratee) {
|
||||||
|
array = arrayMap(array, baseUnary(iteratee));
|
||||||
|
}
|
||||||
|
maxLength = nativeMin(array.length, maxLength);
|
||||||
|
caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
|
||||||
|
? new SetCache(othIndex && array)
|
||||||
|
: undefined;
|
||||||
|
}
|
||||||
|
array = arrays[0];
|
||||||
|
|
||||||
|
var index = -1,
|
||||||
|
seen = caches[0];
|
||||||
|
|
||||||
|
outer:
|
||||||
|
while (++index < length && result.length < maxLength) {
|
||||||
|
var value = array[index],
|
||||||
|
computed = iteratee ? iteratee(value) : value;
|
||||||
|
|
||||||
|
value = (comparator || value !== 0) ? value : 0;
|
||||||
|
if (!(seen
|
||||||
|
? cacheHas(seen, computed)
|
||||||
|
: includes(result, computed, comparator)
|
||||||
|
)) {
|
||||||
|
othIndex = othLength;
|
||||||
|
while (--othIndex) {
|
||||||
|
var cache = caches[othIndex];
|
||||||
|
if (!(cache
|
||||||
|
? cacheHas(cache, computed)
|
||||||
|
: includes(arrays[othIndex], computed, comparator))
|
||||||
|
) {
|
||||||
|
continue outer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (seen) {
|
||||||
|
seen.push(computed);
|
||||||
|
}
|
||||||
|
result.push(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseIntersection;
|
21
node_modules/redux/node_modules/lodash-es/_baseInverter.js
generated
vendored
Normal file
21
node_modules/redux/node_modules/lodash-es/_baseInverter.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
import baseForOwn from './_baseForOwn.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.invert` and `_.invertBy` which inverts
|
||||||
|
* `object` with values transformed by `iteratee` and set by `setter`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to iterate over.
|
||||||
|
* @param {Function} setter The function to set `accumulator` values.
|
||||||
|
* @param {Function} iteratee The iteratee to transform values.
|
||||||
|
* @param {Object} accumulator The initial inverted object.
|
||||||
|
* @returns {Function} Returns `accumulator`.
|
||||||
|
*/
|
||||||
|
function baseInverter(object, setter, iteratee, accumulator) {
|
||||||
|
baseForOwn(object, function(value, key, object) {
|
||||||
|
setter(accumulator, iteratee(value), key, object);
|
||||||
|
});
|
||||||
|
return accumulator;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseInverter;
|
28
node_modules/redux/node_modules/lodash-es/_baseInvoke.js
generated
vendored
Normal file
28
node_modules/redux/node_modules/lodash-es/_baseInvoke.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
import apply from './_apply.js';
|
||||||
|
import castPath from './_castPath.js';
|
||||||
|
import isKey from './_isKey.js';
|
||||||
|
import last from './last.js';
|
||||||
|
import parent from './_parent.js';
|
||||||
|
import toKey from './_toKey.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.invoke` without support for individual
|
||||||
|
* method arguments.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @param {Array|string} path The path of the method to invoke.
|
||||||
|
* @param {Array} args The arguments to invoke the method with.
|
||||||
|
* @returns {*} Returns the result of the invoked method.
|
||||||
|
*/
|
||||||
|
function baseInvoke(object, path, args) {
|
||||||
|
if (!isKey(path, object)) {
|
||||||
|
path = castPath(path);
|
||||||
|
object = parent(object, path);
|
||||||
|
path = last(path);
|
||||||
|
}
|
||||||
|
var func = object == null ? object : object[toKey(path)];
|
||||||
|
return func == null ? undefined : apply(func, object, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseInvoke;
|
30
node_modules/redux/node_modules/lodash-es/_baseIsEqual.js
generated
vendored
Normal file
30
node_modules/redux/node_modules/lodash-es/_baseIsEqual.js
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
import baseIsEqualDeep from './_baseIsEqualDeep.js';
|
||||||
|
import isObject from './isObject.js';
|
||||||
|
import isObjectLike from './isObjectLike.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 {Function} [customizer] The function to customize comparisons.
|
||||||
|
* @param {boolean} [bitmask] The bitmask of comparison flags.
|
||||||
|
* The bitmask may be composed of the following flags:
|
||||||
|
* 1 - Unordered comparison
|
||||||
|
* 2 - Partial comparison
|
||||||
|
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
|
||||||
|
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||||
|
*/
|
||||||
|
function baseIsEqual(value, other, customizer, bitmask, stack) {
|
||||||
|
if (value === other) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
|
||||||
|
return value !== value && other !== other;
|
||||||
|
}
|
||||||
|
return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseIsEqual;
|
82
node_modules/redux/node_modules/lodash-es/_baseIsEqualDeep.js
generated
vendored
Normal file
82
node_modules/redux/node_modules/lodash-es/_baseIsEqualDeep.js
generated
vendored
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
import Stack from './_Stack.js';
|
||||||
|
import equalArrays from './_equalArrays.js';
|
||||||
|
import equalByTag from './_equalByTag.js';
|
||||||
|
import equalObjects from './_equalObjects.js';
|
||||||
|
import getTag from './_getTag.js';
|
||||||
|
import isArray from './isArray.js';
|
||||||
|
import isHostObject from './_isHostObject.js';
|
||||||
|
import isTypedArray from './isTypedArray.js';
|
||||||
|
|
||||||
|
/** Used to compose bitmasks for comparison styles. */
|
||||||
|
var PARTIAL_COMPARE_FLAG = 2;
|
||||||
|
|
||||||
|
/** `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 {Function} equalFunc The function to determine equivalents of values.
|
||||||
|
* @param {Function} [customizer] The function to customize comparisons.
|
||||||
|
* @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
|
||||||
|
* for more details.
|
||||||
|
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
|
||||||
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
||||||
|
*/
|
||||||
|
function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
|
||||||
|
var objIsArr = isArray(object),
|
||||||
|
othIsArr = isArray(other),
|
||||||
|
objTag = arrayTag,
|
||||||
|
othTag = arrayTag;
|
||||||
|
|
||||||
|
if (!objIsArr) {
|
||||||
|
objTag = getTag(object);
|
||||||
|
objTag = objTag == argsTag ? objectTag : objTag;
|
||||||
|
}
|
||||||
|
if (!othIsArr) {
|
||||||
|
othTag = getTag(other);
|
||||||
|
othTag = othTag == argsTag ? objectTag : othTag;
|
||||||
|
}
|
||||||
|
var objIsObj = objTag == objectTag && !isHostObject(object),
|
||||||
|
othIsObj = othTag == objectTag && !isHostObject(other),
|
||||||
|
isSameTag = objTag == othTag;
|
||||||
|
|
||||||
|
if (isSameTag && !objIsObj) {
|
||||||
|
stack || (stack = new Stack);
|
||||||
|
return (objIsArr || isTypedArray(object))
|
||||||
|
? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
|
||||||
|
: equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
|
||||||
|
}
|
||||||
|
if (!(bitmask & PARTIAL_COMPARE_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, customizer, bitmask, stack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isSameTag) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
stack || (stack = new Stack);
|
||||||
|
return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseIsEqualDeep;
|
62
node_modules/redux/node_modules/lodash-es/_baseIsMatch.js
generated
vendored
Normal file
62
node_modules/redux/node_modules/lodash-es/_baseIsMatch.js
generated
vendored
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
import Stack from './_Stack.js';
|
||||||
|
import baseIsEqual from './_baseIsEqual.js';
|
||||||
|
|
||||||
|
/** Used to compose bitmasks for comparison styles. */
|
||||||
|
var UNORDERED_COMPARE_FLAG = 1,
|
||||||
|
PARTIAL_COMPARE_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, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
|
||||||
|
: result
|
||||||
|
)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseIsMatch;
|
47
node_modules/redux/node_modules/lodash-es/_baseIsNative.js
generated
vendored
Normal file
47
node_modules/redux/node_modules/lodash-es/_baseIsNative.js
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
import isFunction from './isFunction.js';
|
||||||
|
import isHostObject from './_isHostObject.js';
|
||||||
|
import isMasked from './_isMasked.js';
|
||||||
|
import isObject from './isObject.js';
|
||||||
|
import toSource from './_toSource.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to match `RegExp`
|
||||||
|
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||||
|
*/
|
||||||
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||||
|
|
||||||
|
/** Used to detect host constructors (Safari). */
|
||||||
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
||||||
|
|
||||||
|
/** Used for built-in method references. */
|
||||||
|
var objectProto = Object.prototype;
|
||||||
|
|
||||||
|
/** Used to resolve the decompiled source of functions. */
|
||||||
|
var funcToString = Function.prototype.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) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
||||||
|
return pattern.test(toSource(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseIsNative;
|
31
node_modules/redux/node_modules/lodash-es/_baseIteratee.js
generated
vendored
Normal file
31
node_modules/redux/node_modules/lodash-es/_baseIteratee.js
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
import baseMatches from './_baseMatches.js';
|
||||||
|
import baseMatchesProperty from './_baseMatchesProperty.js';
|
||||||
|
import identity from './identity.js';
|
||||||
|
import isArray from './isArray.js';
|
||||||
|
import property from './property.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseIteratee;
|
16
node_modules/redux/node_modules/lodash-es/_baseKeys.js
generated
vendored
Normal file
16
node_modules/redux/node_modules/lodash-es/_baseKeys.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||||
|
var nativeKeys = Object.keys;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||||
|
* property of prototypes or treat sparse arrays as dense.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @returns {Array} Returns the array of property names.
|
||||||
|
*/
|
||||||
|
function baseKeys(object) {
|
||||||
|
return nativeKeys(Object(object));
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseKeys;
|
36
node_modules/redux/node_modules/lodash-es/_baseKeysIn.js
generated
vendored
Normal file
36
node_modules/redux/node_modules/lodash-es/_baseKeysIn.js
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
import Reflect from './_Reflect.js';
|
||||||
|
import iteratorToArray from './_iteratorToArray.js';
|
||||||
|
|
||||||
|
/** Used for built-in method references. */
|
||||||
|
var objectProto = Object.prototype;
|
||||||
|
|
||||||
|
/** Built-in value references. */
|
||||||
|
var enumerate = Reflect ? Reflect.enumerate : undefined,
|
||||||
|
propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.keysIn` which doesn't skip the constructor
|
||||||
|
* property of prototypes or treat sparse arrays as dense.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @returns {Array} Returns the array of property names.
|
||||||
|
*/
|
||||||
|
function baseKeysIn(object) {
|
||||||
|
object = object == null ? object : Object(object);
|
||||||
|
|
||||||
|
var result = [];
|
||||||
|
for (var key in object) {
|
||||||
|
result.push(key);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fallback for IE < 9 with es6-shim.
|
||||||
|
if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
|
||||||
|
baseKeysIn = function(object) {
|
||||||
|
return iteratorToArray(enumerate(object));
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseKeysIn;
|
10
node_modules/redux/node_modules/lodash-es/_baseLodash.js
generated
vendored
Normal file
10
node_modules/redux/node_modules/lodash-es/_baseLodash.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
/**
|
||||||
|
* The function whose prototype chain sequence wrappers inherit from.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
function baseLodash() {
|
||||||
|
// No operation performed.
|
||||||
|
}
|
||||||
|
|
||||||
|
export default baseLodash;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue