zreact-redux-rails 3.6.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,945 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if(typeof define === 'function' && define.amd)
5
+ define([], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["Redux"] = factory();
8
+ else
9
+ root["Redux"] = factory();
10
+ })(this, function() {
11
+ return /******/ (function(modules) { // webpackBootstrap
12
+ /******/ // The module cache
13
+ /******/ var installedModules = {};
14
+
15
+ /******/ // The require function
16
+ /******/ function __webpack_require__(moduleId) {
17
+
18
+ /******/ // Check if module is in cache
19
+ /******/ if(installedModules[moduleId])
20
+ /******/ return installedModules[moduleId].exports;
21
+
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var module = installedModules[moduleId] = {
24
+ /******/ exports: {},
25
+ /******/ id: moduleId,
26
+ /******/ loaded: false
27
+ /******/ };
28
+
29
+ /******/ // Execute the module function
30
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
+
32
+ /******/ // Flag the module as loaded
33
+ /******/ module.loaded = true;
34
+
35
+ /******/ // Return the exports of the module
36
+ /******/ return module.exports;
37
+ /******/ }
38
+
39
+
40
+ /******/ // expose the modules object (__webpack_modules__)
41
+ /******/ __webpack_require__.m = modules;
42
+
43
+ /******/ // expose the module cache
44
+ /******/ __webpack_require__.c = installedModules;
45
+
46
+ /******/ // __webpack_public_path__
47
+ /******/ __webpack_require__.p = "";
48
+
49
+ /******/ // Load entry module and return exports
50
+ /******/ return __webpack_require__(0);
51
+ /******/ })
52
+ /************************************************************************/
53
+ /******/ ([
54
+ /* 0 */
55
+ /***/ function(module, exports, __webpack_require__) {
56
+
57
+ 'use strict';
58
+
59
+ exports.__esModule = true;
60
+ exports.compose = exports.applyMiddleware = exports.bindActionCreators = exports.combineReducers = exports.createStore = undefined;
61
+
62
+ var _createStore = __webpack_require__(2);
63
+
64
+ var _createStore2 = _interopRequireDefault(_createStore);
65
+
66
+ var _combineReducers = __webpack_require__(7);
67
+
68
+ var _combineReducers2 = _interopRequireDefault(_combineReducers);
69
+
70
+ var _bindActionCreators = __webpack_require__(6);
71
+
72
+ var _bindActionCreators2 = _interopRequireDefault(_bindActionCreators);
73
+
74
+ var _applyMiddleware = __webpack_require__(5);
75
+
76
+ var _applyMiddleware2 = _interopRequireDefault(_applyMiddleware);
77
+
78
+ var _compose = __webpack_require__(1);
79
+
80
+ var _compose2 = _interopRequireDefault(_compose);
81
+
82
+ var _warning = __webpack_require__(3);
83
+
84
+ var _warning2 = _interopRequireDefault(_warning);
85
+
86
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
87
+
88
+ /*
89
+ * This is a dummy function to check if the function name has been altered by minification.
90
+ * If the function has been minified and NODE_ENV !== 'production', warn the user.
91
+ */
92
+ function isCrushed() {}
93
+
94
+ if (("development") !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
95
+ (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.');
96
+ }
97
+
98
+ exports.createStore = _createStore2['default'];
99
+ exports.combineReducers = _combineReducers2['default'];
100
+ exports.bindActionCreators = _bindActionCreators2['default'];
101
+ exports.applyMiddleware = _applyMiddleware2['default'];
102
+ exports.compose = _compose2['default'];
103
+
104
+ /***/ },
105
+ /* 1 */
106
+ /***/ function(module, exports) {
107
+
108
+ "use strict";
109
+
110
+ exports.__esModule = true;
111
+ exports["default"] = compose;
112
+ /**
113
+ * Composes single-argument functions from right to left. The rightmost
114
+ * function can take multiple arguments as it provides the signature for
115
+ * the resulting composite function.
116
+ *
117
+ * @param {...Function} funcs The functions to compose.
118
+ * @returns {Function} A function obtained by composing the argument functions
119
+ * from right to left. For example, compose(f, g, h) is identical to doing
120
+ * (...args) => f(g(h(...args))).
121
+ */
122
+
123
+ function compose() {
124
+ for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
125
+ funcs[_key] = arguments[_key];
126
+ }
127
+
128
+ if (funcs.length === 0) {
129
+ return function (arg) {
130
+ return arg;
131
+ };
132
+ }
133
+
134
+ if (funcs.length === 1) {
135
+ return funcs[0];
136
+ }
137
+
138
+ var last = funcs[funcs.length - 1];
139
+ var rest = funcs.slice(0, -1);
140
+ return function () {
141
+ return rest.reduceRight(function (composed, f) {
142
+ return f(composed);
143
+ }, last.apply(undefined, arguments));
144
+ };
145
+ }
146
+
147
+ /***/ },
148
+ /* 2 */
149
+ /***/ function(module, exports, __webpack_require__) {
150
+
151
+ 'use strict';
152
+
153
+ exports.__esModule = true;
154
+ exports.ActionTypes = undefined;
155
+ exports['default'] = createStore;
156
+
157
+ var _isPlainObject = __webpack_require__(4);
158
+
159
+ var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
160
+
161
+ var _symbolObservable = __webpack_require__(12);
162
+
163
+ var _symbolObservable2 = _interopRequireDefault(_symbolObservable);
164
+
165
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
166
+
167
+ /**
168
+ * These are private action types reserved by Redux.
169
+ * For any unknown actions, you must return the current state.
170
+ * If the current state is undefined, you must return the initial state.
171
+ * Do not reference these action types directly in your code.
172
+ */
173
+ var ActionTypes = exports.ActionTypes = {
174
+ INIT: '@@redux/INIT'
175
+ };
176
+
177
+ /**
178
+ * Creates a Redux store that holds the state tree.
179
+ * The only way to change the data in the store is to call `dispatch()` on it.
180
+ *
181
+ * There should only be a single store in your app. To specify how different
182
+ * parts of the state tree respond to actions, you may combine several reducers
183
+ * into a single reducer function by using `combineReducers`.
184
+ *
185
+ * @param {Function} reducer A function that returns the next state tree, given
186
+ * the current state tree and the action to handle.
187
+ *
188
+ * @param {any} [preloadedState] The initial state. You may optionally specify it
189
+ * to hydrate the state from the server in universal apps, or to restore a
190
+ * previously serialized user session.
191
+ * If you use `combineReducers` to produce the root reducer function, this must be
192
+ * an object with the same shape as `combineReducers` keys.
193
+ *
194
+ * @param {Function} enhancer The store enhancer. You may optionally specify it
195
+ * to enhance the store with third-party capabilities such as middleware,
196
+ * time travel, persistence, etc. The only store enhancer that ships with Redux
197
+ * is `applyMiddleware()`.
198
+ *
199
+ * @returns {Store} A Redux store that lets you read the state, dispatch actions
200
+ * and subscribe to changes.
201
+ */
202
+ function createStore(reducer, preloadedState, enhancer) {
203
+ var _ref2;
204
+
205
+ if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
206
+ enhancer = preloadedState;
207
+ preloadedState = undefined;
208
+ }
209
+
210
+ if (typeof enhancer !== 'undefined') {
211
+ if (typeof enhancer !== 'function') {
212
+ throw new Error('Expected the enhancer to be a function.');
213
+ }
214
+
215
+ return enhancer(createStore)(reducer, preloadedState);
216
+ }
217
+
218
+ if (typeof reducer !== 'function') {
219
+ throw new Error('Expected the reducer to be a function.');
220
+ }
221
+
222
+ var currentReducer = reducer;
223
+ var currentState = preloadedState;
224
+ var currentListeners = [];
225
+ var nextListeners = currentListeners;
226
+ var isDispatching = false;
227
+
228
+ function ensureCanMutateNextListeners() {
229
+ if (nextListeners === currentListeners) {
230
+ nextListeners = currentListeners.slice();
231
+ }
232
+ }
233
+
234
+ /**
235
+ * Reads the state tree managed by the store.
236
+ *
237
+ * @returns {any} The current state tree of your application.
238
+ */
239
+ function getState() {
240
+ return currentState;
241
+ }
242
+
243
+ /**
244
+ * Adds a change listener. It will be called any time an action is dispatched,
245
+ * and some part of the state tree may potentially have changed. You may then
246
+ * call `getState()` to read the current state tree inside the callback.
247
+ *
248
+ * You may call `dispatch()` from a change listener, with the following
249
+ * caveats:
250
+ *
251
+ * 1. The subscriptions are snapshotted just before every `dispatch()` call.
252
+ * If you subscribe or unsubscribe while the listeners are being invoked, this
253
+ * will not have any effect on the `dispatch()` that is currently in progress.
254
+ * However, the next `dispatch()` call, whether nested or not, will use a more
255
+ * recent snapshot of the subscription list.
256
+ *
257
+ * 2. The listener should not expect to see all state changes, as the state
258
+ * might have been updated multiple times during a nested `dispatch()` before
259
+ * the listener is called. It is, however, guaranteed that all subscribers
260
+ * registered before the `dispatch()` started will be called with the latest
261
+ * state by the time it exits.
262
+ *
263
+ * @param {Function} listener A callback to be invoked on every dispatch.
264
+ * @returns {Function} A function to remove this change listener.
265
+ */
266
+ function subscribe(listener) {
267
+ if (typeof listener !== 'function') {
268
+ throw new Error('Expected listener to be a function.');
269
+ }
270
+
271
+ var isSubscribed = true;
272
+
273
+ ensureCanMutateNextListeners();
274
+ nextListeners.push(listener);
275
+
276
+ return function unsubscribe() {
277
+ if (!isSubscribed) {
278
+ return;
279
+ }
280
+
281
+ isSubscribed = false;
282
+
283
+ ensureCanMutateNextListeners();
284
+ var index = nextListeners.indexOf(listener);
285
+ nextListeners.splice(index, 1);
286
+ };
287
+ }
288
+
289
+ /**
290
+ * Dispatches an action. It is the only way to trigger a state change.
291
+ *
292
+ * The `reducer` function, used to create the store, will be called with the
293
+ * current state tree and the given `action`. Its return value will
294
+ * be considered the **next** state of the tree, and the change listeners
295
+ * will be notified.
296
+ *
297
+ * The base implementation only supports plain object actions. If you want to
298
+ * dispatch a Promise, an Observable, a thunk, or something else, you need to
299
+ * wrap your store creating function into the corresponding middleware. For
300
+ * example, see the documentation for the `redux-thunk` package. Even the
301
+ * middleware will eventually dispatch plain object actions using this method.
302
+ *
303
+ * @param {Object} action A plain object representing “what changed”. It is
304
+ * a good idea to keep actions serializable so you can record and replay user
305
+ * sessions, or use the time travelling `redux-devtools`. An action must have
306
+ * a `type` property which may not be `undefined`. It is a good idea to use
307
+ * string constants for action types.
308
+ *
309
+ * @returns {Object} For convenience, the same action object you dispatched.
310
+ *
311
+ * Note that, if you use a custom middleware, it may wrap `dispatch()` to
312
+ * return something else (for example, a Promise you can await).
313
+ */
314
+ function dispatch(action) {
315
+ if (!(0, _isPlainObject2['default'])(action)) {
316
+ throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
317
+ }
318
+
319
+ if (typeof action.type === 'undefined') {
320
+ throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
321
+ }
322
+
323
+ if (isDispatching) {
324
+ throw new Error('Reducers may not dispatch actions.');
325
+ }
326
+
327
+ try {
328
+ isDispatching = true;
329
+ currentState = currentReducer(currentState, action);
330
+ } finally {
331
+ isDispatching = false;
332
+ }
333
+
334
+ var listeners = currentListeners = nextListeners;
335
+ for (var i = 0; i < listeners.length; i++) {
336
+ listeners[i]();
337
+ }
338
+
339
+ return action;
340
+ }
341
+
342
+ /**
343
+ * Replaces the reducer currently used by the store to calculate the state.
344
+ *
345
+ * You might need this if your app implements code splitting and you want to
346
+ * load some of the reducers dynamically. You might also need this if you
347
+ * implement a hot reloading mechanism for Redux.
348
+ *
349
+ * @param {Function} nextReducer The reducer for the store to use instead.
350
+ * @returns {void}
351
+ */
352
+ function replaceReducer(nextReducer) {
353
+ if (typeof nextReducer !== 'function') {
354
+ throw new Error('Expected the nextReducer to be a function.');
355
+ }
356
+
357
+ currentReducer = nextReducer;
358
+ dispatch({ type: ActionTypes.INIT });
359
+ }
360
+
361
+ /**
362
+ * Interoperability point for observable/reactive libraries.
363
+ * @returns {observable} A minimal observable of state changes.
364
+ * For more information, see the observable proposal:
365
+ * https://github.com/zenparsing/es-observable
366
+ */
367
+ function observable() {
368
+ var _ref;
369
+
370
+ var outerSubscribe = subscribe;
371
+ return _ref = {
372
+ /**
373
+ * The minimal observable subscription method.
374
+ * @param {Object} observer Any object that can be used as an observer.
375
+ * The observer object should have a `next` method.
376
+ * @returns {subscription} An object with an `unsubscribe` method that can
377
+ * be used to unsubscribe the observable from the store, and prevent further
378
+ * emission of values from the observable.
379
+ */
380
+ subscribe: function subscribe(observer) {
381
+ if (typeof observer !== 'object') {
382
+ throw new TypeError('Expected the observer to be an object.');
383
+ }
384
+
385
+ function observeState() {
386
+ if (observer.next) {
387
+ observer.next(getState());
388
+ }
389
+ }
390
+
391
+ observeState();
392
+ var unsubscribe = outerSubscribe(observeState);
393
+ return { unsubscribe: unsubscribe };
394
+ }
395
+ }, _ref[_symbolObservable2['default']] = function () {
396
+ return this;
397
+ }, _ref;
398
+ }
399
+
400
+ // When a store is created, an "INIT" action is dispatched so that every
401
+ // reducer returns their initial state. This effectively populates
402
+ // the initial state tree.
403
+ dispatch({ type: ActionTypes.INIT });
404
+
405
+ return _ref2 = {
406
+ dispatch: dispatch,
407
+ subscribe: subscribe,
408
+ getState: getState,
409
+ replaceReducer: replaceReducer
410
+ }, _ref2[_symbolObservable2['default']] = observable, _ref2;
411
+ }
412
+
413
+ /***/ },
414
+ /* 3 */
415
+ /***/ function(module, exports) {
416
+
417
+ 'use strict';
418
+
419
+ exports.__esModule = true;
420
+ exports['default'] = warning;
421
+ /**
422
+ * Prints a warning in the console if it exists.
423
+ *
424
+ * @param {String} message The warning message.
425
+ * @returns {void}
426
+ */
427
+ function warning(message) {
428
+ /* eslint-disable no-console */
429
+ if (typeof console !== 'undefined' && typeof console.error === 'function') {
430
+ console.error(message);
431
+ }
432
+ /* eslint-enable no-console */
433
+ try {
434
+ // This error was thrown as a convenience so that if you enable
435
+ // "break on all exceptions" in your console,
436
+ // it would pause the execution at this line.
437
+ throw new Error(message);
438
+ /* eslint-disable no-empty */
439
+ } catch (e) {}
440
+ /* eslint-enable no-empty */
441
+ }
442
+
443
+ /***/ },
444
+ /* 4 */
445
+ /***/ function(module, exports, __webpack_require__) {
446
+
447
+ var getPrototype = __webpack_require__(8),
448
+ isHostObject = __webpack_require__(9),
449
+ isObjectLike = __webpack_require__(11);
450
+
451
+ /** `Object#toString` result references. */
452
+ var objectTag = '[object Object]';
453
+
454
+ /** Used for built-in method references. */
455
+ var funcProto = Function.prototype,
456
+ objectProto = Object.prototype;
457
+
458
+ /** Used to resolve the decompiled source of functions. */
459
+ var funcToString = funcProto.toString;
460
+
461
+ /** Used to check objects for own properties. */
462
+ var hasOwnProperty = objectProto.hasOwnProperty;
463
+
464
+ /** Used to infer the `Object` constructor. */
465
+ var objectCtorString = funcToString.call(Object);
466
+
467
+ /**
468
+ * Used to resolve the
469
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
470
+ * of values.
471
+ */
472
+ var objectToString = objectProto.toString;
473
+
474
+ /**
475
+ * Checks if `value` is a plain object, that is, an object created by the
476
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
477
+ *
478
+ * @static
479
+ * @memberOf _
480
+ * @since 0.8.0
481
+ * @category Lang
482
+ * @param {*} value The value to check.
483
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
484
+ * @example
485
+ *
486
+ * function Foo() {
487
+ * this.a = 1;
488
+ * }
489
+ *
490
+ * _.isPlainObject(new Foo);
491
+ * // => false
492
+ *
493
+ * _.isPlainObject([1, 2, 3]);
494
+ * // => false
495
+ *
496
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
497
+ * // => true
498
+ *
499
+ * _.isPlainObject(Object.create(null));
500
+ * // => true
501
+ */
502
+ function isPlainObject(value) {
503
+ if (!isObjectLike(value) ||
504
+ objectToString.call(value) != objectTag || isHostObject(value)) {
505
+ return false;
506
+ }
507
+ var proto = getPrototype(value);
508
+ if (proto === null) {
509
+ return true;
510
+ }
511
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
512
+ return (typeof Ctor == 'function' &&
513
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
514
+ }
515
+
516
+ module.exports = isPlainObject;
517
+
518
+
519
+ /***/ },
520
+ /* 5 */
521
+ /***/ function(module, exports, __webpack_require__) {
522
+
523
+ 'use strict';
524
+
525
+ exports.__esModule = true;
526
+
527
+ 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; };
528
+
529
+ exports['default'] = applyMiddleware;
530
+
531
+ var _compose = __webpack_require__(1);
532
+
533
+ var _compose2 = _interopRequireDefault(_compose);
534
+
535
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
536
+
537
+ /**
538
+ * Creates a store enhancer that applies middleware to the dispatch method
539
+ * of the Redux store. This is handy for a variety of tasks, such as expressing
540
+ * asynchronous actions in a concise manner, or logging every action payload.
541
+ *
542
+ * See `redux-thunk` package as an example of the Redux middleware.
543
+ *
544
+ * Because middleware is potentially asynchronous, this should be the first
545
+ * store enhancer in the composition chain.
546
+ *
547
+ * Note that each middleware will be given the `dispatch` and `getState` functions
548
+ * as named arguments.
549
+ *
550
+ * @param {...Function} middlewares The middleware chain to be applied.
551
+ * @returns {Function} A store enhancer applying the middleware.
552
+ */
553
+ function applyMiddleware() {
554
+ for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
555
+ middlewares[_key] = arguments[_key];
556
+ }
557
+
558
+ return function (createStore) {
559
+ return function (reducer, preloadedState, enhancer) {
560
+ var store = createStore(reducer, preloadedState, enhancer);
561
+ var _dispatch = store.dispatch;
562
+ var chain = [];
563
+
564
+ var middlewareAPI = {
565
+ getState: store.getState,
566
+ dispatch: function dispatch(action) {
567
+ return _dispatch(action);
568
+ }
569
+ };
570
+ chain = middlewares.map(function (middleware) {
571
+ return middleware(middlewareAPI);
572
+ });
573
+ _dispatch = _compose2['default'].apply(undefined, chain)(store.dispatch);
574
+
575
+ return _extends({}, store, {
576
+ dispatch: _dispatch
577
+ });
578
+ };
579
+ };
580
+ }
581
+
582
+ /***/ },
583
+ /* 6 */
584
+ /***/ function(module, exports) {
585
+
586
+ 'use strict';
587
+
588
+ exports.__esModule = true;
589
+ exports['default'] = bindActionCreators;
590
+ function bindActionCreator(actionCreator, dispatch) {
591
+ return function () {
592
+ return dispatch(actionCreator.apply(undefined, arguments));
593
+ };
594
+ }
595
+
596
+ /**
597
+ * Turns an object whose values are action creators, into an object with the
598
+ * same keys, but with every function wrapped into a `dispatch` call so they
599
+ * may be invoked directly. This is just a convenience method, as you can call
600
+ * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
601
+ *
602
+ * For convenience, you can also pass a single function as the first argument,
603
+ * and get a function in return.
604
+ *
605
+ * @param {Function|Object} actionCreators An object whose values are action
606
+ * creator functions. One handy way to obtain it is to use ES6 `import * as`
607
+ * syntax. You may also pass a single function.
608
+ *
609
+ * @param {Function} dispatch The `dispatch` function available on your Redux
610
+ * store.
611
+ *
612
+ * @returns {Function|Object} The object mimicking the original object, but with
613
+ * every action creator wrapped into the `dispatch` call. If you passed a
614
+ * function as `actionCreators`, the return value will also be a single
615
+ * function.
616
+ */
617
+ function bindActionCreators(actionCreators, dispatch) {
618
+ if (typeof actionCreators === 'function') {
619
+ return bindActionCreator(actionCreators, dispatch);
620
+ }
621
+
622
+ if (typeof actionCreators !== 'object' || actionCreators === null) {
623
+ 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"?');
624
+ }
625
+
626
+ var keys = Object.keys(actionCreators);
627
+ var boundActionCreators = {};
628
+ for (var i = 0; i < keys.length; i++) {
629
+ var key = keys[i];
630
+ var actionCreator = actionCreators[key];
631
+ if (typeof actionCreator === 'function') {
632
+ boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
633
+ }
634
+ }
635
+ return boundActionCreators;
636
+ }
637
+
638
+ /***/ },
639
+ /* 7 */
640
+ /***/ function(module, exports, __webpack_require__) {
641
+
642
+ 'use strict';
643
+
644
+ exports.__esModule = true;
645
+ exports['default'] = combineReducers;
646
+
647
+ var _createStore = __webpack_require__(2);
648
+
649
+ var _isPlainObject = __webpack_require__(4);
650
+
651
+ var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
652
+
653
+ var _warning = __webpack_require__(3);
654
+
655
+ var _warning2 = _interopRequireDefault(_warning);
656
+
657
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
658
+
659
+ function getUndefinedStateErrorMessage(key, action) {
660
+ var actionType = action && action.type;
661
+ var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
662
+
663
+ return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.';
664
+ }
665
+
666
+ function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
667
+ var reducerKeys = Object.keys(reducers);
668
+ var argumentName = action && action.type === _createStore.ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
669
+
670
+ if (reducerKeys.length === 0) {
671
+ return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
672
+ }
673
+
674
+ if (!(0, _isPlainObject2['default'])(inputState)) {
675
+ 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('", "') + '"');
676
+ }
677
+
678
+ var unexpectedKeys = Object.keys(inputState).filter(function (key) {
679
+ return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
680
+ });
681
+
682
+ unexpectedKeys.forEach(function (key) {
683
+ unexpectedKeyCache[key] = true;
684
+ });
685
+
686
+ if (unexpectedKeys.length > 0) {
687
+ 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.');
688
+ }
689
+ }
690
+
691
+ function assertReducerSanity(reducers) {
692
+ Object.keys(reducers).forEach(function (key) {
693
+ var reducer = reducers[key];
694
+ var initialState = reducer(undefined, { type: _createStore.ActionTypes.INIT });
695
+
696
+ if (typeof initialState === 'undefined') {
697
+ 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.');
698
+ }
699
+
700
+ var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
701
+ if (typeof reducer(undefined, { type: type }) === 'undefined') {
702
+ 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.');
703
+ }
704
+ });
705
+ }
706
+
707
+ /**
708
+ * Turns an object whose values are different reducer functions, into a single
709
+ * reducer function. It will call every child reducer, and gather their results
710
+ * into a single state object, whose keys correspond to the keys of the passed
711
+ * reducer functions.
712
+ *
713
+ * @param {Object} reducers An object whose values correspond to different
714
+ * reducer functions that need to be combined into one. One handy way to obtain
715
+ * it is to use ES6 `import * as reducers` syntax. The reducers may never return
716
+ * undefined for any action. Instead, they should return their initial state
717
+ * if the state passed to them was undefined, and the current state for any
718
+ * unrecognized action.
719
+ *
720
+ * @returns {Function} A reducer function that invokes every reducer inside the
721
+ * passed object, and builds a state object with the same shape.
722
+ */
723
+ function combineReducers(reducers) {
724
+ var reducerKeys = Object.keys(reducers);
725
+ var finalReducers = {};
726
+ for (var i = 0; i < reducerKeys.length; i++) {
727
+ var key = reducerKeys[i];
728
+
729
+ if (true) {
730
+ if (typeof reducers[key] === 'undefined') {
731
+ (0, _warning2['default'])('No reducer provided for key "' + key + '"');
732
+ }
733
+ }
734
+
735
+ if (typeof reducers[key] === 'function') {
736
+ finalReducers[key] = reducers[key];
737
+ }
738
+ }
739
+ var finalReducerKeys = Object.keys(finalReducers);
740
+
741
+ if (true) {
742
+ var unexpectedKeyCache = {};
743
+ }
744
+
745
+ var sanityError;
746
+ try {
747
+ assertReducerSanity(finalReducers);
748
+ } catch (e) {
749
+ sanityError = e;
750
+ }
751
+
752
+ return function combination() {
753
+ var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
754
+ var action = arguments[1];
755
+
756
+ if (sanityError) {
757
+ throw sanityError;
758
+ }
759
+
760
+ if (true) {
761
+ var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
762
+ if (warningMessage) {
763
+ (0, _warning2['default'])(warningMessage);
764
+ }
765
+ }
766
+
767
+ var hasChanged = false;
768
+ var nextState = {};
769
+ for (var i = 0; i < finalReducerKeys.length; i++) {
770
+ var key = finalReducerKeys[i];
771
+ var reducer = finalReducers[key];
772
+ var previousStateForKey = state[key];
773
+ var nextStateForKey = reducer(previousStateForKey, action);
774
+ if (typeof nextStateForKey === 'undefined') {
775
+ var errorMessage = getUndefinedStateErrorMessage(key, action);
776
+ throw new Error(errorMessage);
777
+ }
778
+ nextState[key] = nextStateForKey;
779
+ hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
780
+ }
781
+ return hasChanged ? nextState : state;
782
+ };
783
+ }
784
+
785
+ /***/ },
786
+ /* 8 */
787
+ /***/ function(module, exports, __webpack_require__) {
788
+
789
+ var overArg = __webpack_require__(10);
790
+
791
+ /** Built-in value references. */
792
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
793
+
794
+ module.exports = getPrototype;
795
+
796
+
797
+ /***/ },
798
+ /* 9 */
799
+ /***/ function(module, exports) {
800
+
801
+ /**
802
+ * Checks if `value` is a host object in IE < 9.
803
+ *
804
+ * @private
805
+ * @param {*} value The value to check.
806
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
807
+ */
808
+ function isHostObject(value) {
809
+ // Many host objects are `Object` objects that can coerce to strings
810
+ // despite having improperly defined `toString` methods.
811
+ var result = false;
812
+ if (value != null && typeof value.toString != 'function') {
813
+ try {
814
+ result = !!(value + '');
815
+ } catch (e) {}
816
+ }
817
+ return result;
818
+ }
819
+
820
+ module.exports = isHostObject;
821
+
822
+
823
+ /***/ },
824
+ /* 10 */
825
+ /***/ function(module, exports) {
826
+
827
+ /**
828
+ * Creates a unary function that invokes `func` with its argument transformed.
829
+ *
830
+ * @private
831
+ * @param {Function} func The function to wrap.
832
+ * @param {Function} transform The argument transform.
833
+ * @returns {Function} Returns the new function.
834
+ */
835
+ function overArg(func, transform) {
836
+ return function(arg) {
837
+ return func(transform(arg));
838
+ };
839
+ }
840
+
841
+ module.exports = overArg;
842
+
843
+
844
+ /***/ },
845
+ /* 11 */
846
+ /***/ function(module, exports) {
847
+
848
+ /**
849
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
850
+ * and has a `typeof` result of "object".
851
+ *
852
+ * @static
853
+ * @memberOf _
854
+ * @since 4.0.0
855
+ * @category Lang
856
+ * @param {*} value The value to check.
857
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
858
+ * @example
859
+ *
860
+ * _.isObjectLike({});
861
+ * // => true
862
+ *
863
+ * _.isObjectLike([1, 2, 3]);
864
+ * // => true
865
+ *
866
+ * _.isObjectLike(_.noop);
867
+ * // => false
868
+ *
869
+ * _.isObjectLike(null);
870
+ * // => false
871
+ */
872
+ function isObjectLike(value) {
873
+ return !!value && typeof value == 'object';
874
+ }
875
+
876
+ module.exports = isObjectLike;
877
+
878
+
879
+ /***/ },
880
+ /* 12 */
881
+ /***/ function(module, exports, __webpack_require__) {
882
+
883
+ module.exports = __webpack_require__(13);
884
+
885
+
886
+ /***/ },
887
+ /* 13 */
888
+ /***/ function(module, exports, __webpack_require__) {
889
+
890
+ /* WEBPACK VAR INJECTION */(function(global) {'use strict';
891
+
892
+ Object.defineProperty(exports, "__esModule", {
893
+ value: true
894
+ });
895
+
896
+ var _ponyfill = __webpack_require__(14);
897
+
898
+ var _ponyfill2 = _interopRequireDefault(_ponyfill);
899
+
900
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
901
+
902
+ var root = undefined; /* global window */
903
+
904
+ if (typeof global !== 'undefined') {
905
+ root = global;
906
+ } else if (typeof window !== 'undefined') {
907
+ root = window;
908
+ }
909
+
910
+ var result = (0, _ponyfill2['default'])(root);
911
+ exports['default'] = result;
912
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
913
+
914
+ /***/ },
915
+ /* 14 */
916
+ /***/ function(module, exports) {
917
+
918
+ 'use strict';
919
+
920
+ Object.defineProperty(exports, "__esModule", {
921
+ value: true
922
+ });
923
+ exports['default'] = symbolObservablePonyfill;
924
+ function symbolObservablePonyfill(root) {
925
+ var result;
926
+ var _Symbol = root.Symbol;
927
+
928
+ if (typeof _Symbol === 'function') {
929
+ if (_Symbol.observable) {
930
+ result = _Symbol.observable;
931
+ } else {
932
+ result = _Symbol('observable');
933
+ _Symbol.observable = result;
934
+ }
935
+ } else {
936
+ result = '@@observable';
937
+ }
938
+
939
+ return result;
940
+ };
941
+
942
+ /***/ }
943
+ /******/ ])
944
+ });
945
+ ;