isomorfeus-redux 4.2.0 → 22.9.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (236) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +176 -0
  3. data/lib/app_state.rb +25 -0
  4. data/lib/isomorfeus/browser_store_api.rb +0 -16
  5. data/lib/isomorfeus/redux/config.rb +97 -14
  6. data/lib/isomorfeus/redux/handler.rb +35 -0
  7. data/lib/isomorfeus/redux/version.rb +5 -0
  8. data/lib/isomorfeus/redux_imports.rb +14 -0
  9. data/lib/{redux/reducers.rb → isomorfeus/redux_reducers.rb} +15 -13
  10. data/lib/isomorfeus-redux.rb +18 -30
  11. data/lib/local_store.rb +27 -30
  12. data/lib/redux/store.rb +156 -120
  13. data/lib/session_store.rb +28 -30
  14. metadata +24 -247
  15. data/lib/app_store.rb +0 -42
  16. data/lib/isomorfeus/core_ext/hash/deep_merge.rb +0 -34
  17. data/lib/isomorfeus/core_ext/kernel.rb +0 -30
  18. data/lib/isomorfeus/execution_environment.rb +0 -67
  19. data/lib/isomorfeus/redux/imports.rb +0 -17
  20. data/lib/redux/version.rb +0 -3
  21. data/lib/redux.rb +0 -118
  22. data/node_modules/.package-lock.json +0 -31
  23. data/node_modules/@babel/runtime/LICENSE +0 -22
  24. data/node_modules/@babel/runtime/README.md +0 -19
  25. data/node_modules/@babel/runtime/helpers/AsyncGenerator.js +0 -99
  26. data/node_modules/@babel/runtime/helpers/AwaitValue.js +0 -6
  27. data/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +0 -31
  28. data/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -12
  29. data/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -6
  30. data/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +0 -8
  31. data/node_modules/@babel/runtime/helpers/assertThisInitialized.js +0 -10
  32. data/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +0 -57
  33. data/node_modules/@babel/runtime/helpers/asyncIterator.js +0 -16
  34. data/node_modules/@babel/runtime/helpers/asyncToGenerator.js +0 -38
  35. data/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +0 -8
  36. data/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +0 -8
  37. data/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +0 -23
  38. data/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +0 -10
  39. data/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +0 -14
  40. data/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -8
  41. data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +0 -8
  42. data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -8
  43. data/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +0 -10
  44. data/node_modules/@babel/runtime/helpers/classNameTDZError.js +0 -6
  45. data/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +0 -11
  46. data/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +0 -11
  47. data/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +0 -9
  48. data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +0 -10
  49. data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +0 -8
  50. data/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +0 -12
  51. data/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +0 -10
  52. data/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +0 -9
  53. data/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +0 -6
  54. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +0 -14
  55. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +0 -14
  56. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +0 -15
  57. data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +0 -9
  58. data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +0 -6
  59. data/node_modules/@babel/runtime/helpers/construct.js +0 -26
  60. data/node_modules/@babel/runtime/helpers/createClass.js +0 -18
  61. data/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +0 -61
  62. data/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +0 -25
  63. data/node_modules/@babel/runtime/helpers/createSuper.js +0 -25
  64. data/node_modules/@babel/runtime/helpers/decorate.js +0 -401
  65. data/node_modules/@babel/runtime/helpers/defaults.js +0 -17
  66. data/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +0 -25
  67. data/node_modules/@babel/runtime/helpers/defineProperty.js +0 -17
  68. data/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +0 -95
  69. data/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +0 -3
  70. data/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +0 -28
  71. data/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -9
  72. data/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -3
  73. data/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -4
  74. data/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -7
  75. data/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +0 -54
  76. data/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +0 -13
  77. data/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +0 -35
  78. data/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +0 -4
  79. data/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +0 -5
  80. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +0 -20
  81. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +0 -7
  82. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +0 -11
  83. data/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -5
  84. data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
  85. data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -5
  86. data/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +0 -7
  87. data/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +0 -3
  88. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +0 -6
  89. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +0 -6
  90. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +0 -5
  91. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +0 -7
  92. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +0 -4
  93. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +0 -7
  94. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +0 -7
  95. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +0 -5
  96. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +0 -3
  97. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -8
  98. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -8
  99. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -9
  100. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +0 -5
  101. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +0 -3
  102. data/node_modules/@babel/runtime/helpers/esm/construct.js +0 -18
  103. data/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -15
  104. data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +0 -57
  105. data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +0 -21
  106. data/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -19
  107. data/node_modules/@babel/runtime/helpers/esm/decorate.js +0 -396
  108. data/node_modules/@babel/runtime/helpers/esm/defaults.js +0 -14
  109. data/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +0 -22
  110. data/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -14
  111. data/node_modules/@babel/runtime/helpers/esm/extends.js +0 -17
  112. data/node_modules/@babel/runtime/helpers/esm/get.js +0 -20
  113. data/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -6
  114. data/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -15
  115. data/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -6
  116. data/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +0 -9
  117. data/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +0 -3
  118. data/node_modules/@babel/runtime/helpers/esm/instanceof.js +0 -7
  119. data/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +0 -5
  120. data/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +0 -51
  121. data/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +0 -3
  122. data/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -12
  123. data/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -3
  124. data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -29
  125. data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +0 -14
  126. data/node_modules/@babel/runtime/helpers/esm/jsx.js +0 -46
  127. data/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +0 -9
  128. data/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +0 -5
  129. data/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -3
  130. data/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -3
  131. data/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +0 -3
  132. data/node_modules/@babel/runtime/helpers/esm/objectSpread.js +0 -19
  133. data/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -39
  134. data/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -19
  135. data/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -14
  136. data/node_modules/@babel/runtime/helpers/esm/package.json +0 -3
  137. data/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -11
  138. data/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +0 -3
  139. data/node_modules/@babel/runtime/helpers/esm/set.js +0 -51
  140. data/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -8
  141. data/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +0 -7
  142. data/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -7
  143. data/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +0 -7
  144. data/node_modules/@babel/runtime/helpers/esm/superPropBase.js +0 -9
  145. data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -11
  146. data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +0 -8
  147. data/node_modules/@babel/runtime/helpers/esm/tdz.js +0 -3
  148. data/node_modules/@babel/runtime/helpers/esm/temporalRef.js +0 -5
  149. data/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +0 -1
  150. data/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -7
  151. data/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -7
  152. data/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -13
  153. data/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -6
  154. data/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -15
  155. data/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -9
  156. data/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +0 -6
  157. data/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +0 -37
  158. data/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +0 -65
  159. data/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +0 -3
  160. data/node_modules/@babel/runtime/helpers/extends.js +0 -21
  161. data/node_modules/@babel/runtime/helpers/get.js +0 -27
  162. data/node_modules/@babel/runtime/helpers/getPrototypeOf.js +0 -10
  163. data/node_modules/@babel/runtime/helpers/inherits.js +0 -19
  164. data/node_modules/@babel/runtime/helpers/inheritsLoose.js +0 -10
  165. data/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +0 -12
  166. data/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +0 -6
  167. data/node_modules/@babel/runtime/helpers/instanceof.js +0 -10
  168. data/node_modules/@babel/runtime/helpers/interopRequireDefault.js +0 -8
  169. data/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +0 -54
  170. data/node_modules/@babel/runtime/helpers/isNativeFunction.js +0 -6
  171. data/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +0 -15
  172. data/node_modules/@babel/runtime/helpers/iterableToArray.js +0 -6
  173. data/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -32
  174. data/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +0 -17
  175. data/node_modules/@babel/runtime/helpers/jsx.js +0 -50
  176. data/node_modules/@babel/runtime/helpers/maybeArrayLike.js +0 -13
  177. data/node_modules/@babel/runtime/helpers/newArrowCheck.js +0 -8
  178. data/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -6
  179. data/node_modules/@babel/runtime/helpers/nonIterableSpread.js +0 -6
  180. data/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +0 -6
  181. data/node_modules/@babel/runtime/helpers/objectSpread.js +0 -23
  182. data/node_modules/@babel/runtime/helpers/objectSpread2.js +0 -42
  183. data/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -23
  184. data/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -17
  185. data/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +0 -16
  186. data/node_modules/@babel/runtime/helpers/readOnlyError.js +0 -6
  187. data/node_modules/@babel/runtime/helpers/set.js +0 -55
  188. data/node_modules/@babel/runtime/helpers/setPrototypeOf.js +0 -12
  189. data/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +0 -10
  190. data/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -14
  191. data/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +0 -14
  192. data/node_modules/@babel/runtime/helpers/superPropBase.js +0 -13
  193. data/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +0 -14
  194. data/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +0 -11
  195. data/node_modules/@babel/runtime/helpers/tdz.js +0 -6
  196. data/node_modules/@babel/runtime/helpers/temporalRef.js +0 -10
  197. data/node_modules/@babel/runtime/helpers/temporalUndefined.js +0 -4
  198. data/node_modules/@babel/runtime/helpers/toArray.js +0 -14
  199. data/node_modules/@babel/runtime/helpers/toConsumableArray.js +0 -14
  200. data/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -17
  201. data/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -11
  202. data/node_modules/@babel/runtime/helpers/typeof.js +0 -22
  203. data/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -13
  204. data/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +0 -10
  205. data/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +0 -45
  206. data/node_modules/@babel/runtime/helpers/wrapRegExp.js +0 -72
  207. data/node_modules/@babel/runtime/helpers/writeOnlyError.js +0 -6
  208. data/node_modules/@babel/runtime/package.json +0 -848
  209. data/node_modules/@babel/runtime/regenerator/index.js +0 -1
  210. data/node_modules/redux/LICENSE.md +0 -21
  211. data/node_modules/redux/README.md +0 -322
  212. data/node_modules/redux/dist/redux.js +0 -768
  213. data/node_modules/redux/dist/redux.min.js +0 -1
  214. data/node_modules/redux/es/redux.js +0 -716
  215. data/node_modules/redux/es/redux.mjs +0 -1
  216. data/node_modules/redux/index.d.ts +0 -776
  217. data/node_modules/redux/lib/redux.js +0 -730
  218. data/node_modules/redux/package.json +0 -108
  219. data/node_modules/redux/src/applyMiddleware.js +0 -41
  220. data/node_modules/redux/src/bindActionCreators.js +0 -52
  221. data/node_modules/redux/src/combineReducers.js +0 -175
  222. data/node_modules/redux/src/compose.js +0 -22
  223. data/node_modules/redux/src/createStore.js +0 -347
  224. data/node_modules/redux/src/index.js +0 -37
  225. data/node_modules/redux/src/utils/actionTypes.js +0 -17
  226. data/node_modules/redux/src/utils/formatProdErrorMessage.js +0 -15
  227. data/node_modules/redux/src/utils/isPlainObject.js +0 -14
  228. data/node_modules/redux/src/utils/kindOf.js +0 -70
  229. data/node_modules/redux/src/utils/symbol-observable.js +0 -3
  230. data/node_modules/redux/src/utils/warning.js +0 -19
  231. data/node_modules/regenerator-runtime/LICENSE +0 -21
  232. data/node_modules/regenerator-runtime/README.md +0 -31
  233. data/node_modules/regenerator-runtime/package.json +0 -19
  234. data/node_modules/regenerator-runtime/path.js +0 -11
  235. data/node_modules/regenerator-runtime/runtime.js +0 -754
  236. data/package.json +0 -6
@@ -1,730 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
10
-
11
- /**
12
- * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js
13
- *
14
- * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes
15
- * during build.
16
- * @param {number} code
17
- */
18
- function formatProdErrorMessage(code) {
19
- return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. ';
20
- }
21
-
22
- // Inlined version of the `symbol-observable` polyfill
23
- var $$observable = (function () {
24
- return typeof Symbol === 'function' && Symbol.observable || '@@observable';
25
- })();
26
-
27
- /**
28
- * These are private action types reserved by Redux.
29
- * For any unknown actions, you must return the current state.
30
- * If the current state is undefined, you must return the initial state.
31
- * Do not reference these action types directly in your code.
32
- */
33
- var randomString = function randomString() {
34
- return Math.random().toString(36).substring(7).split('').join('.');
35
- };
36
-
37
- var ActionTypes = {
38
- INIT: "@@redux/INIT" + randomString(),
39
- REPLACE: "@@redux/REPLACE" + randomString(),
40
- PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
41
- return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
42
- }
43
- };
44
-
45
- /**
46
- * @param {any} obj The object to inspect.
47
- * @returns {boolean} True if the argument appears to be a plain object.
48
- */
49
- function isPlainObject(obj) {
50
- if (typeof obj !== 'object' || obj === null) return false;
51
- var proto = obj;
52
-
53
- while (Object.getPrototypeOf(proto) !== null) {
54
- proto = Object.getPrototypeOf(proto);
55
- }
56
-
57
- return Object.getPrototypeOf(obj) === proto;
58
- }
59
-
60
- // Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of
61
- function miniKindOf(val) {
62
- if (val === void 0) return 'undefined';
63
- if (val === null) return 'null';
64
- var type = typeof val;
65
-
66
- switch (type) {
67
- case 'boolean':
68
- case 'string':
69
- case 'number':
70
- case 'symbol':
71
- case 'function':
72
- {
73
- return type;
74
- }
75
- }
76
-
77
- if (Array.isArray(val)) return 'array';
78
- if (isDate(val)) return 'date';
79
- if (isError(val)) return 'error';
80
- var constructorName = ctorName(val);
81
-
82
- switch (constructorName) {
83
- case 'Symbol':
84
- case 'Promise':
85
- case 'WeakMap':
86
- case 'WeakSet':
87
- case 'Map':
88
- case 'Set':
89
- return constructorName;
90
- } // other
91
-
92
-
93
- return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
94
- }
95
-
96
- function ctorName(val) {
97
- return typeof val.constructor === 'function' ? val.constructor.name : null;
98
- }
99
-
100
- function isError(val) {
101
- return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';
102
- }
103
-
104
- function isDate(val) {
105
- if (val instanceof Date) return true;
106
- return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';
107
- }
108
-
109
- function kindOf(val) {
110
- var typeOfVal = typeof val;
111
-
112
- if (process.env.NODE_ENV !== 'production') {
113
- typeOfVal = miniKindOf(val);
114
- }
115
-
116
- return typeOfVal;
117
- }
118
-
119
- /**
120
- * @deprecated
121
- *
122
- * **We recommend using the `configureStore` method
123
- * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
124
- *
125
- * Redux Toolkit is our recommended approach for writing Redux logic today,
126
- * including store setup, reducers, data fetching, and more.
127
- *
128
- * **For more details, please read this Redux docs page:**
129
- * **https://redux.js.org/introduction/why-rtk-is-redux-today**
130
- *
131
- * `configureStore` from Redux Toolkit is an improved version of `createStore` that
132
- * simplifies setup and helps avoid common bugs.
133
- *
134
- * You should not be using the `redux` core package by itself today, except for learning purposes.
135
- * The `createStore` method from the core `redux` package will not be removed, but we encourage
136
- * all users to migrate to using Redux Toolkit for all Redux code.
137
- *
138
- * If you want to use `createStore` without this visual deprecation warning, use
139
- * the `legacy_createStore` import instead:
140
- *
141
- * `import { legacy_createStore as createStore} from 'redux'`
142
- *
143
- */
144
-
145
- function createStore(reducer, preloadedState, enhancer) {
146
- var _ref2;
147
-
148
- if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
149
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(0) : 'It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.');
150
- }
151
-
152
- if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
153
- enhancer = preloadedState;
154
- preloadedState = undefined;
155
- }
156
-
157
- if (typeof enhancer !== 'undefined') {
158
- if (typeof enhancer !== 'function') {
159
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(1) : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'");
160
- }
161
-
162
- return enhancer(createStore)(reducer, preloadedState);
163
- }
164
-
165
- if (typeof reducer !== 'function') {
166
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(2) : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'");
167
- }
168
-
169
- var currentReducer = reducer;
170
- var currentState = preloadedState;
171
- var currentListeners = [];
172
- var nextListeners = currentListeners;
173
- var isDispatching = false;
174
- /**
175
- * This makes a shallow copy of currentListeners so we can use
176
- * nextListeners as a temporary list while dispatching.
177
- *
178
- * This prevents any bugs around consumers calling
179
- * subscribe/unsubscribe in the middle of a dispatch.
180
- */
181
-
182
- function ensureCanMutateNextListeners() {
183
- if (nextListeners === currentListeners) {
184
- nextListeners = currentListeners.slice();
185
- }
186
- }
187
- /**
188
- * Reads the state tree managed by the store.
189
- *
190
- * @returns {any} The current state tree of your application.
191
- */
192
-
193
-
194
- function getState() {
195
- if (isDispatching) {
196
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(3) : 'You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
197
- }
198
-
199
- return currentState;
200
- }
201
- /**
202
- * Adds a change listener. It will be called any time an action is dispatched,
203
- * and some part of the state tree may potentially have changed. You may then
204
- * call `getState()` to read the current state tree inside the callback.
205
- *
206
- * You may call `dispatch()` from a change listener, with the following
207
- * caveats:
208
- *
209
- * 1. The subscriptions are snapshotted just before every `dispatch()` call.
210
- * If you subscribe or unsubscribe while the listeners are being invoked, this
211
- * will not have any effect on the `dispatch()` that is currently in progress.
212
- * However, the next `dispatch()` call, whether nested or not, will use a more
213
- * recent snapshot of the subscription list.
214
- *
215
- * 2. The listener should not expect to see all state changes, as the state
216
- * might have been updated multiple times during a nested `dispatch()` before
217
- * the listener is called. It is, however, guaranteed that all subscribers
218
- * registered before the `dispatch()` started will be called with the latest
219
- * state by the time it exits.
220
- *
221
- * @param {Function} listener A callback to be invoked on every dispatch.
222
- * @returns {Function} A function to remove this change listener.
223
- */
224
-
225
-
226
- function subscribe(listener) {
227
- if (typeof listener !== 'function') {
228
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(4) : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'");
229
- }
230
-
231
- if (isDispatching) {
232
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(5) : 'You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.');
233
- }
234
-
235
- var isSubscribed = true;
236
- ensureCanMutateNextListeners();
237
- nextListeners.push(listener);
238
- return function unsubscribe() {
239
- if (!isSubscribed) {
240
- return;
241
- }
242
-
243
- if (isDispatching) {
244
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(6) : 'You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.');
245
- }
246
-
247
- isSubscribed = false;
248
- ensureCanMutateNextListeners();
249
- var index = nextListeners.indexOf(listener);
250
- nextListeners.splice(index, 1);
251
- currentListeners = null;
252
- };
253
- }
254
- /**
255
- * Dispatches an action. It is the only way to trigger a state change.
256
- *
257
- * The `reducer` function, used to create the store, will be called with the
258
- * current state tree and the given `action`. Its return value will
259
- * be considered the **next** state of the tree, and the change listeners
260
- * will be notified.
261
- *
262
- * The base implementation only supports plain object actions. If you want to
263
- * dispatch a Promise, an Observable, a thunk, or something else, you need to
264
- * wrap your store creating function into the corresponding middleware. For
265
- * example, see the documentation for the `redux-thunk` package. Even the
266
- * middleware will eventually dispatch plain object actions using this method.
267
- *
268
- * @param {Object} action A plain object representing “what changed”. It is
269
- * a good idea to keep actions serializable so you can record and replay user
270
- * sessions, or use the time travelling `redux-devtools`. An action must have
271
- * a `type` property which may not be `undefined`. It is a good idea to use
272
- * string constants for action types.
273
- *
274
- * @returns {Object} For convenience, the same action object you dispatched.
275
- *
276
- * Note that, if you use a custom middleware, it may wrap `dispatch()` to
277
- * return something else (for example, a Promise you can await).
278
- */
279
-
280
-
281
- function dispatch(action) {
282
- if (!isPlainObject(action)) {
283
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(7) : "Actions must be plain objects. Instead, the actual type was: '" + kindOf(action) + "'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");
284
- }
285
-
286
- if (typeof action.type === 'undefined') {
287
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(8) : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
288
- }
289
-
290
- if (isDispatching) {
291
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(9) : 'Reducers may not dispatch actions.');
292
- }
293
-
294
- try {
295
- isDispatching = true;
296
- currentState = currentReducer(currentState, action);
297
- } finally {
298
- isDispatching = false;
299
- }
300
-
301
- var listeners = currentListeners = nextListeners;
302
-
303
- for (var i = 0; i < listeners.length; i++) {
304
- var listener = listeners[i];
305
- listener();
306
- }
307
-
308
- return action;
309
- }
310
- /**
311
- * Replaces the reducer currently used by the store to calculate the state.
312
- *
313
- * You might need this if your app implements code splitting and you want to
314
- * load some of the reducers dynamically. You might also need this if you
315
- * implement a hot reloading mechanism for Redux.
316
- *
317
- * @param {Function} nextReducer The reducer for the store to use instead.
318
- * @returns {void}
319
- */
320
-
321
-
322
- function replaceReducer(nextReducer) {
323
- if (typeof nextReducer !== 'function') {
324
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(10) : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer));
325
- }
326
-
327
- currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
328
- // Any reducers that existed in both the new and old rootReducer
329
- // will receive the previous state. This effectively populates
330
- // the new state tree with any relevant data from the old one.
331
-
332
- dispatch({
333
- type: ActionTypes.REPLACE
334
- });
335
- }
336
- /**
337
- * Interoperability point for observable/reactive libraries.
338
- * @returns {observable} A minimal observable of state changes.
339
- * For more information, see the observable proposal:
340
- * https://github.com/tc39/proposal-observable
341
- */
342
-
343
-
344
- function observable() {
345
- var _ref;
346
-
347
- var outerSubscribe = subscribe;
348
- return _ref = {
349
- /**
350
- * The minimal observable subscription method.
351
- * @param {Object} observer Any object that can be used as an observer.
352
- * The observer object should have a `next` method.
353
- * @returns {subscription} An object with an `unsubscribe` method that can
354
- * be used to unsubscribe the observable from the store, and prevent further
355
- * emission of values from the observable.
356
- */
357
- subscribe: function subscribe(observer) {
358
- if (typeof observer !== 'object' || observer === null) {
359
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(11) : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'");
360
- }
361
-
362
- function observeState() {
363
- if (observer.next) {
364
- observer.next(getState());
365
- }
366
- }
367
-
368
- observeState();
369
- var unsubscribe = outerSubscribe(observeState);
370
- return {
371
- unsubscribe: unsubscribe
372
- };
373
- }
374
- }, _ref[$$observable] = function () {
375
- return this;
376
- }, _ref;
377
- } // When a store is created, an "INIT" action is dispatched so that every
378
- // reducer returns their initial state. This effectively populates
379
- // the initial state tree.
380
-
381
-
382
- dispatch({
383
- type: ActionTypes.INIT
384
- });
385
- return _ref2 = {
386
- dispatch: dispatch,
387
- subscribe: subscribe,
388
- getState: getState,
389
- replaceReducer: replaceReducer
390
- }, _ref2[$$observable] = observable, _ref2;
391
- }
392
- /**
393
- * Creates a Redux store that holds the state tree.
394
- *
395
- * **We recommend using `configureStore` from the
396
- * `@reduxjs/toolkit` package**, which replaces `createStore`:
397
- * **https://redux.js.org/introduction/why-rtk-is-redux-today**
398
- *
399
- * The only way to change the data in the store is to call `dispatch()` on it.
400
- *
401
- * There should only be a single store in your app. To specify how different
402
- * parts of the state tree respond to actions, you may combine several reducers
403
- * into a single reducer function by using `combineReducers`.
404
- *
405
- * @param {Function} reducer A function that returns the next state tree, given
406
- * the current state tree and the action to handle.
407
- *
408
- * @param {any} [preloadedState] The initial state. You may optionally specify it
409
- * to hydrate the state from the server in universal apps, or to restore a
410
- * previously serialized user session.
411
- * If you use `combineReducers` to produce the root reducer function, this must be
412
- * an object with the same shape as `combineReducers` keys.
413
- *
414
- * @param {Function} [enhancer] The store enhancer. You may optionally specify it
415
- * to enhance the store with third-party capabilities such as middleware,
416
- * time travel, persistence, etc. The only store enhancer that ships with Redux
417
- * is `applyMiddleware()`.
418
- *
419
- * @returns {Store} A Redux store that lets you read the state, dispatch actions
420
- * and subscribe to changes.
421
- */
422
-
423
- var legacy_createStore = createStore;
424
-
425
- /**
426
- * Prints a warning in the console if it exists.
427
- *
428
- * @param {String} message The warning message.
429
- * @returns {void}
430
- */
431
- function warning(message) {
432
- /* eslint-disable no-console */
433
- if (typeof console !== 'undefined' && typeof console.error === 'function') {
434
- console.error(message);
435
- }
436
- /* eslint-enable no-console */
437
-
438
-
439
- try {
440
- // This error was thrown as a convenience so that if you enable
441
- // "break on all exceptions" in your console,
442
- // it would pause the execution at this line.
443
- throw new Error(message);
444
- } catch (e) {} // eslint-disable-line no-empty
445
-
446
- }
447
-
448
- function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
449
- var reducerKeys = Object.keys(reducers);
450
- var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
451
-
452
- if (reducerKeys.length === 0) {
453
- return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
454
- }
455
-
456
- if (!isPlainObject(inputState)) {
457
- return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
458
- }
459
-
460
- var unexpectedKeys = Object.keys(inputState).filter(function (key) {
461
- return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
462
- });
463
- unexpectedKeys.forEach(function (key) {
464
- unexpectedKeyCache[key] = true;
465
- });
466
- if (action && action.type === ActionTypes.REPLACE) return;
467
-
468
- if (unexpectedKeys.length > 0) {
469
- 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.");
470
- }
471
- }
472
-
473
- function assertReducerShape(reducers) {
474
- Object.keys(reducers).forEach(function (key) {
475
- var reducer = reducers[key];
476
- var initialState = reducer(undefined, {
477
- type: ActionTypes.INIT
478
- });
479
-
480
- if (typeof initialState === 'undefined') {
481
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(12) : "The slice reducer for key \"" + 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. If you don't want to set a value for this reducer, " + "you can use null instead of undefined.");
482
- }
483
-
484
- if (typeof reducer(undefined, {
485
- type: ActionTypes.PROBE_UNKNOWN_ACTION()
486
- }) === 'undefined') {
487
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(13) : "The slice reducer for key \"" + 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, but can be null.");
488
- }
489
- });
490
- }
491
- /**
492
- * Turns an object whose values are different reducer functions, into a single
493
- * reducer function. It will call every child reducer, and gather their results
494
- * into a single state object, whose keys correspond to the keys of the passed
495
- * reducer functions.
496
- *
497
- * @param {Object} reducers An object whose values correspond to different
498
- * reducer functions that need to be combined into one. One handy way to obtain
499
- * it is to use ES6 `import * as reducers` syntax. The reducers may never return
500
- * undefined for any action. Instead, they should return their initial state
501
- * if the state passed to them was undefined, and the current state for any
502
- * unrecognized action.
503
- *
504
- * @returns {Function} A reducer function that invokes every reducer inside the
505
- * passed object, and builds a state object with the same shape.
506
- */
507
-
508
-
509
- function combineReducers(reducers) {
510
- var reducerKeys = Object.keys(reducers);
511
- var finalReducers = {};
512
-
513
- for (var i = 0; i < reducerKeys.length; i++) {
514
- var key = reducerKeys[i];
515
-
516
- if (process.env.NODE_ENV !== 'production') {
517
- if (typeof reducers[key] === 'undefined') {
518
- warning("No reducer provided for key \"" + key + "\"");
519
- }
520
- }
521
-
522
- if (typeof reducers[key] === 'function') {
523
- finalReducers[key] = reducers[key];
524
- }
525
- }
526
-
527
- var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
528
- // keys multiple times.
529
-
530
- var unexpectedKeyCache;
531
-
532
- if (process.env.NODE_ENV !== 'production') {
533
- unexpectedKeyCache = {};
534
- }
535
-
536
- var shapeAssertionError;
537
-
538
- try {
539
- assertReducerShape(finalReducers);
540
- } catch (e) {
541
- shapeAssertionError = e;
542
- }
543
-
544
- return function combination(state, action) {
545
- if (state === void 0) {
546
- state = {};
547
- }
548
-
549
- if (shapeAssertionError) {
550
- throw shapeAssertionError;
551
- }
552
-
553
- if (process.env.NODE_ENV !== 'production') {
554
- var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
555
-
556
- if (warningMessage) {
557
- warning(warningMessage);
558
- }
559
- }
560
-
561
- var hasChanged = false;
562
- var nextState = {};
563
-
564
- for (var _i = 0; _i < finalReducerKeys.length; _i++) {
565
- var _key = finalReducerKeys[_i];
566
- var reducer = finalReducers[_key];
567
- var previousStateForKey = state[_key];
568
- var nextStateForKey = reducer(previousStateForKey, action);
569
-
570
- if (typeof nextStateForKey === 'undefined') {
571
- var actionType = action && action.type;
572
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(14) : "When called with an action of type " + (actionType ? "\"" + String(actionType) + "\"" : '(unknown type)') + ", the slice reducer for key \"" + _key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.");
573
- }
574
-
575
- nextState[_key] = nextStateForKey;
576
- hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
577
- }
578
-
579
- hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
580
- return hasChanged ? nextState : state;
581
- };
582
- }
583
-
584
- function bindActionCreator(actionCreator, dispatch) {
585
- return function () {
586
- return dispatch(actionCreator.apply(this, arguments));
587
- };
588
- }
589
- /**
590
- * Turns an object whose values are action creators, into an object with the
591
- * same keys, but with every function wrapped into a `dispatch` call so they
592
- * may be invoked directly. This is just a convenience method, as you can call
593
- * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
594
- *
595
- * For convenience, you can also pass an action creator as the first argument,
596
- * and get a dispatch wrapped function in return.
597
- *
598
- * @param {Function|Object} actionCreators An object whose values are action
599
- * creator functions. One handy way to obtain it is to use ES6 `import * as`
600
- * syntax. You may also pass a single function.
601
- *
602
- * @param {Function} dispatch The `dispatch` function available on your Redux
603
- * store.
604
- *
605
- * @returns {Function|Object} The object mimicking the original object, but with
606
- * every action creator wrapped into the `dispatch` call. If you passed a
607
- * function as `actionCreators`, the return value will also be a single
608
- * function.
609
- */
610
-
611
-
612
- function bindActionCreators(actionCreators, dispatch) {
613
- if (typeof actionCreators === 'function') {
614
- return bindActionCreator(actionCreators, dispatch);
615
- }
616
-
617
- if (typeof actionCreators !== 'object' || actionCreators === null) {
618
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(16) : "bindActionCreators expected an object or a function, but instead received: '" + kindOf(actionCreators) + "'. " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");
619
- }
620
-
621
- var boundActionCreators = {};
622
-
623
- for (var key in actionCreators) {
624
- var actionCreator = actionCreators[key];
625
-
626
- if (typeof actionCreator === 'function') {
627
- boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
628
- }
629
- }
630
-
631
- return boundActionCreators;
632
- }
633
-
634
- /**
635
- * Composes single-argument functions from right to left. The rightmost
636
- * function can take multiple arguments as it provides the signature for
637
- * the resulting composite function.
638
- *
639
- * @param {...Function} funcs The functions to compose.
640
- * @returns {Function} A function obtained by composing the argument functions
641
- * from right to left. For example, compose(f, g, h) is identical to doing
642
- * (...args) => f(g(h(...args))).
643
- */
644
- function compose() {
645
- for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
646
- funcs[_key] = arguments[_key];
647
- }
648
-
649
- if (funcs.length === 0) {
650
- return function (arg) {
651
- return arg;
652
- };
653
- }
654
-
655
- if (funcs.length === 1) {
656
- return funcs[0];
657
- }
658
-
659
- return funcs.reduce(function (a, b) {
660
- return function () {
661
- return a(b.apply(void 0, arguments));
662
- };
663
- });
664
- }
665
-
666
- /**
667
- * Creates a store enhancer that applies middleware to the dispatch method
668
- * of the Redux store. This is handy for a variety of tasks, such as expressing
669
- * asynchronous actions in a concise manner, or logging every action payload.
670
- *
671
- * See `redux-thunk` package as an example of the Redux middleware.
672
- *
673
- * Because middleware is potentially asynchronous, this should be the first
674
- * store enhancer in the composition chain.
675
- *
676
- * Note that each middleware will be given the `dispatch` and `getState` functions
677
- * as named arguments.
678
- *
679
- * @param {...Function} middlewares The middleware chain to be applied.
680
- * @returns {Function} A store enhancer applying the middleware.
681
- */
682
-
683
- function applyMiddleware() {
684
- for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
685
- middlewares[_key] = arguments[_key];
686
- }
687
-
688
- return function (createStore) {
689
- return function () {
690
- var store = createStore.apply(void 0, arguments);
691
-
692
- var _dispatch = function dispatch() {
693
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(15) : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
694
- };
695
-
696
- var middlewareAPI = {
697
- getState: store.getState,
698
- dispatch: function dispatch() {
699
- return _dispatch.apply(void 0, arguments);
700
- }
701
- };
702
- var chain = middlewares.map(function (middleware) {
703
- return middleware(middlewareAPI);
704
- });
705
- _dispatch = compose.apply(void 0, chain)(store.dispatch);
706
- return _objectSpread__default['default'](_objectSpread__default['default']({}, store), {}, {
707
- dispatch: _dispatch
708
- });
709
- };
710
- };
711
- }
712
-
713
- /*
714
- * This is a dummy function to check if the function name has been altered by minification.
715
- * If the function has been minified and NODE_ENV !== 'production', warn the user.
716
- */
717
-
718
- function isCrushed() {}
719
-
720
- if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
721
- 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 setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');
722
- }
723
-
724
- exports.__DO_NOT_USE__ActionTypes = ActionTypes;
725
- exports.applyMiddleware = applyMiddleware;
726
- exports.bindActionCreators = bindActionCreators;
727
- exports.combineReducers = combineReducers;
728
- exports.compose = compose;
729
- exports.createStore = createStore;
730
- exports.legacy_createStore = legacy_createStore;