1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory(require("react"), require("react-redux"));
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define(["react", "react-redux"], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["ReduxFormsReact"] = factory(require("react"), require("react-redux"));
|
8 | else
|
9 | root["ReduxFormsReact"] = factory(root["React"], root["ReactRedux"]);
|
10 | })(this, function(__WEBPACK_EXTERNAL_MODULE_11__, __WEBPACK_EXTERNAL_MODULE_21__) {
|
11 | return (function(modules) {
|
12 |
|
13 | var installedModules = {};
|
14 |
|
15 |
|
16 | function __webpack_require__(moduleId) {
|
17 |
|
18 |
|
19 | if(installedModules[moduleId]) {
|
20 | return installedModules[moduleId].exports;
|
21 | }
|
22 |
|
23 | var module = installedModules[moduleId] = {
|
24 | i: moduleId,
|
25 | l: false,
|
26 | exports: {}
|
27 | };
|
28 |
|
29 |
|
30 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 |
|
32 |
|
33 | module.l = true;
|
34 |
|
35 |
|
36 | return module.exports;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | __webpack_require__.m = modules;
|
42 |
|
43 |
|
44 | __webpack_require__.c = installedModules;
|
45 |
|
46 |
|
47 | __webpack_require__.d = function(exports, name, getter) {
|
48 | if(!__webpack_require__.o(exports, name)) {
|
49 | Object.defineProperty(exports, name, {
|
50 | configurable: false,
|
51 | enumerable: true,
|
52 | get: getter
|
53 | /******/ });
|
54 | /******/ }
|
55 | /******/ };
|
56 | /******/
|
57 | /******/ // getDefaultExport function for compatibility with non-harmony modules
|
58 | /******/ __webpack_require__.n = function(module) {
|
59 | var getter = module && module.__esModule ?
|
60 | function getDefault() { return module['default']; } :
|
61 | function getModuleExports() { return module; };
|
62 | __webpack_require__.d(getter, 'a', getter);
|
63 | return getter;
|
64 | };
|
65 |
|
66 |
|
67 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
68 |
|
69 |
|
70 | __webpack_require__.p = "";
|
71 |
|
72 |
|
73 | return __webpack_require__(__webpack_require__.s = 50);
|
74 | })
|
75 |
|
76 | ([
|
77 |
|
78 | (function(module, exports, __webpack_require__) {
|
79 |
|
80 | var _curry1 = __webpack_require__(2);
|
81 | var _isPlaceholder = __webpack_require__(13);
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 | module.exports = function _curry2(fn) {
|
93 | return function f2(a, b) {
|
94 | switch (arguments.length) {
|
95 | case 0:
|
96 | return f2;
|
97 | case 1:
|
98 | return _isPlaceholder(a) ? f2
|
99 | : _curry1(function(_b) { return fn(a, _b); });
|
100 | default:
|
101 | return _isPlaceholder(a) && _isPlaceholder(b) ? f2
|
102 | : _isPlaceholder(a) ? _curry1(function(_a) { return fn(_a, b); })
|
103 | : _isPlaceholder(b) ? _curry1(function(_b) { return fn(a, _b); })
|
104 | : fn(a, b);
|
105 | }
|
106 | };
|
107 | };
|
108 |
|
109 |
|
110 | }),
|
111 |
|
112 | (function(module, exports, __webpack_require__) {
|
113 |
|
114 | var _isPlaceholder = __webpack_require__(9);
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 | module.exports = function _curry1(fn) {
|
126 | return function f1(a) {
|
127 | if (arguments.length === 0 || _isPlaceholder(a)) {
|
128 | return f1;
|
129 | } else {
|
130 | return fn.apply(this, arguments);
|
131 | }
|
132 | };
|
133 | };
|
134 |
|
135 |
|
136 | }),
|
137 |
|
138 | (function(module, exports, __webpack_require__) {
|
139 |
|
140 | var _isPlaceholder = __webpack_require__(13);
|
141 |
|
142 |
|
143 |
|
144 |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 | module.exports = function _curry1(fn) {
|
152 | return function f1(a) {
|
153 | if (arguments.length === 0 || _isPlaceholder(a)) {
|
154 | return f1;
|
155 | } else {
|
156 | return fn.apply(this, arguments);
|
157 | }
|
158 | };
|
159 | };
|
160 |
|
161 |
|
162 | }),
|
163 |
|
164 | (function(module, exports, __webpack_require__) {
|
165 |
|
166 | var _curry1 = __webpack_require__(1);
|
167 | var _isPlaceholder = __webpack_require__(9);
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 |
|
175 |
|
176 |
|
177 |
|
178 | module.exports = function _curry2(fn) {
|
179 | return function f2(a, b) {
|
180 | switch (arguments.length) {
|
181 | case 0:
|
182 | return f2;
|
183 | case 1:
|
184 | return _isPlaceholder(a) ? f2
|
185 | : _curry1(function(_b) { return fn(a, _b); });
|
186 | default:
|
187 | return _isPlaceholder(a) && _isPlaceholder(b) ? f2
|
188 | : _isPlaceholder(a) ? _curry1(function(_a) { return fn(_a, b); })
|
189 | : _isPlaceholder(b) ? _curry1(function(_b) { return fn(a, _b); })
|
190 | : fn(a, b);
|
191 | }
|
192 | };
|
193 | };
|
194 |
|
195 |
|
196 | }),
|
197 |
|
198 | (function(module, exports, __webpack_require__) {
|
199 |
|
200 | "use strict";
|
201 |
|
202 |
|
203 | exports.__esModule = true;
|
204 |
|
205 | var _prop = __webpack_require__(22);
|
206 |
|
207 | var _prop2 = _interopRequireDefault(_prop);
|
208 |
|
209 | var _reduce = __webpack_require__(32);
|
210 |
|
211 | var _reduce2 = _interopRequireDefault(_reduce);
|
212 |
|
213 | var _keys = __webpack_require__(5);
|
214 |
|
215 | var _keys2 = _interopRequireDefault(_keys);
|
216 |
|
217 | var _length = __webpack_require__(62);
|
218 |
|
219 | var _length2 = _interopRequireDefault(_length);
|
220 |
|
221 | var _compose = __webpack_require__(34);
|
222 |
|
223 | var _compose2 = _interopRequireDefault(_compose);
|
224 |
|
225 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
226 |
|
227 | exports.isString = isString;
|
228 | exports.isNumber = isNumber;
|
229 | exports.isPromise = isPromise;
|
230 | exports.isFunction = isFunction;
|
231 | exports.isEvent = isEvent;
|
232 | exports.shallowCompare = shallowCompare;
|
233 | exports.unflatten = unflatten;
|
234 | exports.invariant = invariant;
|
235 |
|
236 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
237 |
|
238 | function isString(cand) {
|
239 | return typeof cand === 'string';
|
240 | }
|
241 | function isNumber(cand) {
|
242 | return typeof cand === 'number';
|
243 | }
|
244 | function isPromise(cand) {
|
245 | return Boolean(cand) && (typeof cand === 'undefined' ? 'undefined' : _typeof(cand)) === 'object' && typeof cand.then === 'function';
|
246 | }
|
247 | function isFunction(cand) {
|
248 | return typeof cand === 'function';
|
249 | }
|
250 | function isEvent(cand) {
|
251 | return Boolean(cand && (typeof cand === 'undefined' ? 'undefined' : _typeof(cand)) === 'object' && isFunction(cand.preventDefault) && isFunction(cand.stopPropagation));
|
252 | }
|
253 | var keyCount = (0, _compose2.default)(_length2.default, _keys2.default);
|
254 | function shallowCompare(props1, props2) {
|
255 | if (props1 === props2) {
|
256 | return true;
|
257 | }
|
258 | if (keyCount(props1) !== keyCount(props2)) {
|
259 | return false;
|
260 | }
|
261 | return (0, _reduce2.default)(function (acc, key) {
|
262 | return acc && (0, _prop2.default)(key, props1) === (0, _prop2.default)(key, props2);
|
263 | }, true, (0, _keys2.default)(props1));
|
264 | }
|
265 |
|
266 |
|
267 | function unflatten(obj) {
|
268 | var result = {};
|
269 | Object.keys(obj).forEach(function (propp) {
|
270 | return propp.split('.').reduce(function (acc, key, index, array) {
|
271 | var k = isNaN(Number(key)) ? key : Number(key);
|
272 | if (index === array.length - 1) {
|
273 | return acc[k] = obj[propp];
|
274 | }
|
275 | if (acc[k]) {
|
276 | return acc[k] = acc[k];
|
277 | }
|
278 | if (!isNaN(Number(array[index + 1]))) {
|
279 | return acc[k] = [];
|
280 | }
|
281 | return acc[k] = {};
|
282 | }, result);
|
283 | });
|
284 | return result;
|
285 | }
|
286 | function invariant(cond, msg) {
|
287 | if (cond) {
|
288 | return;
|
289 | }
|
290 | var error = new Error(msg);
|
291 | error.name = 'Invariant violation';
|
292 | throw error;
|
293 | }
|
294 |
|
295 | }),
|
296 |
|
297 | (function(module, exports, __webpack_require__) {
|
298 |
|
299 | var _curry1 = __webpack_require__(2);
|
300 | var _has = __webpack_require__(7);
|
301 | var _isArguments = __webpack_require__(61);
|
302 |
|
303 |
|
304 |
|
305 |
|
306 |
|
307 |
|
308 |
|
309 |
|
310 |
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 |
|
317 |
|
318 |
|
319 |
|
320 |
|
321 |
|
322 | module.exports = (function() {
|
323 |
|
324 | var hasEnumBug = !({toString: null}).propertyIsEnumerable('toString');
|
325 | var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString',
|
326 | 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
|
327 |
|
328 | var hasArgsEnumBug = (function() {
|
329 | 'use strict';
|
330 | return arguments.propertyIsEnumerable('length');
|
331 | }());
|
332 |
|
333 | var contains = function contains(list, item) {
|
334 | var idx = 0;
|
335 | while (idx < list.length) {
|
336 | if (list[idx] === item) {
|
337 | return true;
|
338 | }
|
339 | idx += 1;
|
340 | }
|
341 | return false;
|
342 | };
|
343 |
|
344 | return typeof Object.keys === 'function' && !hasArgsEnumBug ?
|
345 | _curry1(function keys(obj) {
|
346 | return Object(obj) !== obj ? [] : Object.keys(obj);
|
347 | }) :
|
348 | _curry1(function keys(obj) {
|
349 | if (Object(obj) !== obj) {
|
350 | return [];
|
351 | }
|
352 | var prop, nIdx;
|
353 | var ks = [];
|
354 | var checkArgsLength = hasArgsEnumBug && _isArguments(obj);
|
355 | for (prop in obj) {
|
356 | if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {
|
357 | ks[ks.length] = prop;
|
358 | }
|
359 | }
|
360 | if (hasEnumBug) {
|
361 | nIdx = nonEnumerableProps.length - 1;
|
362 | while (nIdx >= 0) {
|
363 | prop = nonEnumerableProps[nIdx];
|
364 | if (_has(prop, obj) && !contains(ks, prop)) {
|
365 | ks[ks.length] = prop;
|
366 | }
|
367 | nIdx -= 1;
|
368 | }
|
369 | }
|
370 | return ks;
|
371 | });
|
372 | }());
|
373 |
|
374 |
|
375 | }),
|
376 |
|
377 | (function(module, exports) {
|
378 |
|
379 | module.exports = function _arity(n, fn) {
|
380 |
|
381 | switch (n) {
|
382 | case 0: return function() { return fn.apply(this, arguments); };
|
383 | case 1: return function(a0) { return fn.apply(this, arguments); };
|
384 | case 2: return function(a0, a1) { return fn.apply(this, arguments); };
|
385 | case 3: return function(a0, a1, a2) { return fn.apply(this, arguments); };
|
386 | case 4: return function(a0, a1, a2, a3) { return fn.apply(this, arguments); };
|
387 | case 5: return function(a0, a1, a2, a3, a4) { return fn.apply(this, arguments); };
|
388 | case 6: return function(a0, a1, a2, a3, a4, a5) { return fn.apply(this, arguments); };
|
389 | case 7: return function(a0, a1, a2, a3, a4, a5, a6) { return fn.apply(this, arguments); };
|
390 | case 8: return function(a0, a1, a2, a3, a4, a5, a6, a7) { return fn.apply(this, arguments); };
|
391 | case 9: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.apply(this, arguments); };
|
392 | case 10: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.apply(this, arguments); };
|
393 | default: throw new Error('First argument to _arity must be a non-negative integer no greater than ten');
|
394 | }
|
395 | };
|
396 |
|
397 |
|
398 | }),
|
399 |
|
400 | (function(module, exports) {
|
401 |
|
402 | module.exports = function _has(prop, obj) {
|
403 | return Object.prototype.hasOwnProperty.call(obj, prop);
|
404 | };
|
405 |
|
406 |
|
407 | }),
|
408 |
|
409 | (function(module, exports, __webpack_require__) {
|
410 |
|
411 | var _curry1 = __webpack_require__(1);
|
412 | var _curry2 = __webpack_require__(3);
|
413 | var _isPlaceholder = __webpack_require__(9);
|
414 |
|
415 |
|
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 |
|
422 |
|
423 |
|
424 | module.exports = function _curry3(fn) {
|
425 | return function f3(a, b, c) {
|
426 | switch (arguments.length) {
|
427 | case 0:
|
428 | return f3;
|
429 | case 1:
|
430 | return _isPlaceholder(a) ? f3
|
431 | : _curry2(function(_b, _c) { return fn(a, _b, _c); });
|
432 | case 2:
|
433 | return _isPlaceholder(a) && _isPlaceholder(b) ? f3
|
434 | : _isPlaceholder(a) ? _curry2(function(_a, _c) { return fn(_a, b, _c); })
|
435 | : _isPlaceholder(b) ? _curry2(function(_b, _c) { return fn(a, _b, _c); })
|
436 | : _curry1(function(_c) { return fn(a, b, _c); });
|
437 | default:
|
438 | return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3
|
439 | : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function(_a, _b) { return fn(_a, _b, c); })
|
440 | : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function(_a, _c) { return fn(_a, b, _c); })
|
441 | : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function(_b, _c) { return fn(a, _b, _c); })
|
442 | : _isPlaceholder(a) ? _curry1(function(_a) { return fn(_a, b, c); })
|
443 | : _isPlaceholder(b) ? _curry1(function(_b) { return fn(a, _b, c); })
|
444 | : _isPlaceholder(c) ? _curry1(function(_c) { return fn(a, b, _c); })
|
445 | : fn(a, b, c);
|
446 | }
|
447 | };
|
448 | };
|
449 |
|
450 |
|
451 | }),
|
452 |
|
453 | (function(module, exports) {
|
454 |
|
455 | module.exports = function _isPlaceholder(a) {
|
456 | return a != null &&
|
457 | typeof a === 'object' &&
|
458 | a['@@functional/placeholder'] === true;
|
459 | };
|
460 |
|
461 |
|
462 | }),
|
463 |
|
464 | (function(module, exports, __webpack_require__) {
|
465 |
|
466 | var _assign = __webpack_require__(53);
|
467 | var _curry2 = __webpack_require__(3);
|
468 |
|
469 |
|
470 |
|
471 |
|
472 |
|
473 |
|
474 |
|
475 |
|
476 |
|
477 |
|
478 |
|
479 |
|
480 |
|
481 |
|
482 |
|
483 |
|
484 |
|
485 |
|
486 |
|
487 |
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
|
493 | module.exports = _curry2(function merge(l, r) {
|
494 | return _assign({}, l, r);
|
495 | });
|
496 |
|
497 |
|
498 | }),
|
499 |
|
500 | (function(module, exports) {
|
501 |
|
502 | module.exports = __WEBPACK_EXTERNAL_MODULE_11__;
|
503 |
|
504 | }),
|
505 |
|
506 | (function(module, exports, __webpack_require__) {
|
507 |
|
508 |
|
509 |
|
510 |
|
511 |
|
512 |
|
513 |
|
514 |
|
515 |
|
516 |
|
517 | if (undefined !== 'production') {
|
518 | var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
|
519 | Symbol.for &&
|
520 | Symbol.for('react.element')) ||
|
521 | 0xeac7;
|
522 |
|
523 | var isValidElement = function(object) {
|
524 | return typeof object === 'object' &&
|
525 | object !== null &&
|
526 | object.$$typeof === REACT_ELEMENT_TYPE;
|
527 | };
|
528 |
|
529 |
|
530 |
|
531 | var throwOnDirectAccess = true;
|
532 | module.exports = __webpack_require__(55)(isValidElement, throwOnDirectAccess);
|
533 | } else {
|
534 |
|
535 |
|
536 | module.exports = __webpack_require__(57)();
|
537 | }
|
538 |
|
539 |
|
540 | }),
|
541 |
|
542 | (function(module, exports) {
|
543 |
|
544 | module.exports = function _isPlaceholder(a) {
|
545 | return a != null &&
|
546 | typeof a === 'object' &&
|
547 | a['@@functional/placeholder'] === true;
|
548 | };
|
549 |
|
550 |
|
551 | }),
|
552 |
|
553 | (function(module, exports, __webpack_require__) {
|
554 |
|
555 | var _curry1 = __webpack_require__(2);
|
556 | var _curry2 = __webpack_require__(0);
|
557 | var _isPlaceholder = __webpack_require__(13);
|
558 |
|
559 |
|
560 |
|
561 |
|
562 |
|
563 |
|
564 |
|
565 |
|
566 |
|
567 |
|
568 | module.exports = function _curry3(fn) {
|
569 | return function f3(a, b, c) {
|
570 | switch (arguments.length) {
|
571 | case 0:
|
572 | return f3;
|
573 | case 1:
|
574 | return _isPlaceholder(a) ? f3
|
575 | : _curry2(function(_b, _c) { return fn(a, _b, _c); });
|
576 | case 2:
|
577 | return _isPlaceholder(a) && _isPlaceholder(b) ? f3
|
578 | : _isPlaceholder(a) ? _curry2(function(_a, _c) { return fn(_a, b, _c); })
|
579 | : _isPlaceholder(b) ? _curry2(function(_b, _c) { return fn(a, _b, _c); })
|
580 | : _curry1(function(_c) { return fn(a, b, _c); });
|
581 | default:
|
582 | return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3
|
583 | : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function(_a, _b) { return fn(_a, _b, c); })
|
584 | : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function(_a, _c) { return fn(_a, b, _c); })
|
585 | : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function(_b, _c) { return fn(a, _b, _c); })
|
586 | : _isPlaceholder(a) ? _curry1(function(_a) { return fn(_a, b, c); })
|
587 | : _isPlaceholder(b) ? _curry1(function(_b) { return fn(a, _b, c); })
|
588 | : _isPlaceholder(c) ? _curry1(function(_c) { return fn(a, b, _c); })
|
589 | : fn(a, b, c);
|
590 | }
|
591 | };
|
592 | };
|
593 |
|
594 |
|
595 | }),
|
596 |
|
597 | (function(module, exports, __webpack_require__) {
|
598 |
|
599 | var _isArray = __webpack_require__(24);
|
600 | var _isTransformer = __webpack_require__(80);
|
601 |
|
602 |
|
603 |
|
604 |
|
605 |
|
606 |
|
607 |
|
608 |
|
609 |
|
610 |
|
611 |
|
612 |
|
613 |
|
614 |
|
615 |
|
616 |
|
617 | module.exports = function _dispatchable(methodNames, xf, fn) {
|
618 | return function() {
|
619 | if (arguments.length === 0) {
|
620 | return fn();
|
621 | }
|
622 | var args = Array.prototype.slice.call(arguments, 0);
|
623 | var obj = args.pop();
|
624 | if (!_isArray(obj)) {
|
625 | var idx = 0;
|
626 | while (idx < methodNames.length) {
|
627 | if (typeof obj[methodNames[idx]] === 'function') {
|
628 | return obj[methodNames[idx]].apply(obj, args);
|
629 | }
|
630 | idx += 1;
|
631 | }
|
632 | if (_isTransformer(obj)) {
|
633 | var transducer = xf.apply(null, args);
|
634 | return transducer(obj);
|
635 | }
|
636 | }
|
637 | return fn.apply(this, arguments);
|
638 | };
|
639 | };
|
640 |
|
641 |
|
642 | }),
|
643 |
|
644 | (function(module, exports) {
|
645 |
|
646 | module.exports = function _arity(n, fn) {
|
647 |
|
648 | switch (n) {
|
649 | case 0: return function() { return fn.apply(this, arguments); };
|
650 | case 1: return function(a0) { return fn.apply(this, arguments); };
|
651 | case 2: return function(a0, a1) { return fn.apply(this, arguments); };
|
652 | case 3: return function(a0, a1, a2) { return fn.apply(this, arguments); };
|
653 | case 4: return function(a0, a1, a2, a3) { return fn.apply(this, arguments); };
|
654 | case 5: return function(a0, a1, a2, a3, a4) { return fn.apply(this, arguments); };
|
655 | case 6: return function(a0, a1, a2, a3, a4, a5) { return fn.apply(this, arguments); };
|
656 | case 7: return function(a0, a1, a2, a3, a4, a5, a6) { return fn.apply(this, arguments); };
|
657 | case 8: return function(a0, a1, a2, a3, a4, a5, a6, a7) { return fn.apply(this, arguments); };
|
658 | case 9: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.apply(this, arguments); };
|
659 | case 10: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.apply(this, arguments); };
|
660 | default: throw new Error('First argument to _arity must be a non-negative integer no greater than ten');
|
661 | }
|
662 | };
|
663 |
|
664 |
|
665 | }),
|
666 |
|
667 | (function(module, exports) {
|
668 |
|
669 | module.exports = function _has(prop, obj) {
|
670 | return Object.prototype.hasOwnProperty.call(obj, prop);
|
671 | };
|
672 |
|
673 |
|
674 | }),
|
675 |
|
676 | (function(module, exports, __webpack_require__) {
|
677 |
|
678 | "use strict";
|
679 |
|
680 |
|
681 |
|
682 |
|
683 |
|
684 |
|
685 |
|
686 |
|
687 |
|
688 |
|
689 |
|
690 |
|
691 |
|
692 | function makeEmptyFunction(arg) {
|
693 | return function () {
|
694 | return arg;
|
695 | };
|
696 | }
|
697 |
|
698 |
|
699 |
|
700 |
|
701 |
|
702 |
|
703 | var emptyFunction = function emptyFunction() {};
|
704 |
|
705 | emptyFunction.thatReturns = makeEmptyFunction;
|
706 | emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
|
707 | emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
|
708 | emptyFunction.thatReturnsNull = makeEmptyFunction(null);
|
709 | emptyFunction.thatReturnsThis = function () {
|
710 | return this;
|
711 | };
|
712 | emptyFunction.thatReturnsArgument = function (arg) {
|
713 | return arg;
|
714 | };
|
715 |
|
716 | module.exports = emptyFunction;
|
717 |
|
718 | }),
|
719 |
|
720 | (function(module, exports, __webpack_require__) {
|
721 |
|
722 | "use strict";
|
723 |
|
724 |
|
725 |
|
726 |
|
727 |
|
728 |
|
729 |
|
730 |
|
731 |
|
732 |
|
733 |
|
734 |
|
735 |
|
736 |
|
737 |
|
738 |
|
739 |
|
740 |
|
741 |
|
742 |
|
743 |
|
744 |
|
745 |
|
746 | var validateFormat = function validateFormat(format) {};
|
747 |
|
748 | if (undefined !== 'production') {
|
749 | validateFormat = function validateFormat(format) {
|
750 | if (format === undefined) {
|
751 | throw new Error('invariant requires an error message argument');
|
752 | }
|
753 | };
|
754 | }
|
755 |
|
756 | function invariant(condition, format, a, b, c, d, e, f) {
|
757 | validateFormat(format);
|
758 |
|
759 | if (!condition) {
|
760 | var error;
|
761 | if (format === undefined) {
|
762 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
763 | } else {
|
764 | var args = [a, b, c, d, e, f];
|
765 | var argIndex = 0;
|
766 | error = new Error(format.replace(/%s/g, function () {
|
767 | return args[argIndex++];
|
768 | }));
|
769 | error.name = 'Invariant Violation';
|
770 | }
|
771 |
|
772 | error.framesToPop = 1;
|
773 | throw error;
|
774 | }
|
775 | }
|
776 |
|
777 | module.exports = invariant;
|
778 |
|
779 | }),
|
780 |
|
781 | (function(module, exports, __webpack_require__) {
|
782 |
|
783 | "use strict";
|
784 |
|
785 |
|
786 |
|
787 |
|
788 |
|
789 |
|
790 |
|
791 |
|
792 |
|
793 |
|
794 |
|
795 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
796 |
|
797 | module.exports = ReactPropTypesSecret;
|
798 |
|
799 |
|
800 | }),
|
801 |
|
802 | (function(module, exports) {
|
803 |
|
804 | module.exports = __WEBPACK_EXTERNAL_MODULE_21__;
|
805 |
|
806 | }),
|
807 |
|
808 | (function(module, exports, __webpack_require__) {
|
809 |
|
810 | var _curry2 = __webpack_require__(0);
|
811 |
|
812 |
|
813 |
|
814 |
|
815 |
|
816 |
|
817 |
|
818 |
|
819 |
|
820 |
|
821 |
|
822 |
|
823 |
|
824 |
|
825 |
|
826 |
|
827 |
|
828 |
|
829 |
|
830 |
|
831 | module.exports = _curry2(function prop(p, obj) { return obj[p]; });
|
832 |
|
833 |
|
834 | }),
|
835 |
|
836 | (function(module, exports, __webpack_require__) {
|
837 |
|
838 | var _isArrayLike = __webpack_require__(58);
|
839 | var _xwrap = __webpack_require__(59);
|
840 | var bind = __webpack_require__(60);
|
841 |
|
842 |
|
843 | module.exports = (function() {
|
844 | function _arrayReduce(xf, acc, list) {
|
845 | var idx = 0;
|
846 | var len = list.length;
|
847 | while (idx < len) {
|
848 | acc = xf['@@transducer/step'](acc, list[idx]);
|
849 | if (acc && acc['@@transducer/reduced']) {
|
850 | acc = acc['@@transducer/value'];
|
851 | break;
|
852 | }
|
853 | idx += 1;
|
854 | }
|
855 | return xf['@@transducer/result'](acc);
|
856 | }
|
857 |
|
858 | function _iterableReduce(xf, acc, iter) {
|
859 | var step = iter.next();
|
860 | while (!step.done) {
|
861 | acc = xf['@@transducer/step'](acc, step.value);
|
862 | if (acc && acc['@@transducer/reduced']) {
|
863 | acc = acc['@@transducer/value'];
|
864 | break;
|
865 | }
|
866 | step = iter.next();
|
867 | }
|
868 | return xf['@@transducer/result'](acc);
|
869 | }
|
870 |
|
871 | function _methodReduce(xf, acc, obj, methodName) {
|
872 | return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));
|
873 | }
|
874 |
|
875 | var symIterator = (typeof Symbol !== 'undefined') ? Symbol.iterator : '@@iterator';
|
876 | return function _reduce(fn, acc, list) {
|
877 | if (typeof fn === 'function') {
|
878 | fn = _xwrap(fn);
|
879 | }
|
880 | if (_isArrayLike(list)) {
|
881 | return _arrayReduce(fn, acc, list);
|
882 | }
|
883 | if (typeof list['fantasy-land/reduce'] === 'function') {
|
884 | return _methodReduce(fn, acc, list, 'fantasy-land/reduce');
|
885 | }
|
886 | if (list[symIterator] != null) {
|
887 | return _iterableReduce(fn, acc, list[symIterator]());
|
888 | }
|
889 | if (typeof list.next === 'function') {
|
890 | return _iterableReduce(fn, acc, list);
|
891 | }
|
892 | if (typeof list.reduce === 'function') {
|
893 | return _methodReduce(fn, acc, list, 'reduce');
|
894 | }
|
895 |
|
896 | throw new TypeError('reduce: list must be array or iterable');
|
897 | };
|
898 | }());
|
899 |
|
900 |
|
901 | }),
|
902 |
|
903 | (function(module, exports) {
|
904 |
|
905 |
|
906 |
|
907 |
|
908 |
|
909 |
|
910 |
|
911 |
|
912 |
|
913 |
|
914 |
|
915 |
|
916 |
|
917 | module.exports = Array.isArray || function _isArray(val) {
|
918 | return (val != null &&
|
919 | val.length >= 0 &&
|
920 | Object.prototype.toString.call(val) === '[object Array]');
|
921 | };
|
922 |
|
923 |
|
924 | }),
|
925 |
|
926 | (function(module, exports, __webpack_require__) {
|
927 |
|
928 | var _contains = __webpack_require__(36);
|
929 | var _curry2 = __webpack_require__(0);
|
930 |
|
931 |
|
932 |
|
933 |
|
934 |
|
935 |
|
936 |
|
937 |
|
938 |
|
939 |
|
940 |
|
941 |
|
942 |
|
943 |
|
944 |
|
945 |
|
946 |
|
947 |
|
948 | module.exports = _curry2(function omit(names, obj) {
|
949 | var result = {};
|
950 | for (var prop in obj) {
|
951 | if (!_contains(prop, names)) {
|
952 | result[prop] = obj[prop];
|
953 | }
|
954 | }
|
955 | return result;
|
956 | });
|
957 |
|
958 |
|
959 | }),
|
960 |
|
961 | (function(module, exports, __webpack_require__) {
|
962 |
|
963 | module.exports = __webpack_require__(77);
|
964 |
|
965 |
|
966 | }),
|
967 |
|
968 | (function(module, exports) {
|
969 |
|
970 | module.exports = {
|
971 | init: function() {
|
972 | return this.xf['@@transducer/init']();
|
973 | },
|
974 | result: function(result) {
|
975 | return this.xf['@@transducer/result'](result);
|
976 | }
|
977 | };
|
978 |
|
979 |
|
980 | }),
|
981 |
|
982 | (function(module, exports) {
|
983 |
|
984 |
|
985 |
|
986 |
|
987 |
|
988 |
|
989 |
|
990 |
|
991 |
|
992 |
|
993 |
|
994 |
|
995 |
|
996 | module.exports = Array.isArray || function _isArray(val) {
|
997 | return (val != null &&
|
998 | val.length >= 0 &&
|
999 | Object.prototype.toString.call(val) === '[object Array]');
|
1000 | };
|
1001 |
|
1002 |
|
1003 | }),
|
1004 |
|
1005 | (function(module, exports, __webpack_require__) {
|
1006 |
|
1007 | var _curry2 = __webpack_require__(3);
|
1008 |
|
1009 |
|
1010 |
|
1011 |
|
1012 |
|
1013 |
|
1014 |
|
1015 |
|
1016 |
|
1017 |
|
1018 |
|
1019 |
|
1020 |
|
1021 |
|
1022 |
|
1023 |
|
1024 |
|
1025 |
|
1026 |
|
1027 |
|
1028 | module.exports = _curry2(function prop(p, obj) { return obj[p]; });
|
1029 |
|
1030 |
|
1031 | }),
|
1032 |
|
1033 | (function(module, exports, __webpack_require__) {
|
1034 |
|
1035 | var _curry1 = __webpack_require__(1);
|
1036 | var _identity = __webpack_require__(52);
|
1037 |
|
1038 |
|
1039 |
|
1040 |
|
1041 |
|
1042 |
|
1043 |
|
1044 |
|
1045 |
|
1046 |
|
1047 |
|
1048 |
|
1049 |
|
1050 |
|
1051 |
|
1052 |
|
1053 |
|
1054 |
|
1055 |
|
1056 |
|
1057 |
|
1058 | module.exports = _curry1(_identity);
|
1059 |
|
1060 |
|
1061 | }),
|
1062 |
|
1063 | (function(module, exports, __webpack_require__) {
|
1064 |
|
1065 | "use strict";
|
1066 |
|
1067 |
|
1068 |
|
1069 |
|
1070 |
|
1071 |
|
1072 |
|
1073 |
|
1074 |
|
1075 |
|
1076 |
|
1077 |
|
1078 | var emptyFunction = __webpack_require__(18);
|
1079 |
|
1080 |
|
1081 |
|
1082 |
|
1083 |
|
1084 |
|
1085 |
|
1086 |
|
1087 | var warning = emptyFunction;
|
1088 |
|
1089 | if (undefined !== 'production') {
|
1090 | (function () {
|
1091 | var printWarning = function printWarning(format) {
|
1092 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
1093 | args[_key - 1] = arguments[_key];
|
1094 | }
|
1095 |
|
1096 | var argIndex = 0;
|
1097 | var message = 'Warning: ' + format.replace(/%s/g, function () {
|
1098 | return args[argIndex++];
|
1099 | });
|
1100 | if (typeof console !== 'undefined') {
|
1101 | console.error(message);
|
1102 | }
|
1103 | try {
|
1104 |
|
1105 |
|
1106 |
|
1107 | throw new Error(message);
|
1108 | } catch (x) {}
|
1109 | };
|
1110 |
|
1111 | warning = function warning(condition, format) {
|
1112 | if (format === undefined) {
|
1113 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
1114 | }
|
1115 |
|
1116 | if (format.indexOf('Failed Composite propType: ') === 0) {
|
1117 | return;
|
1118 | }
|
1119 |
|
1120 | if (!condition) {
|
1121 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
1122 | args[_key2 - 2] = arguments[_key2];
|
1123 | }
|
1124 |
|
1125 | printWarning.apply(undefined, [format].concat(args));
|
1126 | }
|
1127 | };
|
1128 | })();
|
1129 | }
|
1130 |
|
1131 | module.exports = warning;
|
1132 |
|
1133 | }),
|
1134 |
|
1135 | (function(module, exports, __webpack_require__) {
|
1136 |
|
1137 | var _curry3 = __webpack_require__(14);
|
1138 | var _reduce = __webpack_require__(23);
|
1139 |
|
1140 |
|
1141 |
|
1142 |
|
1143 |
|
1144 |
|
1145 |
|
1146 |
|
1147 |
|
1148 |
|
1149 |
|
1150 |
|
1151 |
|
1152 |
|
1153 |
|
1154 |
|
1155 |
|
1156 |
|
1157 |
|
1158 |
|
1159 |
|
1160 |
|
1161 |
|
1162 |
|
1163 |
|
1164 |
|
1165 |
|
1166 |
|
1167 |
|
1168 |
|
1169 |
|
1170 |
|
1171 |
|
1172 |
|
1173 |
|
1174 |
|
1175 |
|
1176 |
|
1177 |
|
1178 |
|
1179 |
|
1180 |
|
1181 |
|
1182 |
|
1183 |
|
1184 |
|
1185 |
|
1186 |
|
1187 | module.exports = _curry3(_reduce);
|
1188 |
|
1189 |
|
1190 | }),
|
1191 |
|
1192 | (function(module, exports) {
|
1193 |
|
1194 | module.exports = function _isString(x) {
|
1195 | return Object.prototype.toString.call(x) === '[object String]';
|
1196 | };
|
1197 |
|
1198 |
|
1199 | }),
|
1200 |
|
1201 | (function(module, exports, __webpack_require__) {
|
1202 |
|
1203 | var pipe = __webpack_require__(64);
|
1204 | var reverse = __webpack_require__(68);
|
1205 |
|
1206 |
|
1207 |
|
1208 |
|
1209 |
|
1210 |
|
1211 |
|
1212 |
|
1213 |
|
1214 |
|
1215 |
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 |
|
1225 |
|
1226 |
|
1227 |
|
1228 |
|
1229 |
|
1230 |
|
1231 | module.exports = function compose() {
|
1232 | if (arguments.length === 0) {
|
1233 | throw new Error('compose requires at least one argument');
|
1234 | }
|
1235 | return pipe.apply(this, reverse(arguments));
|
1236 | };
|
1237 |
|
1238 |
|
1239 | }),
|
1240 |
|
1241 | (function(module, exports, __webpack_require__) {
|
1242 |
|
1243 | var _isArray = __webpack_require__(24);
|
1244 |
|
1245 |
|
1246 |
|
1247 |
|
1248 |
|
1249 |
|
1250 |
|
1251 |
|
1252 |
|
1253 |
|
1254 |
|
1255 |
|
1256 | module.exports = function _checkForMethod(methodname, fn) {
|
1257 | return function() {
|
1258 | var length = arguments.length;
|
1259 | if (length === 0) {
|
1260 | return fn();
|
1261 | }
|
1262 | var obj = arguments[length - 1];
|
1263 | return (_isArray(obj) || typeof obj[methodname] !== 'function') ?
|
1264 | fn.apply(this, arguments) :
|
1265 | obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));
|
1266 | };
|
1267 | };
|
1268 |
|
1269 |
|
1270 | }),
|
1271 |
|
1272 | (function(module, exports, __webpack_require__) {
|
1273 |
|
1274 | var _indexOf = __webpack_require__(70);
|
1275 |
|
1276 |
|
1277 | module.exports = function _contains(a, list) {
|
1278 | return _indexOf(list, a, 0) >= 0;
|
1279 | };
|
1280 |
|
1281 |
|
1282 | }),
|
1283 |
|
1284 | (function(module, exports, __webpack_require__) {
|
1285 |
|
1286 | var _curry2 = __webpack_require__(0);
|
1287 | var _dispatchable = __webpack_require__(15);
|
1288 | var _xany = __webpack_require__(38);
|
1289 |
|
1290 |
|
1291 |
|
1292 |
|
1293 |
|
1294 |
|
1295 |
|
1296 |
|
1297 |
|
1298 |
|
1299 |
|
1300 |
|
1301 |
|
1302 |
|
1303 |
|
1304 |
|
1305 |
|
1306 |
|
1307 |
|
1308 |
|
1309 |
|
1310 |
|
1311 |
|
1312 |
|
1313 |
|
1314 |
|
1315 |
|
1316 | module.exports = _curry2(_dispatchable(['any'], _xany, function any(fn, list) {
|
1317 | var idx = 0;
|
1318 | while (idx < list.length) {
|
1319 | if (fn(list[idx])) {
|
1320 | return true;
|
1321 | }
|
1322 | idx += 1;
|
1323 | }
|
1324 | return false;
|
1325 | }));
|
1326 |
|
1327 |
|
1328 | }),
|
1329 |
|
1330 | (function(module, exports, __webpack_require__) {
|
1331 |
|
1332 | var _curry2 = __webpack_require__(0);
|
1333 | var _reduced = __webpack_require__(81);
|
1334 | var _xfBase = __webpack_require__(27);
|
1335 |
|
1336 |
|
1337 | module.exports = (function() {
|
1338 | function XAny(f, xf) {
|
1339 | this.xf = xf;
|
1340 | this.f = f;
|
1341 | this.any = false;
|
1342 | }
|
1343 | XAny.prototype['@@transducer/init'] = _xfBase.init;
|
1344 | XAny.prototype['@@transducer/result'] = function(result) {
|
1345 | if (!this.any) {
|
1346 | result = this.xf['@@transducer/step'](result, false);
|
1347 | }
|
1348 | return this.xf['@@transducer/result'](result);
|
1349 | };
|
1350 | XAny.prototype['@@transducer/step'] = function(result, input) {
|
1351 | if (this.f(input)) {
|
1352 | this.any = true;
|
1353 | result = _reduced(this.xf['@@transducer/step'](result, true));
|
1354 | }
|
1355 | return result;
|
1356 | };
|
1357 |
|
1358 | return _curry2(function _xany(f, xf) { return new XAny(f, xf); });
|
1359 | }());
|
1360 |
|
1361 |
|
1362 | }),
|
1363 |
|
1364 | (function(module, exports) {
|
1365 |
|
1366 | module.exports = function _complement(f) {
|
1367 | return function() {
|
1368 | return !f.apply(this, arguments);
|
1369 | };
|
1370 | };
|
1371 |
|
1372 |
|
1373 | }),
|
1374 |
|
1375 | (function(module, exports, __webpack_require__) {
|
1376 |
|
1377 | var _curry2 = __webpack_require__(0);
|
1378 | var _dispatchable = __webpack_require__(15);
|
1379 | var _map = __webpack_require__(41);
|
1380 | var _reduce = __webpack_require__(23);
|
1381 | var _xmap = __webpack_require__(85);
|
1382 | var curryN = __webpack_require__(86);
|
1383 | var keys = __webpack_require__(5);
|
1384 |
|
1385 |
|
1386 |
|
1387 |
|
1388 |
|
1389 |
|
1390 |
|
1391 |
|
1392 |
|
1393 |
|
1394 |
|
1395 |
|
1396 |
|
1397 |
|
1398 |
|
1399 |
|
1400 |
|
1401 |
|
1402 |
|
1403 |
|
1404 |
|
1405 |
|
1406 |
|
1407 |
|
1408 |
|
1409 |
|
1410 |
|
1411 |
|
1412 |
|
1413 |
|
1414 |
|
1415 |
|
1416 |
|
1417 |
|
1418 |
|
1419 |
|
1420 |
|
1421 | module.exports = _curry2(_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {
|
1422 | switch (Object.prototype.toString.call(functor)) {
|
1423 | case '[object Function]':
|
1424 | return curryN(functor.length, function() {
|
1425 | return fn.call(this, functor.apply(this, arguments));
|
1426 | });
|
1427 | case '[object Object]':
|
1428 | return _reduce(function(acc, key) {
|
1429 | acc[key] = fn(functor[key]);
|
1430 | return acc;
|
1431 | }, {}, keys(functor));
|
1432 | default:
|
1433 | return _map(fn, functor);
|
1434 | }
|
1435 | }));
|
1436 |
|
1437 |
|
1438 | }),
|
1439 |
|
1440 | (function(module, exports) {
|
1441 |
|
1442 | module.exports = function _map(fn, functor) {
|
1443 | var idx = 0;
|
1444 | var len = functor.length;
|
1445 | var result = Array(len);
|
1446 | while (idx < len) {
|
1447 | result[idx] = fn(functor[idx]);
|
1448 | idx += 1;
|
1449 | }
|
1450 | return result;
|
1451 | };
|
1452 |
|
1453 |
|
1454 | }),
|
1455 |
|
1456 | (function(module, exports, __webpack_require__) {
|
1457 |
|
1458 | var _curry2 = __webpack_require__(3);
|
1459 |
|
1460 |
|
1461 |
|
1462 |
|
1463 |
|
1464 |
|
1465 |
|
1466 |
|
1467 |
|
1468 |
|
1469 |
|
1470 |
|
1471 |
|
1472 |
|
1473 |
|
1474 |
|
1475 |
|
1476 |
|
1477 |
|
1478 |
|
1479 | module.exports = _curry2(function path(paths, obj) {
|
1480 | var val = obj;
|
1481 | var idx = 0;
|
1482 | while (idx < paths.length) {
|
1483 | if (val == null) {
|
1484 | return;
|
1485 | }
|
1486 | val = val[paths[idx]];
|
1487 | idx += 1;
|
1488 | }
|
1489 | return val;
|
1490 | });
|
1491 |
|
1492 |
|
1493 | }),
|
1494 |
|
1495 | (function(module, exports, __webpack_require__) {
|
1496 |
|
1497 | var _curry2 = __webpack_require__(3);
|
1498 | var _dispatchable = __webpack_require__(103);
|
1499 | var _map = __webpack_require__(105);
|
1500 | var _reduce = __webpack_require__(44);
|
1501 | var _xmap = __webpack_require__(109);
|
1502 | var curryN = __webpack_require__(46);
|
1503 | var keys = __webpack_require__(112);
|
1504 |
|
1505 |
|
1506 |
|
1507 |
|
1508 |
|
1509 |
|
1510 |
|
1511 |
|
1512 |
|
1513 |
|
1514 |
|
1515 |
|
1516 |
|
1517 |
|
1518 |
|
1519 |
|
1520 |
|
1521 |
|
1522 |
|
1523 |
|
1524 |
|
1525 |
|
1526 |
|
1527 |
|
1528 |
|
1529 |
|
1530 |
|
1531 |
|
1532 |
|
1533 |
|
1534 |
|
1535 |
|
1536 |
|
1537 |
|
1538 |
|
1539 |
|
1540 |
|
1541 | module.exports = _curry2(_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {
|
1542 | switch (Object.prototype.toString.call(functor)) {
|
1543 | case '[object Function]':
|
1544 | return curryN(functor.length, function() {
|
1545 | return fn.call(this, functor.apply(this, arguments));
|
1546 | });
|
1547 | case '[object Object]':
|
1548 | return _reduce(function(acc, key) {
|
1549 | acc[key] = fn(functor[key]);
|
1550 | return acc;
|
1551 | }, {}, keys(functor));
|
1552 | default:
|
1553 | return _map(fn, functor);
|
1554 | }
|
1555 | }));
|
1556 |
|
1557 |
|
1558 | }),
|
1559 |
|
1560 | (function(module, exports, __webpack_require__) {
|
1561 |
|
1562 | var _isArrayLike = __webpack_require__(106);
|
1563 | var _xwrap = __webpack_require__(107);
|
1564 | var bind = __webpack_require__(108);
|
1565 |
|
1566 |
|
1567 | module.exports = (function() {
|
1568 | function _arrayReduce(xf, acc, list) {
|
1569 | var idx = 0;
|
1570 | var len = list.length;
|
1571 | while (idx < len) {
|
1572 | acc = xf['@@transducer/step'](acc, list[idx]);
|
1573 | if (acc && acc['@@transducer/reduced']) {
|
1574 | acc = acc['@@transducer/value'];
|
1575 | break;
|
1576 | }
|
1577 | idx += 1;
|
1578 | }
|
1579 | return xf['@@transducer/result'](acc);
|
1580 | }
|
1581 |
|
1582 | function _iterableReduce(xf, acc, iter) {
|
1583 | var step = iter.next();
|
1584 | while (!step.done) {
|
1585 | acc = xf['@@transducer/step'](acc, step.value);
|
1586 | if (acc && acc['@@transducer/reduced']) {
|
1587 | acc = acc['@@transducer/value'];
|
1588 | break;
|
1589 | }
|
1590 | step = iter.next();
|
1591 | }
|
1592 | return xf['@@transducer/result'](acc);
|
1593 | }
|
1594 |
|
1595 | function _methodReduce(xf, acc, obj, methodName) {
|
1596 | return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));
|
1597 | }
|
1598 |
|
1599 | var symIterator = (typeof Symbol !== 'undefined') ? Symbol.iterator : '@@iterator';
|
1600 | return function _reduce(fn, acc, list) {
|
1601 | if (typeof fn === 'function') {
|
1602 | fn = _xwrap(fn);
|
1603 | }
|
1604 | if (_isArrayLike(list)) {
|
1605 | return _arrayReduce(fn, acc, list);
|
1606 | }
|
1607 | if (typeof list['fantasy-land/reduce'] === 'function') {
|
1608 | return _methodReduce(fn, acc, list, 'fantasy-land/reduce');
|
1609 | }
|
1610 | if (list[symIterator] != null) {
|
1611 | return _iterableReduce(fn, acc, list[symIterator]());
|
1612 | }
|
1613 | if (typeof list.next === 'function') {
|
1614 | return _iterableReduce(fn, acc, list);
|
1615 | }
|
1616 | if (typeof list.reduce === 'function') {
|
1617 | return _methodReduce(fn, acc, list, 'reduce');
|
1618 | }
|
1619 |
|
1620 | throw new TypeError('reduce: list must be array or iterable');
|
1621 | };
|
1622 | }());
|
1623 |
|
1624 |
|
1625 | }),
|
1626 |
|
1627 | (function(module, exports) {
|
1628 |
|
1629 | module.exports = function _isString(x) {
|
1630 | return Object.prototype.toString.call(x) === '[object String]';
|
1631 | };
|
1632 |
|
1633 |
|
1634 | }),
|
1635 |
|
1636 | (function(module, exports, __webpack_require__) {
|
1637 |
|
1638 | var _arity = __webpack_require__(16);
|
1639 | var _curry1 = __webpack_require__(1);
|
1640 | var _curry2 = __webpack_require__(3);
|
1641 | var _curryN = __webpack_require__(111);
|
1642 |
|
1643 |
|
1644 |
|
1645 |
|
1646 |
|
1647 |
|
1648 |
|
1649 |
|
1650 |
|
1651 |
|
1652 |
|
1653 |
|
1654 |
|
1655 |
|
1656 |
|
1657 |
|
1658 |
|
1659 |
|
1660 |
|
1661 |
|
1662 |
|
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 |
|
1668 |
|
1669 |
|
1670 |
|
1671 |
|
1672 |
|
1673 |
|
1674 |
|
1675 |
|
1676 |
|
1677 |
|
1678 |
|
1679 |
|
1680 |
|
1681 |
|
1682 |
|
1683 |
|
1684 |
|
1685 |
|
1686 | module.exports = _curry2(function curryN(length, fn) {
|
1687 | if (length === 1) {
|
1688 | return _curry1(fn);
|
1689 | }
|
1690 | return _arity(length, _curryN(length, [], fn));
|
1691 | });
|
1692 |
|
1693 |
|
1694 | }),
|
1695 |
|
1696 | (function(module, exports, __webpack_require__) {
|
1697 |
|
1698 | var _curry1 = __webpack_require__(1);
|
1699 |
|
1700 |
|
1701 |
|
1702 |
|
1703 |
|
1704 |
|
1705 |
|
1706 |
|
1707 |
|
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 |
|
1713 |
|
1714 |
|
1715 |
|
1716 |
|
1717 |
|
1718 |
|
1719 |
|
1720 | module.exports = _curry1(function always(val) {
|
1721 | return function() {
|
1722 | return val;
|
1723 | };
|
1724 | });
|
1725 |
|
1726 |
|
1727 | }),
|
1728 |
|
1729 | (function(module, exports, __webpack_require__) {
|
1730 |
|
1731 | var _isArray = __webpack_require__(28);
|
1732 |
|
1733 |
|
1734 |
|
1735 |
|
1736 |
|
1737 |
|
1738 |
|
1739 |
|
1740 |
|
1741 |
|
1742 |
|
1743 |
|
1744 | module.exports = function _checkForMethod(methodname, fn) {
|
1745 | return function() {
|
1746 | var length = arguments.length;
|
1747 | if (length === 0) {
|
1748 | return fn();
|
1749 | }
|
1750 | var obj = arguments[length - 1];
|
1751 | return (_isArray(obj) || typeof obj[methodname] !== 'function') ?
|
1752 | fn.apply(this, arguments) :
|
1753 | obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));
|
1754 | };
|
1755 | };
|
1756 |
|
1757 |
|
1758 | }),
|
1759 |
|
1760 | (function(module, exports, __webpack_require__) {
|
1761 |
|
1762 | "use strict";
|
1763 |
|
1764 |
|
1765 | exports.__esModule = true;
|
1766 |
|
1767 | var _merge = __webpack_require__(10);
|
1768 |
|
1769 | var _merge2 = _interopRequireDefault(_merge);
|
1770 |
|
1771 | exports.default = connectField;
|
1772 |
|
1773 | var _react = __webpack_require__(11);
|
1774 |
|
1775 | var React = _interopRequireWildcard(_react);
|
1776 |
|
1777 | var _propTypes = __webpack_require__(12);
|
1778 |
|
1779 | var PropTypes = _interopRequireWildcard(_propTypes);
|
1780 |
|
1781 | var _helpers = __webpack_require__(4);
|
1782 |
|
1783 | function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
1784 |
|
1785 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
1786 |
|
1787 | function connectField(Wrapped) {
|
1788 | var ConnectedField = function ConnectedField(props, _ref) {
|
1789 | var reduxForms = _ref.reduxForms;
|
1790 |
|
1791 | var contextForm = (0, _helpers.isString)(reduxForms) ? reduxForms : null;
|
1792 | var form = (0, _helpers.isString)(props.form) ? props.form : contextForm;
|
1793 | (0, _helpers.invariant)((0, _helpers.isString)(form), '[redux-forms] "field(...)" and "fieldArray(...)" must be a child of the Form ' + 'component or an explicit "form" prop must be supplied.');
|
1794 | return React.createElement(Wrapped, (0, _merge2.default)(props, {
|
1795 | _form: form
|
1796 | }));
|
1797 | };
|
1798 | ConnectedField.contextTypes = {
|
1799 | reduxForms: PropTypes.string
|
1800 | };
|
1801 | ConnectedField.displayName = Wrapped.displayName;
|
1802 | ConnectedField.WrappedComponent = Wrapped;
|
1803 | return ConnectedField;
|
1804 | }
|
1805 |
|
1806 | }),
|
1807 |
|
1808 | (function(module, exports, __webpack_require__) {
|
1809 |
|
1810 | "use strict";
|
1811 |
|
1812 |
|
1813 | exports.__esModule = true;
|
1814 | exports.fieldArray = exports.field = exports.Form = undefined;
|
1815 |
|
1816 | var _Form = __webpack_require__(51);
|
1817 |
|
1818 | var _Form2 = _interopRequireDefault(_Form);
|
1819 |
|
1820 | var _field = __webpack_require__(99);
|
1821 |
|
1822 | var _field2 = _interopRequireDefault(_field);
|
1823 |
|
1824 | var _fieldArray = __webpack_require__(135);
|
1825 |
|
1826 | var _fieldArray2 = _interopRequireDefault(_fieldArray);
|
1827 |
|
1828 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
1829 |
|
1830 | exports.Form = _Form2.default;
|
1831 | exports.field = _field2.default;
|
1832 | exports.fieldArray = _fieldArray2.default;
|
1833 |
|
1834 | }),
|
1835 |
|
1836 | (function(module, exports, __webpack_require__) {
|
1837 |
|
1838 | "use strict";
|
1839 |
|
1840 |
|
1841 | exports.__esModule = true;
|
1842 |
|
1843 | var _prop = __webpack_require__(29);
|
1844 |
|
1845 | var _prop2 = _interopRequireDefault(_prop);
|
1846 |
|
1847 | var _identity = __webpack_require__(30);
|
1848 |
|
1849 | var _identity2 = _interopRequireDefault(_identity);
|
1850 |
|
1851 | var _merge = __webpack_require__(10);
|
1852 |
|
1853 | var _merge2 = _interopRequireDefault(_merge);
|
1854 |
|
1855 | var _react = __webpack_require__(11);
|
1856 |
|
1857 | var React = _interopRequireWildcard(_react);
|
1858 |
|
1859 | var _propTypes = __webpack_require__(12);
|
1860 |
|
1861 | var PropTypes = _interopRequireWildcard(_propTypes);
|
1862 |
|
1863 | var _reactRedux = __webpack_require__(21);
|
1864 |
|
1865 | var _helpers = __webpack_require__(4);
|
1866 |
|
1867 | var _formProps = __webpack_require__(69);
|
1868 |
|
1869 | var _formProps2 = _interopRequireDefault(_formProps);
|
1870 |
|
1871 | var _actions = __webpack_require__(26);
|
1872 |
|
1873 | var actions = _interopRequireWildcard(_actions);
|
1874 |
|
1875 | var _selectors = __webpack_require__(78);
|
1876 |
|
1877 | var selectors = _interopRequireWildcard(_selectors);
|
1878 |
|
1879 | function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
1880 |
|
1881 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
1882 |
|
1883 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
1884 |
|
1885 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
1886 |
|
1887 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
1888 |
|
1889 | var Form = function (_React$Component) {
|
1890 | _inherits(Form, _React$Component);
|
1891 |
|
1892 | function Form(props) {
|
1893 | _classCallCheck(this, Form);
|
1894 |
|
1895 | var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
|
1896 |
|
1897 | _this.handleSubmit = _this.handleSubmit.bind(_this);
|
1898 | return _this;
|
1899 | }
|
1900 |
|
1901 | Form.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
|
1902 | return !(0, _helpers.shallowCompare)((0, _formProps.toUpdate)(this.props), (0, _formProps.toUpdate)(nextProps));
|
1903 | };
|
1904 |
|
1905 | Form.prototype.componentWillMount = function componentWillMount() {
|
1906 | var _props = this.props,
|
1907 | name = _props.name,
|
1908 | _form = _props._form,
|
1909 | _addForm = _props._addForm;
|
1910 |
|
1911 | if (!_form) {
|
1912 | _addForm(name);
|
1913 | }
|
1914 | };
|
1915 |
|
1916 | Form.prototype.componentWillUnmount = function componentWillUnmount() {
|
1917 | var _props2 = this.props,
|
1918 | name = _props2.name,
|
1919 | persistent = _props2.persistent,
|
1920 | _removeForm = _props2._removeForm;
|
1921 |
|
1922 | if (!persistent) {
|
1923 | _removeForm(name);
|
1924 | }
|
1925 | };
|
1926 |
|
1927 | Form.prototype.getChildContext = function getChildContext() {
|
1928 | var name = this.props.name;
|
1929 |
|
1930 | return {
|
1931 | reduxForms: name
|
1932 | };
|
1933 | };
|
1934 |
|
1935 | Form.prototype.handleSubmit = function handleSubmit(ev) {
|
1936 | var _props3 = this.props,
|
1937 | name = _props3.name,
|
1938 | onSubmit = _props3.onSubmit,
|
1939 | _valid = _props3._valid,
|
1940 | _values = _props3._values,
|
1941 | _touchAll = _props3._touchAll,
|
1942 | _submitting = _props3._submitting,
|
1943 | _submitStart = _props3._submitStart,
|
1944 | _submitStop = _props3._submitStop;
|
1945 |
|
1946 | ev.preventDefault();
|
1947 | _touchAll(name);
|
1948 | if (_submitting) {
|
1949 | return;
|
1950 | }
|
1951 | if (!_valid || !(0, _helpers.isFunction)(onSubmit)) {
|
1952 | return;
|
1953 | }
|
1954 | var maybePromise = onSubmit(_values);
|
1955 | if ((0, _helpers.isPromise)(maybePromise)) {
|
1956 | _submitStart(name);
|
1957 | maybePromise.then(function () {
|
1958 | return _submitStop(name);
|
1959 | });
|
1960 | }
|
1961 | };
|
1962 |
|
1963 | Form.prototype.render = function render() {
|
1964 | var _props4 = this.props,
|
1965 | children = _props4.children,
|
1966 | withRef = _props4.withRef,
|
1967 | _form = _props4._form;
|
1968 |
|
1969 |
|
1970 | if (!_form) {
|
1971 | return null;
|
1972 | }
|
1973 | return React.createElement('form', (0, _formProps2.default)((0, _merge2.default)(this.props, {
|
1974 | ref: withRef,
|
1975 | onSubmit: this.handleSubmit
|
1976 | })), children);
|
1977 | };
|
1978 |
|
1979 | return Form;
|
1980 | }(React.Component);
|
1981 |
|
1982 | Form.defaultProps = {
|
1983 | persistent: false,
|
1984 | onSubmit: function onSubmit() {
|
1985 | return null;
|
1986 | },
|
1987 | withRef: function withRef() {
|
1988 | return null;
|
1989 | },
|
1990 |
|
1991 | _form: false,
|
1992 | _values: {},
|
1993 | _valid: false,
|
1994 | _submitting: false,
|
1995 |
|
1996 | _addForm: _identity2.default,
|
1997 | _removeForm: _identity2.default,
|
1998 | _touchAll: _identity2.default,
|
1999 | _submitStart: _identity2.default,
|
2000 | _submitStop: _identity2.default
|
2001 | };
|
2002 | Form.childContextTypes = {
|
2003 | reduxForms: PropTypes.string.isRequired
|
2004 | };
|
2005 | Form.propTypes = {
|
2006 | name: PropTypes.string.isRequired,
|
2007 | persistent: PropTypes.bool.isRequired,
|
2008 | onSubmit: PropTypes.func.isRequired,
|
2009 | withRef: PropTypes.func.isRequired
|
2010 | };
|
2011 | var Connected = (0, _reactRedux.connect)(function (state, props) {
|
2012 | return {
|
2013 | _form: Boolean((0, _prop2.default)(props.name, state.reduxForms)),
|
2014 | _values: selectors.getValues(props.name, state),
|
2015 | _valid: selectors.isValid(props.name, state),
|
2016 | _submitting: selectors.isSubmitting(props.name, state)
|
2017 | };
|
2018 | }, {
|
2019 | _addForm: actions.addForm,
|
2020 | _removeForm: actions.removeForm,
|
2021 | _touchAll: actions.touchAll,
|
2022 | _submitStart: actions.submitStart,
|
2023 | _submitStop: actions.submitStop
|
2024 | })(Form);
|
2025 | Connected.displayName = 'Form';
|
2026 | exports.default = Connected;
|
2027 |
|
2028 | }),
|
2029 |
|
2030 | (function(module, exports) {
|
2031 |
|
2032 | module.exports = function _identity(x) { return x; };
|
2033 |
|
2034 |
|
2035 | }),
|
2036 |
|
2037 | (function(module, exports, __webpack_require__) {
|
2038 |
|
2039 | var _objectAssign = __webpack_require__(54);
|
2040 |
|
2041 | module.exports =
|
2042 | typeof Object.assign === 'function' ? Object.assign : _objectAssign;
|
2043 |
|
2044 |
|
2045 | }),
|
2046 |
|
2047 | (function(module, exports, __webpack_require__) {
|
2048 |
|
2049 | var _has = __webpack_require__(17);
|
2050 |
|
2051 |
|
2052 | module.exports = function _objectAssign(target) {
|
2053 | if (target == null) {
|
2054 | throw new TypeError('Cannot convert undefined or null to object');
|
2055 | }
|
2056 |
|
2057 | var output = Object(target);
|
2058 | var idx = 1;
|
2059 | var length = arguments.length;
|
2060 | while (idx < length) {
|
2061 | var source = arguments[idx];
|
2062 | if (source != null) {
|
2063 | for (var nextKey in source) {
|
2064 | if (_has(nextKey, source)) {
|
2065 | output[nextKey] = source[nextKey];
|
2066 | }
|
2067 | }
|
2068 | }
|
2069 | idx += 1;
|
2070 | }
|
2071 | return output;
|
2072 | };
|
2073 |
|
2074 |
|
2075 | }),
|
2076 |
|
2077 | (function(module, exports, __webpack_require__) {
|
2078 |
|
2079 | "use strict";
|
2080 |
|
2081 |
|
2082 |
|
2083 |
|
2084 |
|
2085 |
|
2086 |
|
2087 |
|
2088 |
|
2089 |
|
2090 |
|
2091 | var emptyFunction = __webpack_require__(18);
|
2092 | var invariant = __webpack_require__(19);
|
2093 | var warning = __webpack_require__(31);
|
2094 |
|
2095 | var ReactPropTypesSecret = __webpack_require__(20);
|
2096 | var checkPropTypes = __webpack_require__(56);
|
2097 |
|
2098 | module.exports = function(isValidElement, throwOnDirectAccess) {
|
2099 |
|
2100 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
2101 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
2102 |
|
2103 | |
2104 |
|
2105 |
|
2106 |
|
2107 |
|
2108 |
|
2109 |
|
2110 |
|
2111 |
|
2112 |
|
2113 |
|
2114 |
|
2115 |
|
2116 |
|
2117 | function getIteratorFn(maybeIterable) {
|
2118 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
2119 | if (typeof iteratorFn === 'function') {
|
2120 | return iteratorFn;
|
2121 | }
|
2122 | }
|
2123 |
|
2124 | |
2125 |
|
2126 |
|
2127 |
|
2128 |
|
2129 |
|
2130 |
|
2131 |
|
2132 |
|
2133 |
|
2134 |
|
2135 |
|
2136 |
|
2137 |
|
2138 |
|
2139 |
|
2140 |
|
2141 |
|
2142 |
|
2143 |
|
2144 |
|
2145 |
|
2146 |
|
2147 |
|
2148 |
|
2149 |
|
2150 |
|
2151 |
|
2152 |
|
2153 |
|
2154 |
|
2155 |
|
2156 |
|
2157 |
|
2158 |
|
2159 |
|
2160 |
|
2161 |
|
2162 |
|
2163 |
|
2164 |
|
2165 |
|
2166 |
|
2167 |
|
2168 |
|
2169 |
|
2170 |
|
2171 | var ANONYMOUS = '<<anonymous>>';
|
2172 |
|
2173 |
|
2174 |
|
2175 | var ReactPropTypes = {
|
2176 | array: createPrimitiveTypeChecker('array'),
|
2177 | bool: createPrimitiveTypeChecker('boolean'),
|
2178 | func: createPrimitiveTypeChecker('function'),
|
2179 | number: createPrimitiveTypeChecker('number'),
|
2180 | object: createPrimitiveTypeChecker('object'),
|
2181 | string: createPrimitiveTypeChecker('string'),
|
2182 | symbol: createPrimitiveTypeChecker('symbol'),
|
2183 |
|
2184 | any: createAnyTypeChecker(),
|
2185 | arrayOf: createArrayOfTypeChecker,
|
2186 | element: createElementTypeChecker(),
|
2187 | instanceOf: createInstanceTypeChecker,
|
2188 | node: createNodeChecker(),
|
2189 | objectOf: createObjectOfTypeChecker,
|
2190 | oneOf: createEnumTypeChecker,
|
2191 | oneOfType: createUnionTypeChecker,
|
2192 | shape: createShapeTypeChecker
|
2193 | };
|
2194 |
|
2195 | |
2196 |
|
2197 |
|
2198 |
|
2199 |
|
2200 | function is(x, y) {
|
2201 |
|
2202 | if (x === y) {
|
2203 |
|
2204 |
|
2205 | return x !== 0 || 1 / x === 1 / y;
|
2206 | } else {
|
2207 |
|
2208 | return x !== x && y !== y;
|
2209 | }
|
2210 | }
|
2211 |
|
2212 |
|
2213 | |
2214 |
|
2215 |
|
2216 |
|
2217 |
|
2218 |
|
2219 |
|
2220 | function PropTypeError(message) {
|
2221 | this.message = message;
|
2222 | this.stack = '';
|
2223 | }
|
2224 |
|
2225 | PropTypeError.prototype = Error.prototype;
|
2226 |
|
2227 | function createChainableTypeChecker(validate) {
|
2228 | if (undefined !== 'production') {
|
2229 | var manualPropTypeCallCache = {};
|
2230 | var manualPropTypeWarningCount = 0;
|
2231 | }
|
2232 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
2233 | componentName = componentName || ANONYMOUS;
|
2234 | propFullName = propFullName || propName;
|
2235 |
|
2236 | if (secret !== ReactPropTypesSecret) {
|
2237 | if (throwOnDirectAccess) {
|
2238 |
|
2239 | invariant(
|
2240 | false,
|
2241 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
2242 | 'Use `PropTypes.checkPropTypes()` to call them. ' +
|
2243 | 'Read more at http://fb.me/use-check-prop-types'
|
2244 | );
|
2245 | } else if (undefined !== 'production' && typeof console !== 'undefined') {
|
2246 |
|
2247 | var cacheKey = componentName + ':' + propName;
|
2248 | if (
|
2249 | !manualPropTypeCallCache[cacheKey] &&
|
2250 |
|
2251 | manualPropTypeWarningCount < 3
|
2252 | ) {
|
2253 | warning(
|
2254 | false,
|
2255 | 'You are manually calling a React.PropTypes validation ' +
|
2256 | 'function for the `%s` prop on `%s`. This is deprecated ' +
|
2257 | 'and will throw in the standalone `prop-types` package. ' +
|
2258 | 'You may be seeing this warning due to a third-party PropTypes ' +
|
2259 | 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
|
2260 | propFullName,
|
2261 | componentName
|
2262 | );
|
2263 | manualPropTypeCallCache[cacheKey] = true;
|
2264 | manualPropTypeWarningCount++;
|
2265 | }
|
2266 | }
|
2267 | }
|
2268 | if (props[propName] == null) {
|
2269 | if (isRequired) {
|
2270 | if (props[propName] === null) {
|
2271 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
2272 | }
|
2273 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
2274 | }
|
2275 | return null;
|
2276 | } else {
|
2277 | return validate(props, propName, componentName, location, propFullName);
|
2278 | }
|
2279 | }
|
2280 |
|
2281 | var chainedCheckType = checkType.bind(null, false);
|
2282 | chainedCheckType.isRequired = checkType.bind(null, true);
|
2283 |
|
2284 | return chainedCheckType;
|
2285 | }
|
2286 |
|
2287 | function createPrimitiveTypeChecker(expectedType) {
|
2288 | function validate(props, propName, componentName, location, propFullName, secret) {
|
2289 | var propValue = props[propName];
|
2290 | var propType = getPropType(propValue);
|
2291 | if (propType !== expectedType) {
|
2292 |
|
2293 |
|
2294 |
|
2295 | var preciseType = getPreciseType(propValue);
|
2296 |
|
2297 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
2298 | }
|
2299 | return null;
|
2300 | }
|
2301 | return createChainableTypeChecker(validate);
|
2302 | }
|
2303 |
|
2304 | function createAnyTypeChecker() {
|
2305 | return createChainableTypeChecker(emptyFunction.thatReturnsNull);
|
2306 | }
|
2307 |
|
2308 | function createArrayOfTypeChecker(typeChecker) {
|
2309 | function validate(props, propName, componentName, location, propFullName) {
|
2310 | if (typeof typeChecker !== 'function') {
|
2311 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
2312 | }
|
2313 | var propValue = props[propName];
|
2314 | if (!Array.isArray(propValue)) {
|
2315 | var propType = getPropType(propValue);
|
2316 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
2317 | }
|
2318 | for (var i = 0; i < propValue.length; i++) {
|
2319 | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
2320 | if (error instanceof Error) {
|
2321 | return error;
|
2322 | }
|
2323 | }
|
2324 | return null;
|
2325 | }
|
2326 | return createChainableTypeChecker(validate);
|
2327 | }
|
2328 |
|
2329 | function createElementTypeChecker() {
|
2330 | function validate(props, propName, componentName, location, propFullName) {
|
2331 | var propValue = props[propName];
|
2332 | if (!isValidElement(propValue)) {
|
2333 | var propType = getPropType(propValue);
|
2334 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
2335 | }
|
2336 | return null;
|
2337 | }
|
2338 | return createChainableTypeChecker(validate);
|
2339 | }
|
2340 |
|
2341 | function createInstanceTypeChecker(expectedClass) {
|
2342 | function validate(props, propName, componentName, location, propFullName) {
|
2343 | if (!(props[propName] instanceof expectedClass)) {
|
2344 | var expectedClassName = expectedClass.name || ANONYMOUS;
|
2345 | var actualClassName = getClassName(props[propName]);
|
2346 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
2347 | }
|
2348 | return null;
|
2349 | }
|
2350 | return createChainableTypeChecker(validate);
|
2351 | }
|
2352 |
|
2353 | function createEnumTypeChecker(expectedValues) {
|
2354 | if (!Array.isArray(expectedValues)) {
|
2355 | undefined !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
|
2356 | return emptyFunction.thatReturnsNull;
|
2357 | }
|
2358 |
|
2359 | function validate(props, propName, componentName, location, propFullName) {
|
2360 | var propValue = props[propName];
|
2361 | for (var i = 0; i < expectedValues.length; i++) {
|
2362 | if (is(propValue, expectedValues[i])) {
|
2363 | return null;
|
2364 | }
|
2365 | }
|
2366 |
|
2367 | var valuesString = JSON.stringify(expectedValues);
|
2368 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
2369 | }
|
2370 | return createChainableTypeChecker(validate);
|
2371 | }
|
2372 |
|
2373 | function createObjectOfTypeChecker(typeChecker) {
|
2374 | function validate(props, propName, componentName, location, propFullName) {
|
2375 | if (typeof typeChecker !== 'function') {
|
2376 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
2377 | }
|
2378 | var propValue = props[propName];
|
2379 | var propType = getPropType(propValue);
|
2380 | if (propType !== 'object') {
|
2381 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
2382 | }
|
2383 | for (var key in propValue) {
|
2384 | if (propValue.hasOwnProperty(key)) {
|
2385 | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
2386 | if (error instanceof Error) {
|
2387 | return error;
|
2388 | }
|
2389 | }
|
2390 | }
|
2391 | return null;
|
2392 | }
|
2393 | return createChainableTypeChecker(validate);
|
2394 | }
|
2395 |
|
2396 | function createUnionTypeChecker(arrayOfTypeCheckers) {
|
2397 | if (!Array.isArray(arrayOfTypeCheckers)) {
|
2398 | undefined !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
2399 | return emptyFunction.thatReturnsNull;
|
2400 | }
|
2401 |
|
2402 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
2403 | var checker = arrayOfTypeCheckers[i];
|
2404 | if (typeof checker !== 'function') {
|
2405 | warning(
|
2406 | false,
|
2407 | 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
|
2408 | 'received %s at index %s.',
|
2409 | getPostfixForTypeWarning(checker),
|
2410 | i
|
2411 | );
|
2412 | return emptyFunction.thatReturnsNull;
|
2413 | }
|
2414 | }
|
2415 |
|
2416 | function validate(props, propName, componentName, location, propFullName) {
|
2417 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
2418 | var checker = arrayOfTypeCheckers[i];
|
2419 | if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
2420 | return null;
|
2421 | }
|
2422 | }
|
2423 |
|
2424 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
2425 | }
|
2426 | return createChainableTypeChecker(validate);
|
2427 | }
|
2428 |
|
2429 | function createNodeChecker() {
|
2430 | function validate(props, propName, componentName, location, propFullName) {
|
2431 | if (!isNode(props[propName])) {
|
2432 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
2433 | }
|
2434 | return null;
|
2435 | }
|
2436 | return createChainableTypeChecker(validate);
|
2437 | }
|
2438 |
|
2439 | function createShapeTypeChecker(shapeTypes) {
|
2440 | function validate(props, propName, componentName, location, propFullName) {
|
2441 | var propValue = props[propName];
|
2442 | var propType = getPropType(propValue);
|
2443 | if (propType !== 'object') {
|
2444 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
2445 | }
|
2446 | for (var key in shapeTypes) {
|
2447 | var checker = shapeTypes[key];
|
2448 | if (!checker) {
|
2449 | continue;
|
2450 | }
|
2451 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
2452 | if (error) {
|
2453 | return error;
|
2454 | }
|
2455 | }
|
2456 | return null;
|
2457 | }
|
2458 | return createChainableTypeChecker(validate);
|
2459 | }
|
2460 |
|
2461 | function isNode(propValue) {
|
2462 | switch (typeof propValue) {
|
2463 | case 'number':
|
2464 | case 'string':
|
2465 | case 'undefined':
|
2466 | return true;
|
2467 | case 'boolean':
|
2468 | return !propValue;
|
2469 | case 'object':
|
2470 | if (Array.isArray(propValue)) {
|
2471 | return propValue.every(isNode);
|
2472 | }
|
2473 | if (propValue === null || isValidElement(propValue)) {
|
2474 | return true;
|
2475 | }
|
2476 |
|
2477 | var iteratorFn = getIteratorFn(propValue);
|
2478 | if (iteratorFn) {
|
2479 | var iterator = iteratorFn.call(propValue);
|
2480 | var step;
|
2481 | if (iteratorFn !== propValue.entries) {
|
2482 | while (!(step = iterator.next()).done) {
|
2483 | if (!isNode(step.value)) {
|
2484 | return false;
|
2485 | }
|
2486 | }
|
2487 | } else {
|
2488 |
|
2489 | while (!(step = iterator.next()).done) {
|
2490 | var entry = step.value;
|
2491 | if (entry) {
|
2492 | if (!isNode(entry[1])) {
|
2493 | return false;
|
2494 | }
|
2495 | }
|
2496 | }
|
2497 | }
|
2498 | } else {
|
2499 | return false;
|
2500 | }
|
2501 |
|
2502 | return true;
|
2503 | default:
|
2504 | return false;
|
2505 | }
|
2506 | }
|
2507 |
|
2508 | function isSymbol(propType, propValue) {
|
2509 |
|
2510 | if (propType === 'symbol') {
|
2511 | return true;
|
2512 | }
|
2513 |
|
2514 |
|
2515 | if (propValue['@@toStringTag'] === 'Symbol') {
|
2516 | return true;
|
2517 | }
|
2518 |
|
2519 |
|
2520 | if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
2521 | return true;
|
2522 | }
|
2523 |
|
2524 | return false;
|
2525 | }
|
2526 |
|
2527 |
|
2528 | function getPropType(propValue) {
|
2529 | var propType = typeof propValue;
|
2530 | if (Array.isArray(propValue)) {
|
2531 | return 'array';
|
2532 | }
|
2533 | if (propValue instanceof RegExp) {
|
2534 |
|
2535 |
|
2536 |
|
2537 | return 'object';
|
2538 | }
|
2539 | if (isSymbol(propType, propValue)) {
|
2540 | return 'symbol';
|
2541 | }
|
2542 | return propType;
|
2543 | }
|
2544 |
|
2545 |
|
2546 |
|
2547 | function getPreciseType(propValue) {
|
2548 | if (typeof propValue === 'undefined' || propValue === null) {
|
2549 | return '' + propValue;
|
2550 | }
|
2551 | var propType = getPropType(propValue);
|
2552 | if (propType === 'object') {
|
2553 | if (propValue instanceof Date) {
|
2554 | return 'date';
|
2555 | } else if (propValue instanceof RegExp) {
|
2556 | return 'regexp';
|
2557 | }
|
2558 | }
|
2559 | return propType;
|
2560 | }
|
2561 |
|
2562 |
|
2563 |
|
2564 | function getPostfixForTypeWarning(value) {
|
2565 | var type = getPreciseType(value);
|
2566 | switch (type) {
|
2567 | case 'array':
|
2568 | case 'object':
|
2569 | return 'an ' + type;
|
2570 | case 'boolean':
|
2571 | case 'date':
|
2572 | case 'regexp':
|
2573 | return 'a ' + type;
|
2574 | default:
|
2575 | return type;
|
2576 | }
|
2577 | }
|
2578 |
|
2579 |
|
2580 | function getClassName(propValue) {
|
2581 | if (!propValue.constructor || !propValue.constructor.name) {
|
2582 | return ANONYMOUS;
|
2583 | }
|
2584 | return propValue.constructor.name;
|
2585 | }
|
2586 |
|
2587 | ReactPropTypes.checkPropTypes = checkPropTypes;
|
2588 | ReactPropTypes.PropTypes = ReactPropTypes;
|
2589 |
|
2590 | return ReactPropTypes;
|
2591 | };
|
2592 |
|
2593 |
|
2594 | }),
|
2595 |
|
2596 | (function(module, exports, __webpack_require__) {
|
2597 |
|
2598 | "use strict";
|
2599 |
|
2600 |
|
2601 |
|
2602 |
|
2603 |
|
2604 |
|
2605 |
|
2606 |
|
2607 |
|
2608 |
|
2609 |
|
2610 | if (undefined !== 'production') {
|
2611 | var invariant = __webpack_require__(19);
|
2612 | var warning = __webpack_require__(31);
|
2613 | var ReactPropTypesSecret = __webpack_require__(20);
|
2614 | var loggedTypeFailures = {};
|
2615 | }
|
2616 |
|
2617 |
|
2618 |
|
2619 |
|
2620 |
|
2621 |
|
2622 |
|
2623 |
|
2624 |
|
2625 |
|
2626 |
|
2627 |
|
2628 | function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
2629 | if (undefined !== 'production') {
|
2630 | for (var typeSpecName in typeSpecs) {
|
2631 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
2632 | var error;
|
2633 |
|
2634 |
|
2635 |
|
2636 | try {
|
2637 |
|
2638 |
|
2639 | invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
|
2640 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
2641 | } catch (ex) {
|
2642 | error = ex;
|
2643 | }
|
2644 | warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
|
2645 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
2646 |
|
2647 |
|
2648 | loggedTypeFailures[error.message] = true;
|
2649 |
|
2650 | var stack = getStack ? getStack() : '';
|
2651 |
|
2652 | warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
|
2653 | }
|
2654 | }
|
2655 | }
|
2656 | }
|
2657 | }
|
2658 |
|
2659 | module.exports = checkPropTypes;
|
2660 |
|
2661 |
|
2662 | }),
|
2663 |
|
2664 | (function(module, exports, __webpack_require__) {
|
2665 |
|
2666 | "use strict";
|
2667 |
|
2668 |
|
2669 |
|
2670 |
|
2671 |
|
2672 |
|
2673 |
|
2674 |
|
2675 |
|
2676 |
|
2677 |
|
2678 | var emptyFunction = __webpack_require__(18);
|
2679 | var invariant = __webpack_require__(19);
|
2680 | var ReactPropTypesSecret = __webpack_require__(20);
|
2681 |
|
2682 | module.exports = function() {
|
2683 | function shim(props, propName, componentName, location, propFullName, secret) {
|
2684 | if (secret === ReactPropTypesSecret) {
|
2685 |
|
2686 | return;
|
2687 | }
|
2688 | invariant(
|
2689 | false,
|
2690 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
2691 | 'Use PropTypes.checkPropTypes() to call them. ' +
|
2692 | 'Read more at http://fb.me/use-check-prop-types'
|
2693 | );
|
2694 | };
|
2695 | shim.isRequired = shim;
|
2696 | function getShim() {
|
2697 | return shim;
|
2698 | };
|
2699 |
|
2700 |
|
2701 | var ReactPropTypes = {
|
2702 | array: shim,
|
2703 | bool: shim,
|
2704 | func: shim,
|
2705 | number: shim,
|
2706 | object: shim,
|
2707 | string: shim,
|
2708 | symbol: shim,
|
2709 |
|
2710 | any: shim,
|
2711 | arrayOf: getShim,
|
2712 | element: shim,
|
2713 | instanceOf: getShim,
|
2714 | node: shim,
|
2715 | objectOf: getShim,
|
2716 | oneOf: getShim,
|
2717 | oneOfType: getShim,
|
2718 | shape: getShim
|
2719 | };
|
2720 |
|
2721 | ReactPropTypes.checkPropTypes = emptyFunction;
|
2722 | ReactPropTypes.PropTypes = ReactPropTypes;
|
2723 |
|
2724 | return ReactPropTypes;
|
2725 | };
|
2726 |
|
2727 |
|
2728 | }),
|
2729 |
|
2730 | (function(module, exports, __webpack_require__) {
|
2731 |
|
2732 | var _curry1 = __webpack_require__(2);
|
2733 | var _isArray = __webpack_require__(24);
|
2734 | var _isString = __webpack_require__(33);
|
2735 |
|
2736 |
|
2737 |
|
2738 |
|
2739 |
|
2740 |
|
2741 |
|
2742 |
|
2743 |
|
2744 |
|
2745 |
|
2746 |
|
2747 |
|
2748 |
|
2749 |
|
2750 |
|
2751 |
|
2752 |
|
2753 |
|
2754 | module.exports = _curry1(function isArrayLike(x) {
|
2755 | if (_isArray(x)) { return true; }
|
2756 | if (!x) { return false; }
|
2757 | if (typeof x !== 'object') { return false; }
|
2758 | if (_isString(x)) { return false; }
|
2759 | if (x.nodeType === 1) { return !!x.length; }
|
2760 | if (x.length === 0) { return true; }
|
2761 | if (x.length > 0) {
|
2762 | return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);
|
2763 | }
|
2764 | return false;
|
2765 | });
|
2766 |
|
2767 |
|
2768 | }),
|
2769 |
|
2770 | (function(module, exports) {
|
2771 |
|
2772 | module.exports = (function() {
|
2773 | function XWrap(fn) {
|
2774 | this.f = fn;
|
2775 | }
|
2776 | XWrap.prototype['@@transducer/init'] = function() {
|
2777 | throw new Error('init not implemented on XWrap');
|
2778 | };
|
2779 | XWrap.prototype['@@transducer/result'] = function(acc) { return acc; };
|
2780 | XWrap.prototype['@@transducer/step'] = function(acc, x) {
|
2781 | return this.f(acc, x);
|
2782 | };
|
2783 |
|
2784 | return function _xwrap(fn) { return new XWrap(fn); };
|
2785 | }());
|
2786 |
|
2787 |
|
2788 | }),
|
2789 |
|
2790 | (function(module, exports, __webpack_require__) {
|
2791 |
|
2792 | var _arity = __webpack_require__(6);
|
2793 | var _curry2 = __webpack_require__(0);
|
2794 |
|
2795 |
|
2796 |
|
2797 |
|
2798 |
|
2799 |
|
2800 |
|
2801 |
|
2802 |
|
2803 |
|
2804 |
|
2805 |
|
2806 |
|
2807 |
|
2808 |
|
2809 |
|
2810 |
|
2811 |
|
2812 |
|
2813 |
|
2814 |
|
2815 |
|
2816 |
|
2817 |
|
2818 | module.exports = _curry2(function bind(fn, thisObj) {
|
2819 | return _arity(fn.length, function() {
|
2820 | return fn.apply(thisObj, arguments);
|
2821 | });
|
2822 | });
|
2823 |
|
2824 |
|
2825 | }),
|
2826 |
|
2827 | (function(module, exports, __webpack_require__) {
|
2828 |
|
2829 | var _has = __webpack_require__(7);
|
2830 |
|
2831 |
|
2832 | module.exports = (function() {
|
2833 | var toString = Object.prototype.toString;
|
2834 | return toString.call(arguments) === '[object Arguments]' ?
|
2835 | function _isArguments(x) { return toString.call(x) === '[object Arguments]'; } :
|
2836 | function _isArguments(x) { return _has('callee', x); };
|
2837 | }());
|
2838 |
|
2839 |
|
2840 | }),
|
2841 |
|
2842 | (function(module, exports, __webpack_require__) {
|
2843 |
|
2844 | var _curry1 = __webpack_require__(2);
|
2845 | var _isNumber = __webpack_require__(63);
|
2846 |
|
2847 |
|
2848 |
|
2849 |
|
2850 |
|
2851 |
|
2852 |
|
2853 |
|
2854 |
|
2855 |
|
2856 |
|
2857 |
|
2858 |
|
2859 |
|
2860 |
|
2861 |
|
2862 |
|
2863 | module.exports = _curry1(function length(list) {
|
2864 | return list != null && _isNumber(list.length) ? list.length : NaN;
|
2865 | });
|
2866 |
|
2867 |
|
2868 | }),
|
2869 |
|
2870 | (function(module, exports) {
|
2871 |
|
2872 | module.exports = function _isNumber(x) {
|
2873 | return Object.prototype.toString.call(x) === '[object Number]';
|
2874 | };
|
2875 |
|
2876 |
|
2877 | }),
|
2878 |
|
2879 | (function(module, exports, __webpack_require__) {
|
2880 |
|
2881 | var _arity = __webpack_require__(6);
|
2882 | var _pipe = __webpack_require__(65);
|
2883 | var reduce = __webpack_require__(32);
|
2884 | var tail = __webpack_require__(66);
|
2885 |
|
2886 |
|
2887 |
|
2888 |
|
2889 |
|
2890 |
|
2891 |
|
2892 |
|
2893 |
|
2894 |
|
2895 |
|
2896 |
|
2897 |
|
2898 |
|
2899 |
|
2900 |
|
2901 |
|
2902 |
|
2903 |
|
2904 |
|
2905 |
|
2906 |
|
2907 |
|
2908 |
|
2909 |
|
2910 | module.exports = function pipe() {
|
2911 | if (arguments.length === 0) {
|
2912 | throw new Error('pipe requires at least one argument');
|
2913 | }
|
2914 | return _arity(arguments[0].length,
|
2915 | reduce(_pipe, arguments[0], tail(arguments)));
|
2916 | };
|
2917 |
|
2918 |
|
2919 | }),
|
2920 |
|
2921 | (function(module, exports) {
|
2922 |
|
2923 | module.exports = function _pipe(f, g) {
|
2924 | return function() {
|
2925 | return g.call(this, f.apply(this, arguments));
|
2926 | };
|
2927 | };
|
2928 |
|
2929 |
|
2930 | }),
|
2931 |
|
2932 | (function(module, exports, __webpack_require__) {
|
2933 |
|
2934 | var _checkForMethod = __webpack_require__(35);
|
2935 | var _curry1 = __webpack_require__(2);
|
2936 | var slice = __webpack_require__(67);
|
2937 |
|
2938 |
|
2939 |
|
2940 |
|
2941 |
|
2942 |
|
2943 |
|
2944 |
|
2945 |
|
2946 |
|
2947 |
|
2948 |
|
2949 |
|
2950 |
|
2951 |
|
2952 |
|
2953 |
|
2954 |
|
2955 |
|
2956 |
|
2957 |
|
2958 |
|
2959 |
|
2960 |
|
2961 |
|
2962 |
|
2963 |
|
2964 |
|
2965 |
|
2966 | module.exports = _curry1(_checkForMethod('tail', slice(1, Infinity)));
|
2967 |
|
2968 |
|
2969 | }),
|
2970 |
|
2971 | (function(module, exports, __webpack_require__) {
|
2972 |
|
2973 | var _checkForMethod = __webpack_require__(35);
|
2974 | var _curry3 = __webpack_require__(14);
|
2975 |
|
2976 |
|
2977 |
|
2978 |
|
2979 |
|
2980 |
|
2981 |
|
2982 |
|
2983 |
|
2984 |
|
2985 |
|
2986 |
|
2987 |
|
2988 |
|
2989 |
|
2990 |
|
2991 |
|
2992 |
|
2993 |
|
2994 |
|
2995 |
|
2996 |
|
2997 |
|
2998 |
|
2999 |
|
3000 |
|
3001 | module.exports = _curry3(_checkForMethod('slice', function slice(fromIndex, toIndex, list) {
|
3002 | return Array.prototype.slice.call(list, fromIndex, toIndex);
|
3003 | }));
|
3004 |
|
3005 |
|
3006 | }),
|
3007 |
|
3008 | (function(module, exports, __webpack_require__) {
|
3009 |
|
3010 | var _curry1 = __webpack_require__(2);
|
3011 | var _isString = __webpack_require__(33);
|
3012 |
|
3013 |
|
3014 |
|
3015 |
|
3016 |
|
3017 |
|
3018 |
|
3019 |
|
3020 |
|
3021 |
|
3022 |
|
3023 |
|
3024 |
|
3025 |
|
3026 |
|
3027 |
|
3028 |
|
3029 |
|
3030 |
|
3031 |
|
3032 |
|
3033 |
|
3034 |
|
3035 |
|
3036 |
|
3037 |
|
3038 | module.exports = _curry1(function reverse(list) {
|
3039 | return _isString(list) ? list.split('').reverse().join('') :
|
3040 | Array.prototype.slice.call(list, 0).reverse();
|
3041 | });
|
3042 |
|
3043 |
|
3044 | }),
|
3045 |
|
3046 | (function(module, exports, __webpack_require__) {
|
3047 |
|
3048 | "use strict";
|
3049 |
|
3050 |
|
3051 | exports.__esModule = true;
|
3052 | exports.toUpdate = undefined;
|
3053 |
|
3054 | var _omit = __webpack_require__(25);
|
3055 |
|
3056 | var _omit2 = _interopRequireDefault(_omit);
|
3057 |
|
3058 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
3059 |
|
3060 | var FORM_PROPS = ['name', 'persistent', 'withRef',
|
3061 |
|
3062 | '_form', '_values', '_valid', '_submitting',
|
3063 |
|
3064 | '_addForm', '_removeForm', '_touchAll', '_submitStart', '_submitStop'];
|
3065 | var formProps = function formProps(props) {
|
3066 | return (0, _omit2.default)(FORM_PROPS, props);
|
3067 | };
|
3068 | exports.default = formProps;
|
3069 |
|
3070 | var NOT_TO_UPDATE = ['_values', '_valid', '_submitting'];
|
3071 | var toUpdate = exports.toUpdate = function toUpdate(all) {
|
3072 | return (0, _omit2.default)(NOT_TO_UPDATE, all);
|
3073 | };
|
3074 |
|
3075 | }),
|
3076 |
|
3077 | (function(module, exports, __webpack_require__) {
|
3078 |
|
3079 | var equals = __webpack_require__(71);
|
3080 |
|
3081 |
|
3082 | module.exports = function _indexOf(list, a, idx) {
|
3083 | var inf, item;
|
3084 |
|
3085 | if (typeof list.indexOf === 'function') {
|
3086 | switch (typeof a) {
|
3087 | case 'number':
|
3088 | if (a === 0) {
|
3089 |
|
3090 | inf = 1 / a;
|
3091 | while (idx < list.length) {
|
3092 | item = list[idx];
|
3093 | if (item === 0 && 1 / item === inf) {
|
3094 | return idx;
|
3095 | }
|
3096 | idx += 1;
|
3097 | }
|
3098 | return -1;
|
3099 | } else if (a !== a) {
|
3100 |
|
3101 | while (idx < list.length) {
|
3102 | item = list[idx];
|
3103 | if (typeof item === 'number' && item !== item) {
|
3104 | return idx;
|
3105 | }
|
3106 | idx += 1;
|
3107 | }
|
3108 | return -1;
|
3109 | }
|
3110 |
|
3111 | return list.indexOf(a, idx);
|
3112 |
|
3113 |
|
3114 | case 'string':
|
3115 | case 'boolean':
|
3116 | case 'function':
|
3117 | case 'undefined':
|
3118 | return list.indexOf(a, idx);
|
3119 |
|
3120 | case 'object':
|
3121 | if (a === null) {
|
3122 |
|
3123 | return list.indexOf(a, idx);
|
3124 | }
|
3125 | }
|
3126 | }
|
3127 |
|
3128 | while (idx < list.length) {
|
3129 | if (equals(list[idx], a)) {
|
3130 | return idx;
|
3131 | }
|
3132 | idx += 1;
|
3133 | }
|
3134 | return -1;
|
3135 | };
|
3136 |
|
3137 |
|
3138 | }),
|
3139 |
|
3140 | (function(module, exports, __webpack_require__) {
|
3141 |
|
3142 | var _curry2 = __webpack_require__(0);
|
3143 | var _equals = __webpack_require__(72);
|
3144 |
|
3145 |
|
3146 |
|
3147 |
|
3148 |
|
3149 |
|
3150 |
|
3151 |
|
3152 |
|
3153 |
|
3154 |
|
3155 |
|
3156 |
|
3157 |
|
3158 |
|
3159 |
|
3160 |
|
3161 |
|
3162 |
|
3163 |
|
3164 |
|
3165 |
|
3166 |
|
3167 |
|
3168 |
|
3169 |
|
3170 |
|
3171 | module.exports = _curry2(function equals(a, b) {
|
3172 | return _equals(a, b, [], []);
|
3173 | });
|
3174 |
|
3175 |
|
3176 | }),
|
3177 |
|
3178 | (function(module, exports, __webpack_require__) {
|
3179 |
|
3180 | var _arrayFromIterator = __webpack_require__(73);
|
3181 | var _functionName = __webpack_require__(74);
|
3182 | var _has = __webpack_require__(7);
|
3183 | var identical = __webpack_require__(75);
|
3184 | var keys = __webpack_require__(5);
|
3185 | var type = __webpack_require__(76);
|
3186 |
|
3187 |
|
3188 | module.exports = function _equals(a, b, stackA, stackB) {
|
3189 | if (identical(a, b)) {
|
3190 | return true;
|
3191 | }
|
3192 |
|
3193 | if (type(a) !== type(b)) {
|
3194 | return false;
|
3195 | }
|
3196 |
|
3197 | if (a == null || b == null) {
|
3198 | return false;
|
3199 | }
|
3200 |
|
3201 | if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {
|
3202 | return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) &&
|
3203 | typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);
|
3204 | }
|
3205 |
|
3206 | if (typeof a.equals === 'function' || typeof b.equals === 'function') {
|
3207 | return typeof a.equals === 'function' && a.equals(b) &&
|
3208 | typeof b.equals === 'function' && b.equals(a);
|
3209 | }
|
3210 |
|
3211 | switch (type(a)) {
|
3212 | case 'Arguments':
|
3213 | case 'Array':
|
3214 | case 'Object':
|
3215 | if (typeof a.constructor === 'function' &&
|
3216 | _functionName(a.constructor) === 'Promise') {
|
3217 | return a === b;
|
3218 | }
|
3219 | break;
|
3220 | case 'Boolean':
|
3221 | case 'Number':
|
3222 | case 'String':
|
3223 | if (!(typeof a === typeof b && identical(a.valueOf(), b.valueOf()))) {
|
3224 | return false;
|
3225 | }
|
3226 | break;
|
3227 | case 'Date':
|
3228 | if (!identical(a.valueOf(), b.valueOf())) {
|
3229 | return false;
|
3230 | }
|
3231 | break;
|
3232 | case 'Error':
|
3233 | return a.name === b.name && a.message === b.message;
|
3234 | case 'RegExp':
|
3235 | if (!(a.source === b.source &&
|
3236 | a.global === b.global &&
|
3237 | a.ignoreCase === b.ignoreCase &&
|
3238 | a.multiline === b.multiline &&
|
3239 | a.sticky === b.sticky &&
|
3240 | a.unicode === b.unicode)) {
|
3241 | return false;
|
3242 | }
|
3243 | break;
|
3244 | case 'Map':
|
3245 | case 'Set':
|
3246 | if (!_equals(_arrayFromIterator(a.entries()), _arrayFromIterator(b.entries()), stackA, stackB)) {
|
3247 | return false;
|
3248 | }
|
3249 | break;
|
3250 | case 'Int8Array':
|
3251 | case 'Uint8Array':
|
3252 | case 'Uint8ClampedArray':
|
3253 | case 'Int16Array':
|
3254 | case 'Uint16Array':
|
3255 | case 'Int32Array':
|
3256 | case 'Uint32Array':
|
3257 | case 'Float32Array':
|
3258 | case 'Float64Array':
|
3259 | break;
|
3260 | case 'ArrayBuffer':
|
3261 | break;
|
3262 | default:
|
3263 |
|
3264 | return false;
|
3265 | }
|
3266 |
|
3267 | var keysA = keys(a);
|
3268 | if (keysA.length !== keys(b).length) {
|
3269 | return false;
|
3270 | }
|
3271 |
|
3272 | var idx = stackA.length - 1;
|
3273 | while (idx >= 0) {
|
3274 | if (stackA[idx] === a) {
|
3275 | return stackB[idx] === b;
|
3276 | }
|
3277 | idx -= 1;
|
3278 | }
|
3279 |
|
3280 | stackA.push(a);
|
3281 | stackB.push(b);
|
3282 | idx = keysA.length - 1;
|
3283 | while (idx >= 0) {
|
3284 | var key = keysA[idx];
|
3285 | if (!(_has(key, b) && _equals(b[key], a[key], stackA, stackB))) {
|
3286 | return false;
|
3287 | }
|
3288 | idx -= 1;
|
3289 | }
|
3290 | stackA.pop();
|
3291 | stackB.pop();
|
3292 | return true;
|
3293 | };
|
3294 |
|
3295 |
|
3296 | }),
|
3297 |
|
3298 | (function(module, exports) {
|
3299 |
|
3300 | module.exports = function _arrayFromIterator(iter) {
|
3301 | var list = [];
|
3302 | var next;
|
3303 | while (!(next = iter.next()).done) {
|
3304 | list.push(next.value);
|
3305 | }
|
3306 | return list;
|
3307 | };
|
3308 |
|
3309 |
|
3310 | }),
|
3311 |
|
3312 | (function(module, exports) {
|
3313 |
|
3314 | module.exports = function _functionName(f) {
|
3315 |
|
3316 | var match = String(f).match(/^function (\w*)/);
|
3317 | return match == null ? '' : match[1];
|
3318 | };
|
3319 |
|
3320 |
|
3321 | }),
|
3322 |
|
3323 | (function(module, exports, __webpack_require__) {
|
3324 |
|
3325 | var _curry2 = __webpack_require__(0);
|
3326 |
|
3327 |
|
3328 |
|
3329 |
|
3330 |
|
3331 |
|
3332 |
|
3333 |
|
3334 |
|
3335 |
|
3336 |
|
3337 |
|
3338 |
|
3339 |
|
3340 |
|
3341 |
|
3342 |
|
3343 |
|
3344 |
|
3345 |
|
3346 |
|
3347 |
|
3348 |
|
3349 |
|
3350 |
|
3351 | module.exports = _curry2(function identical(a, b) {
|
3352 |
|
3353 | if (a === b) {
|
3354 |
|
3355 | return a !== 0 || 1 / a === 1 / b;
|
3356 | } else {
|
3357 |
|
3358 | return a !== a && b !== b;
|
3359 | }
|
3360 | });
|
3361 |
|
3362 |
|
3363 | }),
|
3364 |
|
3365 | (function(module, exports, __webpack_require__) {
|
3366 |
|
3367 | var _curry1 = __webpack_require__(2);
|
3368 |
|
3369 |
|
3370 |
|
3371 |
|
3372 |
|
3373 |
|
3374 |
|
3375 |
|
3376 |
|
3377 |
|
3378 |
|
3379 |
|
3380 |
|
3381 |
|
3382 |
|
3383 |
|
3384 |
|
3385 |
|
3386 |
|
3387 |
|
3388 |
|
3389 |
|
3390 |
|
3391 |
|
3392 |
|
3393 |
|
3394 | module.exports = _curry1(function type(val) {
|
3395 | return val === null ? 'Null' :
|
3396 | val === undefined ? 'Undefined' :
|
3397 | Object.prototype.toString.call(val).slice(8, -1);
|
3398 | });
|
3399 |
|
3400 |
|
3401 | }),
|
3402 |
|
3403 | (function(module, exports, __webpack_require__) {
|
3404 |
|
3405 | "use strict";
|
3406 |
|
3407 |
|
3408 | exports.__esModule = true;
|
3409 | var ADD_FORM = exports.ADD_FORM = '@@redux-forms/ADD_FORM';
|
3410 | var REMOVE_FORM = exports.REMOVE_FORM = '@@redux-forms/REMOVE_FORM';
|
3411 | var ADD_FIELD = exports.ADD_FIELD = '@@redux-forms/ADD_FIELD';
|
3412 | var REMOVE_FIELD = exports.REMOVE_FIELD = '@@redux-forms/REMOVE_FIELD';
|
3413 | var TOUCH_ALL = exports.TOUCH_ALL = '@@redux-forms/TOUCH_ALL';
|
3414 | var SUBMIT_START = exports.SUBMIT_START = '@@redux-forms/SUBMIT_START';
|
3415 | var SUBMIT_STOP = exports.SUBMIT_STOP = '@@redux-forms/SUBMIT_STOP';
|
3416 | var ADD_ARRAY = exports.ADD_ARRAY = '@@redux-forms/ADD_ARRAY';
|
3417 | var REMOVE_ARRAY = exports.REMOVE_ARRAY = '@@redux-forms/REMOVE_ARRAY';
|
3418 | var ARRAY_PUSH = exports.ARRAY_PUSH = '@@redux-forms/ARRAY_PUSH';
|
3419 | var ARRAY_POP = exports.ARRAY_POP = '@@redux-forms/ARRAY_POP';
|
3420 | var ARRAY_UNSHIFT = exports.ARRAY_UNSHIFT = '@@redux-forms/ARRAY_UNSHIFT';
|
3421 | var ARRAY_SHIFT = exports.ARRAY_SHIFT = '@@redux-forms/ARRAY_SHIFT';
|
3422 | var ARRAY_INSERT = exports.ARRAY_INSERT = '@@redux-forms/ARRAY_INSERT';
|
3423 | var ARRAY_REMOVE = exports.ARRAY_REMOVE = '@@redux-forms/ARRAY_REMOVE';
|
3424 | var ARRAY_SWAP = exports.ARRAY_SWAP = '@@redux-forms/ARRAY_SWAP';
|
3425 | var ARRAY_MOVE = exports.ARRAY_MOVE = '@@redux-forms/ARRAY_MOVE';
|
3426 | var FIELD_CHANGE = exports.FIELD_CHANGE = '@@redux-forms/FIELD_CHANGE';
|
3427 | var FIELD_FOCUS = exports.FIELD_FOCUS = '@@redux-forms/FIELD_FOCUS';
|
3428 | var FIELD_BLUR = exports.FIELD_BLUR = '@@redux-forms/FIELD_BLUR';
|
3429 | var FIELD_VALUE = exports.FIELD_VALUE = '@@redux-forms/FIELD_VALUE';
|
3430 | var FIELD_ERROR = exports.FIELD_ERROR = '@@redux-forms/FIELD_ERROR';
|
3431 | var FIELD_DIRTY = exports.FIELD_DIRTY = '@@redux-forms/FIELD_DIRTY';
|
3432 | var addForm = exports.addForm = function addForm(name) {
|
3433 | return {
|
3434 | type: ADD_FORM,
|
3435 | payload: { name: name }
|
3436 | };
|
3437 | };
|
3438 | var removeForm = exports.removeForm = function removeForm(name) {
|
3439 | return {
|
3440 | type: REMOVE_FORM,
|
3441 | payload: { name: name }
|
3442 | };
|
3443 | };
|
3444 | var addField = exports.addField = function addField(form, id, field) {
|
3445 | return {
|
3446 | type: ADD_FIELD,
|
3447 | payload: { form: form, id: id, field: field }
|
3448 | };
|
3449 | };
|
3450 | var removeField = exports.removeField = function removeField(form, id) {
|
3451 | return {
|
3452 | type: REMOVE_FIELD,
|
3453 | payload: { form: form, id: id }
|
3454 | };
|
3455 | };
|
3456 | var touchAll = exports.touchAll = function touchAll(form) {
|
3457 | return {
|
3458 | type: TOUCH_ALL,
|
3459 | payload: { form: form }
|
3460 | };
|
3461 | };
|
3462 | var submitStart = exports.submitStart = function submitStart(form) {
|
3463 | return {
|
3464 | type: SUBMIT_START,
|
3465 | payload: { form: form }
|
3466 | };
|
3467 | };
|
3468 | var submitStop = exports.submitStop = function submitStop(form) {
|
3469 | return {
|
3470 | type: SUBMIT_STOP,
|
3471 | payload: { form: form }
|
3472 | };
|
3473 | };
|
3474 | var addArray = exports.addArray = function addArray(form, id) {
|
3475 | return {
|
3476 | type: ADD_ARRAY,
|
3477 | payload: { form: form, id: id }
|
3478 | };
|
3479 | };
|
3480 | var removeArray = exports.removeArray = function removeArray(form, id) {
|
3481 | return {
|
3482 | type: REMOVE_ARRAY,
|
3483 | payload: { form: form, id: id }
|
3484 | };
|
3485 | };
|
3486 | var arrayPush = exports.arrayPush = function arrayPush(form, id) {
|
3487 | return {
|
3488 | type: ARRAY_PUSH,
|
3489 | payload: { form: form, id: id }
|
3490 | };
|
3491 | };
|
3492 | var arrayPop = exports.arrayPop = function arrayPop(form, id) {
|
3493 | return {
|
3494 | type: ARRAY_POP,
|
3495 | payload: { form: form, id: id }
|
3496 | };
|
3497 | };
|
3498 | var arrayUnshift = exports.arrayUnshift = function arrayUnshift(form, id) {
|
3499 | return {
|
3500 | type: ARRAY_UNSHIFT,
|
3501 | payload: { form: form, id: id }
|
3502 | };
|
3503 | };
|
3504 | var arrayShift = exports.arrayShift = function arrayShift(form, id) {
|
3505 | return {
|
3506 | type: ARRAY_SHIFT,
|
3507 | payload: { form: form, id: id }
|
3508 | };
|
3509 | };
|
3510 | var arrayInsert = exports.arrayInsert = function arrayInsert(form, id, index) {
|
3511 | return {
|
3512 | type: ARRAY_INSERT,
|
3513 | payload: { form: form, id: id, index: index }
|
3514 | };
|
3515 | };
|
3516 | var arrayRemove = exports.arrayRemove = function arrayRemove(form, id, index) {
|
3517 | return {
|
3518 | type: ARRAY_REMOVE,
|
3519 | payload: { form: form, id: id, index: index }
|
3520 | };
|
3521 | };
|
3522 | var arraySwap = exports.arraySwap = function arraySwap(form, id, index1, index2) {
|
3523 | return {
|
3524 | type: ARRAY_SWAP,
|
3525 | payload: { form: form, id: id, index1: index1, index2: index2 }
|
3526 | };
|
3527 | };
|
3528 | var arrayMove = exports.arrayMove = function arrayMove(form, id, from, to) {
|
3529 | return {
|
3530 | type: ARRAY_MOVE,
|
3531 | payload: { form: form, id: id, from: from, to: to }
|
3532 | };
|
3533 | };
|
3534 | var fieldChange = exports.fieldChange = function fieldChange(form, field, value, error, dirty) {
|
3535 | return {
|
3536 | type: FIELD_CHANGE,
|
3537 | payload: { form: form, field: field, value: value, error: error, dirty: dirty }
|
3538 | };
|
3539 | };
|
3540 | var fieldFocus = exports.fieldFocus = function fieldFocus(form, field) {
|
3541 | return {
|
3542 | type: FIELD_FOCUS,
|
3543 | payload: { form: form, field: field }
|
3544 | };
|
3545 | };
|
3546 | var fieldBlur = exports.fieldBlur = function fieldBlur(form, field, value, error, dirty) {
|
3547 | return {
|
3548 | type: FIELD_BLUR,
|
3549 | payload: { form: form, field: field, value: value, error: error, dirty: dirty }
|
3550 | };
|
3551 | };
|
3552 | var fieldValue = exports.fieldValue = function fieldValue(form, field, value) {
|
3553 | return {
|
3554 | type: FIELD_VALUE,
|
3555 | payload: { form: form, field: field, value: value }
|
3556 | };
|
3557 | };
|
3558 | var fieldError = exports.fieldError = function fieldError(form, field, error) {
|
3559 | return {
|
3560 | type: FIELD_ERROR,
|
3561 | payload: { form: form, field: field, error: error }
|
3562 | };
|
3563 | };
|
3564 | var fieldDirty = exports.fieldDirty = function fieldDirty(form, field, dirty) {
|
3565 | return {
|
3566 | type: FIELD_DIRTY,
|
3567 | payload: { form: form, field: field, dirty: dirty }
|
3568 | };
|
3569 | };
|
3570 |
|
3571 | }),
|
3572 |
|
3573 | (function(module, exports, __webpack_require__) {
|
3574 |
|
3575 | module.exports = __webpack_require__(79);
|
3576 |
|
3577 |
|
3578 | }),
|
3579 |
|
3580 | (function(module, exports, __webpack_require__) {
|
3581 |
|
3582 | "use strict";
|
3583 |
|
3584 |
|
3585 | exports.__esModule = true;
|
3586 |
|
3587 | var _any = __webpack_require__(37);
|
3588 |
|
3589 | var _any2 = _interopRequireDefault(_any);
|
3590 |
|
3591 | var _none = __webpack_require__(82);
|
3592 |
|
3593 | var _none2 = _interopRequireDefault(_none);
|
3594 |
|
3595 | var _values = __webpack_require__(83);
|
3596 |
|
3597 | var _values2 = _interopRequireDefault(_values);
|
3598 |
|
3599 | var _path = __webpack_require__(84);
|
3600 |
|
3601 | var _path2 = _interopRequireDefault(_path);
|
3602 |
|
3603 | var _prop = __webpack_require__(22);
|
3604 |
|
3605 | var _prop2 = _interopRequireDefault(_prop);
|
3606 |
|
3607 | var _map = __webpack_require__(40);
|
3608 |
|
3609 | var _map2 = _interopRequireDefault(_map);
|
3610 |
|
3611 | var _compose = __webpack_require__(34);
|
3612 |
|
3613 | var _compose2 = _interopRequireDefault(_compose);
|
3614 |
|
3615 | var _memoize = __webpack_require__(88);
|
3616 |
|
3617 | var _memoize2 = _interopRequireDefault(_memoize);
|
3618 |
|
3619 | exports.getValues = getValues;
|
3620 | exports.getErrors = getErrors;
|
3621 | exports.isValid = isValid;
|
3622 | exports.isTouched = isTouched;
|
3623 | exports.isDirty = isDirty;
|
3624 | exports.isSubmitting = isSubmitting;
|
3625 |
|
3626 | var _helpers = __webpack_require__(4);
|
3627 |
|
3628 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
3629 |
|
3630 | var EMPTY = {};
|
3631 | var memUnflatten = (0, _memoize2.default)(_helpers.unflatten);
|
3632 | var memValue = (0, _memoize2.default)((0, _compose2.default)(memUnflatten, (0, _map2.default)((0, _prop2.default)('value'))));
|
3633 | function getValues(name, state) {
|
3634 | var form = (0, _path2.default)(['reduxForms', name], state);
|
3635 | if (!form) {
|
3636 | return EMPTY;
|
3637 | }
|
3638 | return memValue(form.fields);
|
3639 | }
|
3640 | var memError = (0, _memoize2.default)((0, _compose2.default)(memUnflatten, (0, _map2.default)((0, _prop2.default)('error'))));
|
3641 | function getErrors(name, state) {
|
3642 | var form = (0, _path2.default)(['reduxForms', name], state);
|
3643 | if (!form) {
|
3644 | return EMPTY;
|
3645 | }
|
3646 | return memError(form.fields);
|
3647 | }
|
3648 | var memValues = (0, _memoize2.default)(_values2.default);
|
3649 | var memValid = (0, _memoize2.default)((0, _compose2.default)((0, _none2.default)(Boolean), memValues, (0, _map2.default)((0, _prop2.default)('error'))));
|
3650 | function isValid(name, state) {
|
3651 | var form = (0, _path2.default)(['reduxForms', name], state);
|
3652 | if (!form) {
|
3653 | return false;
|
3654 | }
|
3655 | return memValid(form.fields);
|
3656 | }
|
3657 | var memTouched = (0, _memoize2.default)((0, _compose2.default)((0, _any2.default)(Boolean), memValues, (0, _map2.default)((0, _prop2.default)('touched'))));
|
3658 | function isTouched(name, state) {
|
3659 | var form = (0, _path2.default)(['reduxForms', name], state);
|
3660 | if (!form) {
|
3661 | return false;
|
3662 | }
|
3663 | return memTouched(form.fields);
|
3664 | }
|
3665 | var memDirty = (0, _memoize2.default)((0, _compose2.default)((0, _any2.default)(Boolean), memValues, (0, _map2.default)((0, _prop2.default)('dirty'))));
|
3666 | function isDirty(name, state) {
|
3667 | var form = (0, _path2.default)(['reduxForms', name], state);
|
3668 | if (!form) {
|
3669 | return false;
|
3670 | }
|
3671 | return memDirty(form.fields);
|
3672 | }
|
3673 | function isSubmitting(name, state) {
|
3674 | var form = (0, _path2.default)(['reduxForms', name], state);
|
3675 | if (!form) {
|
3676 | return false;
|
3677 | }
|
3678 | return form.submitting;
|
3679 | }
|
3680 |
|
3681 | }),
|
3682 |
|
3683 | (function(module, exports) {
|
3684 |
|
3685 | module.exports = function _isTransformer(obj) {
|
3686 | return typeof obj['@@transducer/step'] === 'function';
|
3687 | };
|
3688 |
|
3689 |
|
3690 | }),
|
3691 |
|
3692 | (function(module, exports) {
|
3693 |
|
3694 | module.exports = function _reduced(x) {
|
3695 | return x && x['@@transducer/reduced'] ? x :
|
3696 | {
|
3697 | '@@transducer/value': x,
|
3698 | '@@transducer/reduced': true
|
3699 | };
|
3700 | };
|
3701 |
|
3702 |
|
3703 | }),
|
3704 |
|
3705 | (function(module, exports, __webpack_require__) {
|
3706 |
|
3707 | var _complement = __webpack_require__(39);
|
3708 | var _curry2 = __webpack_require__(0);
|
3709 | var _dispatchable = __webpack_require__(15);
|
3710 | var _xany = __webpack_require__(38);
|
3711 | var any = __webpack_require__(37);
|
3712 |
|
3713 |
|
3714 |
|
3715 |
|
3716 |
|
3717 |
|
3718 |
|
3719 |
|
3720 |
|
3721 |
|
3722 |
|
3723 |
|
3724 |
|
3725 |
|
3726 |
|
3727 |
|
3728 |
|
3729 |
|
3730 |
|
3731 |
|
3732 |
|
3733 |
|
3734 |
|
3735 |
|
3736 | module.exports = _curry2(_complement(_dispatchable(['any'], _xany, any)));
|
3737 |
|
3738 |
|
3739 | }),
|
3740 |
|
3741 | (function(module, exports, __webpack_require__) {
|
3742 |
|
3743 | var _curry1 = __webpack_require__(2);
|
3744 | var keys = __webpack_require__(5);
|
3745 |
|
3746 |
|
3747 |
|
3748 |
|
3749 |
|
3750 |
|
3751 |
|
3752 |
|
3753 |
|
3754 |
|
3755 |
|
3756 |
|
3757 |
|
3758 |
|
3759 |
|
3760 |
|
3761 |
|
3762 |
|
3763 |
|
3764 | module.exports = _curry1(function values(obj) {
|
3765 | var props = keys(obj);
|
3766 | var len = props.length;
|
3767 | var vals = [];
|
3768 | var idx = 0;
|
3769 | while (idx < len) {
|
3770 | vals[idx] = obj[props[idx]];
|
3771 | idx += 1;
|
3772 | }
|
3773 | return vals;
|
3774 | });
|
3775 |
|
3776 |
|
3777 | }),
|
3778 |
|
3779 | (function(module, exports, __webpack_require__) {
|
3780 |
|
3781 | var _curry2 = __webpack_require__(0);
|
3782 |
|
3783 |
|
3784 |
|
3785 |
|
3786 |
|
3787 |
|
3788 |
|
3789 |
|
3790 |
|
3791 |
|
3792 |
|
3793 |
|
3794 |
|
3795 |
|
3796 |
|
3797 |
|
3798 |
|
3799 |
|
3800 |
|
3801 |
|
3802 | module.exports = _curry2(function path(paths, obj) {
|
3803 | var val = obj;
|
3804 | var idx = 0;
|
3805 | while (idx < paths.length) {
|
3806 | if (val == null) {
|
3807 | return;
|
3808 | }
|
3809 | val = val[paths[idx]];
|
3810 | idx += 1;
|
3811 | }
|
3812 | return val;
|
3813 | });
|
3814 |
|
3815 |
|
3816 | }),
|
3817 |
|
3818 | (function(module, exports, __webpack_require__) {
|
3819 |
|
3820 | var _curry2 = __webpack_require__(0);
|
3821 | var _xfBase = __webpack_require__(27);
|
3822 |
|
3823 |
|
3824 | module.exports = (function() {
|
3825 | function XMap(f, xf) {
|
3826 | this.xf = xf;
|
3827 | this.f = f;
|
3828 | }
|
3829 | XMap.prototype['@@transducer/init'] = _xfBase.init;
|
3830 | XMap.prototype['@@transducer/result'] = _xfBase.result;
|
3831 | XMap.prototype['@@transducer/step'] = function(result, input) {
|
3832 | return this.xf['@@transducer/step'](result, this.f(input));
|
3833 | };
|
3834 |
|
3835 | return _curry2(function _xmap(f, xf) { return new XMap(f, xf); });
|
3836 | }());
|
3837 |
|
3838 |
|
3839 | }),
|
3840 |
|
3841 | (function(module, exports, __webpack_require__) {
|
3842 |
|
3843 | var _arity = __webpack_require__(6);
|
3844 | var _curry1 = __webpack_require__(2);
|
3845 | var _curry2 = __webpack_require__(0);
|
3846 | var _curryN = __webpack_require__(87);
|
3847 |
|
3848 |
|
3849 |
|
3850 |
|
3851 |
|
3852 |
|
3853 |
|
3854 |
|
3855 |
|
3856 |
|
3857 |
|
3858 |
|
3859 |
|
3860 |
|
3861 |
|
3862 |
|
3863 |
|
3864 |
|
3865 |
|
3866 |
|
3867 |
|
3868 |
|
3869 |
|
3870 |
|
3871 |
|
3872 |
|
3873 |
|
3874 |
|
3875 |
|
3876 |
|
3877 |
|
3878 |
|
3879 |
|
3880 |
|
3881 |
|
3882 |
|
3883 |
|
3884 |
|
3885 |
|
3886 |
|
3887 |
|
3888 |
|
3889 |
|
3890 |
|
3891 | module.exports = _curry2(function curryN(length, fn) {
|
3892 | if (length === 1) {
|
3893 | return _curry1(fn);
|
3894 | }
|
3895 | return _arity(length, _curryN(length, [], fn));
|
3896 | });
|
3897 |
|
3898 |
|
3899 | }),
|
3900 |
|
3901 | (function(module, exports, __webpack_require__) {
|
3902 |
|
3903 | var _arity = __webpack_require__(6);
|
3904 | var _isPlaceholder = __webpack_require__(13);
|
3905 |
|
3906 |
|
3907 |
|
3908 |
|
3909 |
|
3910 |
|
3911 |
|
3912 |
|
3913 |
|
3914 |
|
3915 |
|
3916 |
|
3917 | module.exports = function _curryN(length, received, fn) {
|
3918 | return function() {
|
3919 | var combined = [];
|
3920 | var argsIdx = 0;
|
3921 | var left = length;
|
3922 | var combinedIdx = 0;
|
3923 | while (combinedIdx < received.length || argsIdx < arguments.length) {
|
3924 | var result;
|
3925 | if (combinedIdx < received.length &&
|
3926 | (!_isPlaceholder(received[combinedIdx]) ||
|
3927 | argsIdx >= arguments.length)) {
|
3928 | result = received[combinedIdx];
|
3929 | } else {
|
3930 | result = arguments[argsIdx];
|
3931 | argsIdx += 1;
|
3932 | }
|
3933 | combined[combinedIdx] = result;
|
3934 | if (!_isPlaceholder(result)) {
|
3935 | left -= 1;
|
3936 | }
|
3937 | combinedIdx += 1;
|
3938 | }
|
3939 | return left <= 0 ? fn.apply(this, combined)
|
3940 | : _arity(left, _curryN(length, combined, fn));
|
3941 | };
|
3942 | };
|
3943 |
|
3944 |
|
3945 | }),
|
3946 |
|
3947 | (function(module, exports, __webpack_require__) {
|
3948 |
|
3949 | var memoizeWith = __webpack_require__(89);
|
3950 | var toString = __webpack_require__(90);
|
3951 |
|
3952 |
|
3953 |
|
3954 |
|
3955 |
|
3956 |
|
3957 |
|
3958 |
|
3959 |
|
3960 |
|
3961 |
|
3962 |
|
3963 |
|
3964 |
|
3965 |
|
3966 |
|
3967 |
|
3968 |
|
3969 |
|
3970 |
|
3971 |
|
3972 |
|
3973 |
|
3974 |
|
3975 |
|
3976 |
|
3977 |
|
3978 |
|
3979 |
|
3980 | module.exports = memoizeWith(function() {
|
3981 | return toString(arguments);
|
3982 | });
|
3983 |
|
3984 |
|
3985 | }),
|
3986 |
|
3987 | (function(module, exports, __webpack_require__) {
|
3988 |
|
3989 | var _arity = __webpack_require__(6);
|
3990 | var _curry2 = __webpack_require__(0);
|
3991 | var _has = __webpack_require__(7);
|
3992 |
|
3993 |
|
3994 |
|
3995 |
|
3996 |
|
3997 |
|
3998 |
|
3999 |
|
4000 |
|
4001 |
|
4002 |
|
4003 |
|
4004 |
|
4005 |
|
4006 |
|
4007 |
|
4008 |
|
4009 |
|
4010 |
|
4011 |
|
4012 |
|
4013 |
|
4014 |
|
4015 |
|
4016 |
|
4017 |
|
4018 |
|
4019 |
|
4020 |
|
4021 |
|
4022 |
|
4023 | module.exports = _curry2(function memoizeWith(mFn, fn) {
|
4024 | var cache = {};
|
4025 | return _arity(fn.length, function() {
|
4026 | var key = mFn.apply(this, arguments);
|
4027 | if (!_has(key, cache)) {
|
4028 | cache[key] = fn.apply(this, arguments);
|
4029 | }
|
4030 | return cache[key];
|
4031 | });
|
4032 | });
|
4033 |
|
4034 |
|
4035 | }),
|
4036 |
|
4037 | (function(module, exports, __webpack_require__) {
|
4038 |
|
4039 | var _curry1 = __webpack_require__(2);
|
4040 | var _toString = __webpack_require__(91);
|
4041 |
|
4042 |
|
4043 |
|
4044 |
|
4045 |
|
4046 |
|
4047 |
|
4048 |
|
4049 |
|
4050 |
|
4051 |
|
4052 |
|
4053 |
|
4054 |
|
4055 |
|
4056 |
|
4057 |
|
4058 |
|
4059 |
|
4060 |
|
4061 |
|
4062 |
|
4063 |
|
4064 |
|
4065 |
|
4066 |
|
4067 |
|
4068 |
|
4069 |
|
4070 |
|
4071 |
|
4072 |
|
4073 |
|
4074 |
|
4075 |
|
4076 |
|
4077 |
|
4078 |
|
4079 | module.exports = _curry1(function toString(val) { return _toString(val, []); });
|
4080 |
|
4081 |
|
4082 | }),
|
4083 |
|
4084 | (function(module, exports, __webpack_require__) {
|
4085 |
|
4086 | var _contains = __webpack_require__(36);
|
4087 | var _map = __webpack_require__(41);
|
4088 | var _quote = __webpack_require__(92);
|
4089 | var _toISOString = __webpack_require__(93);
|
4090 | var keys = __webpack_require__(5);
|
4091 | var reject = __webpack_require__(94);
|
4092 |
|
4093 |
|
4094 | module.exports = function _toString(x, seen) {
|
4095 | var recur = function recur(y) {
|
4096 | var xs = seen.concat([x]);
|
4097 | return _contains(y, xs) ? '<Circular>' : _toString(y, xs);
|
4098 | };
|
4099 |
|
4100 |
|
4101 | var mapPairs = function(obj, keys) {
|
4102 | return _map(function(k) { return _quote(k) + ': ' + recur(obj[k]); }, keys.slice().sort());
|
4103 | };
|
4104 |
|
4105 | switch (Object.prototype.toString.call(x)) {
|
4106 | case '[object Arguments]':
|
4107 | return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))';
|
4108 | case '[object Array]':
|
4109 | return '[' + _map(recur, x).concat(mapPairs(x, reject(function(k) { return /^\d+$/.test(k); }, keys(x)))).join(', ') + ']';
|
4110 | case '[object Boolean]':
|
4111 | return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString();
|
4112 | case '[object Date]':
|
4113 | return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')';
|
4114 | case '[object Null]':
|
4115 | return 'null';
|
4116 | case '[object Number]':
|
4117 | return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10);
|
4118 | case '[object String]':
|
4119 | return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x);
|
4120 | case '[object Undefined]':
|
4121 | return 'undefined';
|
4122 | default:
|
4123 | if (typeof x.toString === 'function') {
|
4124 | var repr = x.toString();
|
4125 | if (repr !== '[object Object]') {
|
4126 | return repr;
|
4127 | }
|
4128 | }
|
4129 | return '{' + mapPairs(x, keys(x)).join(', ') + '}';
|
4130 | }
|
4131 | };
|
4132 |
|
4133 |
|
4134 | }),
|
4135 |
|
4136 | (function(module, exports) {
|
4137 |
|
4138 | module.exports = function _quote(s) {
|
4139 | var escaped = s
|
4140 | .replace(/\\/g, '\\\\')
|
4141 | .replace(/[\b]/g, '\\b')
|
4142 | .replace(/\f/g, '\\f')
|
4143 | .replace(/\n/g, '\\n')
|
4144 | .replace(/\r/g, '\\r')
|
4145 | .replace(/\t/g, '\\t')
|
4146 | .replace(/\v/g, '\\v')
|
4147 | .replace(/\0/g, '\\0');
|
4148 |
|
4149 | return '"' + escaped.replace(/"/g, '\\"') + '"';
|
4150 | };
|
4151 |
|
4152 |
|
4153 | }),
|
4154 |
|
4155 | (function(module, exports) {
|
4156 |
|
4157 |
|
4158 |
|
4159 |
|
4160 | module.exports = (function() {
|
4161 | var pad = function pad(n) { return (n < 10 ? '0' : '') + n; };
|
4162 |
|
4163 | return typeof Date.prototype.toISOString === 'function' ?
|
4164 | function _toISOString(d) {
|
4165 | return d.toISOString();
|
4166 | } :
|
4167 | function _toISOString(d) {
|
4168 | return (
|
4169 | d.getUTCFullYear() + '-' +
|
4170 | pad(d.getUTCMonth() + 1) + '-' +
|
4171 | pad(d.getUTCDate()) + 'T' +
|
4172 | pad(d.getUTCHours()) + ':' +
|
4173 | pad(d.getUTCMinutes()) + ':' +
|
4174 | pad(d.getUTCSeconds()) + '.' +
|
4175 | (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z'
|
4176 | );
|
4177 | };
|
4178 | }());
|
4179 |
|
4180 |
|
4181 | }),
|
4182 |
|
4183 | (function(module, exports, __webpack_require__) {
|
4184 |
|
4185 | var _complement = __webpack_require__(39);
|
4186 | var _curry2 = __webpack_require__(0);
|
4187 | var filter = __webpack_require__(95);
|
4188 |
|
4189 |
|
4190 |
|
4191 |
|
4192 |
|
4193 |
|
4194 |
|
4195 |
|
4196 |
|
4197 |
|
4198 |
|
4199 |
|
4200 |
|
4201 |
|
4202 |
|
4203 |
|
4204 |
|
4205 |
|
4206 |
|
4207 |
|
4208 |
|
4209 |
|
4210 |
|
4211 |
|
4212 |
|
4213 |
|
4214 | module.exports = _curry2(function reject(pred, filterable) {
|
4215 | return filter(_complement(pred), filterable);
|
4216 | });
|
4217 |
|
4218 |
|
4219 | }),
|
4220 |
|
4221 | (function(module, exports, __webpack_require__) {
|
4222 |
|
4223 | var _curry2 = __webpack_require__(0);
|
4224 | var _dispatchable = __webpack_require__(15);
|
4225 | var _filter = __webpack_require__(96);
|
4226 | var _isObject = __webpack_require__(97);
|
4227 | var _reduce = __webpack_require__(23);
|
4228 | var _xfilter = __webpack_require__(98);
|
4229 | var keys = __webpack_require__(5);
|
4230 |
|
4231 |
|
4232 |
|
4233 |
|
4234 |
|
4235 |
|
4236 |
|
4237 |
|
4238 |
|
4239 |
|
4240 |
|
4241 |
|
4242 |
|
4243 |
|
4244 |
|
4245 |
|
4246 |
|
4247 |
|
4248 |
|
4249 |
|
4250 |
|
4251 |
|
4252 |
|
4253 |
|
4254 |
|
4255 |
|
4256 |
|
4257 |
|
4258 |
|
4259 | module.exports = _curry2(_dispatchable(['filter'], _xfilter, function(pred, filterable) {
|
4260 | return (
|
4261 | _isObject(filterable) ?
|
4262 | _reduce(function(acc, key) {
|
4263 | if (pred(filterable[key])) {
|
4264 | acc[key] = filterable[key];
|
4265 | }
|
4266 | return acc;
|
4267 | }, {}, keys(filterable)) :
|
4268 |
|
4269 | _filter(pred, filterable)
|
4270 | );
|
4271 | }));
|
4272 |
|
4273 |
|
4274 | }),
|
4275 |
|
4276 | (function(module, exports) {
|
4277 |
|
4278 | module.exports = function _filter(fn, list) {
|
4279 | var idx = 0;
|
4280 | var len = list.length;
|
4281 | var result = [];
|
4282 |
|
4283 | while (idx < len) {
|
4284 | if (fn(list[idx])) {
|
4285 | result[result.length] = list[idx];
|
4286 | }
|
4287 | idx += 1;
|
4288 | }
|
4289 | return result;
|
4290 | };
|
4291 |
|
4292 |
|
4293 | }),
|
4294 |
|
4295 | (function(module, exports) {
|
4296 |
|
4297 | module.exports = function _isObject(x) {
|
4298 | return Object.prototype.toString.call(x) === '[object Object]';
|
4299 | };
|
4300 |
|
4301 |
|
4302 | }),
|
4303 |
|
4304 | (function(module, exports, __webpack_require__) {
|
4305 |
|
4306 | var _curry2 = __webpack_require__(0);
|
4307 | var _xfBase = __webpack_require__(27);
|
4308 |
|
4309 |
|
4310 | module.exports = (function() {
|
4311 | function XFilter(f, xf) {
|
4312 | this.xf = xf;
|
4313 | this.f = f;
|
4314 | }
|
4315 | XFilter.prototype['@@transducer/init'] = _xfBase.init;
|
4316 | XFilter.prototype['@@transducer/result'] = _xfBase.result;
|
4317 | XFilter.prototype['@@transducer/step'] = function(result, input) {
|
4318 | return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;
|
4319 | };
|
4320 |
|
4321 | return _curry2(function _xfilter(f, xf) { return new XFilter(f, xf); });
|
4322 | }());
|
4323 |
|
4324 |
|
4325 | }),
|
4326 |
|
4327 | (function(module, exports, __webpack_require__) {
|
4328 |
|
4329 | "use strict";
|
4330 |
|
4331 |
|
4332 | exports.__esModule = true;
|
4333 |
|
4334 | var _path = __webpack_require__(42);
|
4335 |
|
4336 | var _path2 = _interopRequireDefault(_path);
|
4337 |
|
4338 | var _identity = __webpack_require__(30);
|
4339 |
|
4340 | var _identity2 = _interopRequireDefault(_identity);
|
4341 |
|
4342 | var _merge = __webpack_require__(10);
|
4343 |
|
4344 | var _merge2 = _interopRequireDefault(_merge);
|
4345 |
|
4346 | var _lensProp = __webpack_require__(100);
|
4347 |
|
4348 | var _lensProp2 = _interopRequireDefault(_lensProp);
|
4349 |
|
4350 | var _set = __webpack_require__(114);
|
4351 |
|
4352 | var _set2 = _interopRequireDefault(_set);
|
4353 |
|
4354 | var _compose = __webpack_require__(116);
|
4355 |
|
4356 | var _compose2 = _interopRequireDefault(_compose);
|
4357 |
|
4358 | var _not = __webpack_require__(123);
|
4359 |
|
4360 | var _not2 = _interopRequireDefault(_not);
|
4361 |
|
4362 | var _react = __webpack_require__(11);
|
4363 |
|
4364 | var React = _interopRequireWildcard(_react);
|
4365 |
|
4366 | var _propTypes = __webpack_require__(12);
|
4367 |
|
4368 | var PropTypes = _interopRequireWildcard(_propTypes);
|
4369 |
|
4370 | var _reactRedux = __webpack_require__(21);
|
4371 |
|
4372 | var _containers = __webpack_require__(124);
|
4373 |
|
4374 | var containers = _interopRequireWildcard(_containers);
|
4375 |
|
4376 | var _fieldProps2 = __webpack_require__(125);
|
4377 |
|
4378 | var _fieldProps3 = _interopRequireDefault(_fieldProps2);
|
4379 |
|
4380 | var _getValue = __webpack_require__(134);
|
4381 |
|
4382 | var _getValue2 = _interopRequireDefault(_getValue);
|
4383 |
|
4384 | var _helpers = __webpack_require__(4);
|
4385 |
|
4386 | var _actions = __webpack_require__(26);
|
4387 |
|
4388 | var actions = _interopRequireWildcard(_actions);
|
4389 |
|
4390 | var _connectField = __webpack_require__(49);
|
4391 |
|
4392 | var _connectField2 = _interopRequireDefault(_connectField);
|
4393 |
|
4394 | function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
4395 |
|
4396 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
4397 |
|
4398 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
4399 |
|
4400 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
4401 |
|
4402 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
4403 |
|
4404 | function field(Component) {
|
4405 | var Field = function (_React$Component) {
|
4406 | _inherits(Field, _React$Component);
|
4407 |
|
4408 | function Field(props) {
|
4409 | _classCallCheck(this, Field);
|
4410 |
|
4411 | var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
|
4412 |
|
4413 | _this.handleChange = _this.handleChange.bind(_this);
|
4414 | _this.handleFocus = _this.handleFocus.bind(_this);
|
4415 | _this.handleBlur = _this.handleBlur.bind(_this);
|
4416 | return _this;
|
4417 | }
|
4418 |
|
4419 | Field.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
|
4420 | var _field = this.props._field;
|
4421 |
|
4422 | if (!(0, _helpers.shallowCompare)((0, _fieldProps2.boolField)(this.props), (0, _fieldProps2.boolField)(nextProps))) {
|
4423 | return true;
|
4424 | }
|
4425 | return (0, _not2.default)(_field && nextProps._field && (0, _helpers.shallowCompare)(_field, nextProps._field));
|
4426 | };
|
4427 |
|
4428 | Field.prototype.componentWillMount = function componentWillMount() {
|
4429 | if (!this.props._field) {
|
4430 | this.newField(this.props);
|
4431 | }
|
4432 | };
|
4433 |
|
4434 | Field.prototype.componentWillReceiveProps = function componentWillReceiveProps(next) {
|
4435 | var _props = this.props,
|
4436 | _fieldChange = _props._fieldChange,
|
4437 | _form = _props._form,
|
4438 | name = _props.name,
|
4439 | defaultValue = _props.defaultValue;
|
4440 |
|
4441 | if (!next._field) {
|
4442 | this.newField(next);
|
4443 | return;
|
4444 | }
|
4445 | if (defaultValue !== next.defaultValue) {
|
4446 | var value = next.normalize(next._field.value);
|
4447 | var error = next.validate ? next.validate(value) : next._field.error;
|
4448 | var dirty = next.defaultValue !== value;
|
4449 | _fieldChange(_form, name, value, error, dirty);
|
4450 | }
|
4451 | };
|
4452 |
|
4453 | Field.prototype.newField = function newField(props) {
|
4454 | var value = props.normalize(props.defaultValue);
|
4455 | var newField = (0, _compose2.default)((0, _set2.default)((0, _lensProp2.default)('value'), value), (0, _set2.default)((0, _lensProp2.default)('error'), props.validate ? props.validate(value) : null))(containers.field);
|
4456 | props._addField(props._form, props.name, newField);
|
4457 | };
|
4458 |
|
4459 | Field.prototype.handleChange = function handleChange(ev) {
|
4460 | var _props2 = this.props,
|
4461 | _fieldChange = _props2._fieldChange,
|
4462 | _form = _props2._form,
|
4463 | _field = _props2._field,
|
4464 | name = _props2.name,
|
4465 | normalize = _props2.normalize,
|
4466 | validate = _props2.validate,
|
4467 | defaultValue = _props2.defaultValue;
|
4468 |
|
4469 | if (!_field) {
|
4470 | return;
|
4471 | }
|
4472 | var value = normalize((0, _getValue2.default)(ev));
|
4473 | var error = validate ? validate(value) : _field.error;
|
4474 | var dirty = value !== defaultValue;
|
4475 | _fieldChange(_form, name, value, error, dirty);
|
4476 | };
|
4477 |
|
4478 | Field.prototype.handleFocus = function handleFocus() {
|
4479 | var _props3 = this.props,
|
4480 | _fieldFocus = _props3._fieldFocus,
|
4481 | _form = _props3._form,
|
4482 | name = _props3.name;
|
4483 |
|
4484 | _fieldFocus(_form, name);
|
4485 | };
|
4486 |
|
4487 | Field.prototype.handleBlur = function handleBlur(ev) {
|
4488 | var _props4 = this.props,
|
4489 | _fieldBlur = _props4._fieldBlur,
|
4490 | _form = _props4._form,
|
4491 | _field = _props4._field,
|
4492 | name = _props4.name,
|
4493 | normalize = _props4.normalize,
|
4494 | validate = _props4.validate,
|
4495 | defaultValue = _props4.defaultValue;
|
4496 |
|
4497 | if (!_field) {
|
4498 | return;
|
4499 | }
|
4500 | var value = normalize((0, _getValue2.default)(ev));
|
4501 | var error = validate ? validate(value) : _field.error;
|
4502 | var dirty = value !== defaultValue;
|
4503 | _fieldBlur(_form, name, value, error, dirty);
|
4504 | };
|
4505 |
|
4506 | Field.prototype.render = function render() {
|
4507 | var _props5 = this.props,
|
4508 | name = _props5.name,
|
4509 | _field = _props5._field;
|
4510 |
|
4511 |
|
4512 | if (!_field) {
|
4513 | return null;
|
4514 | }
|
4515 | var props = (0, _merge2.default)(_field, {
|
4516 | name: name,
|
4517 | onChange: this.handleChange,
|
4518 | onFocus: this.handleFocus,
|
4519 | onBlur: this.handleBlur
|
4520 | });
|
4521 |
|
4522 | var _fieldProps = (0, _fieldProps3.default)(props),
|
4523 | input = _fieldProps.input,
|
4524 | meta = _fieldProps.meta,
|
4525 | rest = _fieldProps.rest;
|
4526 |
|
4527 |
|
4528 |
|
4529 | return React.createElement(Component, (0, _merge2.default)(rest, {
|
4530 | input: input,
|
4531 | meta: meta
|
4532 | }));
|
4533 | };
|
4534 |
|
4535 | return Field;
|
4536 | }(React.Component);
|
4537 |
|
4538 | Field.defaultProps = {
|
4539 | normalize: _identity2.default,
|
4540 | defaultValue: ''
|
4541 | };
|
4542 | Field.propTypes = {
|
4543 | name: PropTypes.string.isRequired,
|
4544 | normalize: PropTypes.func.isRequired,
|
4545 | defaultValue: PropTypes.any.isRequired,
|
4546 | validate: PropTypes.func
|
4547 | };
|
4548 | var connector = (0, _reactRedux.connect)(function (state, props) {
|
4549 | return {
|
4550 | _field: (0, _path2.default)([props._form, 'fields', props.name], state.reduxForms)
|
4551 | };
|
4552 | }, {
|
4553 | _addField: actions.addField,
|
4554 | _fieldChange: actions.fieldChange,
|
4555 | _fieldFocus: actions.fieldFocus,
|
4556 | _fieldBlur: actions.fieldBlur
|
4557 | });
|
4558 |
|
4559 | var Connected = connector(Field);
|
4560 | var Contexted = (0, _connectField2.default)(Connected);
|
4561 | Contexted.displayName = 'field(' + (Component.displayName || 'Component') + ')';
|
4562 | return Contexted;
|
4563 | }
|
4564 | exports.default = field;
|
4565 |
|
4566 | }),
|
4567 |
|
4568 | (function(module, exports, __webpack_require__) {
|
4569 |
|
4570 | var _curry1 = __webpack_require__(1);
|
4571 | var assoc = __webpack_require__(101);
|
4572 | var lens = __webpack_require__(102);
|
4573 | var prop = __webpack_require__(29);
|
4574 |
|
4575 |
|
4576 |
|
4577 |
|
4578 |
|
4579 |
|
4580 |
|
4581 |
|
4582 |
|
4583 |
|
4584 |
|
4585 |
|
4586 |
|
4587 |
|
4588 |
|
4589 |
|
4590 |
|
4591 |
|
4592 |
|
4593 |
|
4594 |
|
4595 |
|
4596 | module.exports = _curry1(function lensProp(k) {
|
4597 | return lens(prop(k), assoc(k));
|
4598 | });
|
4599 |
|
4600 |
|
4601 | }),
|
4602 |
|
4603 | (function(module, exports, __webpack_require__) {
|
4604 |
|
4605 | var _curry3 = __webpack_require__(8);
|
4606 |
|
4607 |
|
4608 |
|
4609 |
|
4610 |
|
4611 |
|
4612 |
|
4613 |
|
4614 |
|
4615 |
|
4616 |
|
4617 |
|
4618 |
|
4619 |
|
4620 |
|
4621 |
|
4622 |
|
4623 |
|
4624 |
|
4625 |
|
4626 |
|
4627 |
|
4628 | module.exports = _curry3(function assoc(prop, val, obj) {
|
4629 | var result = {};
|
4630 | for (var p in obj) {
|
4631 | result[p] = obj[p];
|
4632 | }
|
4633 | result[prop] = val;
|
4634 | return result;
|
4635 | });
|
4636 |
|
4637 |
|
4638 | }),
|
4639 |
|
4640 | (function(module, exports, __webpack_require__) {
|
4641 |
|
4642 | var _curry2 = __webpack_require__(3);
|
4643 | var map = __webpack_require__(43);
|
4644 |
|
4645 |
|
4646 |
|
4647 |
|
4648 |
|
4649 |
|
4650 |
|
4651 |
|
4652 |
|
4653 |
|
4654 |
|
4655 |
|
4656 |
|
4657 |
|
4658 |
|
4659 |
|
4660 |
|
4661 |
|
4662 |
|
4663 |
|
4664 |
|
4665 |
|
4666 |
|
4667 |
|
4668 |
|
4669 | module.exports = _curry2(function lens(getter, setter) {
|
4670 | return function(toFunctorFn) {
|
4671 | return function(target) {
|
4672 | return map(
|
4673 | function(focus) {
|
4674 | return setter(focus, target);
|
4675 | },
|
4676 | toFunctorFn(getter(target))
|
4677 | );
|
4678 | };
|
4679 | };
|
4680 | });
|
4681 |
|
4682 |
|
4683 | }),
|
4684 |
|
4685 | (function(module, exports, __webpack_require__) {
|
4686 |
|
4687 | var _isArray = __webpack_require__(28);
|
4688 | var _isTransformer = __webpack_require__(104);
|
4689 |
|
4690 |
|
4691 |
|
4692 |
|
4693 |
|
4694 |
|
4695 |
|
4696 |
|
4697 |
|
4698 |
|
4699 |
|
4700 |
|
4701 |
|
4702 |
|
4703 |
|
4704 |
|
4705 | module.exports = function _dispatchable(methodNames, xf, fn) {
|
4706 | return function() {
|
4707 | if (arguments.length === 0) {
|
4708 | return fn();
|
4709 | }
|
4710 | var args = Array.prototype.slice.call(arguments, 0);
|
4711 | var obj = args.pop();
|
4712 | if (!_isArray(obj)) {
|
4713 | var idx = 0;
|
4714 | while (idx < methodNames.length) {
|
4715 | if (typeof obj[methodNames[idx]] === 'function') {
|
4716 | return obj[methodNames[idx]].apply(obj, args);
|
4717 | }
|
4718 | idx += 1;
|
4719 | }
|
4720 | if (_isTransformer(obj)) {
|
4721 | var transducer = xf.apply(null, args);
|
4722 | return transducer(obj);
|
4723 | }
|
4724 | }
|
4725 | return fn.apply(this, arguments);
|
4726 | };
|
4727 | };
|
4728 |
|
4729 |
|
4730 | }),
|
4731 |
|
4732 | (function(module, exports) {
|
4733 |
|
4734 | module.exports = function _isTransformer(obj) {
|
4735 | return typeof obj['@@transducer/step'] === 'function';
|
4736 | };
|
4737 |
|
4738 |
|
4739 | }),
|
4740 |
|
4741 | (function(module, exports) {
|
4742 |
|
4743 | module.exports = function _map(fn, functor) {
|
4744 | var idx = 0;
|
4745 | var len = functor.length;
|
4746 | var result = Array(len);
|
4747 | while (idx < len) {
|
4748 | result[idx] = fn(functor[idx]);
|
4749 | idx += 1;
|
4750 | }
|
4751 | return result;
|
4752 | };
|
4753 |
|
4754 |
|
4755 | }),
|
4756 |
|
4757 | (function(module, exports, __webpack_require__) {
|
4758 |
|
4759 | var _curry1 = __webpack_require__(1);
|
4760 | var _isArray = __webpack_require__(28);
|
4761 | var _isString = __webpack_require__(45);
|
4762 |
|
4763 |
|
4764 |
|
4765 |
|
4766 |
|
4767 |
|
4768 |
|
4769 |
|
4770 |
|
4771 |
|
4772 |
|
4773 |
|
4774 |
|
4775 |
|
4776 |
|
4777 |
|
4778 |
|
4779 |
|
4780 |
|
4781 | module.exports = _curry1(function isArrayLike(x) {
|
4782 | if (_isArray(x)) { return true; }
|
4783 | if (!x) { return false; }
|
4784 | if (typeof x !== 'object') { return false; }
|
4785 | if (_isString(x)) { return false; }
|
4786 | if (x.nodeType === 1) { return !!x.length; }
|
4787 | if (x.length === 0) { return true; }
|
4788 | if (x.length > 0) {
|
4789 | return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);
|
4790 | }
|
4791 | return false;
|
4792 | });
|
4793 |
|
4794 |
|
4795 | }),
|
4796 |
|
4797 | (function(module, exports) {
|
4798 |
|
4799 | module.exports = (function() {
|
4800 | function XWrap(fn) {
|
4801 | this.f = fn;
|
4802 | }
|
4803 | XWrap.prototype['@@transducer/init'] = function() {
|
4804 | throw new Error('init not implemented on XWrap');
|
4805 | };
|
4806 | XWrap.prototype['@@transducer/result'] = function(acc) { return acc; };
|
4807 | XWrap.prototype['@@transducer/step'] = function(acc, x) {
|
4808 | return this.f(acc, x);
|
4809 | };
|
4810 |
|
4811 | return function _xwrap(fn) { return new XWrap(fn); };
|
4812 | }());
|
4813 |
|
4814 |
|
4815 | }),
|
4816 |
|
4817 | (function(module, exports, __webpack_require__) {
|
4818 |
|
4819 | var _arity = __webpack_require__(16);
|
4820 | var _curry2 = __webpack_require__(3);
|
4821 |
|
4822 |
|
4823 |
|
4824 |
|
4825 |
|
4826 |
|
4827 |
|
4828 |
|
4829 |
|
4830 |
|
4831 |
|
4832 |
|
4833 |
|
4834 |
|
4835 |
|
4836 |
|
4837 |
|
4838 |
|
4839 |
|
4840 |
|
4841 |
|
4842 |
|
4843 |
|
4844 |
|
4845 | module.exports = _curry2(function bind(fn, thisObj) {
|
4846 | return _arity(fn.length, function() {
|
4847 | return fn.apply(thisObj, arguments);
|
4848 | });
|
4849 | });
|
4850 |
|
4851 |
|
4852 | }),
|
4853 |
|
4854 | (function(module, exports, __webpack_require__) {
|
4855 |
|
4856 | var _curry2 = __webpack_require__(3);
|
4857 | var _xfBase = __webpack_require__(110);
|
4858 |
|
4859 |
|
4860 | module.exports = (function() {
|
4861 | function XMap(f, xf) {
|
4862 | this.xf = xf;
|
4863 | this.f = f;
|
4864 | }
|
4865 | XMap.prototype['@@transducer/init'] = _xfBase.init;
|
4866 | XMap.prototype['@@transducer/result'] = _xfBase.result;
|
4867 | XMap.prototype['@@transducer/step'] = function(result, input) {
|
4868 | return this.xf['@@transducer/step'](result, this.f(input));
|
4869 | };
|
4870 |
|
4871 | return _curry2(function _xmap(f, xf) { return new XMap(f, xf); });
|
4872 | }());
|
4873 |
|
4874 |
|
4875 | }),
|
4876 |
|
4877 | (function(module, exports) {
|
4878 |
|
4879 | module.exports = {
|
4880 | init: function() {
|
4881 | return this.xf['@@transducer/init']();
|
4882 | },
|
4883 | result: function(result) {
|
4884 | return this.xf['@@transducer/result'](result);
|
4885 | }
|
4886 | };
|
4887 |
|
4888 |
|
4889 | }),
|
4890 |
|
4891 | (function(module, exports, __webpack_require__) {
|
4892 |
|
4893 | var _arity = __webpack_require__(16);
|
4894 | var _isPlaceholder = __webpack_require__(9);
|
4895 |
|
4896 |
|
4897 |
|
4898 |
|
4899 |
|
4900 |
|
4901 |
|
4902 |
|
4903 |
|
4904 |
|
4905 |
|
4906 |
|
4907 | module.exports = function _curryN(length, received, fn) {
|
4908 | return function() {
|
4909 | var combined = [];
|
4910 | var argsIdx = 0;
|
4911 | var left = length;
|
4912 | var combinedIdx = 0;
|
4913 | while (combinedIdx < received.length || argsIdx < arguments.length) {
|
4914 | var result;
|
4915 | if (combinedIdx < received.length &&
|
4916 | (!_isPlaceholder(received[combinedIdx]) ||
|
4917 | argsIdx >= arguments.length)) {
|
4918 | result = received[combinedIdx];
|
4919 | } else {
|
4920 | result = arguments[argsIdx];
|
4921 | argsIdx += 1;
|
4922 | }
|
4923 | combined[combinedIdx] = result;
|
4924 | if (!_isPlaceholder(result)) {
|
4925 | left -= 1;
|
4926 | }
|
4927 | combinedIdx += 1;
|
4928 | }
|
4929 | return left <= 0 ? fn.apply(this, combined)
|
4930 | : _arity(left, _curryN(length, combined, fn));
|
4931 | };
|
4932 | };
|
4933 |
|
4934 |
|
4935 | }),
|
4936 |
|
4937 | (function(module, exports, __webpack_require__) {
|
4938 |
|
4939 | var _curry1 = __webpack_require__(1);
|
4940 | var _has = __webpack_require__(17);
|
4941 | var _isArguments = __webpack_require__(113);
|
4942 |
|
4943 |
|
4944 |
|
4945 |
|
4946 |
|
4947 |
|
4948 |
|
4949 |
|
4950 |
|
4951 |
|
4952 |
|
4953 |
|
4954 |
|
4955 |
|
4956 |
|
4957 |
|
4958 |
|
4959 |
|
4960 |
|
4961 |
|
4962 | module.exports = (function() {
|
4963 |
|
4964 | var hasEnumBug = !({toString: null}).propertyIsEnumerable('toString');
|
4965 | var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString',
|
4966 | 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
|
4967 |
|
4968 | var hasArgsEnumBug = (function() {
|
4969 | 'use strict';
|
4970 | return arguments.propertyIsEnumerable('length');
|
4971 | }());
|
4972 |
|
4973 | var contains = function contains(list, item) {
|
4974 | var idx = 0;
|
4975 | while (idx < list.length) {
|
4976 | if (list[idx] === item) {
|
4977 | return true;
|
4978 | }
|
4979 | idx += 1;
|
4980 | }
|
4981 | return false;
|
4982 | };
|
4983 |
|
4984 | return typeof Object.keys === 'function' && !hasArgsEnumBug ?
|
4985 | _curry1(function keys(obj) {
|
4986 | return Object(obj) !== obj ? [] : Object.keys(obj);
|
4987 | }) :
|
4988 | _curry1(function keys(obj) {
|
4989 | if (Object(obj) !== obj) {
|
4990 | return [];
|
4991 | }
|
4992 | var prop, nIdx;
|
4993 | var ks = [];
|
4994 | var checkArgsLength = hasArgsEnumBug && _isArguments(obj);
|
4995 | for (prop in obj) {
|
4996 | if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {
|
4997 | ks[ks.length] = prop;
|
4998 | }
|
4999 | }
|
5000 | if (hasEnumBug) {
|
5001 | nIdx = nonEnumerableProps.length - 1;
|
5002 | while (nIdx >= 0) {
|
5003 | prop = nonEnumerableProps[nIdx];
|
5004 | if (_has(prop, obj) && !contains(ks, prop)) {
|
5005 | ks[ks.length] = prop;
|
5006 | }
|
5007 | nIdx -= 1;
|
5008 | }
|
5009 | }
|
5010 | return ks;
|
5011 | });
|
5012 | }());
|
5013 |
|
5014 |
|
5015 | }),
|
5016 |
|
5017 | (function(module, exports, __webpack_require__) {
|
5018 |
|
5019 | var _has = __webpack_require__(17);
|
5020 |
|
5021 |
|
5022 | module.exports = (function() {
|
5023 | var toString = Object.prototype.toString;
|
5024 | return toString.call(arguments) === '[object Arguments]' ?
|
5025 | function _isArguments(x) { return toString.call(x) === '[object Arguments]'; } :
|
5026 | function _isArguments(x) { return _has('callee', x); };
|
5027 | }());
|
5028 |
|
5029 |
|
5030 | }),
|
5031 |
|
5032 | (function(module, exports, __webpack_require__) {
|
5033 |
|
5034 | var _curry3 = __webpack_require__(8);
|
5035 | var always = __webpack_require__(47);
|
5036 | var over = __webpack_require__(115);
|
5037 |
|
5038 |
|
5039 |
|
5040 |
|
5041 |
|
5042 |
|
5043 |
|
5044 |
|
5045 |
|
5046 |
|
5047 |
|
5048 |
|
5049 |
|
5050 |
|
5051 |
|
5052 |
|
5053 |
|
5054 |
|
5055 |
|
5056 |
|
5057 |
|
5058 |
|
5059 |
|
5060 |
|
5061 | module.exports = _curry3(function set(lens, v, x) {
|
5062 | return over(lens, always(v), x);
|
5063 | });
|
5064 |
|
5065 |
|
5066 | }),
|
5067 |
|
5068 | (function(module, exports, __webpack_require__) {
|
5069 |
|
5070 | var _curry3 = __webpack_require__(8);
|
5071 |
|
5072 |
|
5073 |
|
5074 |
|
5075 |
|
5076 |
|
5077 |
|
5078 |
|
5079 |
|
5080 |
|
5081 |
|
5082 |
|
5083 |
|
5084 |
|
5085 |
|
5086 |
|
5087 |
|
5088 |
|
5089 |
|
5090 |
|
5091 |
|
5092 |
|
5093 |
|
5094 |
|
5095 | module.exports = (function() {
|
5096 |
|
5097 |
|
5098 | var Identity = function(x) {
|
5099 | return {value: x, map: function(f) { return Identity(f(x)); }};
|
5100 | };
|
5101 |
|
5102 | return _curry3(function over(lens, f, x) {
|
5103 |
|
5104 |
|
5105 |
|
5106 | return lens(function(y) { return Identity(f(y)); })(x).value;
|
5107 | });
|
5108 | }());
|
5109 |
|
5110 |
|
5111 | }),
|
5112 |
|
5113 | (function(module, exports, __webpack_require__) {
|
5114 |
|
5115 | var pipe = __webpack_require__(117);
|
5116 | var reverse = __webpack_require__(122);
|
5117 |
|
5118 |
|
5119 |
|
5120 |
|
5121 |
|
5122 |
|
5123 |
|
5124 |
|
5125 |
|
5126 |
|
5127 |
|
5128 |
|
5129 |
|
5130 |
|
5131 |
|
5132 |
|
5133 |
|
5134 |
|
5135 |
|
5136 |
|
5137 |
|
5138 |
|
5139 |
|
5140 |
|
5141 |
|
5142 |
|
5143 | module.exports = function compose() {
|
5144 | if (arguments.length === 0) {
|
5145 | throw new Error('compose requires at least one argument');
|
5146 | }
|
5147 | return pipe.apply(this, reverse(arguments));
|
5148 | };
|
5149 |
|
5150 |
|
5151 | }),
|
5152 |
|
5153 | (function(module, exports, __webpack_require__) {
|
5154 |
|
5155 | var _arity = __webpack_require__(16);
|
5156 | var _pipe = __webpack_require__(118);
|
5157 | var reduce = __webpack_require__(119);
|
5158 | var tail = __webpack_require__(120);
|
5159 |
|
5160 |
|
5161 |
|
5162 |
|
5163 |
|
5164 |
|
5165 |
|
5166 |
|
5167 |
|
5168 |
|
5169 |
|
5170 |
|
5171 |
|
5172 |
|
5173 |
|
5174 |
|
5175 |
|
5176 |
|
5177 |
|
5178 |
|
5179 |
|
5180 |
|
5181 |
|
5182 |
|
5183 |
|
5184 | module.exports = function pipe() {
|
5185 | if (arguments.length === 0) {
|
5186 | throw new Error('pipe requires at least one argument');
|
5187 | }
|
5188 | return _arity(arguments[0].length,
|
5189 | reduce(_pipe, arguments[0], tail(arguments)));
|
5190 | };
|
5191 |
|
5192 |
|
5193 | }),
|
5194 |
|
5195 | (function(module, exports) {
|
5196 |
|
5197 | module.exports = function _pipe(f, g) {
|
5198 | return function() {
|
5199 | return g.call(this, f.apply(this, arguments));
|
5200 | };
|
5201 | };
|
5202 |
|
5203 |
|
5204 | }),
|
5205 |
|
5206 | (function(module, exports, __webpack_require__) {
|
5207 |
|
5208 | var _curry3 = __webpack_require__(8);
|
5209 | var _reduce = __webpack_require__(44);
|
5210 |
|
5211 |
|
5212 |
|
5213 |
|
5214 |
|
5215 |
|
5216 |
|
5217 |
|
5218 |
|
5219 |
|
5220 |
|
5221 |
|
5222 |
|
5223 |
|
5224 |
|
5225 |
|
5226 |
|
5227 |
|
5228 |
|
5229 |
|
5230 |
|
5231 |
|
5232 |
|
5233 |
|
5234 |
|
5235 |
|
5236 |
|
5237 |
|
5238 |
|
5239 |
|
5240 |
|
5241 |
|
5242 |
|
5243 |
|
5244 |
|
5245 |
|
5246 |
|
5247 |
|
5248 |
|
5249 |
|
5250 |
|
5251 |
|
5252 |
|
5253 |
|
5254 |
|
5255 |
|
5256 |
|
5257 |
|
5258 | module.exports = _curry3(_reduce);
|
5259 |
|
5260 |
|
5261 | }),
|
5262 |
|
5263 | (function(module, exports, __webpack_require__) {
|
5264 |
|
5265 | var _checkForMethod = __webpack_require__(48);
|
5266 | var _curry1 = __webpack_require__(1);
|
5267 | var slice = __webpack_require__(121);
|
5268 |
|
5269 |
|
5270 |
|
5271 |
|
5272 |
|
5273 |
|
5274 |
|
5275 |
|
5276 |
|
5277 |
|
5278 |
|
5279 |
|
5280 |
|
5281 |
|
5282 |
|
5283 |
|
5284 |
|
5285 |
|
5286 |
|
5287 |
|
5288 |
|
5289 |
|
5290 |
|
5291 |
|
5292 |
|
5293 |
|
5294 |
|
5295 |
|
5296 |
|
5297 | module.exports = _curry1(_checkForMethod('tail', slice(1, Infinity)));
|
5298 |
|
5299 |
|
5300 | }),
|
5301 |
|
5302 | (function(module, exports, __webpack_require__) {
|
5303 |
|
5304 | var _checkForMethod = __webpack_require__(48);
|
5305 | var _curry3 = __webpack_require__(8);
|
5306 |
|
5307 |
|
5308 |
|
5309 |
|
5310 |
|
5311 |
|
5312 |
|
5313 |
|
5314 |
|
5315 |
|
5316 |
|
5317 |
|
5318 |
|
5319 |
|
5320 |
|
5321 |
|
5322 |
|
5323 |
|
5324 |
|
5325 |
|
5326 |
|
5327 |
|
5328 |
|
5329 |
|
5330 |
|
5331 |
|
5332 | module.exports = _curry3(_checkForMethod('slice', function slice(fromIndex, toIndex, list) {
|
5333 | return Array.prototype.slice.call(list, fromIndex, toIndex);
|
5334 | }));
|
5335 |
|
5336 |
|
5337 | }),
|
5338 |
|
5339 | (function(module, exports, __webpack_require__) {
|
5340 |
|
5341 | var _curry1 = __webpack_require__(1);
|
5342 | var _isString = __webpack_require__(45);
|
5343 |
|
5344 |
|
5345 |
|
5346 |
|
5347 |
|
5348 |
|
5349 |
|
5350 |
|
5351 |
|
5352 |
|
5353 |
|
5354 |
|
5355 |
|
5356 |
|
5357 |
|
5358 |
|
5359 |
|
5360 |
|
5361 |
|
5362 |
|
5363 |
|
5364 |
|
5365 |
|
5366 |
|
5367 |
|
5368 |
|
5369 | module.exports = _curry1(function reverse(list) {
|
5370 | return _isString(list) ? list.split('').reverse().join('') :
|
5371 | Array.prototype.slice.call(list, 0).reverse();
|
5372 | });
|
5373 |
|
5374 |
|
5375 | }),
|
5376 |
|
5377 | (function(module, exports, __webpack_require__) {
|
5378 |
|
5379 | var _curry1 = __webpack_require__(1);
|
5380 |
|
5381 |
|
5382 |
|
5383 |
|
5384 |
|
5385 |
|
5386 |
|
5387 |
|
5388 |
|
5389 |
|
5390 |
|
5391 |
|
5392 |
|
5393 |
|
5394 |
|
5395 |
|
5396 |
|
5397 |
|
5398 |
|
5399 |
|
5400 |
|
5401 | module.exports = _curry1(function not(a) {
|
5402 | return !a;
|
5403 | });
|
5404 |
|
5405 |
|
5406 | }),
|
5407 |
|
5408 | (function(module, exports, __webpack_require__) {
|
5409 |
|
5410 | "use strict";
|
5411 |
|
5412 |
|
5413 | exports.__esModule = true;
|
5414 | var form = exports.form = {
|
5415 | fields: {},
|
5416 | arrays: {},
|
5417 | submitting: false
|
5418 | };
|
5419 | var field = exports.field = {
|
5420 | value: '',
|
5421 | error: null,
|
5422 | visited: false,
|
5423 | touched: false,
|
5424 | active: false,
|
5425 | dirty: false
|
5426 | };
|
5427 |
|
5428 | }),
|
5429 |
|
5430 | (function(module, exports, __webpack_require__) {
|
5431 |
|
5432 | "use strict";
|
5433 |
|
5434 |
|
5435 | exports.__esModule = true;
|
5436 | exports.boolField = undefined;
|
5437 |
|
5438 | var _lensProp = __webpack_require__(126);
|
5439 |
|
5440 | var _lensProp2 = _interopRequireDefault(_lensProp);
|
5441 |
|
5442 | var _over = __webpack_require__(129);
|
5443 |
|
5444 | var _over2 = _interopRequireDefault(_over);
|
5445 |
|
5446 | var _omit = __webpack_require__(25);
|
5447 |
|
5448 | var _omit2 = _interopRequireDefault(_omit);
|
5449 |
|
5450 | var _pick = __webpack_require__(130);
|
5451 |
|
5452 | var _pick2 = _interopRequireDefault(_pick);
|
5453 |
|
5454 | var _merge = __webpack_require__(131);
|
5455 |
|
5456 | var _merge2 = _interopRequireDefault(_merge);
|
5457 |
|
5458 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5459 |
|
5460 | var INPUT_PROPS = ['checked', 'name', 'value', 'onChange', 'onFocus', 'onBlur'];
|
5461 | var META_PROPS = ['active', 'dirty', 'error', 'touched', 'visited'];
|
5462 | var IGNORE_PROPS = [].concat(INPUT_PROPS, META_PROPS, ['validate', 'normalize', 'defaultValue', '_form', '_addField', '_fieldChange', '_fieldFocus', '_fieldBlur']);
|
5463 | var maybeCheckProps = function maybeCheckProps(all) {
|
5464 | if (typeof all.value === 'boolean') {
|
5465 | return (0, _merge2.default)(all, { checked: all.value });
|
5466 | }
|
5467 | return all;
|
5468 | };
|
5469 | var separateProps = function separateProps(all) {
|
5470 | return {
|
5471 | input: (0, _pick2.default)(INPUT_PROPS, all),
|
5472 | meta: (0, _pick2.default)(META_PROPS, all),
|
5473 | rest: (0, _omit2.default)(IGNORE_PROPS, all)
|
5474 | };
|
5475 | };
|
5476 |
|
5477 | exports.default = function (all) {
|
5478 | return separateProps(maybeCheckProps(all));
|
5479 | };
|
5480 |
|
5481 | var boolField = exports.boolField = (0, _over2.default)((0, _lensProp2.default)('_field'), Boolean);
|
5482 |
|
5483 | }),
|
5484 |
|
5485 | (function(module, exports, __webpack_require__) {
|
5486 |
|
5487 | var _curry1 = __webpack_require__(2);
|
5488 | var assoc = __webpack_require__(127);
|
5489 | var lens = __webpack_require__(128);
|
5490 | var prop = __webpack_require__(22);
|
5491 |
|
5492 |
|
5493 |
|
5494 |
|
5495 |
|
5496 |
|
5497 |
|
5498 |
|
5499 |
|
5500 |
|
5501 |
|
5502 |
|
5503 |
|
5504 |
|
5505 |
|
5506 |
|
5507 |
|
5508 |
|
5509 |
|
5510 |
|
5511 |
|
5512 |
|
5513 | module.exports = _curry1(function lensProp(k) {
|
5514 | return lens(prop(k), assoc(k));
|
5515 | });
|
5516 |
|
5517 |
|
5518 | }),
|
5519 |
|
5520 | (function(module, exports, __webpack_require__) {
|
5521 |
|
5522 | var _curry3 = __webpack_require__(14);
|
5523 |
|
5524 |
|
5525 |
|
5526 |
|
5527 |
|
5528 |
|
5529 |
|
5530 |
|
5531 |
|
5532 |
|
5533 |
|
5534 |
|
5535 |
|
5536 |
|
5537 |
|
5538 |
|
5539 |
|
5540 |
|
5541 |
|
5542 |
|
5543 |
|
5544 |
|
5545 | module.exports = _curry3(function assoc(prop, val, obj) {
|
5546 | var result = {};
|
5547 | for (var p in obj) {
|
5548 | result[p] = obj[p];
|
5549 | }
|
5550 | result[prop] = val;
|
5551 | return result;
|
5552 | });
|
5553 |
|
5554 |
|
5555 | }),
|
5556 |
|
5557 | (function(module, exports, __webpack_require__) {
|
5558 |
|
5559 | var _curry2 = __webpack_require__(0);
|
5560 | var map = __webpack_require__(40);
|
5561 |
|
5562 |
|
5563 |
|
5564 |
|
5565 |
|
5566 |
|
5567 |
|
5568 |
|
5569 |
|
5570 |
|
5571 |
|
5572 |
|
5573 |
|
5574 |
|
5575 |
|
5576 |
|
5577 |
|
5578 |
|
5579 |
|
5580 |
|
5581 |
|
5582 |
|
5583 |
|
5584 |
|
5585 |
|
5586 | module.exports = _curry2(function lens(getter, setter) {
|
5587 | return function(toFunctorFn) {
|
5588 | return function(target) {
|
5589 | return map(
|
5590 | function(focus) {
|
5591 | return setter(focus, target);
|
5592 | },
|
5593 | toFunctorFn(getter(target))
|
5594 | );
|
5595 | };
|
5596 | };
|
5597 | });
|
5598 |
|
5599 |
|
5600 | }),
|
5601 |
|
5602 | (function(module, exports, __webpack_require__) {
|
5603 |
|
5604 | var _curry3 = __webpack_require__(14);
|
5605 |
|
5606 |
|
5607 |
|
5608 |
|
5609 |
|
5610 |
|
5611 |
|
5612 |
|
5613 |
|
5614 |
|
5615 |
|
5616 |
|
5617 |
|
5618 |
|
5619 |
|
5620 |
|
5621 |
|
5622 |
|
5623 |
|
5624 |
|
5625 |
|
5626 |
|
5627 |
|
5628 |
|
5629 | module.exports = (function() {
|
5630 |
|
5631 |
|
5632 | var Identity = function(x) {
|
5633 | return {value: x, map: function(f) { return Identity(f(x)); }};
|
5634 | };
|
5635 |
|
5636 | return _curry3(function over(lens, f, x) {
|
5637 |
|
5638 |
|
5639 |
|
5640 | return lens(function(y) { return Identity(f(y)); })(x).value;
|
5641 | });
|
5642 | }());
|
5643 |
|
5644 |
|
5645 | }),
|
5646 |
|
5647 | (function(module, exports, __webpack_require__) {
|
5648 |
|
5649 | var _curry2 = __webpack_require__(0);
|
5650 |
|
5651 |
|
5652 |
|
5653 |
|
5654 |
|
5655 |
|
5656 |
|
5657 |
|
5658 |
|
5659 |
|
5660 |
|
5661 |
|
5662 |
|
5663 |
|
5664 |
|
5665 |
|
5666 |
|
5667 |
|
5668 |
|
5669 |
|
5670 | module.exports = _curry2(function pick(names, obj) {
|
5671 | var result = {};
|
5672 | var idx = 0;
|
5673 | while (idx < names.length) {
|
5674 | if (names[idx] in obj) {
|
5675 | result[names[idx]] = obj[names[idx]];
|
5676 | }
|
5677 | idx += 1;
|
5678 | }
|
5679 | return result;
|
5680 | });
|
5681 |
|
5682 |
|
5683 | }),
|
5684 |
|
5685 | (function(module, exports, __webpack_require__) {
|
5686 |
|
5687 | var _assign = __webpack_require__(132);
|
5688 | var _curry2 = __webpack_require__(0);
|
5689 |
|
5690 |
|
5691 |
|
5692 |
|
5693 |
|
5694 |
|
5695 |
|
5696 |
|
5697 |
|
5698 |
|
5699 |
|
5700 |
|
5701 |
|
5702 |
|
5703 |
|
5704 |
|
5705 |
|
5706 |
|
5707 |
|
5708 |
|
5709 |
|
5710 |
|
5711 |
|
5712 |
|
5713 |
|
5714 | module.exports = _curry2(function merge(l, r) {
|
5715 | return _assign({}, l, r);
|
5716 | });
|
5717 |
|
5718 |
|
5719 | }),
|
5720 |
|
5721 | (function(module, exports, __webpack_require__) {
|
5722 |
|
5723 | var _objectAssign = __webpack_require__(133);
|
5724 |
|
5725 | module.exports =
|
5726 | typeof Object.assign === 'function' ? Object.assign : _objectAssign;
|
5727 |
|
5728 |
|
5729 | }),
|
5730 |
|
5731 | (function(module, exports, __webpack_require__) {
|
5732 |
|
5733 | var _has = __webpack_require__(7);
|
5734 |
|
5735 |
|
5736 | module.exports = function _objectAssign(target) {
|
5737 | if (target == null) {
|
5738 | throw new TypeError('Cannot convert undefined or null to object');
|
5739 | }
|
5740 |
|
5741 | var output = Object(target);
|
5742 | var idx = 1;
|
5743 | var length = arguments.length;
|
5744 | while (idx < length) {
|
5745 | var source = arguments[idx];
|
5746 | if (source != null) {
|
5747 | for (var nextKey in source) {
|
5748 | if (_has(nextKey, source)) {
|
5749 | output[nextKey] = source[nextKey];
|
5750 | }
|
5751 | }
|
5752 | }
|
5753 | idx += 1;
|
5754 | }
|
5755 | return output;
|
5756 | };
|
5757 |
|
5758 |
|
5759 | }),
|
5760 |
|
5761 | (function(module, exports, __webpack_require__) {
|
5762 |
|
5763 | "use strict";
|
5764 |
|
5765 |
|
5766 | exports.__esModule = true;
|
5767 |
|
5768 | var _helpers = __webpack_require__(4);
|
5769 |
|
5770 | var getSelectedValues = function getSelectedValues(options) {
|
5771 | return Array.from(options).filter(function (option) {
|
5772 | return option.selected;
|
5773 | }).map(function (option) {
|
5774 | return option.value;
|
5775 | });
|
5776 | };
|
5777 | var getValue = function getValue(ev) {
|
5778 | if (!(0, _helpers.isEvent)(ev)) {
|
5779 | return ev;
|
5780 | }
|
5781 | var target = ev.target;
|
5782 | switch (target.type) {
|
5783 | case 'checkbox':
|
5784 | return target.checked;
|
5785 | case 'file':
|
5786 | return target.files;
|
5787 | case 'select-multiple':
|
5788 | return getSelectedValues(target.options);
|
5789 | default:
|
5790 | return target.value;
|
5791 | }
|
5792 | };
|
5793 | exports.default = getValue;
|
5794 |
|
5795 | }),
|
5796 |
|
5797 | (function(module, exports, __webpack_require__) {
|
5798 |
|
5799 | "use strict";
|
5800 |
|
5801 |
|
5802 | exports.__esModule = true;
|
5803 |
|
5804 | var _path = __webpack_require__(42);
|
5805 |
|
5806 | var _path2 = _interopRequireDefault(_path);
|
5807 |
|
5808 | var _merge = __webpack_require__(10);
|
5809 |
|
5810 | var _merge2 = _interopRequireDefault(_merge);
|
5811 |
|
5812 | var _repeat = __webpack_require__(136);
|
5813 |
|
5814 | var _repeat2 = _interopRequireDefault(_repeat);
|
5815 |
|
5816 | var _map = __webpack_require__(43);
|
5817 |
|
5818 | var _map2 = _interopRequireDefault(_map);
|
5819 |
|
5820 | var _addIndex = __webpack_require__(138);
|
5821 |
|
5822 | var _addIndex2 = _interopRequireDefault(_addIndex);
|
5823 |
|
5824 | var _react = __webpack_require__(11);
|
5825 |
|
5826 | var React = _interopRequireWildcard(_react);
|
5827 |
|
5828 | var _propTypes = __webpack_require__(12);
|
5829 |
|
5830 | var PropTypes = _interopRequireWildcard(_propTypes);
|
5831 |
|
5832 | var _reactRedux = __webpack_require__(21);
|
5833 |
|
5834 | var _fieldArrayProps = __webpack_require__(140);
|
5835 |
|
5836 | var _fieldArrayProps2 = _interopRequireDefault(_fieldArrayProps);
|
5837 |
|
5838 | var _helpers = __webpack_require__(4);
|
5839 |
|
5840 | var _actions = __webpack_require__(26);
|
5841 |
|
5842 | var actions = _interopRequireWildcard(_actions);
|
5843 |
|
5844 | var _connectField = __webpack_require__(49);
|
5845 |
|
5846 | var _connectField2 = _interopRequireDefault(_connectField);
|
5847 |
|
5848 | function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
5849 |
|
5850 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5851 |
|
5852 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
5853 |
|
5854 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
5855 |
|
5856 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
5857 |
|
5858 | var RindexMap = (0, _addIndex2.default)(_map2.default);
|
5859 | function fieldArray(Component) {
|
5860 | var FieldArray = function (_React$PureComponent) {
|
5861 | _inherits(FieldArray, _React$PureComponent);
|
5862 |
|
5863 | function FieldArray(props) {
|
5864 | _classCallCheck(this, FieldArray);
|
5865 |
|
5866 | var _this = _possibleConstructorReturn(this, _React$PureComponent.call(this, props));
|
5867 |
|
5868 | _this.handleMap = _this.handleMap.bind(_this);
|
5869 | _this.handlePush = _this.handlePush.bind(_this);
|
5870 | _this.handlePop = _this.handlePop.bind(_this);
|
5871 | _this.handleUnshift = _this.handleUnshift.bind(_this);
|
5872 | _this.handleShift = _this.handleShift.bind(_this);
|
5873 | _this.handleInsert = _this.handleInsert.bind(_this);
|
5874 | _this.handleRemove = _this.handleRemove.bind(_this);
|
5875 | _this.handleSwap = _this.handleSwap.bind(_this);
|
5876 | _this.handleMove = _this.handleMove.bind(_this);
|
5877 | return _this;
|
5878 | }
|
5879 |
|
5880 | FieldArray.prototype.componentWillMount = function componentWillMount() {
|
5881 | var _props = this.props,
|
5882 | _form = _props._form,
|
5883 | name = _props.name,
|
5884 | _array = _props._array,
|
5885 | _addArray = _props._addArray;
|
5886 |
|
5887 | if (!_array) {
|
5888 | _addArray(_form, name);
|
5889 | }
|
5890 | };
|
5891 |
|
5892 | FieldArray.prototype.handleMap = function handleMap(fn) {
|
5893 | var _props2 = this.props,
|
5894 | name = _props2.name,
|
5895 | _array = _props2._array;
|
5896 |
|
5897 | if (!(0, _helpers.isNumber)(_array)) {
|
5898 | return [];
|
5899 | }
|
5900 | var array = (0, _repeat2.default)(null, _array);
|
5901 | return RindexMap(fn, RindexMap(function (_, i) {
|
5902 | return name + '.' + i;
|
5903 | }, array));
|
5904 | };
|
5905 |
|
5906 | FieldArray.prototype.handlePush = function handlePush() {
|
5907 | var _props3 = this.props,
|
5908 | _form = _props3._form,
|
5909 | name = _props3.name,
|
5910 | _arrayPush = _props3._arrayPush;
|
5911 |
|
5912 | _arrayPush(_form, name);
|
5913 | };
|
5914 |
|
5915 | FieldArray.prototype.handlePop = function handlePop() {
|
5916 | var _props4 = this.props,
|
5917 | _form = _props4._form,
|
5918 | name = _props4.name,
|
5919 | _array = _props4._array,
|
5920 | _arrayPop = _props4._arrayPop;
|
5921 |
|
5922 | if ((0, _helpers.isNumber)(_array) && _array > 0) {
|
5923 | _arrayPop(_form, name);
|
5924 | }
|
5925 | };
|
5926 |
|
5927 | FieldArray.prototype.handleUnshift = function handleUnshift() {
|
5928 | var _props5 = this.props,
|
5929 | _form = _props5._form,
|
5930 | name = _props5.name,
|
5931 | _arrayUnshift = _props5._arrayUnshift;
|
5932 |
|
5933 | _arrayUnshift(_form, name);
|
5934 | };
|
5935 |
|
5936 | FieldArray.prototype.handleShift = function handleShift() {
|
5937 | var _props6 = this.props,
|
5938 | _form = _props6._form,
|
5939 | name = _props6.name,
|
5940 | _array = _props6._array,
|
5941 | _arrayShift = _props6._arrayShift;
|
5942 |
|
5943 | if ((0, _helpers.isNumber)(_array) && _array > 0) {
|
5944 | _arrayShift(_form, name);
|
5945 | }
|
5946 | };
|
5947 |
|
5948 | FieldArray.prototype.handleInsert = function handleInsert(index) {
|
5949 | var _props7 = this.props,
|
5950 | _form = _props7._form,
|
5951 | name = _props7.name,
|
5952 | _arrayInsert = _props7._arrayInsert;
|
5953 |
|
5954 | _arrayInsert(_form, name, index);
|
5955 | };
|
5956 |
|
5957 | FieldArray.prototype.handleRemove = function handleRemove(index) {
|
5958 | var _props8 = this.props,
|
5959 | _form = _props8._form,
|
5960 | name = _props8.name,
|
5961 | _arrayRemove = _props8._arrayRemove;
|
5962 |
|
5963 | _arrayRemove(_form, name, index);
|
5964 | };
|
5965 |
|
5966 | FieldArray.prototype.handleSwap = function handleSwap(index1, index2) {
|
5967 | var _props9 = this.props,
|
5968 | _form = _props9._form,
|
5969 | name = _props9.name,
|
5970 | _arraySwap = _props9._arraySwap;
|
5971 |
|
5972 | _arraySwap(_form, name, index1, index2);
|
5973 | };
|
5974 |
|
5975 | FieldArray.prototype.handleMove = function handleMove(from, to) {
|
5976 | var _props10 = this.props,
|
5977 | _form = _props10._form,
|
5978 | name = _props10.name,
|
5979 | _arrayMove = _props10._arrayMove;
|
5980 |
|
5981 | _arrayMove(_form, name, from, to);
|
5982 | };
|
5983 |
|
5984 | FieldArray.prototype.render = function render() {
|
5985 | var _array = this.props._array;
|
5986 |
|
5987 | if (!(0, _helpers.isNumber)(_array)) {
|
5988 | return null;
|
5989 | }
|
5990 |
|
5991 | return React.createElement(Component, (0, _merge2.default)((0, _fieldArrayProps2.default)(this.props), {
|
5992 | fields: {
|
5993 | length: _array,
|
5994 | map: this.handleMap,
|
5995 | push: this.handlePush,
|
5996 | pop: this.handlePop,
|
5997 | unshift: this.handleUnshift,
|
5998 | shift: this.handleShift,
|
5999 | insert: this.handleInsert,
|
6000 | remove: this.handleRemove,
|
6001 | swap: this.handleSwap,
|
6002 | move: this.handleMove
|
6003 | }
|
6004 | }));
|
6005 | };
|
6006 |
|
6007 | return FieldArray;
|
6008 | }(React.PureComponent);
|
6009 |
|
6010 | FieldArray.propTypes = {
|
6011 | name: PropTypes.string.isRequired
|
6012 | };
|
6013 | var connector = (0, _reactRedux.connect)(function (state, props) {
|
6014 | return {
|
6015 | _array: (0, _path2.default)([props._form, 'arrays', props.name], state.reduxForms)
|
6016 | };
|
6017 | }, {
|
6018 | _addArray: actions.addArray,
|
6019 | _arrayPush: actions.arrayPush,
|
6020 | _arrayPop: actions.arrayPop,
|
6021 | _arrayUnshift: actions.arrayUnshift,
|
6022 | _arrayShift: actions.arrayShift,
|
6023 | _arrayInsert: actions.arrayInsert,
|
6024 | _arrayRemove: actions.arrayRemove,
|
6025 | _arraySwap: actions.arraySwap,
|
6026 | _arrayMove: actions.arrayMove
|
6027 | });
|
6028 |
|
6029 | var Connected = connector(FieldArray);
|
6030 | var Contexted = (0, _connectField2.default)(Connected);
|
6031 | Contexted.displayName = 'fieldArray(' + (Component.displayName || 'Component') + ')';
|
6032 | return Contexted;
|
6033 | }
|
6034 | exports.default = fieldArray;
|
6035 |
|
6036 | }),
|
6037 |
|
6038 | (function(module, exports, __webpack_require__) {
|
6039 |
|
6040 | var _curry2 = __webpack_require__(3);
|
6041 | var always = __webpack_require__(47);
|
6042 | var times = __webpack_require__(137);
|
6043 |
|
6044 |
|
6045 |
|
6046 |
|
6047 |
|
6048 |
|
6049 |
|
6050 |
|
6051 |
|
6052 |
|
6053 |
|
6054 |
|
6055 |
|
6056 |
|
6057 |
|
6058 |
|
6059 |
|
6060 |
|
6061 |
|
6062 |
|
6063 |
|
6064 |
|
6065 |
|
6066 |
|
6067 |
|
6068 | module.exports = _curry2(function repeat(value, n) {
|
6069 | return times(always(value), n);
|
6070 | });
|
6071 |
|
6072 |
|
6073 | }),
|
6074 |
|
6075 | (function(module, exports, __webpack_require__) {
|
6076 |
|
6077 | var _curry2 = __webpack_require__(3);
|
6078 |
|
6079 |
|
6080 |
|
6081 |
|
6082 |
|
6083 |
|
6084 |
|
6085 |
|
6086 |
|
6087 |
|
6088 |
|
6089 |
|
6090 |
|
6091 |
|
6092 |
|
6093 |
|
6094 |
|
6095 |
|
6096 |
|
6097 |
|
6098 |
|
6099 |
|
6100 |
|
6101 |
|
6102 |
|
6103 | module.exports = _curry2(function times(fn, n) {
|
6104 | var len = Number(n);
|
6105 | var idx = 0;
|
6106 | var list;
|
6107 |
|
6108 | if (len < 0 || isNaN(len)) {
|
6109 | throw new RangeError('n must be a non-negative number');
|
6110 | }
|
6111 | list = new Array(len);
|
6112 | while (idx < len) {
|
6113 | list[idx] = fn(idx);
|
6114 | idx += 1;
|
6115 | }
|
6116 | return list;
|
6117 | });
|
6118 |
|
6119 |
|
6120 | }),
|
6121 |
|
6122 | (function(module, exports, __webpack_require__) {
|
6123 |
|
6124 | var _concat = __webpack_require__(139);
|
6125 | var _curry1 = __webpack_require__(1);
|
6126 | var curryN = __webpack_require__(46);
|
6127 |
|
6128 |
|
6129 |
|
6130 |
|
6131 |
|
6132 |
|
6133 |
|
6134 |
|
6135 |
|
6136 |
|
6137 |
|
6138 |
|
6139 |
|
6140 |
|
6141 |
|
6142 |
|
6143 |
|
6144 |
|
6145 |
|
6146 |
|
6147 |
|
6148 |
|
6149 |
|
6150 |
|
6151 |
|
6152 |
|
6153 | module.exports = _curry1(function addIndex(fn) {
|
6154 | return curryN(fn.length, function() {
|
6155 | var idx = 0;
|
6156 | var origFn = arguments[0];
|
6157 | var list = arguments[arguments.length - 1];
|
6158 | var args = Array.prototype.slice.call(arguments, 0);
|
6159 | args[0] = function() {
|
6160 | var result = origFn.apply(this, _concat(arguments, [idx, list]));
|
6161 | idx += 1;
|
6162 | return result;
|
6163 | };
|
6164 | return fn.apply(this, args);
|
6165 | });
|
6166 | });
|
6167 |
|
6168 |
|
6169 | }),
|
6170 |
|
6171 | (function(module, exports) {
|
6172 |
|
6173 |
|
6174 |
|
6175 |
|
6176 |
|
6177 |
|
6178 |
|
6179 |
|
6180 |
|
6181 |
|
6182 |
|
6183 |
|
6184 | module.exports = function _concat(set1, set2) {
|
6185 | set1 = set1 || [];
|
6186 | set2 = set2 || [];
|
6187 | var idx;
|
6188 | var len1 = set1.length;
|
6189 | var len2 = set2.length;
|
6190 | var result = [];
|
6191 |
|
6192 | idx = 0;
|
6193 | while (idx < len1) {
|
6194 | result[result.length] = set1[idx];
|
6195 | idx += 1;
|
6196 | }
|
6197 | idx = 0;
|
6198 | while (idx < len2) {
|
6199 | result[result.length] = set2[idx];
|
6200 | idx += 1;
|
6201 | }
|
6202 | return result;
|
6203 | };
|
6204 |
|
6205 |
|
6206 | }),
|
6207 |
|
6208 | (function(module, exports, __webpack_require__) {
|
6209 |
|
6210 | "use strict";
|
6211 |
|
6212 |
|
6213 | exports.__esModule = true;
|
6214 |
|
6215 | var _omit = __webpack_require__(25);
|
6216 |
|
6217 | var _omit2 = _interopRequireDefault(_omit);
|
6218 |
|
6219 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6220 |
|
6221 | var IGNORE_PROPS = ['_form', '_array', '_addArray', '_arrayPush', '_arrayPop', '_arrayUnshift', '_arrayShift', '_arrayInsert', '_arrayRemove', '_arraySwap', '_arrayMove'];
|
6222 | var clearProps = function clearProps(all) {
|
6223 | return (0, _omit2.default)(IGNORE_PROPS, all);
|
6224 | };
|
6225 | exports.default = clearProps;
|
6226 |
|
6227 | })
|
6228 | ]);
|
6229 | }); |
\ | No newline at end of file |