UNPKG

380 kBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory(require("react"), require("react-dom"));
4 else if(typeof define === 'function' && define.amd)
5 define(["react", "react-dom"], factory);
6 else if(typeof exports === 'object')
7 exports["rc-calendar"] = factory(require("react"), require("react-dom"));
8 else
9 root["rc-calendar"] = factory(root["React"], root["ReactDOM"]);
10})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_40__) {
11return /******/ (function(modules) { // webpackBootstrap
12/******/ // The module cache
13/******/ var installedModules = {};
14/******/
15/******/ // The require function
16/******/ function __webpack_require__(moduleId) {
17/******/
18/******/ // Check if module is in cache
19/******/ if(installedModules[moduleId]) {
20/******/ return installedModules[moduleId].exports;
21/******/ }
22/******/ // Create a new module (and put it into the cache)
23/******/ var module = installedModules[moduleId] = {
24/******/ i: moduleId,
25/******/ l: false,
26/******/ exports: {}
27/******/ };
28/******/
29/******/ // Execute the module function
30/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31/******/
32/******/ // Flag the module as loaded
33/******/ module.l = true;
34/******/
35/******/ // Return the exports of the module
36/******/ return module.exports;
37/******/ }
38/******/
39/******/
40/******/ // expose the modules object (__webpack_modules__)
41/******/ __webpack_require__.m = modules;
42/******/
43/******/ // expose the module cache
44/******/ __webpack_require__.c = installedModules;
45/******/
46/******/ // define getter function for harmony exports
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/******/ // Object.prototype.hasOwnProperty.call
67/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
68/******/
69/******/ // __webpack_public_path__
70/******/ __webpack_require__.p = "";
71/******/
72/******/ // Load entry module and return exports
73/******/ return __webpack_require__(__webpack_require__.s = 58);
74/******/ })
75/************************************************************************/
76/******/ ([
77/* 0 */
78/***/ (function(module, exports) {
79
80module.exports = __WEBPACK_EXTERNAL_MODULE_0__;
81
82/***/ }),
83/* 1 */
84/***/ (function(module, exports, __webpack_require__) {
85
86"use strict";
87
88
89exports.__esModule = true;
90
91exports.default = function (instance, Constructor) {
92 if (!(instance instanceof Constructor)) {
93 throw new TypeError("Cannot call a class as a function");
94 }
95};
96
97/***/ }),
98/* 2 */
99/***/ (function(module, exports, __webpack_require__) {
100
101"use strict";
102
103
104exports.__esModule = true;
105
106var _typeof2 = __webpack_require__(49);
107
108var _typeof3 = _interopRequireDefault(_typeof2);
109
110function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
111
112exports.default = function (self, call) {
113 if (!self) {
114 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
115 }
116
117 return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
118};
119
120/***/ }),
121/* 3 */
122/***/ (function(module, exports, __webpack_require__) {
123
124"use strict";
125
126
127exports.__esModule = true;
128
129var _setPrototypeOf = __webpack_require__(92);
130
131var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
132
133var _create = __webpack_require__(96);
134
135var _create2 = _interopRequireDefault(_create);
136
137var _typeof2 = __webpack_require__(49);
138
139var _typeof3 = _interopRequireDefault(_typeof2);
140
141function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
142
143exports.default = function (subClass, superClass) {
144 if (typeof superClass !== "function" && superClass !== null) {
145 throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
146 }
147
148 subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
149 constructor: {
150 value: subClass,
151 enumerable: false,
152 writable: true,
153 configurable: true
154 }
155 });
156 if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
157};
158
159/***/ }),
160/* 4 */
161/***/ (function(module, exports, __webpack_require__) {
162
163/* WEBPACK VAR INJECTION */(function(process) {/**
164 * Copyright (c) 2013-present, Facebook, Inc.
165 *
166 * This source code is licensed under the MIT license found in the
167 * LICENSE file in the root directory of this source tree.
168 */
169
170if (process.env.NODE_ENV !== 'production') {
171 var ReactIs = __webpack_require__(54);
172
173 // By explicitly using `prop-types` you are opting into new development behavior.
174 // http://fb.me/prop-types-in-prod
175 var throwOnDirectAccess = true;
176 module.exports = __webpack_require__(101)(ReactIs.isElement, throwOnDirectAccess);
177} else {
178 // By explicitly using `prop-types` you are opting into new production behavior.
179 // http://fb.me/prop-types-in-prod
180 module.exports = __webpack_require__(104)();
181}
182
183/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(19)))
184
185/***/ }),
186/* 5 */
187/***/ (function(module, exports) {
188
189// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
190var global = module.exports = typeof window != 'undefined' && window.Math == Math
191 ? window : typeof self != 'undefined' && self.Math == Math ? self
192 // eslint-disable-next-line no-new-func
193 : Function('return this')();
194if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
195
196
197/***/ }),
198/* 6 */
199/***/ (function(module, exports) {
200
201var core = module.exports = { version: '2.6.10' };
202if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
203
204
205/***/ }),
206/* 7 */
207/***/ (function(module, exports, __webpack_require__) {
208
209// Thank's IE8 for his funny defineProperty
210module.exports = !__webpack_require__(18)(function () {
211 return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
212});
213
214
215/***/ }),
216/* 8 */
217/***/ (function(module, exports) {
218
219var hasOwnProperty = {}.hasOwnProperty;
220module.exports = function (it, key) {
221 return hasOwnProperty.call(it, key);
222};
223
224
225/***/ }),
226/* 9 */
227/***/ (function(module, exports, __webpack_require__) {
228
229var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
230 Copyright (c) 2017 Jed Watson.
231 Licensed under the MIT License (MIT), see
232 http://jedwatson.github.io/classnames
233*/
234/* global define */
235
236(function () {
237 'use strict';
238
239 var hasOwn = {}.hasOwnProperty;
240
241 function classNames () {
242 var classes = [];
243
244 for (var i = 0; i < arguments.length; i++) {
245 var arg = arguments[i];
246 if (!arg) continue;
247
248 var argType = typeof arg;
249
250 if (argType === 'string' || argType === 'number') {
251 classes.push(arg);
252 } else if (Array.isArray(arg) && arg.length) {
253 var inner = classNames.apply(null, arg);
254 if (inner) {
255 classes.push(inner);
256 }
257 } else if (argType === 'object') {
258 for (var key in arg) {
259 if (hasOwn.call(arg, key) && arg[key]) {
260 classes.push(key);
261 }
262 }
263 }
264 }
265
266 return classes.join(' ');
267 }
268
269 if (typeof module !== 'undefined' && module.exports) {
270 classNames.default = classNames;
271 module.exports = classNames;
272 } else if (true) {
273 // register as 'classnames', consistent with npm package name
274 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
275 return classNames;
276 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
277 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
278 } else {
279 window.classNames = classNames;
280 }
281}());
282
283
284/***/ }),
285/* 10 */
286/***/ (function(module, exports, __webpack_require__) {
287
288var dP = __webpack_require__(11);
289var createDesc = __webpack_require__(21);
290module.exports = __webpack_require__(7) ? function (object, key, value) {
291 return dP.f(object, key, createDesc(1, value));
292} : function (object, key, value) {
293 object[key] = value;
294 return object;
295};
296
297
298/***/ }),
299/* 11 */
300/***/ (function(module, exports, __webpack_require__) {
301
302var anObject = __webpack_require__(17);
303var IE8_DOM_DEFINE = __webpack_require__(44);
304var toPrimitive = __webpack_require__(27);
305var dP = Object.defineProperty;
306
307exports.f = __webpack_require__(7) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
308 anObject(O);
309 P = toPrimitive(P, true);
310 anObject(Attributes);
311 if (IE8_DOM_DEFINE) try {
312 return dP(O, P, Attributes);
313 } catch (e) { /* empty */ }
314 if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
315 if ('value' in Attributes) O[P] = Attributes.value;
316 return O;
317};
318
319
320/***/ }),
321/* 12 */
322/***/ (function(module, exports) {
323
324module.exports = function (it) {
325 return typeof it === 'object' ? it !== null : typeof it === 'function';
326};
327
328
329/***/ }),
330/* 13 */
331/***/ (function(module, exports, __webpack_require__) {
332
333// to indexed object, toObject with fallback for non-array-like ES3 strings
334var IObject = __webpack_require__(47);
335var defined = __webpack_require__(28);
336module.exports = function (it) {
337 return IObject(defined(it));
338};
339
340
341/***/ }),
342/* 14 */
343/***/ (function(module, exports, __webpack_require__) {
344
345var store = __webpack_require__(31)('wks');
346var uid = __webpack_require__(24);
347var Symbol = __webpack_require__(5).Symbol;
348var USE_SYMBOL = typeof Symbol == 'function';
349
350var $exports = module.exports = function (name) {
351 return store[name] || (store[name] =
352 USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
353};
354
355$exports.store = store;
356
357
358/***/ }),
359/* 15 */
360/***/ (function(module, __webpack_exports__, __webpack_require__) {
361
362"use strict";
363/* harmony export (immutable) */ __webpack_exports__["e"] = getTodayTime;
364/* harmony export (immutable) */ __webpack_exports__["d"] = getTitleString;
365/* harmony export (immutable) */ __webpack_exports__["f"] = getTodayTimeStr;
366/* harmony export (immutable) */ __webpack_exports__["b"] = getMonthName;
367/* harmony export (immutable) */ __webpack_exports__["h"] = syncTime;
368/* harmony export (immutable) */ __webpack_exports__["c"] = getTimeConfig;
369/* unused harmony export isTimeValidByConfig */
370/* unused harmony export isTimeValid */
371/* harmony export (immutable) */ __webpack_exports__["g"] = isAllowedDate;
372/* harmony export (immutable) */ __webpack_exports__["a"] = formatDate;
373/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(26);
374/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
375/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_moment__ = __webpack_require__(20);
376/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_moment__);
377
378
379
380var defaultDisabledTime = {
381 disabledHours: function disabledHours() {
382 return [];
383 },
384 disabledMinutes: function disabledMinutes() {
385 return [];
386 },
387 disabledSeconds: function disabledSeconds() {
388 return [];
389 }
390};
391
392function getTodayTime(value) {
393 var today = __WEBPACK_IMPORTED_MODULE_1_moment___default()();
394 today.locale(value.locale()).utcOffset(value.utcOffset());
395 return today;
396}
397
398function getTitleString(value) {
399 return value.format('LL');
400}
401
402function getTodayTimeStr(value) {
403 var today = getTodayTime(value);
404 return getTitleString(today);
405}
406
407function getMonthName(month) {
408 var locale = month.locale();
409 var localeData = month.localeData();
410 return localeData[locale === 'zh-cn' ? 'months' : 'monthsShort'](month);
411}
412
413function syncTime(from, to) {
414 if (!__WEBPACK_IMPORTED_MODULE_1_moment___default.a.isMoment(from) || !__WEBPACK_IMPORTED_MODULE_1_moment___default.a.isMoment(to)) return;
415 to.hour(from.hour());
416 to.minute(from.minute());
417 to.second(from.second());
418 to.millisecond(from.millisecond());
419}
420
421function getTimeConfig(value, disabledTime) {
422 var disabledTimeConfig = disabledTime ? disabledTime(value) : {};
423 disabledTimeConfig = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, defaultDisabledTime, disabledTimeConfig);
424 return disabledTimeConfig;
425}
426
427function isTimeValidByConfig(value, disabledTimeConfig) {
428 var invalidTime = false;
429 if (value) {
430 var hour = value.hour();
431 var minutes = value.minute();
432 var seconds = value.second();
433 var disabledHours = disabledTimeConfig.disabledHours();
434 if (disabledHours.indexOf(hour) === -1) {
435 var disabledMinutes = disabledTimeConfig.disabledMinutes(hour);
436 if (disabledMinutes.indexOf(minutes) === -1) {
437 var disabledSeconds = disabledTimeConfig.disabledSeconds(hour, minutes);
438 invalidTime = disabledSeconds.indexOf(seconds) !== -1;
439 } else {
440 invalidTime = true;
441 }
442 } else {
443 invalidTime = true;
444 }
445 }
446 return !invalidTime;
447}
448
449function isTimeValid(value, disabledTime) {
450 var disabledTimeConfig = getTimeConfig(value, disabledTime);
451 return isTimeValidByConfig(value, disabledTimeConfig);
452}
453
454function isAllowedDate(value, disabledDate, disabledTime) {
455 if (disabledDate) {
456 if (disabledDate(value)) {
457 return false;
458 }
459 }
460 if (disabledTime) {
461 if (!isTimeValid(value, disabledTime)) {
462 return false;
463 }
464 }
465 return true;
466}
467
468function formatDate(value, format) {
469 if (!value) {
470 return '';
471 }
472
473 if (Array.isArray(format)) {
474 format = format[0];
475 }
476
477 return value.format(format);
478}
479
480/***/ }),
481/* 16 */
482/***/ (function(module, exports, __webpack_require__) {
483
484var global = __webpack_require__(5);
485var core = __webpack_require__(6);
486var ctx = __webpack_require__(43);
487var hide = __webpack_require__(10);
488var has = __webpack_require__(8);
489var PROTOTYPE = 'prototype';
490
491var $export = function (type, name, source) {
492 var IS_FORCED = type & $export.F;
493 var IS_GLOBAL = type & $export.G;
494 var IS_STATIC = type & $export.S;
495 var IS_PROTO = type & $export.P;
496 var IS_BIND = type & $export.B;
497 var IS_WRAP = type & $export.W;
498 var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
499 var expProto = exports[PROTOTYPE];
500 var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
501 var key, own, out;
502 if (IS_GLOBAL) source = name;
503 for (key in source) {
504 // contains in native
505 own = !IS_FORCED && target && target[key] !== undefined;
506 if (own && has(exports, key)) continue;
507 // export native or passed
508 out = own ? target[key] : source[key];
509 // prevent global pollution for namespaces
510 exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
511 // bind timers to global for call from export context
512 : IS_BIND && own ? ctx(out, global)
513 // wrap global constructors for prevent change them in library
514 : IS_WRAP && target[key] == out ? (function (C) {
515 var F = function (a, b, c) {
516 if (this instanceof C) {
517 switch (arguments.length) {
518 case 0: return new C();
519 case 1: return new C(a);
520 case 2: return new C(a, b);
521 } return new C(a, b, c);
522 } return C.apply(this, arguments);
523 };
524 F[PROTOTYPE] = C[PROTOTYPE];
525 return F;
526 // make static versions for prototype methods
527 })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
528 // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
529 if (IS_PROTO) {
530 (exports.virtual || (exports.virtual = {}))[key] = out;
531 // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
532 if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
533 }
534 }
535};
536// type bitmap
537$export.F = 1; // forced
538$export.G = 2; // global
539$export.S = 4; // static
540$export.P = 8; // proto
541$export.B = 16; // bind
542$export.W = 32; // wrap
543$export.U = 64; // safe
544$export.R = 128; // real proto method for `library`
545module.exports = $export;
546
547
548/***/ }),
549/* 17 */
550/***/ (function(module, exports, __webpack_require__) {
551
552var isObject = __webpack_require__(12);
553module.exports = function (it) {
554 if (!isObject(it)) throw TypeError(it + ' is not an object!');
555 return it;
556};
557
558
559/***/ }),
560/* 18 */
561/***/ (function(module, exports) {
562
563module.exports = function (exec) {
564 try {
565 return !!exec();
566 } catch (e) {
567 return true;
568 }
569};
570
571
572/***/ }),
573/* 19 */
574/***/ (function(module, exports) {
575
576// shim for using process in browser
577var process = module.exports = {};
578
579// cached from whatever global is present so that test runners that stub it
580// don't break things. But we need to wrap it in a try catch in case it is
581// wrapped in strict mode code which doesn't define any globals. It's inside a
582// function because try/catches deoptimize in certain engines.
583
584var cachedSetTimeout;
585var cachedClearTimeout;
586
587function defaultSetTimout() {
588 throw new Error('setTimeout has not been defined');
589}
590function defaultClearTimeout () {
591 throw new Error('clearTimeout has not been defined');
592}
593(function () {
594 try {
595 if (typeof setTimeout === 'function') {
596 cachedSetTimeout = setTimeout;
597 } else {
598 cachedSetTimeout = defaultSetTimout;
599 }
600 } catch (e) {
601 cachedSetTimeout = defaultSetTimout;
602 }
603 try {
604 if (typeof clearTimeout === 'function') {
605 cachedClearTimeout = clearTimeout;
606 } else {
607 cachedClearTimeout = defaultClearTimeout;
608 }
609 } catch (e) {
610 cachedClearTimeout = defaultClearTimeout;
611 }
612} ())
613function runTimeout(fun) {
614 if (cachedSetTimeout === setTimeout) {
615 //normal enviroments in sane situations
616 return setTimeout(fun, 0);
617 }
618 // if setTimeout wasn't available but was latter defined
619 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
620 cachedSetTimeout = setTimeout;
621 return setTimeout(fun, 0);
622 }
623 try {
624 // when when somebody has screwed with setTimeout but no I.E. maddness
625 return cachedSetTimeout(fun, 0);
626 } catch(e){
627 try {
628 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
629 return cachedSetTimeout.call(null, fun, 0);
630 } catch(e){
631 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
632 return cachedSetTimeout.call(this, fun, 0);
633 }
634 }
635
636
637}
638function runClearTimeout(marker) {
639 if (cachedClearTimeout === clearTimeout) {
640 //normal enviroments in sane situations
641 return clearTimeout(marker);
642 }
643 // if clearTimeout wasn't available but was latter defined
644 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
645 cachedClearTimeout = clearTimeout;
646 return clearTimeout(marker);
647 }
648 try {
649 // when when somebody has screwed with setTimeout but no I.E. maddness
650 return cachedClearTimeout(marker);
651 } catch (e){
652 try {
653 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
654 return cachedClearTimeout.call(null, marker);
655 } catch (e){
656 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
657 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
658 return cachedClearTimeout.call(this, marker);
659 }
660 }
661
662
663
664}
665var queue = [];
666var draining = false;
667var currentQueue;
668var queueIndex = -1;
669
670function cleanUpNextTick() {
671 if (!draining || !currentQueue) {
672 return;
673 }
674 draining = false;
675 if (currentQueue.length) {
676 queue = currentQueue.concat(queue);
677 } else {
678 queueIndex = -1;
679 }
680 if (queue.length) {
681 drainQueue();
682 }
683}
684
685function drainQueue() {
686 if (draining) {
687 return;
688 }
689 var timeout = runTimeout(cleanUpNextTick);
690 draining = true;
691
692 var len = queue.length;
693 while(len) {
694 currentQueue = queue;
695 queue = [];
696 while (++queueIndex < len) {
697 if (currentQueue) {
698 currentQueue[queueIndex].run();
699 }
700 }
701 queueIndex = -1;
702 len = queue.length;
703 }
704 currentQueue = null;
705 draining = false;
706 runClearTimeout(timeout);
707}
708
709process.nextTick = function (fun) {
710 var args = new Array(arguments.length - 1);
711 if (arguments.length > 1) {
712 for (var i = 1; i < arguments.length; i++) {
713 args[i - 1] = arguments[i];
714 }
715 }
716 queue.push(new Item(fun, args));
717 if (queue.length === 1 && !draining) {
718 runTimeout(drainQueue);
719 }
720};
721
722// v8 likes predictible objects
723function Item(fun, array) {
724 this.fun = fun;
725 this.array = array;
726}
727Item.prototype.run = function () {
728 this.fun.apply(null, this.array);
729};
730process.title = 'browser';
731process.browser = true;
732process.env = {};
733process.argv = [];
734process.version = ''; // empty string to avoid regexp issues
735process.versions = {};
736
737function noop() {}
738
739process.on = noop;
740process.addListener = noop;
741process.once = noop;
742process.off = noop;
743process.removeListener = noop;
744process.removeAllListeners = noop;
745process.emit = noop;
746process.prependListener = noop;
747process.prependOnceListener = noop;
748
749process.listeners = function (name) { return [] }
750
751process.binding = function (name) {
752 throw new Error('process.binding is not supported');
753};
754
755process.cwd = function () { return '/' };
756process.chdir = function (dir) {
757 throw new Error('process.chdir is not supported');
758};
759process.umask = function() { return 0; };
760
761
762/***/ }),
763/* 20 */
764/***/ (function(module, exports) {
765
766//! moment.js
767
768;(function (global, factory) {
769 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
770 typeof define === 'function' && define.amd ? define(factory) :
771 global.moment = factory()
772}(this, (function () { 'use strict';
773
774 var hookCallback;
775
776 function hooks () {
777 return hookCallback.apply(null, arguments);
778 }
779
780 // This is done to register the method called with moment()
781 // without creating circular dependencies.
782 function setHookCallback (callback) {
783 hookCallback = callback;
784 }
785
786 function isArray(input) {
787 return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
788 }
789
790 function isObject(input) {
791 // IE8 will treat undefined and null as object if it wasn't for
792 // input != null
793 return input != null && Object.prototype.toString.call(input) === '[object Object]';
794 }
795
796 function isObjectEmpty(obj) {
797 if (Object.getOwnPropertyNames) {
798 return (Object.getOwnPropertyNames(obj).length === 0);
799 } else {
800 var k;
801 for (k in obj) {
802 if (obj.hasOwnProperty(k)) {
803 return false;
804 }
805 }
806 return true;
807 }
808 }
809
810 function isUndefined(input) {
811 return input === void 0;
812 }
813
814 function isNumber(input) {
815 return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
816 }
817
818 function isDate(input) {
819 return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
820 }
821
822 function map(arr, fn) {
823 var res = [], i;
824 for (i = 0; i < arr.length; ++i) {
825 res.push(fn(arr[i], i));
826 }
827 return res;
828 }
829
830 function hasOwnProp(a, b) {
831 return Object.prototype.hasOwnProperty.call(a, b);
832 }
833
834 function extend(a, b) {
835 for (var i in b) {
836 if (hasOwnProp(b, i)) {
837 a[i] = b[i];
838 }
839 }
840
841 if (hasOwnProp(b, 'toString')) {
842 a.toString = b.toString;
843 }
844
845 if (hasOwnProp(b, 'valueOf')) {
846 a.valueOf = b.valueOf;
847 }
848
849 return a;
850 }
851
852 function createUTC (input, format, locale, strict) {
853 return createLocalOrUTC(input, format, locale, strict, true).utc();
854 }
855
856 function defaultParsingFlags() {
857 // We need to deep clone this object.
858 return {
859 empty : false,
860 unusedTokens : [],
861 unusedInput : [],
862 overflow : -2,
863 charsLeftOver : 0,
864 nullInput : false,
865 invalidMonth : null,
866 invalidFormat : false,
867 userInvalidated : false,
868 iso : false,
869 parsedDateParts : [],
870 meridiem : null,
871 rfc2822 : false,
872 weekdayMismatch : false
873 };
874 }
875
876 function getParsingFlags(m) {
877 if (m._pf == null) {
878 m._pf = defaultParsingFlags();
879 }
880 return m._pf;
881 }
882
883 var some;
884 if (Array.prototype.some) {
885 some = Array.prototype.some;
886 } else {
887 some = function (fun) {
888 var t = Object(this);
889 var len = t.length >>> 0;
890
891 for (var i = 0; i < len; i++) {
892 if (i in t && fun.call(this, t[i], i, t)) {
893 return true;
894 }
895 }
896
897 return false;
898 };
899 }
900
901 function isValid(m) {
902 if (m._isValid == null) {
903 var flags = getParsingFlags(m);
904 var parsedParts = some.call(flags.parsedDateParts, function (i) {
905 return i != null;
906 });
907 var isNowValid = !isNaN(m._d.getTime()) &&
908 flags.overflow < 0 &&
909 !flags.empty &&
910 !flags.invalidMonth &&
911 !flags.invalidWeekday &&
912 !flags.weekdayMismatch &&
913 !flags.nullInput &&
914 !flags.invalidFormat &&
915 !flags.userInvalidated &&
916 (!flags.meridiem || (flags.meridiem && parsedParts));
917
918 if (m._strict) {
919 isNowValid = isNowValid &&
920 flags.charsLeftOver === 0 &&
921 flags.unusedTokens.length === 0 &&
922 flags.bigHour === undefined;
923 }
924
925 if (Object.isFrozen == null || !Object.isFrozen(m)) {
926 m._isValid = isNowValid;
927 }
928 else {
929 return isNowValid;
930 }
931 }
932 return m._isValid;
933 }
934
935 function createInvalid (flags) {
936 var m = createUTC(NaN);
937 if (flags != null) {
938 extend(getParsingFlags(m), flags);
939 }
940 else {
941 getParsingFlags(m).userInvalidated = true;
942 }
943
944 return m;
945 }
946
947 // Plugins that add properties should also add the key here (null value),
948 // so we can properly clone ourselves.
949 var momentProperties = hooks.momentProperties = [];
950
951 function copyConfig(to, from) {
952 var i, prop, val;
953
954 if (!isUndefined(from._isAMomentObject)) {
955 to._isAMomentObject = from._isAMomentObject;
956 }
957 if (!isUndefined(from._i)) {
958 to._i = from._i;
959 }
960 if (!isUndefined(from._f)) {
961 to._f = from._f;
962 }
963 if (!isUndefined(from._l)) {
964 to._l = from._l;
965 }
966 if (!isUndefined(from._strict)) {
967 to._strict = from._strict;
968 }
969 if (!isUndefined(from._tzm)) {
970 to._tzm = from._tzm;
971 }
972 if (!isUndefined(from._isUTC)) {
973 to._isUTC = from._isUTC;
974 }
975 if (!isUndefined(from._offset)) {
976 to._offset = from._offset;
977 }
978 if (!isUndefined(from._pf)) {
979 to._pf = getParsingFlags(from);
980 }
981 if (!isUndefined(from._locale)) {
982 to._locale = from._locale;
983 }
984
985 if (momentProperties.length > 0) {
986 for (i = 0; i < momentProperties.length; i++) {
987 prop = momentProperties[i];
988 val = from[prop];
989 if (!isUndefined(val)) {
990 to[prop] = val;
991 }
992 }
993 }
994
995 return to;
996 }
997
998 var updateInProgress = false;
999
1000 // Moment prototype object
1001 function Moment(config) {
1002 copyConfig(this, config);
1003 this._d = new Date(config._d != null ? config._d.getTime() : NaN);
1004 if (!this.isValid()) {
1005 this._d = new Date(NaN);
1006 }
1007 // Prevent infinite loop in case updateOffset creates new moment
1008 // objects.
1009 if (updateInProgress === false) {
1010 updateInProgress = true;
1011 hooks.updateOffset(this);
1012 updateInProgress = false;
1013 }
1014 }
1015
1016 function isMoment (obj) {
1017 return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
1018 }
1019
1020 function absFloor (number) {
1021 if (number < 0) {
1022 // -0 -> 0
1023 return Math.ceil(number) || 0;
1024 } else {
1025 return Math.floor(number);
1026 }
1027 }
1028
1029 function toInt(argumentForCoercion) {
1030 var coercedNumber = +argumentForCoercion,
1031 value = 0;
1032
1033 if (coercedNumber !== 0 && isFinite(coercedNumber)) {
1034 value = absFloor(coercedNumber);
1035 }
1036
1037 return value;
1038 }
1039
1040 // compare two arrays, return the number of differences
1041 function compareArrays(array1, array2, dontConvert) {
1042 var len = Math.min(array1.length, array2.length),
1043 lengthDiff = Math.abs(array1.length - array2.length),
1044 diffs = 0,
1045 i;
1046 for (i = 0; i < len; i++) {
1047 if ((dontConvert && array1[i] !== array2[i]) ||
1048 (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
1049 diffs++;
1050 }
1051 }
1052 return diffs + lengthDiff;
1053 }
1054
1055 function warn(msg) {
1056 if (hooks.suppressDeprecationWarnings === false &&
1057 (typeof console !== 'undefined') && console.warn) {
1058 console.warn('Deprecation warning: ' + msg);
1059 }
1060 }
1061
1062 function deprecate(msg, fn) {
1063 var firstTime = true;
1064
1065 return extend(function () {
1066 if (hooks.deprecationHandler != null) {
1067 hooks.deprecationHandler(null, msg);
1068 }
1069 if (firstTime) {
1070 var args = [];
1071 var arg;
1072 for (var i = 0; i < arguments.length; i++) {
1073 arg = '';
1074 if (typeof arguments[i] === 'object') {
1075 arg += '\n[' + i + '] ';
1076 for (var key in arguments[0]) {
1077 arg += key + ': ' + arguments[0][key] + ', ';
1078 }
1079 arg = arg.slice(0, -2); // Remove trailing comma and space
1080 } else {
1081 arg = arguments[i];
1082 }
1083 args.push(arg);
1084 }
1085 warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
1086 firstTime = false;
1087 }
1088 return fn.apply(this, arguments);
1089 }, fn);
1090 }
1091
1092 var deprecations = {};
1093
1094 function deprecateSimple(name, msg) {
1095 if (hooks.deprecationHandler != null) {
1096 hooks.deprecationHandler(name, msg);
1097 }
1098 if (!deprecations[name]) {
1099 warn(msg);
1100 deprecations[name] = true;
1101 }
1102 }
1103
1104 hooks.suppressDeprecationWarnings = false;
1105 hooks.deprecationHandler = null;
1106
1107 function isFunction(input) {
1108 return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
1109 }
1110
1111 function set (config) {
1112 var prop, i;
1113 for (i in config) {
1114 prop = config[i];
1115 if (isFunction(prop)) {
1116 this[i] = prop;
1117 } else {
1118 this['_' + i] = prop;
1119 }
1120 }
1121 this._config = config;
1122 // Lenient ordinal parsing accepts just a number in addition to
1123 // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
1124 // TODO: Remove "ordinalParse" fallback in next major release.
1125 this._dayOfMonthOrdinalParseLenient = new RegExp(
1126 (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
1127 '|' + (/\d{1,2}/).source);
1128 }
1129
1130 function mergeConfigs(parentConfig, childConfig) {
1131 var res = extend({}, parentConfig), prop;
1132 for (prop in childConfig) {
1133 if (hasOwnProp(childConfig, prop)) {
1134 if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
1135 res[prop] = {};
1136 extend(res[prop], parentConfig[prop]);
1137 extend(res[prop], childConfig[prop]);
1138 } else if (childConfig[prop] != null) {
1139 res[prop] = childConfig[prop];
1140 } else {
1141 delete res[prop];
1142 }
1143 }
1144 }
1145 for (prop in parentConfig) {
1146 if (hasOwnProp(parentConfig, prop) &&
1147 !hasOwnProp(childConfig, prop) &&
1148 isObject(parentConfig[prop])) {
1149 // make sure changes to properties don't modify parent config
1150 res[prop] = extend({}, res[prop]);
1151 }
1152 }
1153 return res;
1154 }
1155
1156 function Locale(config) {
1157 if (config != null) {
1158 this.set(config);
1159 }
1160 }
1161
1162 var keys;
1163
1164 if (Object.keys) {
1165 keys = Object.keys;
1166 } else {
1167 keys = function (obj) {
1168 var i, res = [];
1169 for (i in obj) {
1170 if (hasOwnProp(obj, i)) {
1171 res.push(i);
1172 }
1173 }
1174 return res;
1175 };
1176 }
1177
1178 var defaultCalendar = {
1179 sameDay : '[Today at] LT',
1180 nextDay : '[Tomorrow at] LT',
1181 nextWeek : 'dddd [at] LT',
1182 lastDay : '[Yesterday at] LT',
1183 lastWeek : '[Last] dddd [at] LT',
1184 sameElse : 'L'
1185 };
1186
1187 function calendar (key, mom, now) {
1188 var output = this._calendar[key] || this._calendar['sameElse'];
1189 return isFunction(output) ? output.call(mom, now) : output;
1190 }
1191
1192 var defaultLongDateFormat = {
1193 LTS : 'h:mm:ss A',
1194 LT : 'h:mm A',
1195 L : 'MM/DD/YYYY',
1196 LL : 'MMMM D, YYYY',
1197 LLL : 'MMMM D, YYYY h:mm A',
1198 LLLL : 'dddd, MMMM D, YYYY h:mm A'
1199 };
1200
1201 function longDateFormat (key) {
1202 var format = this._longDateFormat[key],
1203 formatUpper = this._longDateFormat[key.toUpperCase()];
1204
1205 if (format || !formatUpper) {
1206 return format;
1207 }
1208
1209 this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
1210 return val.slice(1);
1211 });
1212
1213 return this._longDateFormat[key];
1214 }
1215
1216 var defaultInvalidDate = 'Invalid date';
1217
1218 function invalidDate () {
1219 return this._invalidDate;
1220 }
1221
1222 var defaultOrdinal = '%d';
1223 var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
1224
1225 function ordinal (number) {
1226 return this._ordinal.replace('%d', number);
1227 }
1228
1229 var defaultRelativeTime = {
1230 future : 'in %s',
1231 past : '%s ago',
1232 s : 'a few seconds',
1233 ss : '%d seconds',
1234 m : 'a minute',
1235 mm : '%d minutes',
1236 h : 'an hour',
1237 hh : '%d hours',
1238 d : 'a day',
1239 dd : '%d days',
1240 M : 'a month',
1241 MM : '%d months',
1242 y : 'a year',
1243 yy : '%d years'
1244 };
1245
1246 function relativeTime (number, withoutSuffix, string, isFuture) {
1247 var output = this._relativeTime[string];
1248 return (isFunction(output)) ?
1249 output(number, withoutSuffix, string, isFuture) :
1250 output.replace(/%d/i, number);
1251 }
1252
1253 function pastFuture (diff, output) {
1254 var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
1255 return isFunction(format) ? format(output) : format.replace(/%s/i, output);
1256 }
1257
1258 var aliases = {};
1259
1260 function addUnitAlias (unit, shorthand) {
1261 var lowerCase = unit.toLowerCase();
1262 aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
1263 }
1264
1265 function normalizeUnits(units) {
1266 return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
1267 }
1268
1269 function normalizeObjectUnits(inputObject) {
1270 var normalizedInput = {},
1271 normalizedProp,
1272 prop;
1273
1274 for (prop in inputObject) {
1275 if (hasOwnProp(inputObject, prop)) {
1276 normalizedProp = normalizeUnits(prop);
1277 if (normalizedProp) {
1278 normalizedInput[normalizedProp] = inputObject[prop];
1279 }
1280 }
1281 }
1282
1283 return normalizedInput;
1284 }
1285
1286 var priorities = {};
1287
1288 function addUnitPriority(unit, priority) {
1289 priorities[unit] = priority;
1290 }
1291
1292 function getPrioritizedUnits(unitsObj) {
1293 var units = [];
1294 for (var u in unitsObj) {
1295 units.push({unit: u, priority: priorities[u]});
1296 }
1297 units.sort(function (a, b) {
1298 return a.priority - b.priority;
1299 });
1300 return units;
1301 }
1302
1303 function zeroFill(number, targetLength, forceSign) {
1304 var absNumber = '' + Math.abs(number),
1305 zerosToFill = targetLength - absNumber.length,
1306 sign = number >= 0;
1307 return (sign ? (forceSign ? '+' : '') : '-') +
1308 Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
1309 }
1310
1311 var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
1312
1313 var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
1314
1315 var formatFunctions = {};
1316
1317 var formatTokenFunctions = {};
1318
1319 // token: 'M'
1320 // padded: ['MM', 2]
1321 // ordinal: 'Mo'
1322 // callback: function () { this.month() + 1 }
1323 function addFormatToken (token, padded, ordinal, callback) {
1324 var func = callback;
1325 if (typeof callback === 'string') {
1326 func = function () {
1327 return this[callback]();
1328 };
1329 }
1330 if (token) {
1331 formatTokenFunctions[token] = func;
1332 }
1333 if (padded) {
1334 formatTokenFunctions[padded[0]] = function () {
1335 return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
1336 };
1337 }
1338 if (ordinal) {
1339 formatTokenFunctions[ordinal] = function () {
1340 return this.localeData().ordinal(func.apply(this, arguments), token);
1341 };
1342 }
1343 }
1344
1345 function removeFormattingTokens(input) {
1346 if (input.match(/\[[\s\S]/)) {
1347 return input.replace(/^\[|\]$/g, '');
1348 }
1349 return input.replace(/\\/g, '');
1350 }
1351
1352 function makeFormatFunction(format) {
1353 var array = format.match(formattingTokens), i, length;
1354
1355 for (i = 0, length = array.length; i < length; i++) {
1356 if (formatTokenFunctions[array[i]]) {
1357 array[i] = formatTokenFunctions[array[i]];
1358 } else {
1359 array[i] = removeFormattingTokens(array[i]);
1360 }
1361 }
1362
1363 return function (mom) {
1364 var output = '', i;
1365 for (i = 0; i < length; i++) {
1366 output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
1367 }
1368 return output;
1369 };
1370 }
1371
1372 // format date using native date object
1373 function formatMoment(m, format) {
1374 if (!m.isValid()) {
1375 return m.localeData().invalidDate();
1376 }
1377
1378 format = expandFormat(format, m.localeData());
1379 formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
1380
1381 return formatFunctions[format](m);
1382 }
1383
1384 function expandFormat(format, locale) {
1385 var i = 5;
1386
1387 function replaceLongDateFormatTokens(input) {
1388 return locale.longDateFormat(input) || input;
1389 }
1390
1391 localFormattingTokens.lastIndex = 0;
1392 while (i >= 0 && localFormattingTokens.test(format)) {
1393 format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
1394 localFormattingTokens.lastIndex = 0;
1395 i -= 1;
1396 }
1397
1398 return format;
1399 }
1400
1401 var match1 = /\d/; // 0 - 9
1402 var match2 = /\d\d/; // 00 - 99
1403 var match3 = /\d{3}/; // 000 - 999
1404 var match4 = /\d{4}/; // 0000 - 9999
1405 var match6 = /[+-]?\d{6}/; // -999999 - 999999
1406 var match1to2 = /\d\d?/; // 0 - 99
1407 var match3to4 = /\d\d\d\d?/; // 999 - 9999
1408 var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999
1409 var match1to3 = /\d{1,3}/; // 0 - 999
1410 var match1to4 = /\d{1,4}/; // 0 - 9999
1411 var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999
1412
1413 var matchUnsigned = /\d+/; // 0 - inf
1414 var matchSigned = /[+-]?\d+/; // -inf - inf
1415
1416 var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
1417 var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
1418
1419 var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
1420
1421 // any word (or two) characters or numbers including two/three word month in arabic.
1422 // includes scottish gaelic two word and hyphenated months
1423 var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
1424
1425 var regexes = {};
1426
1427 function addRegexToken (token, regex, strictRegex) {
1428 regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
1429 return (isStrict && strictRegex) ? strictRegex : regex;
1430 };
1431 }
1432
1433 function getParseRegexForToken (token, config) {
1434 if (!hasOwnProp(regexes, token)) {
1435 return new RegExp(unescapeFormat(token));
1436 }
1437
1438 return regexes[token](config._strict, config._locale);
1439 }
1440
1441 // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
1442 function unescapeFormat(s) {
1443 return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
1444 return p1 || p2 || p3 || p4;
1445 }));
1446 }
1447
1448 function regexEscape(s) {
1449 return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
1450 }
1451
1452 var tokens = {};
1453
1454 function addParseToken (token, callback) {
1455 var i, func = callback;
1456 if (typeof token === 'string') {
1457 token = [token];
1458 }
1459 if (isNumber(callback)) {
1460 func = function (input, array) {
1461 array[callback] = toInt(input);
1462 };
1463 }
1464 for (i = 0; i < token.length; i++) {
1465 tokens[token[i]] = func;
1466 }
1467 }
1468
1469 function addWeekParseToken (token, callback) {
1470 addParseToken(token, function (input, array, config, token) {
1471 config._w = config._w || {};
1472 callback(input, config._w, config, token);
1473 });
1474 }
1475
1476 function addTimeToArrayFromToken(token, input, config) {
1477 if (input != null && hasOwnProp(tokens, token)) {
1478 tokens[token](input, config._a, config, token);
1479 }
1480 }
1481
1482 var YEAR = 0;
1483 var MONTH = 1;
1484 var DATE = 2;
1485 var HOUR = 3;
1486 var MINUTE = 4;
1487 var SECOND = 5;
1488 var MILLISECOND = 6;
1489 var WEEK = 7;
1490 var WEEKDAY = 8;
1491
1492 // FORMATTING
1493
1494 addFormatToken('Y', 0, 0, function () {
1495 var y = this.year();
1496 return y <= 9999 ? '' + y : '+' + y;
1497 });
1498
1499 addFormatToken(0, ['YY', 2], 0, function () {
1500 return this.year() % 100;
1501 });
1502
1503 addFormatToken(0, ['YYYY', 4], 0, 'year');
1504 addFormatToken(0, ['YYYYY', 5], 0, 'year');
1505 addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
1506
1507 // ALIASES
1508
1509 addUnitAlias('year', 'y');
1510
1511 // PRIORITIES
1512
1513 addUnitPriority('year', 1);
1514
1515 // PARSING
1516
1517 addRegexToken('Y', matchSigned);
1518 addRegexToken('YY', match1to2, match2);
1519 addRegexToken('YYYY', match1to4, match4);
1520 addRegexToken('YYYYY', match1to6, match6);
1521 addRegexToken('YYYYYY', match1to6, match6);
1522
1523 addParseToken(['YYYYY', 'YYYYYY'], YEAR);
1524 addParseToken('YYYY', function (input, array) {
1525 array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
1526 });
1527 addParseToken('YY', function (input, array) {
1528 array[YEAR] = hooks.parseTwoDigitYear(input);
1529 });
1530 addParseToken('Y', function (input, array) {
1531 array[YEAR] = parseInt(input, 10);
1532 });
1533
1534 // HELPERS
1535
1536 function daysInYear(year) {
1537 return isLeapYear(year) ? 366 : 365;
1538 }
1539
1540 function isLeapYear(year) {
1541 return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
1542 }
1543
1544 // HOOKS
1545
1546 hooks.parseTwoDigitYear = function (input) {
1547 return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
1548 };
1549
1550 // MOMENTS
1551
1552 var getSetYear = makeGetSet('FullYear', true);
1553
1554 function getIsLeapYear () {
1555 return isLeapYear(this.year());
1556 }
1557
1558 function makeGetSet (unit, keepTime) {
1559 return function (value) {
1560 if (value != null) {
1561 set$1(this, unit, value);
1562 hooks.updateOffset(this, keepTime);
1563 return this;
1564 } else {
1565 return get(this, unit);
1566 }
1567 };
1568 }
1569
1570 function get (mom, unit) {
1571 return mom.isValid() ?
1572 mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
1573 }
1574
1575 function set$1 (mom, unit, value) {
1576 if (mom.isValid() && !isNaN(value)) {
1577 if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
1578 mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
1579 }
1580 else {
1581 mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
1582 }
1583 }
1584 }
1585
1586 // MOMENTS
1587
1588 function stringGet (units) {
1589 units = normalizeUnits(units);
1590 if (isFunction(this[units])) {
1591 return this[units]();
1592 }
1593 return this;
1594 }
1595
1596
1597 function stringSet (units, value) {
1598 if (typeof units === 'object') {
1599 units = normalizeObjectUnits(units);
1600 var prioritized = getPrioritizedUnits(units);
1601 for (var i = 0; i < prioritized.length; i++) {
1602 this[prioritized[i].unit](units[prioritized[i].unit]);
1603 }
1604 } else {
1605 units = normalizeUnits(units);
1606 if (isFunction(this[units])) {
1607 return this[units](value);
1608 }
1609 }
1610 return this;
1611 }
1612
1613 function mod(n, x) {
1614 return ((n % x) + x) % x;
1615 }
1616
1617 var indexOf;
1618
1619 if (Array.prototype.indexOf) {
1620 indexOf = Array.prototype.indexOf;
1621 } else {
1622 indexOf = function (o) {
1623 // I know
1624 var i;
1625 for (i = 0; i < this.length; ++i) {
1626 if (this[i] === o) {
1627 return i;
1628 }
1629 }
1630 return -1;
1631 };
1632 }
1633
1634 function daysInMonth(year, month) {
1635 if (isNaN(year) || isNaN(month)) {
1636 return NaN;
1637 }
1638 var modMonth = mod(month, 12);
1639 year += (month - modMonth) / 12;
1640 return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);
1641 }
1642
1643 // FORMATTING
1644
1645 addFormatToken('M', ['MM', 2], 'Mo', function () {
1646 return this.month() + 1;
1647 });
1648
1649 addFormatToken('MMM', 0, 0, function (format) {
1650 return this.localeData().monthsShort(this, format);
1651 });
1652
1653 addFormatToken('MMMM', 0, 0, function (format) {
1654 return this.localeData().months(this, format);
1655 });
1656
1657 // ALIASES
1658
1659 addUnitAlias('month', 'M');
1660
1661 // PRIORITY
1662
1663 addUnitPriority('month', 8);
1664
1665 // PARSING
1666
1667 addRegexToken('M', match1to2);
1668 addRegexToken('MM', match1to2, match2);
1669 addRegexToken('MMM', function (isStrict, locale) {
1670 return locale.monthsShortRegex(isStrict);
1671 });
1672 addRegexToken('MMMM', function (isStrict, locale) {
1673 return locale.monthsRegex(isStrict);
1674 });
1675
1676 addParseToken(['M', 'MM'], function (input, array) {
1677 array[MONTH] = toInt(input) - 1;
1678 });
1679
1680 addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
1681 var month = config._locale.monthsParse(input, token, config._strict);
1682 // if we didn't find a month name, mark the date as invalid.
1683 if (month != null) {
1684 array[MONTH] = month;
1685 } else {
1686 getParsingFlags(config).invalidMonth = input;
1687 }
1688 });
1689
1690 // LOCALES
1691
1692 var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
1693 var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
1694 function localeMonths (m, format) {
1695 if (!m) {
1696 return isArray(this._months) ? this._months :
1697 this._months['standalone'];
1698 }
1699 return isArray(this._months) ? this._months[m.month()] :
1700 this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
1701 }
1702
1703 var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
1704 function localeMonthsShort (m, format) {
1705 if (!m) {
1706 return isArray(this._monthsShort) ? this._monthsShort :
1707 this._monthsShort['standalone'];
1708 }
1709 return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
1710 this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
1711 }
1712
1713 function handleStrictParse(monthName, format, strict) {
1714 var i, ii, mom, llc = monthName.toLocaleLowerCase();
1715 if (!this._monthsParse) {
1716 // this is not used
1717 this._monthsParse = [];
1718 this._longMonthsParse = [];
1719 this._shortMonthsParse = [];
1720 for (i = 0; i < 12; ++i) {
1721 mom = createUTC([2000, i]);
1722 this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
1723 this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
1724 }
1725 }
1726
1727 if (strict) {
1728 if (format === 'MMM') {
1729 ii = indexOf.call(this._shortMonthsParse, llc);
1730 return ii !== -1 ? ii : null;
1731 } else {
1732 ii = indexOf.call(this._longMonthsParse, llc);
1733 return ii !== -1 ? ii : null;
1734 }
1735 } else {
1736 if (format === 'MMM') {
1737 ii = indexOf.call(this._shortMonthsParse, llc);
1738 if (ii !== -1) {
1739 return ii;
1740 }
1741 ii = indexOf.call(this._longMonthsParse, llc);
1742 return ii !== -1 ? ii : null;
1743 } else {
1744 ii = indexOf.call(this._longMonthsParse, llc);
1745 if (ii !== -1) {
1746 return ii;
1747 }
1748 ii = indexOf.call(this._shortMonthsParse, llc);
1749 return ii !== -1 ? ii : null;
1750 }
1751 }
1752 }
1753
1754 function localeMonthsParse (monthName, format, strict) {
1755 var i, mom, regex;
1756
1757 if (this._monthsParseExact) {
1758 return handleStrictParse.call(this, monthName, format, strict);
1759 }
1760
1761 if (!this._monthsParse) {
1762 this._monthsParse = [];
1763 this._longMonthsParse = [];
1764 this._shortMonthsParse = [];
1765 }
1766
1767 // TODO: add sorting
1768 // Sorting makes sure if one month (or abbr) is a prefix of another
1769 // see sorting in computeMonthsParse
1770 for (i = 0; i < 12; i++) {
1771 // make the regex if we don't have it already
1772 mom = createUTC([2000, i]);
1773 if (strict && !this._longMonthsParse[i]) {
1774 this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
1775 this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
1776 }
1777 if (!strict && !this._monthsParse[i]) {
1778 regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
1779 this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
1780 }
1781 // test the regex
1782 if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
1783 return i;
1784 } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
1785 return i;
1786 } else if (!strict && this._monthsParse[i].test(monthName)) {
1787 return i;
1788 }
1789 }
1790 }
1791
1792 // MOMENTS
1793
1794 function setMonth (mom, value) {
1795 var dayOfMonth;
1796
1797 if (!mom.isValid()) {
1798 // No op
1799 return mom;
1800 }
1801
1802 if (typeof value === 'string') {
1803 if (/^\d+$/.test(value)) {
1804 value = toInt(value);
1805 } else {
1806 value = mom.localeData().monthsParse(value);
1807 // TODO: Another silent failure?
1808 if (!isNumber(value)) {
1809 return mom;
1810 }
1811 }
1812 }
1813
1814 dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
1815 mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
1816 return mom;
1817 }
1818
1819 function getSetMonth (value) {
1820 if (value != null) {
1821 setMonth(this, value);
1822 hooks.updateOffset(this, true);
1823 return this;
1824 } else {
1825 return get(this, 'Month');
1826 }
1827 }
1828
1829 function getDaysInMonth () {
1830 return daysInMonth(this.year(), this.month());
1831 }
1832
1833 var defaultMonthsShortRegex = matchWord;
1834 function monthsShortRegex (isStrict) {
1835 if (this._monthsParseExact) {
1836 if (!hasOwnProp(this, '_monthsRegex')) {
1837 computeMonthsParse.call(this);
1838 }
1839 if (isStrict) {
1840 return this._monthsShortStrictRegex;
1841 } else {
1842 return this._monthsShortRegex;
1843 }
1844 } else {
1845 if (!hasOwnProp(this, '_monthsShortRegex')) {
1846 this._monthsShortRegex = defaultMonthsShortRegex;
1847 }
1848 return this._monthsShortStrictRegex && isStrict ?
1849 this._monthsShortStrictRegex : this._monthsShortRegex;
1850 }
1851 }
1852
1853 var defaultMonthsRegex = matchWord;
1854 function monthsRegex (isStrict) {
1855 if (this._monthsParseExact) {
1856 if (!hasOwnProp(this, '_monthsRegex')) {
1857 computeMonthsParse.call(this);
1858 }
1859 if (isStrict) {
1860 return this._monthsStrictRegex;
1861 } else {
1862 return this._monthsRegex;
1863 }
1864 } else {
1865 if (!hasOwnProp(this, '_monthsRegex')) {
1866 this._monthsRegex = defaultMonthsRegex;
1867 }
1868 return this._monthsStrictRegex && isStrict ?
1869 this._monthsStrictRegex : this._monthsRegex;
1870 }
1871 }
1872
1873 function computeMonthsParse () {
1874 function cmpLenRev(a, b) {
1875 return b.length - a.length;
1876 }
1877
1878 var shortPieces = [], longPieces = [], mixedPieces = [],
1879 i, mom;
1880 for (i = 0; i < 12; i++) {
1881 // make the regex if we don't have it already
1882 mom = createUTC([2000, i]);
1883 shortPieces.push(this.monthsShort(mom, ''));
1884 longPieces.push(this.months(mom, ''));
1885 mixedPieces.push(this.months(mom, ''));
1886 mixedPieces.push(this.monthsShort(mom, ''));
1887 }
1888 // Sorting makes sure if one month (or abbr) is a prefix of another it
1889 // will match the longer piece.
1890 shortPieces.sort(cmpLenRev);
1891 longPieces.sort(cmpLenRev);
1892 mixedPieces.sort(cmpLenRev);
1893 for (i = 0; i < 12; i++) {
1894 shortPieces[i] = regexEscape(shortPieces[i]);
1895 longPieces[i] = regexEscape(longPieces[i]);
1896 }
1897 for (i = 0; i < 24; i++) {
1898 mixedPieces[i] = regexEscape(mixedPieces[i]);
1899 }
1900
1901 this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1902 this._monthsShortRegex = this._monthsRegex;
1903 this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
1904 this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
1905 }
1906
1907 function createDate (y, m, d, h, M, s, ms) {
1908 // can't just apply() to create a date:
1909 // https://stackoverflow.com/q/181348
1910 var date;
1911 // the date constructor remaps years 0-99 to 1900-1999
1912 if (y < 100 && y >= 0) {
1913 // preserve leap years using a full 400 year cycle, then reset
1914 date = new Date(y + 400, m, d, h, M, s, ms);
1915 if (isFinite(date.getFullYear())) {
1916 date.setFullYear(y);
1917 }
1918 } else {
1919 date = new Date(y, m, d, h, M, s, ms);
1920 }
1921
1922 return date;
1923 }
1924
1925 function createUTCDate (y) {
1926 var date;
1927 // the Date.UTC function remaps years 0-99 to 1900-1999
1928 if (y < 100 && y >= 0) {
1929 var args = Array.prototype.slice.call(arguments);
1930 // preserve leap years using a full 400 year cycle, then reset
1931 args[0] = y + 400;
1932 date = new Date(Date.UTC.apply(null, args));
1933 if (isFinite(date.getUTCFullYear())) {
1934 date.setUTCFullYear(y);
1935 }
1936 } else {
1937 date = new Date(Date.UTC.apply(null, arguments));
1938 }
1939
1940 return date;
1941 }
1942
1943 // start-of-first-week - start-of-year
1944 function firstWeekOffset(year, dow, doy) {
1945 var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
1946 fwd = 7 + dow - doy,
1947 // first-week day local weekday -- which local weekday is fwd
1948 fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
1949
1950 return -fwdlw + fwd - 1;
1951 }
1952
1953 // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
1954 function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
1955 var localWeekday = (7 + weekday - dow) % 7,
1956 weekOffset = firstWeekOffset(year, dow, doy),
1957 dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
1958 resYear, resDayOfYear;
1959
1960 if (dayOfYear <= 0) {
1961 resYear = year - 1;
1962 resDayOfYear = daysInYear(resYear) + dayOfYear;
1963 } else if (dayOfYear > daysInYear(year)) {
1964 resYear = year + 1;
1965 resDayOfYear = dayOfYear - daysInYear(year);
1966 } else {
1967 resYear = year;
1968 resDayOfYear = dayOfYear;
1969 }
1970
1971 return {
1972 year: resYear,
1973 dayOfYear: resDayOfYear
1974 };
1975 }
1976
1977 function weekOfYear(mom, dow, doy) {
1978 var weekOffset = firstWeekOffset(mom.year(), dow, doy),
1979 week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
1980 resWeek, resYear;
1981
1982 if (week < 1) {
1983 resYear = mom.year() - 1;
1984 resWeek = week + weeksInYear(resYear, dow, doy);
1985 } else if (week > weeksInYear(mom.year(), dow, doy)) {
1986 resWeek = week - weeksInYear(mom.year(), dow, doy);
1987 resYear = mom.year() + 1;
1988 } else {
1989 resYear = mom.year();
1990 resWeek = week;
1991 }
1992
1993 return {
1994 week: resWeek,
1995 year: resYear
1996 };
1997 }
1998
1999 function weeksInYear(year, dow, doy) {
2000 var weekOffset = firstWeekOffset(year, dow, doy),
2001 weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
2002 return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
2003 }
2004
2005 // FORMATTING
2006
2007 addFormatToken('w', ['ww', 2], 'wo', 'week');
2008 addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
2009
2010 // ALIASES
2011
2012 addUnitAlias('week', 'w');
2013 addUnitAlias('isoWeek', 'W');
2014
2015 // PRIORITIES
2016
2017 addUnitPriority('week', 5);
2018 addUnitPriority('isoWeek', 5);
2019
2020 // PARSING
2021
2022 addRegexToken('w', match1to2);
2023 addRegexToken('ww', match1to2, match2);
2024 addRegexToken('W', match1to2);
2025 addRegexToken('WW', match1to2, match2);
2026
2027 addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
2028 week[token.substr(0, 1)] = toInt(input);
2029 });
2030
2031 // HELPERS
2032
2033 // LOCALES
2034
2035 function localeWeek (mom) {
2036 return weekOfYear(mom, this._week.dow, this._week.doy).week;
2037 }
2038
2039 var defaultLocaleWeek = {
2040 dow : 0, // Sunday is the first day of the week.
2041 doy : 6 // The week that contains Jan 6th is the first week of the year.
2042 };
2043
2044 function localeFirstDayOfWeek () {
2045 return this._week.dow;
2046 }
2047
2048 function localeFirstDayOfYear () {
2049 return this._week.doy;
2050 }
2051
2052 // MOMENTS
2053
2054 function getSetWeek (input) {
2055 var week = this.localeData().week(this);
2056 return input == null ? week : this.add((input - week) * 7, 'd');
2057 }
2058
2059 function getSetISOWeek (input) {
2060 var week = weekOfYear(this, 1, 4).week;
2061 return input == null ? week : this.add((input - week) * 7, 'd');
2062 }
2063
2064 // FORMATTING
2065
2066 addFormatToken('d', 0, 'do', 'day');
2067
2068 addFormatToken('dd', 0, 0, function (format) {
2069 return this.localeData().weekdaysMin(this, format);
2070 });
2071
2072 addFormatToken('ddd', 0, 0, function (format) {
2073 return this.localeData().weekdaysShort(this, format);
2074 });
2075
2076 addFormatToken('dddd', 0, 0, function (format) {
2077 return this.localeData().weekdays(this, format);
2078 });
2079
2080 addFormatToken('e', 0, 0, 'weekday');
2081 addFormatToken('E', 0, 0, 'isoWeekday');
2082
2083 // ALIASES
2084
2085 addUnitAlias('day', 'd');
2086 addUnitAlias('weekday', 'e');
2087 addUnitAlias('isoWeekday', 'E');
2088
2089 // PRIORITY
2090 addUnitPriority('day', 11);
2091 addUnitPriority('weekday', 11);
2092 addUnitPriority('isoWeekday', 11);
2093
2094 // PARSING
2095
2096 addRegexToken('d', match1to2);
2097 addRegexToken('e', match1to2);
2098 addRegexToken('E', match1to2);
2099 addRegexToken('dd', function (isStrict, locale) {
2100 return locale.weekdaysMinRegex(isStrict);
2101 });
2102 addRegexToken('ddd', function (isStrict, locale) {
2103 return locale.weekdaysShortRegex(isStrict);
2104 });
2105 addRegexToken('dddd', function (isStrict, locale) {
2106 return locale.weekdaysRegex(isStrict);
2107 });
2108
2109 addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
2110 var weekday = config._locale.weekdaysParse(input, token, config._strict);
2111 // if we didn't get a weekday name, mark the date as invalid
2112 if (weekday != null) {
2113 week.d = weekday;
2114 } else {
2115 getParsingFlags(config).invalidWeekday = input;
2116 }
2117 });
2118
2119 addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
2120 week[token] = toInt(input);
2121 });
2122
2123 // HELPERS
2124
2125 function parseWeekday(input, locale) {
2126 if (typeof input !== 'string') {
2127 return input;
2128 }
2129
2130 if (!isNaN(input)) {
2131 return parseInt(input, 10);
2132 }
2133
2134 input = locale.weekdaysParse(input);
2135 if (typeof input === 'number') {
2136 return input;
2137 }
2138
2139 return null;
2140 }
2141
2142 function parseIsoWeekday(input, locale) {
2143 if (typeof input === 'string') {
2144 return locale.weekdaysParse(input) % 7 || 7;
2145 }
2146 return isNaN(input) ? null : input;
2147 }
2148
2149 // LOCALES
2150 function shiftWeekdays (ws, n) {
2151 return ws.slice(n, 7).concat(ws.slice(0, n));
2152 }
2153
2154 var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
2155 function localeWeekdays (m, format) {
2156 var weekdays = isArray(this._weekdays) ? this._weekdays :
2157 this._weekdays[(m && m !== true && this._weekdays.isFormat.test(format)) ? 'format' : 'standalone'];
2158 return (m === true) ? shiftWeekdays(weekdays, this._week.dow)
2159 : (m) ? weekdays[m.day()] : weekdays;
2160 }
2161
2162 var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
2163 function localeWeekdaysShort (m) {
2164 return (m === true) ? shiftWeekdays(this._weekdaysShort, this._week.dow)
2165 : (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;
2166 }
2167
2168 var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
2169 function localeWeekdaysMin (m) {
2170 return (m === true) ? shiftWeekdays(this._weekdaysMin, this._week.dow)
2171 : (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;
2172 }
2173
2174 function handleStrictParse$1(weekdayName, format, strict) {
2175 var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
2176 if (!this._weekdaysParse) {
2177 this._weekdaysParse = [];
2178 this._shortWeekdaysParse = [];
2179 this._minWeekdaysParse = [];
2180
2181 for (i = 0; i < 7; ++i) {
2182 mom = createUTC([2000, 1]).day(i);
2183 this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
2184 this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
2185 this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
2186 }
2187 }
2188
2189 if (strict) {
2190 if (format === 'dddd') {
2191 ii = indexOf.call(this._weekdaysParse, llc);
2192 return ii !== -1 ? ii : null;
2193 } else if (format === 'ddd') {
2194 ii = indexOf.call(this._shortWeekdaysParse, llc);
2195 return ii !== -1 ? ii : null;
2196 } else {
2197 ii = indexOf.call(this._minWeekdaysParse, llc);
2198 return ii !== -1 ? ii : null;
2199 }
2200 } else {
2201 if (format === 'dddd') {
2202 ii = indexOf.call(this._weekdaysParse, llc);
2203 if (ii !== -1) {
2204 return ii;
2205 }
2206 ii = indexOf.call(this._shortWeekdaysParse, llc);
2207 if (ii !== -1) {
2208 return ii;
2209 }
2210 ii = indexOf.call(this._minWeekdaysParse, llc);
2211 return ii !== -1 ? ii : null;
2212 } else if (format === 'ddd') {
2213 ii = indexOf.call(this._shortWeekdaysParse, llc);
2214 if (ii !== -1) {
2215 return ii;
2216 }
2217 ii = indexOf.call(this._weekdaysParse, llc);
2218 if (ii !== -1) {
2219 return ii;
2220 }
2221 ii = indexOf.call(this._minWeekdaysParse, llc);
2222 return ii !== -1 ? ii : null;
2223 } else {
2224 ii = indexOf.call(this._minWeekdaysParse, llc);
2225 if (ii !== -1) {
2226 return ii;
2227 }
2228 ii = indexOf.call(this._weekdaysParse, llc);
2229 if (ii !== -1) {
2230 return ii;
2231 }
2232 ii = indexOf.call(this._shortWeekdaysParse, llc);
2233 return ii !== -1 ? ii : null;
2234 }
2235 }
2236 }
2237
2238 function localeWeekdaysParse (weekdayName, format, strict) {
2239 var i, mom, regex;
2240
2241 if (this._weekdaysParseExact) {
2242 return handleStrictParse$1.call(this, weekdayName, format, strict);
2243 }
2244
2245 if (!this._weekdaysParse) {
2246 this._weekdaysParse = [];
2247 this._minWeekdaysParse = [];
2248 this._shortWeekdaysParse = [];
2249 this._fullWeekdaysParse = [];
2250 }
2251
2252 for (i = 0; i < 7; i++) {
2253 // make the regex if we don't have it already
2254
2255 mom = createUTC([2000, 1]).day(i);
2256 if (strict && !this._fullWeekdaysParse[i]) {
2257 this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');
2258 this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');
2259 this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');
2260 }
2261 if (!this._weekdaysParse[i]) {
2262 regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
2263 this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
2264 }
2265 // test the regex
2266 if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
2267 return i;
2268 } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
2269 return i;
2270 } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
2271 return i;
2272 } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
2273 return i;
2274 }
2275 }
2276 }
2277
2278 // MOMENTS
2279
2280 function getSetDayOfWeek (input) {
2281 if (!this.isValid()) {
2282 return input != null ? this : NaN;
2283 }
2284 var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
2285 if (input != null) {
2286 input = parseWeekday(input, this.localeData());
2287 return this.add(input - day, 'd');
2288 } else {
2289 return day;
2290 }
2291 }
2292
2293 function getSetLocaleDayOfWeek (input) {
2294 if (!this.isValid()) {
2295 return input != null ? this : NaN;
2296 }
2297 var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
2298 return input == null ? weekday : this.add(input - weekday, 'd');
2299 }
2300
2301 function getSetISODayOfWeek (input) {
2302 if (!this.isValid()) {
2303 return input != null ? this : NaN;
2304 }
2305
2306 // behaves the same as moment#day except
2307 // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
2308 // as a setter, sunday should belong to the previous week.
2309
2310 if (input != null) {
2311 var weekday = parseIsoWeekday(input, this.localeData());
2312 return this.day(this.day() % 7 ? weekday : weekday - 7);
2313 } else {
2314 return this.day() || 7;
2315 }
2316 }
2317
2318 var defaultWeekdaysRegex = matchWord;
2319 function weekdaysRegex (isStrict) {
2320 if (this._weekdaysParseExact) {
2321 if (!hasOwnProp(this, '_weekdaysRegex')) {
2322 computeWeekdaysParse.call(this);
2323 }
2324 if (isStrict) {
2325 return this._weekdaysStrictRegex;
2326 } else {
2327 return this._weekdaysRegex;
2328 }
2329 } else {
2330 if (!hasOwnProp(this, '_weekdaysRegex')) {
2331 this._weekdaysRegex = defaultWeekdaysRegex;
2332 }
2333 return this._weekdaysStrictRegex && isStrict ?
2334 this._weekdaysStrictRegex : this._weekdaysRegex;
2335 }
2336 }
2337
2338 var defaultWeekdaysShortRegex = matchWord;
2339 function weekdaysShortRegex (isStrict) {
2340 if (this._weekdaysParseExact) {
2341 if (!hasOwnProp(this, '_weekdaysRegex')) {
2342 computeWeekdaysParse.call(this);
2343 }
2344 if (isStrict) {
2345 return this._weekdaysShortStrictRegex;
2346 } else {
2347 return this._weekdaysShortRegex;
2348 }
2349 } else {
2350 if (!hasOwnProp(this, '_weekdaysShortRegex')) {
2351 this._weekdaysShortRegex = defaultWeekdaysShortRegex;
2352 }
2353 return this._weekdaysShortStrictRegex && isStrict ?
2354 this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
2355 }
2356 }
2357
2358 var defaultWeekdaysMinRegex = matchWord;
2359 function weekdaysMinRegex (isStrict) {
2360 if (this._weekdaysParseExact) {
2361 if (!hasOwnProp(this, '_weekdaysRegex')) {
2362 computeWeekdaysParse.call(this);
2363 }
2364 if (isStrict) {
2365 return this._weekdaysMinStrictRegex;
2366 } else {
2367 return this._weekdaysMinRegex;
2368 }
2369 } else {
2370 if (!hasOwnProp(this, '_weekdaysMinRegex')) {
2371 this._weekdaysMinRegex = defaultWeekdaysMinRegex;
2372 }
2373 return this._weekdaysMinStrictRegex && isStrict ?
2374 this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
2375 }
2376 }
2377
2378
2379 function computeWeekdaysParse () {
2380 function cmpLenRev(a, b) {
2381 return b.length - a.length;
2382 }
2383
2384 var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
2385 i, mom, minp, shortp, longp;
2386 for (i = 0; i < 7; i++) {
2387 // make the regex if we don't have it already
2388 mom = createUTC([2000, 1]).day(i);
2389 minp = this.weekdaysMin(mom, '');
2390 shortp = this.weekdaysShort(mom, '');
2391 longp = this.weekdays(mom, '');
2392 minPieces.push(minp);
2393 shortPieces.push(shortp);
2394 longPieces.push(longp);
2395 mixedPieces.push(minp);
2396 mixedPieces.push(shortp);
2397 mixedPieces.push(longp);
2398 }
2399 // Sorting makes sure if one weekday (or abbr) is a prefix of another it
2400 // will match the longer piece.
2401 minPieces.sort(cmpLenRev);
2402 shortPieces.sort(cmpLenRev);
2403 longPieces.sort(cmpLenRev);
2404 mixedPieces.sort(cmpLenRev);
2405 for (i = 0; i < 7; i++) {
2406 shortPieces[i] = regexEscape(shortPieces[i]);
2407 longPieces[i] = regexEscape(longPieces[i]);
2408 mixedPieces[i] = regexEscape(mixedPieces[i]);
2409 }
2410
2411 this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
2412 this._weekdaysShortRegex = this._weekdaysRegex;
2413 this._weekdaysMinRegex = this._weekdaysRegex;
2414
2415 this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
2416 this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
2417 this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
2418 }
2419
2420 // FORMATTING
2421
2422 function hFormat() {
2423 return this.hours() % 12 || 12;
2424 }
2425
2426 function kFormat() {
2427 return this.hours() || 24;
2428 }
2429
2430 addFormatToken('H', ['HH', 2], 0, 'hour');
2431 addFormatToken('h', ['hh', 2], 0, hFormat);
2432 addFormatToken('k', ['kk', 2], 0, kFormat);
2433
2434 addFormatToken('hmm', 0, 0, function () {
2435 return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
2436 });
2437
2438 addFormatToken('hmmss', 0, 0, function () {
2439 return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
2440 zeroFill(this.seconds(), 2);
2441 });
2442
2443 addFormatToken('Hmm', 0, 0, function () {
2444 return '' + this.hours() + zeroFill(this.minutes(), 2);
2445 });
2446
2447 addFormatToken('Hmmss', 0, 0, function () {
2448 return '' + this.hours() + zeroFill(this.minutes(), 2) +
2449 zeroFill(this.seconds(), 2);
2450 });
2451
2452 function meridiem (token, lowercase) {
2453 addFormatToken(token, 0, 0, function () {
2454 return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
2455 });
2456 }
2457
2458 meridiem('a', true);
2459 meridiem('A', false);
2460
2461 // ALIASES
2462
2463 addUnitAlias('hour', 'h');
2464
2465 // PRIORITY
2466 addUnitPriority('hour', 13);
2467
2468 // PARSING
2469
2470 function matchMeridiem (isStrict, locale) {
2471 return locale._meridiemParse;
2472 }
2473
2474 addRegexToken('a', matchMeridiem);
2475 addRegexToken('A', matchMeridiem);
2476 addRegexToken('H', match1to2);
2477 addRegexToken('h', match1to2);
2478 addRegexToken('k', match1to2);
2479 addRegexToken('HH', match1to2, match2);
2480 addRegexToken('hh', match1to2, match2);
2481 addRegexToken('kk', match1to2, match2);
2482
2483 addRegexToken('hmm', match3to4);
2484 addRegexToken('hmmss', match5to6);
2485 addRegexToken('Hmm', match3to4);
2486 addRegexToken('Hmmss', match5to6);
2487
2488 addParseToken(['H', 'HH'], HOUR);
2489 addParseToken(['k', 'kk'], function (input, array, config) {
2490 var kInput = toInt(input);
2491 array[HOUR] = kInput === 24 ? 0 : kInput;
2492 });
2493 addParseToken(['a', 'A'], function (input, array, config) {
2494 config._isPm = config._locale.isPM(input);
2495 config._meridiem = input;
2496 });
2497 addParseToken(['h', 'hh'], function (input, array, config) {
2498 array[HOUR] = toInt(input);
2499 getParsingFlags(config).bigHour = true;
2500 });
2501 addParseToken('hmm', function (input, array, config) {
2502 var pos = input.length - 2;
2503 array[HOUR] = toInt(input.substr(0, pos));
2504 array[MINUTE] = toInt(input.substr(pos));
2505 getParsingFlags(config).bigHour = true;
2506 });
2507 addParseToken('hmmss', function (input, array, config) {
2508 var pos1 = input.length - 4;
2509 var pos2 = input.length - 2;
2510 array[HOUR] = toInt(input.substr(0, pos1));
2511 array[MINUTE] = toInt(input.substr(pos1, 2));
2512 array[SECOND] = toInt(input.substr(pos2));
2513 getParsingFlags(config).bigHour = true;
2514 });
2515 addParseToken('Hmm', function (input, array, config) {
2516 var pos = input.length - 2;
2517 array[HOUR] = toInt(input.substr(0, pos));
2518 array[MINUTE] = toInt(input.substr(pos));
2519 });
2520 addParseToken('Hmmss', function (input, array, config) {
2521 var pos1 = input.length - 4;
2522 var pos2 = input.length - 2;
2523 array[HOUR] = toInt(input.substr(0, pos1));
2524 array[MINUTE] = toInt(input.substr(pos1, 2));
2525 array[SECOND] = toInt(input.substr(pos2));
2526 });
2527
2528 // LOCALES
2529
2530 function localeIsPM (input) {
2531 // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
2532 // Using charAt should be more compatible.
2533 return ((input + '').toLowerCase().charAt(0) === 'p');
2534 }
2535
2536 var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
2537 function localeMeridiem (hours, minutes, isLower) {
2538 if (hours > 11) {
2539 return isLower ? 'pm' : 'PM';
2540 } else {
2541 return isLower ? 'am' : 'AM';
2542 }
2543 }
2544
2545
2546 // MOMENTS
2547
2548 // Setting the hour should keep the time, because the user explicitly
2549 // specified which hour they want. So trying to maintain the same hour (in
2550 // a new timezone) makes sense. Adding/subtracting hours does not follow
2551 // this rule.
2552 var getSetHour = makeGetSet('Hours', true);
2553
2554 var baseConfig = {
2555 calendar: defaultCalendar,
2556 longDateFormat: defaultLongDateFormat,
2557 invalidDate: defaultInvalidDate,
2558 ordinal: defaultOrdinal,
2559 dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
2560 relativeTime: defaultRelativeTime,
2561
2562 months: defaultLocaleMonths,
2563 monthsShort: defaultLocaleMonthsShort,
2564
2565 week: defaultLocaleWeek,
2566
2567 weekdays: defaultLocaleWeekdays,
2568 weekdaysMin: defaultLocaleWeekdaysMin,
2569 weekdaysShort: defaultLocaleWeekdaysShort,
2570
2571 meridiemParse: defaultLocaleMeridiemParse
2572 };
2573
2574 // internal storage for locale config files
2575 var locales = {};
2576 var localeFamilies = {};
2577 var globalLocale;
2578
2579 function normalizeLocale(key) {
2580 return key ? key.toLowerCase().replace('_', '-') : key;
2581 }
2582
2583 // pick the locale from the array
2584 // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
2585 // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
2586 function chooseLocale(names) {
2587 var i = 0, j, next, locale, split;
2588
2589 while (i < names.length) {
2590 split = normalizeLocale(names[i]).split('-');
2591 j = split.length;
2592 next = normalizeLocale(names[i + 1]);
2593 next = next ? next.split('-') : null;
2594 while (j > 0) {
2595 locale = loadLocale(split.slice(0, j).join('-'));
2596 if (locale) {
2597 return locale;
2598 }
2599 if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
2600 //the next array item is better than a shallower substring of this one
2601 break;
2602 }
2603 j--;
2604 }
2605 i++;
2606 }
2607 return globalLocale;
2608 }
2609
2610 function loadLocale(name) {
2611 var oldLocale = null;
2612 // TODO: Find a better way to register and load all the locales in Node
2613 if (!locales[name] && (typeof module !== 'undefined') &&
2614 module && module.exports) {
2615 try {
2616 oldLocale = globalLocale._abbr;
2617 var aliasedRequire = require;
2618 aliasedRequire('./locale/' + name);
2619 getSetGlobalLocale(oldLocale);
2620 } catch (e) {}
2621 }
2622 return locales[name];
2623 }
2624
2625 // This function will load locale and then set the global locale. If
2626 // no arguments are passed in, it will simply return the current global
2627 // locale key.
2628 function getSetGlobalLocale (key, values) {
2629 var data;
2630 if (key) {
2631 if (isUndefined(values)) {
2632 data = getLocale(key);
2633 }
2634 else {
2635 data = defineLocale(key, values);
2636 }
2637
2638 if (data) {
2639 // moment.duration._locale = moment._locale = data;
2640 globalLocale = data;
2641 }
2642 else {
2643 if ((typeof console !== 'undefined') && console.warn) {
2644 //warn user if arguments are passed but the locale could not be set
2645 console.warn('Locale ' + key + ' not found. Did you forget to load it?');
2646 }
2647 }
2648 }
2649
2650 return globalLocale._abbr;
2651 }
2652
2653 function defineLocale (name, config) {
2654 if (config !== null) {
2655 var locale, parentConfig = baseConfig;
2656 config.abbr = name;
2657 if (locales[name] != null) {
2658 deprecateSimple('defineLocaleOverride',
2659 'use moment.updateLocale(localeName, config) to change ' +
2660 'an existing locale. moment.defineLocale(localeName, ' +
2661 'config) should only be used for creating a new locale ' +
2662 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
2663 parentConfig = locales[name]._config;
2664 } else if (config.parentLocale != null) {
2665 if (locales[config.parentLocale] != null) {
2666 parentConfig = locales[config.parentLocale]._config;
2667 } else {
2668 locale = loadLocale(config.parentLocale);
2669 if (locale != null) {
2670 parentConfig = locale._config;
2671 } else {
2672 if (!localeFamilies[config.parentLocale]) {
2673 localeFamilies[config.parentLocale] = [];
2674 }
2675 localeFamilies[config.parentLocale].push({
2676 name: name,
2677 config: config
2678 });
2679 return null;
2680 }
2681 }
2682 }
2683 locales[name] = new Locale(mergeConfigs(parentConfig, config));
2684
2685 if (localeFamilies[name]) {
2686 localeFamilies[name].forEach(function (x) {
2687 defineLocale(x.name, x.config);
2688 });
2689 }
2690
2691 // backwards compat for now: also set the locale
2692 // make sure we set the locale AFTER all child locales have been
2693 // created, so we won't end up with the child locale set.
2694 getSetGlobalLocale(name);
2695
2696
2697 return locales[name];
2698 } else {
2699 // useful for testing
2700 delete locales[name];
2701 return null;
2702 }
2703 }
2704
2705 function updateLocale(name, config) {
2706 if (config != null) {
2707 var locale, tmpLocale, parentConfig = baseConfig;
2708 // MERGE
2709 tmpLocale = loadLocale(name);
2710 if (tmpLocale != null) {
2711 parentConfig = tmpLocale._config;
2712 }
2713 config = mergeConfigs(parentConfig, config);
2714 locale = new Locale(config);
2715 locale.parentLocale = locales[name];
2716 locales[name] = locale;
2717
2718 // backwards compat for now: also set the locale
2719 getSetGlobalLocale(name);
2720 } else {
2721 // pass null for config to unupdate, useful for tests
2722 if (locales[name] != null) {
2723 if (locales[name].parentLocale != null) {
2724 locales[name] = locales[name].parentLocale;
2725 } else if (locales[name] != null) {
2726 delete locales[name];
2727 }
2728 }
2729 }
2730 return locales[name];
2731 }
2732
2733 // returns locale data
2734 function getLocale (key) {
2735 var locale;
2736
2737 if (key && key._locale && key._locale._abbr) {
2738 key = key._locale._abbr;
2739 }
2740
2741 if (!key) {
2742 return globalLocale;
2743 }
2744
2745 if (!isArray(key)) {
2746 //short-circuit everything else
2747 locale = loadLocale(key);
2748 if (locale) {
2749 return locale;
2750 }
2751 key = [key];
2752 }
2753
2754 return chooseLocale(key);
2755 }
2756
2757 function listLocales() {
2758 return keys(locales);
2759 }
2760
2761 function checkOverflow (m) {
2762 var overflow;
2763 var a = m._a;
2764
2765 if (a && getParsingFlags(m).overflow === -2) {
2766 overflow =
2767 a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
2768 a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
2769 a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
2770 a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
2771 a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
2772 a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
2773 -1;
2774
2775 if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
2776 overflow = DATE;
2777 }
2778 if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
2779 overflow = WEEK;
2780 }
2781 if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
2782 overflow = WEEKDAY;
2783 }
2784
2785 getParsingFlags(m).overflow = overflow;
2786 }
2787
2788 return m;
2789 }
2790
2791 // Pick the first defined of two or three arguments.
2792 function defaults(a, b, c) {
2793 if (a != null) {
2794 return a;
2795 }
2796 if (b != null) {
2797 return b;
2798 }
2799 return c;
2800 }
2801
2802 function currentDateArray(config) {
2803 // hooks is actually the exported moment object
2804 var nowValue = new Date(hooks.now());
2805 if (config._useUTC) {
2806 return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
2807 }
2808 return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
2809 }
2810
2811 // convert an array to a date.
2812 // the array should mirror the parameters below
2813 // note: all values past the year are optional and will default to the lowest possible value.
2814 // [year, month, day , hour, minute, second, millisecond]
2815 function configFromArray (config) {
2816 var i, date, input = [], currentDate, expectedWeekday, yearToUse;
2817
2818 if (config._d) {
2819 return;
2820 }
2821
2822 currentDate = currentDateArray(config);
2823
2824 //compute day of the year from weeks and weekdays
2825 if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
2826 dayOfYearFromWeekInfo(config);
2827 }
2828
2829 //if the day of the year is set, figure out what it is
2830 if (config._dayOfYear != null) {
2831 yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
2832
2833 if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
2834 getParsingFlags(config)._overflowDayOfYear = true;
2835 }
2836
2837 date = createUTCDate(yearToUse, 0, config._dayOfYear);
2838 config._a[MONTH] = date.getUTCMonth();
2839 config._a[DATE] = date.getUTCDate();
2840 }
2841
2842 // Default to current date.
2843 // * if no year, month, day of month are given, default to today
2844 // * if day of month is given, default month and year
2845 // * if month is given, default only year
2846 // * if year is given, don't default anything
2847 for (i = 0; i < 3 && config._a[i] == null; ++i) {
2848 config._a[i] = input[i] = currentDate[i];
2849 }
2850
2851 // Zero out whatever was not defaulted, including time
2852 for (; i < 7; i++) {
2853 config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
2854 }
2855
2856 // Check for 24:00:00.000
2857 if (config._a[HOUR] === 24 &&
2858 config._a[MINUTE] === 0 &&
2859 config._a[SECOND] === 0 &&
2860 config._a[MILLISECOND] === 0) {
2861 config._nextDay = true;
2862 config._a[HOUR] = 0;
2863 }
2864
2865 config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
2866 expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
2867
2868 // Apply timezone offset from input. The actual utcOffset can be changed
2869 // with parseZone.
2870 if (config._tzm != null) {
2871 config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
2872 }
2873
2874 if (config._nextDay) {
2875 config._a[HOUR] = 24;
2876 }
2877
2878 // check for mismatching day of week
2879 if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
2880 getParsingFlags(config).weekdayMismatch = true;
2881 }
2882 }
2883
2884 function dayOfYearFromWeekInfo(config) {
2885 var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
2886
2887 w = config._w;
2888 if (w.GG != null || w.W != null || w.E != null) {
2889 dow = 1;
2890 doy = 4;
2891
2892 // TODO: We need to take the current isoWeekYear, but that depends on
2893 // how we interpret now (local, utc, fixed offset). So create
2894 // a now version of current config (take local/utc/offset flags, and
2895 // create now).
2896 weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
2897 week = defaults(w.W, 1);
2898 weekday = defaults(w.E, 1);
2899 if (weekday < 1 || weekday > 7) {
2900 weekdayOverflow = true;
2901 }
2902 } else {
2903 dow = config._locale._week.dow;
2904 doy = config._locale._week.doy;
2905
2906 var curWeek = weekOfYear(createLocal(), dow, doy);
2907
2908 weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
2909
2910 // Default to current week.
2911 week = defaults(w.w, curWeek.week);
2912
2913 if (w.d != null) {
2914 // weekday -- low day numbers are considered next week
2915 weekday = w.d;
2916 if (weekday < 0 || weekday > 6) {
2917 weekdayOverflow = true;
2918 }
2919 } else if (w.e != null) {
2920 // local weekday -- counting starts from beginning of week
2921 weekday = w.e + dow;
2922 if (w.e < 0 || w.e > 6) {
2923 weekdayOverflow = true;
2924 }
2925 } else {
2926 // default to beginning of week
2927 weekday = dow;
2928 }
2929 }
2930 if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
2931 getParsingFlags(config)._overflowWeeks = true;
2932 } else if (weekdayOverflow != null) {
2933 getParsingFlags(config)._overflowWeekday = true;
2934 } else {
2935 temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
2936 config._a[YEAR] = temp.year;
2937 config._dayOfYear = temp.dayOfYear;
2938 }
2939 }
2940
2941 // iso 8601 regex
2942 // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
2943 var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
2944 var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
2945
2946 var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
2947
2948 var isoDates = [
2949 ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
2950 ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
2951 ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
2952 ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
2953 ['YYYY-DDD', /\d{4}-\d{3}/],
2954 ['YYYY-MM', /\d{4}-\d\d/, false],
2955 ['YYYYYYMMDD', /[+-]\d{10}/],
2956 ['YYYYMMDD', /\d{8}/],
2957 // YYYYMM is NOT allowed by the standard
2958 ['GGGG[W]WWE', /\d{4}W\d{3}/],
2959 ['GGGG[W]WW', /\d{4}W\d{2}/, false],
2960 ['YYYYDDD', /\d{7}/]
2961 ];
2962
2963 // iso time formats and regexes
2964 var isoTimes = [
2965 ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
2966 ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
2967 ['HH:mm:ss', /\d\d:\d\d:\d\d/],
2968 ['HH:mm', /\d\d:\d\d/],
2969 ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
2970 ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
2971 ['HHmmss', /\d\d\d\d\d\d/],
2972 ['HHmm', /\d\d\d\d/],
2973 ['HH', /\d\d/]
2974 ];
2975
2976 var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
2977
2978 // date from iso format
2979 function configFromISO(config) {
2980 var i, l,
2981 string = config._i,
2982 match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
2983 allowTime, dateFormat, timeFormat, tzFormat;
2984
2985 if (match) {
2986 getParsingFlags(config).iso = true;
2987
2988 for (i = 0, l = isoDates.length; i < l; i++) {
2989 if (isoDates[i][1].exec(match[1])) {
2990 dateFormat = isoDates[i][0];
2991 allowTime = isoDates[i][2] !== false;
2992 break;
2993 }
2994 }
2995 if (dateFormat == null) {
2996 config._isValid = false;
2997 return;
2998 }
2999 if (match[3]) {
3000 for (i = 0, l = isoTimes.length; i < l; i++) {
3001 if (isoTimes[i][1].exec(match[3])) {
3002 // match[2] should be 'T' or space
3003 timeFormat = (match[2] || ' ') + isoTimes[i][0];
3004 break;
3005 }
3006 }
3007 if (timeFormat == null) {
3008 config._isValid = false;
3009 return;
3010 }
3011 }
3012 if (!allowTime && timeFormat != null) {
3013 config._isValid = false;
3014 return;
3015 }
3016 if (match[4]) {
3017 if (tzRegex.exec(match[4])) {
3018 tzFormat = 'Z';
3019 } else {
3020 config._isValid = false;
3021 return;
3022 }
3023 }
3024 config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
3025 configFromStringAndFormat(config);
3026 } else {
3027 config._isValid = false;
3028 }
3029 }
3030
3031 // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
3032 var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;
3033
3034 function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
3035 var result = [
3036 untruncateYear(yearStr),
3037 defaultLocaleMonthsShort.indexOf(monthStr),
3038 parseInt(dayStr, 10),
3039 parseInt(hourStr, 10),
3040 parseInt(minuteStr, 10)
3041 ];
3042
3043 if (secondStr) {
3044 result.push(parseInt(secondStr, 10));
3045 }
3046
3047 return result;
3048 }
3049
3050 function untruncateYear(yearStr) {
3051 var year = parseInt(yearStr, 10);
3052 if (year <= 49) {
3053 return 2000 + year;
3054 } else if (year <= 999) {
3055 return 1900 + year;
3056 }
3057 return year;
3058 }
3059
3060 function preprocessRFC2822(s) {
3061 // Remove comments and folding whitespace and replace multiple-spaces with a single space
3062 return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, '');
3063 }
3064
3065 function checkWeekday(weekdayStr, parsedInput, config) {
3066 if (weekdayStr) {
3067 // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
3068 var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
3069 weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
3070 if (weekdayProvided !== weekdayActual) {
3071 getParsingFlags(config).weekdayMismatch = true;
3072 config._isValid = false;
3073 return false;
3074 }
3075 }
3076 return true;
3077 }
3078
3079 var obsOffsets = {
3080 UT: 0,
3081 GMT: 0,
3082 EDT: -4 * 60,
3083 EST: -5 * 60,
3084 CDT: -5 * 60,
3085 CST: -6 * 60,
3086 MDT: -6 * 60,
3087 MST: -7 * 60,
3088 PDT: -7 * 60,
3089 PST: -8 * 60
3090 };
3091
3092 function calculateOffset(obsOffset, militaryOffset, numOffset) {
3093 if (obsOffset) {
3094 return obsOffsets[obsOffset];
3095 } else if (militaryOffset) {
3096 // the only allowed military tz is Z
3097 return 0;
3098 } else {
3099 var hm = parseInt(numOffset, 10);
3100 var m = hm % 100, h = (hm - m) / 100;
3101 return h * 60 + m;
3102 }
3103 }
3104
3105 // date and time from ref 2822 format
3106 function configFromRFC2822(config) {
3107 var match = rfc2822.exec(preprocessRFC2822(config._i));
3108 if (match) {
3109 var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
3110 if (!checkWeekday(match[1], parsedArray, config)) {
3111 return;
3112 }
3113
3114 config._a = parsedArray;
3115 config._tzm = calculateOffset(match[8], match[9], match[10]);
3116
3117 config._d = createUTCDate.apply(null, config._a);
3118 config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
3119
3120 getParsingFlags(config).rfc2822 = true;
3121 } else {
3122 config._isValid = false;
3123 }
3124 }
3125
3126 // date from iso format or fallback
3127 function configFromString(config) {
3128 var matched = aspNetJsonRegex.exec(config._i);
3129
3130 if (matched !== null) {
3131 config._d = new Date(+matched[1]);
3132 return;
3133 }
3134
3135 configFromISO(config);
3136 if (config._isValid === false) {
3137 delete config._isValid;
3138 } else {
3139 return;
3140 }
3141
3142 configFromRFC2822(config);
3143 if (config._isValid === false) {
3144 delete config._isValid;
3145 } else {
3146 return;
3147 }
3148
3149 // Final attempt, use Input Fallback
3150 hooks.createFromInputFallback(config);
3151 }
3152
3153 hooks.createFromInputFallback = deprecate(
3154 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
3155 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
3156 'discouraged and will be removed in an upcoming major release. Please refer to ' +
3157 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
3158 function (config) {
3159 config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
3160 }
3161 );
3162
3163 // constant that refers to the ISO standard
3164 hooks.ISO_8601 = function () {};
3165
3166 // constant that refers to the RFC 2822 form
3167 hooks.RFC_2822 = function () {};
3168
3169 // date from string and format string
3170 function configFromStringAndFormat(config) {
3171 // TODO: Move this to another part of the creation flow to prevent circular deps
3172 if (config._f === hooks.ISO_8601) {
3173 configFromISO(config);
3174 return;
3175 }
3176 if (config._f === hooks.RFC_2822) {
3177 configFromRFC2822(config);
3178 return;
3179 }
3180 config._a = [];
3181 getParsingFlags(config).empty = true;
3182
3183 // This array is used to make a Date, either with `new Date` or `Date.UTC`
3184 var string = '' + config._i,
3185 i, parsedInput, tokens, token, skipped,
3186 stringLength = string.length,
3187 totalParsedInputLength = 0;
3188
3189 tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
3190
3191 for (i = 0; i < tokens.length; i++) {
3192 token = tokens[i];
3193 parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
3194 // console.log('token', token, 'parsedInput', parsedInput,
3195 // 'regex', getParseRegexForToken(token, config));
3196 if (parsedInput) {
3197 skipped = string.substr(0, string.indexOf(parsedInput));
3198 if (skipped.length > 0) {
3199 getParsingFlags(config).unusedInput.push(skipped);
3200 }
3201 string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
3202 totalParsedInputLength += parsedInput.length;
3203 }
3204 // don't parse if it's not a known token
3205 if (formatTokenFunctions[token]) {
3206 if (parsedInput) {
3207 getParsingFlags(config).empty = false;
3208 }
3209 else {
3210 getParsingFlags(config).unusedTokens.push(token);
3211 }
3212 addTimeToArrayFromToken(token, parsedInput, config);
3213 }
3214 else if (config._strict && !parsedInput) {
3215 getParsingFlags(config).unusedTokens.push(token);
3216 }
3217 }
3218
3219 // add remaining unparsed input length to the string
3220 getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
3221 if (string.length > 0) {
3222 getParsingFlags(config).unusedInput.push(string);
3223 }
3224
3225 // clear _12h flag if hour is <= 12
3226 if (config._a[HOUR] <= 12 &&
3227 getParsingFlags(config).bigHour === true &&
3228 config._a[HOUR] > 0) {
3229 getParsingFlags(config).bigHour = undefined;
3230 }
3231
3232 getParsingFlags(config).parsedDateParts = config._a.slice(0);
3233 getParsingFlags(config).meridiem = config._meridiem;
3234 // handle meridiem
3235 config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
3236
3237 configFromArray(config);
3238 checkOverflow(config);
3239 }
3240
3241
3242 function meridiemFixWrap (locale, hour, meridiem) {
3243 var isPm;
3244
3245 if (meridiem == null) {
3246 // nothing to do
3247 return hour;
3248 }
3249 if (locale.meridiemHour != null) {
3250 return locale.meridiemHour(hour, meridiem);
3251 } else if (locale.isPM != null) {
3252 // Fallback
3253 isPm = locale.isPM(meridiem);
3254 if (isPm && hour < 12) {
3255 hour += 12;
3256 }
3257 if (!isPm && hour === 12) {
3258 hour = 0;
3259 }
3260 return hour;
3261 } else {
3262 // this is not supposed to happen
3263 return hour;
3264 }
3265 }
3266
3267 // date from string and array of format strings
3268 function configFromStringAndArray(config) {
3269 var tempConfig,
3270 bestMoment,
3271
3272 scoreToBeat,
3273 i,
3274 currentScore;
3275
3276 if (config._f.length === 0) {
3277 getParsingFlags(config).invalidFormat = true;
3278 config._d = new Date(NaN);
3279 return;
3280 }
3281
3282 for (i = 0; i < config._f.length; i++) {
3283 currentScore = 0;
3284 tempConfig = copyConfig({}, config);
3285 if (config._useUTC != null) {
3286 tempConfig._useUTC = config._useUTC;
3287 }
3288 tempConfig._f = config._f[i];
3289 configFromStringAndFormat(tempConfig);
3290
3291 if (!isValid(tempConfig)) {
3292 continue;
3293 }
3294
3295 // if there is any input that was not parsed add a penalty for that format
3296 currentScore += getParsingFlags(tempConfig).charsLeftOver;
3297
3298 //or tokens
3299 currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
3300
3301 getParsingFlags(tempConfig).score = currentScore;
3302
3303 if (scoreToBeat == null || currentScore < scoreToBeat) {
3304 scoreToBeat = currentScore;
3305 bestMoment = tempConfig;
3306 }
3307 }
3308
3309 extend(config, bestMoment || tempConfig);
3310 }
3311
3312 function configFromObject(config) {
3313 if (config._d) {
3314 return;
3315 }
3316
3317 var i = normalizeObjectUnits(config._i);
3318 config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
3319 return obj && parseInt(obj, 10);
3320 });
3321
3322 configFromArray(config);
3323 }
3324
3325 function createFromConfig (config) {
3326 var res = new Moment(checkOverflow(prepareConfig(config)));
3327 if (res._nextDay) {
3328 // Adding is smart enough around DST
3329 res.add(1, 'd');
3330 res._nextDay = undefined;
3331 }
3332
3333 return res;
3334 }
3335
3336 function prepareConfig (config) {
3337 var input = config._i,
3338 format = config._f;
3339
3340 config._locale = config._locale || getLocale(config._l);
3341
3342 if (input === null || (format === undefined && input === '')) {
3343 return createInvalid({nullInput: true});
3344 }
3345
3346 if (typeof input === 'string') {
3347 config._i = input = config._locale.preparse(input);
3348 }
3349
3350 if (isMoment(input)) {
3351 return new Moment(checkOverflow(input));
3352 } else if (isDate(input)) {
3353 config._d = input;
3354 } else if (isArray(format)) {
3355 configFromStringAndArray(config);
3356 } else if (format) {
3357 configFromStringAndFormat(config);
3358 } else {
3359 configFromInput(config);
3360 }
3361
3362 if (!isValid(config)) {
3363 config._d = null;
3364 }
3365
3366 return config;
3367 }
3368
3369 function configFromInput(config) {
3370 var input = config._i;
3371 if (isUndefined(input)) {
3372 config._d = new Date(hooks.now());
3373 } else if (isDate(input)) {
3374 config._d = new Date(input.valueOf());
3375 } else if (typeof input === 'string') {
3376 configFromString(config);
3377 } else if (isArray(input)) {
3378 config._a = map(input.slice(0), function (obj) {
3379 return parseInt(obj, 10);
3380 });
3381 configFromArray(config);
3382 } else if (isObject(input)) {
3383 configFromObject(config);
3384 } else if (isNumber(input)) {
3385 // from milliseconds
3386 config._d = new Date(input);
3387 } else {
3388 hooks.createFromInputFallback(config);
3389 }
3390 }
3391
3392 function createLocalOrUTC (input, format, locale, strict, isUTC) {
3393 var c = {};
3394
3395 if (locale === true || locale === false) {
3396 strict = locale;
3397 locale = undefined;
3398 }
3399
3400 if ((isObject(input) && isObjectEmpty(input)) ||
3401 (isArray(input) && input.length === 0)) {
3402 input = undefined;
3403 }
3404 // object construction must be done this way.
3405 // https://github.com/moment/moment/issues/1423
3406 c._isAMomentObject = true;
3407 c._useUTC = c._isUTC = isUTC;
3408 c._l = locale;
3409 c._i = input;
3410 c._f = format;
3411 c._strict = strict;
3412
3413 return createFromConfig(c);
3414 }
3415
3416 function createLocal (input, format, locale, strict) {
3417 return createLocalOrUTC(input, format, locale, strict, false);
3418 }
3419
3420 var prototypeMin = deprecate(
3421 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
3422 function () {
3423 var other = createLocal.apply(null, arguments);
3424 if (this.isValid() && other.isValid()) {
3425 return other < this ? this : other;
3426 } else {
3427 return createInvalid();
3428 }
3429 }
3430 );
3431
3432 var prototypeMax = deprecate(
3433 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
3434 function () {
3435 var other = createLocal.apply(null, arguments);
3436 if (this.isValid() && other.isValid()) {
3437 return other > this ? this : other;
3438 } else {
3439 return createInvalid();
3440 }
3441 }
3442 );
3443
3444 // Pick a moment m from moments so that m[fn](other) is true for all
3445 // other. This relies on the function fn to be transitive.
3446 //
3447 // moments should either be an array of moment objects or an array, whose
3448 // first element is an array of moment objects.
3449 function pickBy(fn, moments) {
3450 var res, i;
3451 if (moments.length === 1 && isArray(moments[0])) {
3452 moments = moments[0];
3453 }
3454 if (!moments.length) {
3455 return createLocal();
3456 }
3457 res = moments[0];
3458 for (i = 1; i < moments.length; ++i) {
3459 if (!moments[i].isValid() || moments[i][fn](res)) {
3460 res = moments[i];
3461 }
3462 }
3463 return res;
3464 }
3465
3466 // TODO: Use [].sort instead?
3467 function min () {
3468 var args = [].slice.call(arguments, 0);
3469
3470 return pickBy('isBefore', args);
3471 }
3472
3473 function max () {
3474 var args = [].slice.call(arguments, 0);
3475
3476 return pickBy('isAfter', args);
3477 }
3478
3479 var now = function () {
3480 return Date.now ? Date.now() : +(new Date());
3481 };
3482
3483 var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
3484
3485 function isDurationValid(m) {
3486 for (var key in m) {
3487 if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
3488 return false;
3489 }
3490 }
3491
3492 var unitHasDecimal = false;
3493 for (var i = 0; i < ordering.length; ++i) {
3494 if (m[ordering[i]]) {
3495 if (unitHasDecimal) {
3496 return false; // only allow non-integers for smallest unit
3497 }
3498 if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
3499 unitHasDecimal = true;
3500 }
3501 }
3502 }
3503
3504 return true;
3505 }
3506
3507 function isValid$1() {
3508 return this._isValid;
3509 }
3510
3511 function createInvalid$1() {
3512 return createDuration(NaN);
3513 }
3514
3515 function Duration (duration) {
3516 var normalizedInput = normalizeObjectUnits(duration),
3517 years = normalizedInput.year || 0,
3518 quarters = normalizedInput.quarter || 0,
3519 months = normalizedInput.month || 0,
3520 weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
3521 days = normalizedInput.day || 0,
3522 hours = normalizedInput.hour || 0,
3523 minutes = normalizedInput.minute || 0,
3524 seconds = normalizedInput.second || 0,
3525 milliseconds = normalizedInput.millisecond || 0;
3526
3527 this._isValid = isDurationValid(normalizedInput);
3528
3529 // representation for dateAddRemove
3530 this._milliseconds = +milliseconds +
3531 seconds * 1e3 + // 1000
3532 minutes * 6e4 + // 1000 * 60
3533 hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
3534 // Because of dateAddRemove treats 24 hours as different from a
3535 // day when working around DST, we need to store them separately
3536 this._days = +days +
3537 weeks * 7;
3538 // It is impossible to translate months into days without knowing
3539 // which months you are are talking about, so we have to store
3540 // it separately.
3541 this._months = +months +
3542 quarters * 3 +
3543 years * 12;
3544
3545 this._data = {};
3546
3547 this._locale = getLocale();
3548
3549 this._bubble();
3550 }
3551
3552 function isDuration (obj) {
3553 return obj instanceof Duration;
3554 }
3555
3556 function absRound (number) {
3557 if (number < 0) {
3558 return Math.round(-1 * number) * -1;
3559 } else {
3560 return Math.round(number);
3561 }
3562 }
3563
3564 // FORMATTING
3565
3566 function offset (token, separator) {
3567 addFormatToken(token, 0, 0, function () {
3568 var offset = this.utcOffset();
3569 var sign = '+';
3570 if (offset < 0) {
3571 offset = -offset;
3572 sign = '-';
3573 }
3574 return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
3575 });
3576 }
3577
3578 offset('Z', ':');
3579 offset('ZZ', '');
3580
3581 // PARSING
3582
3583 addRegexToken('Z', matchShortOffset);
3584 addRegexToken('ZZ', matchShortOffset);
3585 addParseToken(['Z', 'ZZ'], function (input, array, config) {
3586 config._useUTC = true;
3587 config._tzm = offsetFromString(matchShortOffset, input);
3588 });
3589
3590 // HELPERS
3591
3592 // timezone chunker
3593 // '+10:00' > ['10', '00']
3594 // '-1530' > ['-15', '30']
3595 var chunkOffset = /([\+\-]|\d\d)/gi;
3596
3597 function offsetFromString(matcher, string) {
3598 var matches = (string || '').match(matcher);
3599
3600 if (matches === null) {
3601 return null;
3602 }
3603
3604 var chunk = matches[matches.length - 1] || [];
3605 var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
3606 var minutes = +(parts[1] * 60) + toInt(parts[2]);
3607
3608 return minutes === 0 ?
3609 0 :
3610 parts[0] === '+' ? minutes : -minutes;
3611 }
3612
3613 // Return a moment from input, that is local/utc/zone equivalent to model.
3614 function cloneWithOffset(input, model) {
3615 var res, diff;
3616 if (model._isUTC) {
3617 res = model.clone();
3618 diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
3619 // Use low-level api, because this fn is low-level api.
3620 res._d.setTime(res._d.valueOf() + diff);
3621 hooks.updateOffset(res, false);
3622 return res;
3623 } else {
3624 return createLocal(input).local();
3625 }
3626 }
3627
3628 function getDateOffset (m) {
3629 // On Firefox.24 Date#getTimezoneOffset returns a floating point.
3630 // https://github.com/moment/moment/pull/1871
3631 return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
3632 }
3633
3634 // HOOKS
3635
3636 // This function will be called whenever a moment is mutated.
3637 // It is intended to keep the offset in sync with the timezone.
3638 hooks.updateOffset = function () {};
3639
3640 // MOMENTS
3641
3642 // keepLocalTime = true means only change the timezone, without
3643 // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
3644 // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
3645 // +0200, so we adjust the time as needed, to be valid.
3646 //
3647 // Keeping the time actually adds/subtracts (one hour)
3648 // from the actual represented time. That is why we call updateOffset
3649 // a second time. In case it wants us to change the offset again
3650 // _changeInProgress == true case, then we have to adjust, because
3651 // there is no such time in the given timezone.
3652 function getSetOffset (input, keepLocalTime, keepMinutes) {
3653 var offset = this._offset || 0,
3654 localAdjust;
3655 if (!this.isValid()) {
3656 return input != null ? this : NaN;
3657 }
3658 if (input != null) {
3659 if (typeof input === 'string') {
3660 input = offsetFromString(matchShortOffset, input);
3661 if (input === null) {
3662 return this;
3663 }
3664 } else if (Math.abs(input) < 16 && !keepMinutes) {
3665 input = input * 60;
3666 }
3667 if (!this._isUTC && keepLocalTime) {
3668 localAdjust = getDateOffset(this);
3669 }
3670 this._offset = input;
3671 this._isUTC = true;
3672 if (localAdjust != null) {
3673 this.add(localAdjust, 'm');
3674 }
3675 if (offset !== input) {
3676 if (!keepLocalTime || this._changeInProgress) {
3677 addSubtract(this, createDuration(input - offset, 'm'), 1, false);
3678 } else if (!this._changeInProgress) {
3679 this._changeInProgress = true;
3680 hooks.updateOffset(this, true);
3681 this._changeInProgress = null;
3682 }
3683 }
3684 return this;
3685 } else {
3686 return this._isUTC ? offset : getDateOffset(this);
3687 }
3688 }
3689
3690 function getSetZone (input, keepLocalTime) {
3691 if (input != null) {
3692 if (typeof input !== 'string') {
3693 input = -input;
3694 }
3695
3696 this.utcOffset(input, keepLocalTime);
3697
3698 return this;
3699 } else {
3700 return -this.utcOffset();
3701 }
3702 }
3703
3704 function setOffsetToUTC (keepLocalTime) {
3705 return this.utcOffset(0, keepLocalTime);
3706 }
3707
3708 function setOffsetToLocal (keepLocalTime) {
3709 if (this._isUTC) {
3710 this.utcOffset(0, keepLocalTime);
3711 this._isUTC = false;
3712
3713 if (keepLocalTime) {
3714 this.subtract(getDateOffset(this), 'm');
3715 }
3716 }
3717 return this;
3718 }
3719
3720 function setOffsetToParsedOffset () {
3721 if (this._tzm != null) {
3722 this.utcOffset(this._tzm, false, true);
3723 } else if (typeof this._i === 'string') {
3724 var tZone = offsetFromString(matchOffset, this._i);
3725 if (tZone != null) {
3726 this.utcOffset(tZone);
3727 }
3728 else {
3729 this.utcOffset(0, true);
3730 }
3731 }
3732 return this;
3733 }
3734
3735 function hasAlignedHourOffset (input) {
3736 if (!this.isValid()) {
3737 return false;
3738 }
3739 input = input ? createLocal(input).utcOffset() : 0;
3740
3741 return (this.utcOffset() - input) % 60 === 0;
3742 }
3743
3744 function isDaylightSavingTime () {
3745 return (
3746 this.utcOffset() > this.clone().month(0).utcOffset() ||
3747 this.utcOffset() > this.clone().month(5).utcOffset()
3748 );
3749 }
3750
3751 function isDaylightSavingTimeShifted () {
3752 if (!isUndefined(this._isDSTShifted)) {
3753 return this._isDSTShifted;
3754 }
3755
3756 var c = {};
3757
3758 copyConfig(c, this);
3759 c = prepareConfig(c);
3760
3761 if (c._a) {
3762 var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
3763 this._isDSTShifted = this.isValid() &&
3764 compareArrays(c._a, other.toArray()) > 0;
3765 } else {
3766 this._isDSTShifted = false;
3767 }
3768
3769 return this._isDSTShifted;
3770 }
3771
3772 function isLocal () {
3773 return this.isValid() ? !this._isUTC : false;
3774 }
3775
3776 function isUtcOffset () {
3777 return this.isValid() ? this._isUTC : false;
3778 }
3779
3780 function isUtc () {
3781 return this.isValid() ? this._isUTC && this._offset === 0 : false;
3782 }
3783
3784 // ASP.NET json date format regex
3785 var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
3786
3787 // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
3788 // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
3789 // and further modified to allow for strings containing both week and day
3790 var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
3791
3792 function createDuration (input, key) {
3793 var duration = input,
3794 // matching against regexp is expensive, do it on demand
3795 match = null,
3796 sign,
3797 ret,
3798 diffRes;
3799
3800 if (isDuration(input)) {
3801 duration = {
3802 ms : input._milliseconds,
3803 d : input._days,
3804 M : input._months
3805 };
3806 } else if (isNumber(input)) {
3807 duration = {};
3808 if (key) {
3809 duration[key] = input;
3810 } else {
3811 duration.milliseconds = input;
3812 }
3813 } else if (!!(match = aspNetRegex.exec(input))) {
3814 sign = (match[1] === '-') ? -1 : 1;
3815 duration = {
3816 y : 0,
3817 d : toInt(match[DATE]) * sign,
3818 h : toInt(match[HOUR]) * sign,
3819 m : toInt(match[MINUTE]) * sign,
3820 s : toInt(match[SECOND]) * sign,
3821 ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
3822 };
3823 } else if (!!(match = isoRegex.exec(input))) {
3824 sign = (match[1] === '-') ? -1 : 1;
3825 duration = {
3826 y : parseIso(match[2], sign),
3827 M : parseIso(match[3], sign),
3828 w : parseIso(match[4], sign),
3829 d : parseIso(match[5], sign),
3830 h : parseIso(match[6], sign),
3831 m : parseIso(match[7], sign),
3832 s : parseIso(match[8], sign)
3833 };
3834 } else if (duration == null) {// checks for null or undefined
3835 duration = {};
3836 } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
3837 diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
3838
3839 duration = {};
3840 duration.ms = diffRes.milliseconds;
3841 duration.M = diffRes.months;
3842 }
3843
3844 ret = new Duration(duration);
3845
3846 if (isDuration(input) && hasOwnProp(input, '_locale')) {
3847 ret._locale = input._locale;
3848 }
3849
3850 return ret;
3851 }
3852
3853 createDuration.fn = Duration.prototype;
3854 createDuration.invalid = createInvalid$1;
3855
3856 function parseIso (inp, sign) {
3857 // We'd normally use ~~inp for this, but unfortunately it also
3858 // converts floats to ints.
3859 // inp may be undefined, so careful calling replace on it.
3860 var res = inp && parseFloat(inp.replace(',', '.'));
3861 // apply sign while we're at it
3862 return (isNaN(res) ? 0 : res) * sign;
3863 }
3864
3865 function positiveMomentsDifference(base, other) {
3866 var res = {};
3867
3868 res.months = other.month() - base.month() +
3869 (other.year() - base.year()) * 12;
3870 if (base.clone().add(res.months, 'M').isAfter(other)) {
3871 --res.months;
3872 }
3873
3874 res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
3875
3876 return res;
3877 }
3878
3879 function momentsDifference(base, other) {
3880 var res;
3881 if (!(base.isValid() && other.isValid())) {
3882 return {milliseconds: 0, months: 0};
3883 }
3884
3885 other = cloneWithOffset(other, base);
3886 if (base.isBefore(other)) {
3887 res = positiveMomentsDifference(base, other);
3888 } else {
3889 res = positiveMomentsDifference(other, base);
3890 res.milliseconds = -res.milliseconds;
3891 res.months = -res.months;
3892 }
3893
3894 return res;
3895 }
3896
3897 // TODO: remove 'name' arg after deprecation is removed
3898 function createAdder(direction, name) {
3899 return function (val, period) {
3900 var dur, tmp;
3901 //invert the arguments, but complain about it
3902 if (period !== null && !isNaN(+period)) {
3903 deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
3904 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
3905 tmp = val; val = period; period = tmp;
3906 }
3907
3908 val = typeof val === 'string' ? +val : val;
3909 dur = createDuration(val, period);
3910 addSubtract(this, dur, direction);
3911 return this;
3912 };
3913 }
3914
3915 function addSubtract (mom, duration, isAdding, updateOffset) {
3916 var milliseconds = duration._milliseconds,
3917 days = absRound(duration._days),
3918 months = absRound(duration._months);
3919
3920 if (!mom.isValid()) {
3921 // No op
3922 return;
3923 }
3924
3925 updateOffset = updateOffset == null ? true : updateOffset;
3926
3927 if (months) {
3928 setMonth(mom, get(mom, 'Month') + months * isAdding);
3929 }
3930 if (days) {
3931 set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
3932 }
3933 if (milliseconds) {
3934 mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
3935 }
3936 if (updateOffset) {
3937 hooks.updateOffset(mom, days || months);
3938 }
3939 }
3940
3941 var add = createAdder(1, 'add');
3942 var subtract = createAdder(-1, 'subtract');
3943
3944 function getCalendarFormat(myMoment, now) {
3945 var diff = myMoment.diff(now, 'days', true);
3946 return diff < -6 ? 'sameElse' :
3947 diff < -1 ? 'lastWeek' :
3948 diff < 0 ? 'lastDay' :
3949 diff < 1 ? 'sameDay' :
3950 diff < 2 ? 'nextDay' :
3951 diff < 7 ? 'nextWeek' : 'sameElse';
3952 }
3953
3954 function calendar$1 (time, formats) {
3955 // We want to compare the start of today, vs this.
3956 // Getting start-of-today depends on whether we're local/utc/offset or not.
3957 var now = time || createLocal(),
3958 sod = cloneWithOffset(now, this).startOf('day'),
3959 format = hooks.calendarFormat(this, sod) || 'sameElse';
3960
3961 var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
3962
3963 return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
3964 }
3965
3966 function clone () {
3967 return new Moment(this);
3968 }
3969
3970 function isAfter (input, units) {
3971 var localInput = isMoment(input) ? input : createLocal(input);
3972 if (!(this.isValid() && localInput.isValid())) {
3973 return false;
3974 }
3975 units = normalizeUnits(units) || 'millisecond';
3976 if (units === 'millisecond') {
3977 return this.valueOf() > localInput.valueOf();
3978 } else {
3979 return localInput.valueOf() < this.clone().startOf(units).valueOf();
3980 }
3981 }
3982
3983 function isBefore (input, units) {
3984 var localInput = isMoment(input) ? input : createLocal(input);
3985 if (!(this.isValid() && localInput.isValid())) {
3986 return false;
3987 }
3988 units = normalizeUnits(units) || 'millisecond';
3989 if (units === 'millisecond') {
3990 return this.valueOf() < localInput.valueOf();
3991 } else {
3992 return this.clone().endOf(units).valueOf() < localInput.valueOf();
3993 }
3994 }
3995
3996 function isBetween (from, to, units, inclusivity) {
3997 var localFrom = isMoment(from) ? from : createLocal(from),
3998 localTo = isMoment(to) ? to : createLocal(to);
3999 if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
4000 return false;
4001 }
4002 inclusivity = inclusivity || '()';
4003 return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) &&
4004 (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));
4005 }
4006
4007 function isSame (input, units) {
4008 var localInput = isMoment(input) ? input : createLocal(input),
4009 inputMs;
4010 if (!(this.isValid() && localInput.isValid())) {
4011 return false;
4012 }
4013 units = normalizeUnits(units) || 'millisecond';
4014 if (units === 'millisecond') {
4015 return this.valueOf() === localInput.valueOf();
4016 } else {
4017 inputMs = localInput.valueOf();
4018 return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
4019 }
4020 }
4021
4022 function isSameOrAfter (input, units) {
4023 return this.isSame(input, units) || this.isAfter(input, units);
4024 }
4025
4026 function isSameOrBefore (input, units) {
4027 return this.isSame(input, units) || this.isBefore(input, units);
4028 }
4029
4030 function diff (input, units, asFloat) {
4031 var that,
4032 zoneDelta,
4033 output;
4034
4035 if (!this.isValid()) {
4036 return NaN;
4037 }
4038
4039 that = cloneWithOffset(input, this);
4040
4041 if (!that.isValid()) {
4042 return NaN;
4043 }
4044
4045 zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
4046
4047 units = normalizeUnits(units);
4048
4049 switch (units) {
4050 case 'year': output = monthDiff(this, that) / 12; break;
4051 case 'month': output = monthDiff(this, that); break;
4052 case 'quarter': output = monthDiff(this, that) / 3; break;
4053 case 'second': output = (this - that) / 1e3; break; // 1000
4054 case 'minute': output = (this - that) / 6e4; break; // 1000 * 60
4055 case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60
4056 case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst
4057 case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst
4058 default: output = this - that;
4059 }
4060
4061 return asFloat ? output : absFloor(output);
4062 }
4063
4064 function monthDiff (a, b) {
4065 // difference in months
4066 var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
4067 // b is in (anchor - 1 month, anchor + 1 month)
4068 anchor = a.clone().add(wholeMonthDiff, 'months'),
4069 anchor2, adjust;
4070
4071 if (b - anchor < 0) {
4072 anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
4073 // linear across the month
4074 adjust = (b - anchor) / (anchor - anchor2);
4075 } else {
4076 anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
4077 // linear across the month
4078 adjust = (b - anchor) / (anchor2 - anchor);
4079 }
4080
4081 //check for negative zero, return zero if negative zero
4082 return -(wholeMonthDiff + adjust) || 0;
4083 }
4084
4085 hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
4086 hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
4087
4088 function toString () {
4089 return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
4090 }
4091
4092 function toISOString(keepOffset) {
4093 if (!this.isValid()) {
4094 return null;
4095 }
4096 var utc = keepOffset !== true;
4097 var m = utc ? this.clone().utc() : this;
4098 if (m.year() < 0 || m.year() > 9999) {
4099 return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');
4100 }
4101 if (isFunction(Date.prototype.toISOString)) {
4102 // native implementation is ~50x faster, use it when we can
4103 if (utc) {
4104 return this.toDate().toISOString();
4105 } else {
4106 return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));
4107 }
4108 }
4109 return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');
4110 }
4111
4112 /**
4113 * Return a human readable representation of a moment that can
4114 * also be evaluated to get a new moment which is the same
4115 *
4116 * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
4117 */
4118 function inspect () {
4119 if (!this.isValid()) {
4120 return 'moment.invalid(/* ' + this._i + ' */)';
4121 }
4122 var func = 'moment';
4123 var zone = '';
4124 if (!this.isLocal()) {
4125 func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
4126 zone = 'Z';
4127 }
4128 var prefix = '[' + func + '("]';
4129 var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
4130 var datetime = '-MM-DD[T]HH:mm:ss.SSS';
4131 var suffix = zone + '[")]';
4132
4133 return this.format(prefix + year + datetime + suffix);
4134 }
4135
4136 function format (inputString) {
4137 if (!inputString) {
4138 inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
4139 }
4140 var output = formatMoment(this, inputString);
4141 return this.localeData().postformat(output);
4142 }
4143
4144 function from (time, withoutSuffix) {
4145 if (this.isValid() &&
4146 ((isMoment(time) && time.isValid()) ||
4147 createLocal(time).isValid())) {
4148 return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
4149 } else {
4150 return this.localeData().invalidDate();
4151 }
4152 }
4153
4154 function fromNow (withoutSuffix) {
4155 return this.from(createLocal(), withoutSuffix);
4156 }
4157
4158 function to (time, withoutSuffix) {
4159 if (this.isValid() &&
4160 ((isMoment(time) && time.isValid()) ||
4161 createLocal(time).isValid())) {
4162 return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
4163 } else {
4164 return this.localeData().invalidDate();
4165 }
4166 }
4167
4168 function toNow (withoutSuffix) {
4169 return this.to(createLocal(), withoutSuffix);
4170 }
4171
4172 // If passed a locale key, it will set the locale for this
4173 // instance. Otherwise, it will return the locale configuration
4174 // variables for this instance.
4175 function locale (key) {
4176 var newLocaleData;
4177
4178 if (key === undefined) {
4179 return this._locale._abbr;
4180 } else {
4181 newLocaleData = getLocale(key);
4182 if (newLocaleData != null) {
4183 this._locale = newLocaleData;
4184 }
4185 return this;
4186 }
4187 }
4188
4189 var lang = deprecate(
4190 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
4191 function (key) {
4192 if (key === undefined) {
4193 return this.localeData();
4194 } else {
4195 return this.locale(key);
4196 }
4197 }
4198 );
4199
4200 function localeData () {
4201 return this._locale;
4202 }
4203
4204 var MS_PER_SECOND = 1000;
4205 var MS_PER_MINUTE = 60 * MS_PER_SECOND;
4206 var MS_PER_HOUR = 60 * MS_PER_MINUTE;
4207 var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
4208
4209 // actual modulo - handles negative numbers (for dates before 1970):
4210 function mod$1(dividend, divisor) {
4211 return (dividend % divisor + divisor) % divisor;
4212 }
4213
4214 function localStartOfDate(y, m, d) {
4215 // the date constructor remaps years 0-99 to 1900-1999
4216 if (y < 100 && y >= 0) {
4217 // preserve leap years using a full 400 year cycle, then reset
4218 return new Date(y + 400, m, d) - MS_PER_400_YEARS;
4219 } else {
4220 return new Date(y, m, d).valueOf();
4221 }
4222 }
4223
4224 function utcStartOfDate(y, m, d) {
4225 // Date.UTC remaps years 0-99 to 1900-1999
4226 if (y < 100 && y >= 0) {
4227 // preserve leap years using a full 400 year cycle, then reset
4228 return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
4229 } else {
4230 return Date.UTC(y, m, d);
4231 }
4232 }
4233
4234 function startOf (units) {
4235 var time;
4236 units = normalizeUnits(units);
4237 if (units === undefined || units === 'millisecond' || !this.isValid()) {
4238 return this;
4239 }
4240
4241 var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
4242
4243 switch (units) {
4244 case 'year':
4245 time = startOfDate(this.year(), 0, 1);
4246 break;
4247 case 'quarter':
4248 time = startOfDate(this.year(), this.month() - this.month() % 3, 1);
4249 break;
4250 case 'month':
4251 time = startOfDate(this.year(), this.month(), 1);
4252 break;
4253 case 'week':
4254 time = startOfDate(this.year(), this.month(), this.date() - this.weekday());
4255 break;
4256 case 'isoWeek':
4257 time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));
4258 break;
4259 case 'day':
4260 case 'date':
4261 time = startOfDate(this.year(), this.month(), this.date());
4262 break;
4263 case 'hour':
4264 time = this._d.valueOf();
4265 time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);
4266 break;
4267 case 'minute':
4268 time = this._d.valueOf();
4269 time -= mod$1(time, MS_PER_MINUTE);
4270 break;
4271 case 'second':
4272 time = this._d.valueOf();
4273 time -= mod$1(time, MS_PER_SECOND);
4274 break;
4275 }
4276
4277 this._d.setTime(time);
4278 hooks.updateOffset(this, true);
4279 return this;
4280 }
4281
4282 function endOf (units) {
4283 var time;
4284 units = normalizeUnits(units);
4285 if (units === undefined || units === 'millisecond' || !this.isValid()) {
4286 return this;
4287 }
4288
4289 var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
4290
4291 switch (units) {
4292 case 'year':
4293 time = startOfDate(this.year() + 1, 0, 1) - 1;
4294 break;
4295 case 'quarter':
4296 time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;
4297 break;
4298 case 'month':
4299 time = startOfDate(this.year(), this.month() + 1, 1) - 1;
4300 break;
4301 case 'week':
4302 time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;
4303 break;
4304 case 'isoWeek':
4305 time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;
4306 break;
4307 case 'day':
4308 case 'date':
4309 time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
4310 break;
4311 case 'hour':
4312 time = this._d.valueOf();
4313 time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;
4314 break;
4315 case 'minute':
4316 time = this._d.valueOf();
4317 time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
4318 break;
4319 case 'second':
4320 time = this._d.valueOf();
4321 time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
4322 break;
4323 }
4324
4325 this._d.setTime(time);
4326 hooks.updateOffset(this, true);
4327 return this;
4328 }
4329
4330 function valueOf () {
4331 return this._d.valueOf() - ((this._offset || 0) * 60000);
4332 }
4333
4334 function unix () {
4335 return Math.floor(this.valueOf() / 1000);
4336 }
4337
4338 function toDate () {
4339 return new Date(this.valueOf());
4340 }
4341
4342 function toArray () {
4343 var m = this;
4344 return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
4345 }
4346
4347 function toObject () {
4348 var m = this;
4349 return {
4350 years: m.year(),
4351 months: m.month(),
4352 date: m.date(),
4353 hours: m.hours(),
4354 minutes: m.minutes(),
4355 seconds: m.seconds(),
4356 milliseconds: m.milliseconds()
4357 };
4358 }
4359
4360 function toJSON () {
4361 // new Date(NaN).toJSON() === null
4362 return this.isValid() ? this.toISOString() : null;
4363 }
4364
4365 function isValid$2 () {
4366 return isValid(this);
4367 }
4368
4369 function parsingFlags () {
4370 return extend({}, getParsingFlags(this));
4371 }
4372
4373 function invalidAt () {
4374 return getParsingFlags(this).overflow;
4375 }
4376
4377 function creationData() {
4378 return {
4379 input: this._i,
4380 format: this._f,
4381 locale: this._locale,
4382 isUTC: this._isUTC,
4383 strict: this._strict
4384 };
4385 }
4386
4387 // FORMATTING
4388
4389 addFormatToken(0, ['gg', 2], 0, function () {
4390 return this.weekYear() % 100;
4391 });
4392
4393 addFormatToken(0, ['GG', 2], 0, function () {
4394 return this.isoWeekYear() % 100;
4395 });
4396
4397 function addWeekYearFormatToken (token, getter) {
4398 addFormatToken(0, [token, token.length], 0, getter);
4399 }
4400
4401 addWeekYearFormatToken('gggg', 'weekYear');
4402 addWeekYearFormatToken('ggggg', 'weekYear');
4403 addWeekYearFormatToken('GGGG', 'isoWeekYear');
4404 addWeekYearFormatToken('GGGGG', 'isoWeekYear');
4405
4406 // ALIASES
4407
4408 addUnitAlias('weekYear', 'gg');
4409 addUnitAlias('isoWeekYear', 'GG');
4410
4411 // PRIORITY
4412
4413 addUnitPriority('weekYear', 1);
4414 addUnitPriority('isoWeekYear', 1);
4415
4416
4417 // PARSING
4418
4419 addRegexToken('G', matchSigned);
4420 addRegexToken('g', matchSigned);
4421 addRegexToken('GG', match1to2, match2);
4422 addRegexToken('gg', match1to2, match2);
4423 addRegexToken('GGGG', match1to4, match4);
4424 addRegexToken('gggg', match1to4, match4);
4425 addRegexToken('GGGGG', match1to6, match6);
4426 addRegexToken('ggggg', match1to6, match6);
4427
4428 addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
4429 week[token.substr(0, 2)] = toInt(input);
4430 });
4431
4432 addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
4433 week[token] = hooks.parseTwoDigitYear(input);
4434 });
4435
4436 // MOMENTS
4437
4438 function getSetWeekYear (input) {
4439 return getSetWeekYearHelper.call(this,
4440 input,
4441 this.week(),
4442 this.weekday(),
4443 this.localeData()._week.dow,
4444 this.localeData()._week.doy);
4445 }
4446
4447 function getSetISOWeekYear (input) {
4448 return getSetWeekYearHelper.call(this,
4449 input, this.isoWeek(), this.isoWeekday(), 1, 4);
4450 }
4451
4452 function getISOWeeksInYear () {
4453 return weeksInYear(this.year(), 1, 4);
4454 }
4455
4456 function getWeeksInYear () {
4457 var weekInfo = this.localeData()._week;
4458 return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
4459 }
4460
4461 function getSetWeekYearHelper(input, week, weekday, dow, doy) {
4462 var weeksTarget;
4463 if (input == null) {
4464 return weekOfYear(this, dow, doy).year;
4465 } else {
4466 weeksTarget = weeksInYear(input, dow, doy);
4467 if (week > weeksTarget) {
4468 week = weeksTarget;
4469 }
4470 return setWeekAll.call(this, input, week, weekday, dow, doy);
4471 }
4472 }
4473
4474 function setWeekAll(weekYear, week, weekday, dow, doy) {
4475 var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
4476 date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
4477
4478 this.year(date.getUTCFullYear());
4479 this.month(date.getUTCMonth());
4480 this.date(date.getUTCDate());
4481 return this;
4482 }
4483
4484 // FORMATTING
4485
4486 addFormatToken('Q', 0, 'Qo', 'quarter');
4487
4488 // ALIASES
4489
4490 addUnitAlias('quarter', 'Q');
4491
4492 // PRIORITY
4493
4494 addUnitPriority('quarter', 7);
4495
4496 // PARSING
4497
4498 addRegexToken('Q', match1);
4499 addParseToken('Q', function (input, array) {
4500 array[MONTH] = (toInt(input) - 1) * 3;
4501 });
4502
4503 // MOMENTS
4504
4505 function getSetQuarter (input) {
4506 return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
4507 }
4508
4509 // FORMATTING
4510
4511 addFormatToken('D', ['DD', 2], 'Do', 'date');
4512
4513 // ALIASES
4514
4515 addUnitAlias('date', 'D');
4516
4517 // PRIORITY
4518 addUnitPriority('date', 9);
4519
4520 // PARSING
4521
4522 addRegexToken('D', match1to2);
4523 addRegexToken('DD', match1to2, match2);
4524 addRegexToken('Do', function (isStrict, locale) {
4525 // TODO: Remove "ordinalParse" fallback in next major release.
4526 return isStrict ?
4527 (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
4528 locale._dayOfMonthOrdinalParseLenient;
4529 });
4530
4531 addParseToken(['D', 'DD'], DATE);
4532 addParseToken('Do', function (input, array) {
4533 array[DATE] = toInt(input.match(match1to2)[0]);
4534 });
4535
4536 // MOMENTS
4537
4538 var getSetDayOfMonth = makeGetSet('Date', true);
4539
4540 // FORMATTING
4541
4542 addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
4543
4544 // ALIASES
4545
4546 addUnitAlias('dayOfYear', 'DDD');
4547
4548 // PRIORITY
4549 addUnitPriority('dayOfYear', 4);
4550
4551 // PARSING
4552
4553 addRegexToken('DDD', match1to3);
4554 addRegexToken('DDDD', match3);
4555 addParseToken(['DDD', 'DDDD'], function (input, array, config) {
4556 config._dayOfYear = toInt(input);
4557 });
4558
4559 // HELPERS
4560
4561 // MOMENTS
4562
4563 function getSetDayOfYear (input) {
4564 var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
4565 return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
4566 }
4567
4568 // FORMATTING
4569
4570 addFormatToken('m', ['mm', 2], 0, 'minute');
4571
4572 // ALIASES
4573
4574 addUnitAlias('minute', 'm');
4575
4576 // PRIORITY
4577
4578 addUnitPriority('minute', 14);
4579
4580 // PARSING
4581
4582 addRegexToken('m', match1to2);
4583 addRegexToken('mm', match1to2, match2);
4584 addParseToken(['m', 'mm'], MINUTE);
4585
4586 // MOMENTS
4587
4588 var getSetMinute = makeGetSet('Minutes', false);
4589
4590 // FORMATTING
4591
4592 addFormatToken('s', ['ss', 2], 0, 'second');
4593
4594 // ALIASES
4595
4596 addUnitAlias('second', 's');
4597
4598 // PRIORITY
4599
4600 addUnitPriority('second', 15);
4601
4602 // PARSING
4603
4604 addRegexToken('s', match1to2);
4605 addRegexToken('ss', match1to2, match2);
4606 addParseToken(['s', 'ss'], SECOND);
4607
4608 // MOMENTS
4609
4610 var getSetSecond = makeGetSet('Seconds', false);
4611
4612 // FORMATTING
4613
4614 addFormatToken('S', 0, 0, function () {
4615 return ~~(this.millisecond() / 100);
4616 });
4617
4618 addFormatToken(0, ['SS', 2], 0, function () {
4619 return ~~(this.millisecond() / 10);
4620 });
4621
4622 addFormatToken(0, ['SSS', 3], 0, 'millisecond');
4623 addFormatToken(0, ['SSSS', 4], 0, function () {
4624 return this.millisecond() * 10;
4625 });
4626 addFormatToken(0, ['SSSSS', 5], 0, function () {
4627 return this.millisecond() * 100;
4628 });
4629 addFormatToken(0, ['SSSSSS', 6], 0, function () {
4630 return this.millisecond() * 1000;
4631 });
4632 addFormatToken(0, ['SSSSSSS', 7], 0, function () {
4633 return this.millisecond() * 10000;
4634 });
4635 addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
4636 return this.millisecond() * 100000;
4637 });
4638 addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
4639 return this.millisecond() * 1000000;
4640 });
4641
4642
4643 // ALIASES
4644
4645 addUnitAlias('millisecond', 'ms');
4646
4647 // PRIORITY
4648
4649 addUnitPriority('millisecond', 16);
4650
4651 // PARSING
4652
4653 addRegexToken('S', match1to3, match1);
4654 addRegexToken('SS', match1to3, match2);
4655 addRegexToken('SSS', match1to3, match3);
4656
4657 var token;
4658 for (token = 'SSSS'; token.length <= 9; token += 'S') {
4659 addRegexToken(token, matchUnsigned);
4660 }
4661
4662 function parseMs(input, array) {
4663 array[MILLISECOND] = toInt(('0.' + input) * 1000);
4664 }
4665
4666 for (token = 'S'; token.length <= 9; token += 'S') {
4667 addParseToken(token, parseMs);
4668 }
4669 // MOMENTS
4670
4671 var getSetMillisecond = makeGetSet('Milliseconds', false);
4672
4673 // FORMATTING
4674
4675 addFormatToken('z', 0, 0, 'zoneAbbr');
4676 addFormatToken('zz', 0, 0, 'zoneName');
4677
4678 // MOMENTS
4679
4680 function getZoneAbbr () {
4681 return this._isUTC ? 'UTC' : '';
4682 }
4683
4684 function getZoneName () {
4685 return this._isUTC ? 'Coordinated Universal Time' : '';
4686 }
4687
4688 var proto = Moment.prototype;
4689
4690 proto.add = add;
4691 proto.calendar = calendar$1;
4692 proto.clone = clone;
4693 proto.diff = diff;
4694 proto.endOf = endOf;
4695 proto.format = format;
4696 proto.from = from;
4697 proto.fromNow = fromNow;
4698 proto.to = to;
4699 proto.toNow = toNow;
4700 proto.get = stringGet;
4701 proto.invalidAt = invalidAt;
4702 proto.isAfter = isAfter;
4703 proto.isBefore = isBefore;
4704 proto.isBetween = isBetween;
4705 proto.isSame = isSame;
4706 proto.isSameOrAfter = isSameOrAfter;
4707 proto.isSameOrBefore = isSameOrBefore;
4708 proto.isValid = isValid$2;
4709 proto.lang = lang;
4710 proto.locale = locale;
4711 proto.localeData = localeData;
4712 proto.max = prototypeMax;
4713 proto.min = prototypeMin;
4714 proto.parsingFlags = parsingFlags;
4715 proto.set = stringSet;
4716 proto.startOf = startOf;
4717 proto.subtract = subtract;
4718 proto.toArray = toArray;
4719 proto.toObject = toObject;
4720 proto.toDate = toDate;
4721 proto.toISOString = toISOString;
4722 proto.inspect = inspect;
4723 proto.toJSON = toJSON;
4724 proto.toString = toString;
4725 proto.unix = unix;
4726 proto.valueOf = valueOf;
4727 proto.creationData = creationData;
4728 proto.year = getSetYear;
4729 proto.isLeapYear = getIsLeapYear;
4730 proto.weekYear = getSetWeekYear;
4731 proto.isoWeekYear = getSetISOWeekYear;
4732 proto.quarter = proto.quarters = getSetQuarter;
4733 proto.month = getSetMonth;
4734 proto.daysInMonth = getDaysInMonth;
4735 proto.week = proto.weeks = getSetWeek;
4736 proto.isoWeek = proto.isoWeeks = getSetISOWeek;
4737 proto.weeksInYear = getWeeksInYear;
4738 proto.isoWeeksInYear = getISOWeeksInYear;
4739 proto.date = getSetDayOfMonth;
4740 proto.day = proto.days = getSetDayOfWeek;
4741 proto.weekday = getSetLocaleDayOfWeek;
4742 proto.isoWeekday = getSetISODayOfWeek;
4743 proto.dayOfYear = getSetDayOfYear;
4744 proto.hour = proto.hours = getSetHour;
4745 proto.minute = proto.minutes = getSetMinute;
4746 proto.second = proto.seconds = getSetSecond;
4747 proto.millisecond = proto.milliseconds = getSetMillisecond;
4748 proto.utcOffset = getSetOffset;
4749 proto.utc = setOffsetToUTC;
4750 proto.local = setOffsetToLocal;
4751 proto.parseZone = setOffsetToParsedOffset;
4752 proto.hasAlignedHourOffset = hasAlignedHourOffset;
4753 proto.isDST = isDaylightSavingTime;
4754 proto.isLocal = isLocal;
4755 proto.isUtcOffset = isUtcOffset;
4756 proto.isUtc = isUtc;
4757 proto.isUTC = isUtc;
4758 proto.zoneAbbr = getZoneAbbr;
4759 proto.zoneName = getZoneName;
4760 proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
4761 proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
4762 proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
4763 proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
4764 proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
4765
4766 function createUnix (input) {
4767 return createLocal(input * 1000);
4768 }
4769
4770 function createInZone () {
4771 return createLocal.apply(null, arguments).parseZone();
4772 }
4773
4774 function preParsePostFormat (string) {
4775 return string;
4776 }
4777
4778 var proto$1 = Locale.prototype;
4779
4780 proto$1.calendar = calendar;
4781 proto$1.longDateFormat = longDateFormat;
4782 proto$1.invalidDate = invalidDate;
4783 proto$1.ordinal = ordinal;
4784 proto$1.preparse = preParsePostFormat;
4785 proto$1.postformat = preParsePostFormat;
4786 proto$1.relativeTime = relativeTime;
4787 proto$1.pastFuture = pastFuture;
4788 proto$1.set = set;
4789
4790 proto$1.months = localeMonths;
4791 proto$1.monthsShort = localeMonthsShort;
4792 proto$1.monthsParse = localeMonthsParse;
4793 proto$1.monthsRegex = monthsRegex;
4794 proto$1.monthsShortRegex = monthsShortRegex;
4795 proto$1.week = localeWeek;
4796 proto$1.firstDayOfYear = localeFirstDayOfYear;
4797 proto$1.firstDayOfWeek = localeFirstDayOfWeek;
4798
4799 proto$1.weekdays = localeWeekdays;
4800 proto$1.weekdaysMin = localeWeekdaysMin;
4801 proto$1.weekdaysShort = localeWeekdaysShort;
4802 proto$1.weekdaysParse = localeWeekdaysParse;
4803
4804 proto$1.weekdaysRegex = weekdaysRegex;
4805 proto$1.weekdaysShortRegex = weekdaysShortRegex;
4806 proto$1.weekdaysMinRegex = weekdaysMinRegex;
4807
4808 proto$1.isPM = localeIsPM;
4809 proto$1.meridiem = localeMeridiem;
4810
4811 function get$1 (format, index, field, setter) {
4812 var locale = getLocale();
4813 var utc = createUTC().set(setter, index);
4814 return locale[field](utc, format);
4815 }
4816
4817 function listMonthsImpl (format, index, field) {
4818 if (isNumber(format)) {
4819 index = format;
4820 format = undefined;
4821 }
4822
4823 format = format || '';
4824
4825 if (index != null) {
4826 return get$1(format, index, field, 'month');
4827 }
4828
4829 var i;
4830 var out = [];
4831 for (i = 0; i < 12; i++) {
4832 out[i] = get$1(format, i, field, 'month');
4833 }
4834 return out;
4835 }
4836
4837 // ()
4838 // (5)
4839 // (fmt, 5)
4840 // (fmt)
4841 // (true)
4842 // (true, 5)
4843 // (true, fmt, 5)
4844 // (true, fmt)
4845 function listWeekdaysImpl (localeSorted, format, index, field) {
4846 if (typeof localeSorted === 'boolean') {
4847 if (isNumber(format)) {
4848 index = format;
4849 format = undefined;
4850 }
4851
4852 format = format || '';
4853 } else {
4854 format = localeSorted;
4855 index = format;
4856 localeSorted = false;
4857
4858 if (isNumber(format)) {
4859 index = format;
4860 format = undefined;
4861 }
4862
4863 format = format || '';
4864 }
4865
4866 var locale = getLocale(),
4867 shift = localeSorted ? locale._week.dow : 0;
4868
4869 if (index != null) {
4870 return get$1(format, (index + shift) % 7, field, 'day');
4871 }
4872
4873 var i;
4874 var out = [];
4875 for (i = 0; i < 7; i++) {
4876 out[i] = get$1(format, (i + shift) % 7, field, 'day');
4877 }
4878 return out;
4879 }
4880
4881 function listMonths (format, index) {
4882 return listMonthsImpl(format, index, 'months');
4883 }
4884
4885 function listMonthsShort (format, index) {
4886 return listMonthsImpl(format, index, 'monthsShort');
4887 }
4888
4889 function listWeekdays (localeSorted, format, index) {
4890 return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
4891 }
4892
4893 function listWeekdaysShort (localeSorted, format, index) {
4894 return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
4895 }
4896
4897 function listWeekdaysMin (localeSorted, format, index) {
4898 return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
4899 }
4900
4901 getSetGlobalLocale('en', {
4902 dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
4903 ordinal : function (number) {
4904 var b = number % 10,
4905 output = (toInt(number % 100 / 10) === 1) ? 'th' :
4906 (b === 1) ? 'st' :
4907 (b === 2) ? 'nd' :
4908 (b === 3) ? 'rd' : 'th';
4909 return number + output;
4910 }
4911 });
4912
4913 // Side effect imports
4914
4915 hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
4916 hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
4917
4918 var mathAbs = Math.abs;
4919
4920 function abs () {
4921 var data = this._data;
4922
4923 this._milliseconds = mathAbs(this._milliseconds);
4924 this._days = mathAbs(this._days);
4925 this._months = mathAbs(this._months);
4926
4927 data.milliseconds = mathAbs(data.milliseconds);
4928 data.seconds = mathAbs(data.seconds);
4929 data.minutes = mathAbs(data.minutes);
4930 data.hours = mathAbs(data.hours);
4931 data.months = mathAbs(data.months);
4932 data.years = mathAbs(data.years);
4933
4934 return this;
4935 }
4936
4937 function addSubtract$1 (duration, input, value, direction) {
4938 var other = createDuration(input, value);
4939
4940 duration._milliseconds += direction * other._milliseconds;
4941 duration._days += direction * other._days;
4942 duration._months += direction * other._months;
4943
4944 return duration._bubble();
4945 }
4946
4947 // supports only 2.0-style add(1, 's') or add(duration)
4948 function add$1 (input, value) {
4949 return addSubtract$1(this, input, value, 1);
4950 }
4951
4952 // supports only 2.0-style subtract(1, 's') or subtract(duration)
4953 function subtract$1 (input, value) {
4954 return addSubtract$1(this, input, value, -1);
4955 }
4956
4957 function absCeil (number) {
4958 if (number < 0) {
4959 return Math.floor(number);
4960 } else {
4961 return Math.ceil(number);
4962 }
4963 }
4964
4965 function bubble () {
4966 var milliseconds = this._milliseconds;
4967 var days = this._days;
4968 var months = this._months;
4969 var data = this._data;
4970 var seconds, minutes, hours, years, monthsFromDays;
4971
4972 // if we have a mix of positive and negative values, bubble down first
4973 // check: https://github.com/moment/moment/issues/2166
4974 if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
4975 (milliseconds <= 0 && days <= 0 && months <= 0))) {
4976 milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
4977 days = 0;
4978 months = 0;
4979 }
4980
4981 // The following code bubbles up values, see the tests for
4982 // examples of what that means.
4983 data.milliseconds = milliseconds % 1000;
4984
4985 seconds = absFloor(milliseconds / 1000);
4986 data.seconds = seconds % 60;
4987
4988 minutes = absFloor(seconds / 60);
4989 data.minutes = minutes % 60;
4990
4991 hours = absFloor(minutes / 60);
4992 data.hours = hours % 24;
4993
4994 days += absFloor(hours / 24);
4995
4996 // convert days to months
4997 monthsFromDays = absFloor(daysToMonths(days));
4998 months += monthsFromDays;
4999 days -= absCeil(monthsToDays(monthsFromDays));
5000
5001 // 12 months -> 1 year
5002 years = absFloor(months / 12);
5003 months %= 12;
5004
5005 data.days = days;
5006 data.months = months;
5007 data.years = years;
5008
5009 return this;
5010 }
5011
5012 function daysToMonths (days) {
5013 // 400 years have 146097 days (taking into account leap year rules)
5014 // 400 years have 12 months === 4800
5015 return days * 4800 / 146097;
5016 }
5017
5018 function monthsToDays (months) {
5019 // the reverse of daysToMonths
5020 return months * 146097 / 4800;
5021 }
5022
5023 function as (units) {
5024 if (!this.isValid()) {
5025 return NaN;
5026 }
5027 var days;
5028 var months;
5029 var milliseconds = this._milliseconds;
5030
5031 units = normalizeUnits(units);
5032
5033 if (units === 'month' || units === 'quarter' || units === 'year') {
5034 days = this._days + milliseconds / 864e5;
5035 months = this._months + daysToMonths(days);
5036 switch (units) {
5037 case 'month': return months;
5038 case 'quarter': return months / 3;
5039 case 'year': return months / 12;
5040 }
5041 } else {
5042 // handle milliseconds separately because of floating point math errors (issue #1867)
5043 days = this._days + Math.round(monthsToDays(this._months));
5044 switch (units) {
5045 case 'week' : return days / 7 + milliseconds / 6048e5;
5046 case 'day' : return days + milliseconds / 864e5;
5047 case 'hour' : return days * 24 + milliseconds / 36e5;
5048 case 'minute' : return days * 1440 + milliseconds / 6e4;
5049 case 'second' : return days * 86400 + milliseconds / 1000;
5050 // Math.floor prevents floating point math errors here
5051 case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
5052 default: throw new Error('Unknown unit ' + units);
5053 }
5054 }
5055 }
5056
5057 // TODO: Use this.as('ms')?
5058 function valueOf$1 () {
5059 if (!this.isValid()) {
5060 return NaN;
5061 }
5062 return (
5063 this._milliseconds +
5064 this._days * 864e5 +
5065 (this._months % 12) * 2592e6 +
5066 toInt(this._months / 12) * 31536e6
5067 );
5068 }
5069
5070 function makeAs (alias) {
5071 return function () {
5072 return this.as(alias);
5073 };
5074 }
5075
5076 var asMilliseconds = makeAs('ms');
5077 var asSeconds = makeAs('s');
5078 var asMinutes = makeAs('m');
5079 var asHours = makeAs('h');
5080 var asDays = makeAs('d');
5081 var asWeeks = makeAs('w');
5082 var asMonths = makeAs('M');
5083 var asQuarters = makeAs('Q');
5084 var asYears = makeAs('y');
5085
5086 function clone$1 () {
5087 return createDuration(this);
5088 }
5089
5090 function get$2 (units) {
5091 units = normalizeUnits(units);
5092 return this.isValid() ? this[units + 's']() : NaN;
5093 }
5094
5095 function makeGetter(name) {
5096 return function () {
5097 return this.isValid() ? this._data[name] : NaN;
5098 };
5099 }
5100
5101 var milliseconds = makeGetter('milliseconds');
5102 var seconds = makeGetter('seconds');
5103 var minutes = makeGetter('minutes');
5104 var hours = makeGetter('hours');
5105 var days = makeGetter('days');
5106 var months = makeGetter('months');
5107 var years = makeGetter('years');
5108
5109 function weeks () {
5110 return absFloor(this.days() / 7);
5111 }
5112
5113 var round = Math.round;
5114 var thresholds = {
5115 ss: 44, // a few seconds to seconds
5116 s : 45, // seconds to minute
5117 m : 45, // minutes to hour
5118 h : 22, // hours to day
5119 d : 26, // days to month
5120 M : 11 // months to year
5121 };
5122
5123 // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
5124 function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
5125 return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
5126 }
5127
5128 function relativeTime$1 (posNegDuration, withoutSuffix, locale) {
5129 var duration = createDuration(posNegDuration).abs();
5130 var seconds = round(duration.as('s'));
5131 var minutes = round(duration.as('m'));
5132 var hours = round(duration.as('h'));
5133 var days = round(duration.as('d'));
5134 var months = round(duration.as('M'));
5135 var years = round(duration.as('y'));
5136
5137 var a = seconds <= thresholds.ss && ['s', seconds] ||
5138 seconds < thresholds.s && ['ss', seconds] ||
5139 minutes <= 1 && ['m'] ||
5140 minutes < thresholds.m && ['mm', minutes] ||
5141 hours <= 1 && ['h'] ||
5142 hours < thresholds.h && ['hh', hours] ||
5143 days <= 1 && ['d'] ||
5144 days < thresholds.d && ['dd', days] ||
5145 months <= 1 && ['M'] ||
5146 months < thresholds.M && ['MM', months] ||
5147 years <= 1 && ['y'] || ['yy', years];
5148
5149 a[2] = withoutSuffix;
5150 a[3] = +posNegDuration > 0;
5151 a[4] = locale;
5152 return substituteTimeAgo.apply(null, a);
5153 }
5154
5155 // This function allows you to set the rounding function for relative time strings
5156 function getSetRelativeTimeRounding (roundingFunction) {
5157 if (roundingFunction === undefined) {
5158 return round;
5159 }
5160 if (typeof(roundingFunction) === 'function') {
5161 round = roundingFunction;
5162 return true;
5163 }
5164 return false;
5165 }
5166
5167 // This function allows you to set a threshold for relative time strings
5168 function getSetRelativeTimeThreshold (threshold, limit) {
5169 if (thresholds[threshold] === undefined) {
5170 return false;
5171 }
5172 if (limit === undefined) {
5173 return thresholds[threshold];
5174 }
5175 thresholds[threshold] = limit;
5176 if (threshold === 's') {
5177 thresholds.ss = limit - 1;
5178 }
5179 return true;
5180 }
5181
5182 function humanize (withSuffix) {
5183 if (!this.isValid()) {
5184 return this.localeData().invalidDate();
5185 }
5186
5187 var locale = this.localeData();
5188 var output = relativeTime$1(this, !withSuffix, locale);
5189
5190 if (withSuffix) {
5191 output = locale.pastFuture(+this, output);
5192 }
5193
5194 return locale.postformat(output);
5195 }
5196
5197 var abs$1 = Math.abs;
5198
5199 function sign(x) {
5200 return ((x > 0) - (x < 0)) || +x;
5201 }
5202
5203 function toISOString$1() {
5204 // for ISO strings we do not use the normal bubbling rules:
5205 // * milliseconds bubble up until they become hours
5206 // * days do not bubble at all
5207 // * months bubble up until they become years
5208 // This is because there is no context-free conversion between hours and days
5209 // (think of clock changes)
5210 // and also not between days and months (28-31 days per month)
5211 if (!this.isValid()) {
5212 return this.localeData().invalidDate();
5213 }
5214
5215 var seconds = abs$1(this._milliseconds) / 1000;
5216 var days = abs$1(this._days);
5217 var months = abs$1(this._months);
5218 var minutes, hours, years;
5219
5220 // 3600 seconds -> 60 minutes -> 1 hour
5221 minutes = absFloor(seconds / 60);
5222 hours = absFloor(minutes / 60);
5223 seconds %= 60;
5224 minutes %= 60;
5225
5226 // 12 months -> 1 year
5227 years = absFloor(months / 12);
5228 months %= 12;
5229
5230
5231 // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
5232 var Y = years;
5233 var M = months;
5234 var D = days;
5235 var h = hours;
5236 var m = minutes;
5237 var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
5238 var total = this.asSeconds();
5239
5240 if (!total) {
5241 // this is the same as C#'s (Noda) and python (isodate)...
5242 // but not other JS (goog.date)
5243 return 'P0D';
5244 }
5245
5246 var totalSign = total < 0 ? '-' : '';
5247 var ymSign = sign(this._months) !== sign(total) ? '-' : '';
5248 var daysSign = sign(this._days) !== sign(total) ? '-' : '';
5249 var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
5250
5251 return totalSign + 'P' +
5252 (Y ? ymSign + Y + 'Y' : '') +
5253 (M ? ymSign + M + 'M' : '') +
5254 (D ? daysSign + D + 'D' : '') +
5255 ((h || m || s) ? 'T' : '') +
5256 (h ? hmsSign + h + 'H' : '') +
5257 (m ? hmsSign + m + 'M' : '') +
5258 (s ? hmsSign + s + 'S' : '');
5259 }
5260
5261 var proto$2 = Duration.prototype;
5262
5263 proto$2.isValid = isValid$1;
5264 proto$2.abs = abs;
5265 proto$2.add = add$1;
5266 proto$2.subtract = subtract$1;
5267 proto$2.as = as;
5268 proto$2.asMilliseconds = asMilliseconds;
5269 proto$2.asSeconds = asSeconds;
5270 proto$2.asMinutes = asMinutes;
5271 proto$2.asHours = asHours;
5272 proto$2.asDays = asDays;
5273 proto$2.asWeeks = asWeeks;
5274 proto$2.asMonths = asMonths;
5275 proto$2.asQuarters = asQuarters;
5276 proto$2.asYears = asYears;
5277 proto$2.valueOf = valueOf$1;
5278 proto$2._bubble = bubble;
5279 proto$2.clone = clone$1;
5280 proto$2.get = get$2;
5281 proto$2.milliseconds = milliseconds;
5282 proto$2.seconds = seconds;
5283 proto$2.minutes = minutes;
5284 proto$2.hours = hours;
5285 proto$2.days = days;
5286 proto$2.weeks = weeks;
5287 proto$2.months = months;
5288 proto$2.years = years;
5289 proto$2.humanize = humanize;
5290 proto$2.toISOString = toISOString$1;
5291 proto$2.toString = toISOString$1;
5292 proto$2.toJSON = toISOString$1;
5293 proto$2.locale = locale;
5294 proto$2.localeData = localeData;
5295
5296 proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);
5297 proto$2.lang = lang;
5298
5299 // Side effect imports
5300
5301 // FORMATTING
5302
5303 addFormatToken('X', 0, 0, 'unix');
5304 addFormatToken('x', 0, 0, 'valueOf');
5305
5306 // PARSING
5307
5308 addRegexToken('x', matchSigned);
5309 addRegexToken('X', matchTimestamp);
5310 addParseToken('X', function (input, array, config) {
5311 config._d = new Date(parseFloat(input, 10) * 1000);
5312 });
5313 addParseToken('x', function (input, array, config) {
5314 config._d = new Date(toInt(input));
5315 });
5316
5317 // Side effect imports
5318
5319
5320 hooks.version = '2.24.0';
5321
5322 setHookCallback(createLocal);
5323
5324 hooks.fn = proto;
5325 hooks.min = min;
5326 hooks.max = max;
5327 hooks.now = now;
5328 hooks.utc = createUTC;
5329 hooks.unix = createUnix;
5330 hooks.months = listMonths;
5331 hooks.isDate = isDate;
5332 hooks.locale = getSetGlobalLocale;
5333 hooks.invalid = createInvalid;
5334 hooks.duration = createDuration;
5335 hooks.isMoment = isMoment;
5336 hooks.weekdays = listWeekdays;
5337 hooks.parseZone = createInZone;
5338 hooks.localeData = getLocale;
5339 hooks.isDuration = isDuration;
5340 hooks.monthsShort = listMonthsShort;
5341 hooks.weekdaysMin = listWeekdaysMin;
5342 hooks.defineLocale = defineLocale;
5343 hooks.updateLocale = updateLocale;
5344 hooks.locales = listLocales;
5345 hooks.weekdaysShort = listWeekdaysShort;
5346 hooks.normalizeUnits = normalizeUnits;
5347 hooks.relativeTimeRounding = getSetRelativeTimeRounding;
5348 hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
5349 hooks.calendarFormat = getCalendarFormat;
5350 hooks.prototype = proto;
5351
5352 // currently HTML5 input type only supports 24-hour formats
5353 hooks.HTML5_FMT = {
5354 DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
5355 DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
5356 DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
5357 DATE: 'YYYY-MM-DD', // <input type="date" />
5358 TIME: 'HH:mm', // <input type="time" />
5359 TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
5360 TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
5361 WEEK: 'GGGG-[W]WW', // <input type="week" />
5362 MONTH: 'YYYY-MM' // <input type="month" />
5363 };
5364
5365 return hooks;
5366
5367})));
5368
5369
5370/***/ }),
5371/* 21 */
5372/***/ (function(module, exports) {
5373
5374module.exports = function (bitmap, value) {
5375 return {
5376 enumerable: !(bitmap & 1),
5377 configurable: !(bitmap & 2),
5378 writable: !(bitmap & 4),
5379 value: value
5380 };
5381};
5382
5383
5384/***/ }),
5385/* 22 */
5386/***/ (function(module, exports, __webpack_require__) {
5387
5388// 19.1.2.14 / 15.2.3.14 Object.keys(O)
5389var $keys = __webpack_require__(46);
5390var enumBugKeys = __webpack_require__(32);
5391
5392module.exports = Object.keys || function keys(O) {
5393 return $keys(O, enumBugKeys);
5394};
5395
5396
5397/***/ }),
5398/* 23 */
5399/***/ (function(module, exports) {
5400
5401module.exports = true;
5402
5403
5404/***/ }),
5405/* 24 */
5406/***/ (function(module, exports) {
5407
5408var id = 0;
5409var px = Math.random();
5410module.exports = function (key) {
5411 return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
5412};
5413
5414
5415/***/ }),
5416/* 25 */
5417/***/ (function(module, exports) {
5418
5419exports.f = {}.propertyIsEnumerable;
5420
5421
5422/***/ }),
5423/* 26 */
5424/***/ (function(module, exports, __webpack_require__) {
5425
5426"use strict";
5427
5428
5429exports.__esModule = true;
5430
5431var _assign = __webpack_require__(62);
5432
5433var _assign2 = _interopRequireDefault(_assign);
5434
5435function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5436
5437exports.default = _assign2.default || function (target) {
5438 for (var i = 1; i < arguments.length; i++) {
5439 var source = arguments[i];
5440
5441 for (var key in source) {
5442 if (Object.prototype.hasOwnProperty.call(source, key)) {
5443 target[key] = source[key];
5444 }
5445 }
5446 }
5447
5448 return target;
5449};
5450
5451/***/ }),
5452/* 27 */
5453/***/ (function(module, exports, __webpack_require__) {
5454
5455// 7.1.1 ToPrimitive(input [, PreferredType])
5456var isObject = __webpack_require__(12);
5457// instead of the ES6 spec version, we didn't implement @@toPrimitive case
5458// and the second argument - flag - preferred type is a string
5459module.exports = function (it, S) {
5460 if (!isObject(it)) return it;
5461 var fn, val;
5462 if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
5463 if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
5464 if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
5465 throw TypeError("Can't convert object to primitive value");
5466};
5467
5468
5469/***/ }),
5470/* 28 */
5471/***/ (function(module, exports) {
5472
5473// 7.2.1 RequireObjectCoercible(argument)
5474module.exports = function (it) {
5475 if (it == undefined) throw TypeError("Can't call method on " + it);
5476 return it;
5477};
5478
5479
5480/***/ }),
5481/* 29 */
5482/***/ (function(module, exports) {
5483
5484// 7.1.4 ToInteger
5485var ceil = Math.ceil;
5486var floor = Math.floor;
5487module.exports = function (it) {
5488 return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
5489};
5490
5491
5492/***/ }),
5493/* 30 */
5494/***/ (function(module, exports, __webpack_require__) {
5495
5496var shared = __webpack_require__(31)('keys');
5497var uid = __webpack_require__(24);
5498module.exports = function (key) {
5499 return shared[key] || (shared[key] = uid(key));
5500};
5501
5502
5503/***/ }),
5504/* 31 */
5505/***/ (function(module, exports, __webpack_require__) {
5506
5507var core = __webpack_require__(6);
5508var global = __webpack_require__(5);
5509var SHARED = '__core-js_shared__';
5510var store = global[SHARED] || (global[SHARED] = {});
5511
5512(module.exports = function (key, value) {
5513 return store[key] || (store[key] = value !== undefined ? value : {});
5514})('versions', []).push({
5515 version: core.version,
5516 mode: __webpack_require__(23) ? 'pure' : 'global',
5517 copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
5518});
5519
5520
5521/***/ }),
5522/* 32 */
5523/***/ (function(module, exports) {
5524
5525// IE 8- don't enum bug keys
5526module.exports = (
5527 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
5528).split(',');
5529
5530
5531/***/ }),
5532/* 33 */
5533/***/ (function(module, exports) {
5534
5535exports.f = Object.getOwnPropertySymbols;
5536
5537
5538/***/ }),
5539/* 34 */
5540/***/ (function(module, exports, __webpack_require__) {
5541
5542// 7.1.13 ToObject(argument)
5543var defined = __webpack_require__(28);
5544module.exports = function (it) {
5545 return Object(defined(it));
5546};
5547
5548
5549/***/ }),
5550/* 35 */
5551/***/ (function(module, exports) {
5552
5553module.exports = {};
5554
5555
5556/***/ }),
5557/* 36 */
5558/***/ (function(module, exports, __webpack_require__) {
5559
5560// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
5561var anObject = __webpack_require__(17);
5562var dPs = __webpack_require__(75);
5563var enumBugKeys = __webpack_require__(32);
5564var IE_PROTO = __webpack_require__(30)('IE_PROTO');
5565var Empty = function () { /* empty */ };
5566var PROTOTYPE = 'prototype';
5567
5568// Create object with fake `null` prototype: use iframe Object with cleared prototype
5569var createDict = function () {
5570 // Thrash, waste and sodomy: IE GC bug
5571 var iframe = __webpack_require__(45)('iframe');
5572 var i = enumBugKeys.length;
5573 var lt = '<';
5574 var gt = '>';
5575 var iframeDocument;
5576 iframe.style.display = 'none';
5577 __webpack_require__(76).appendChild(iframe);
5578 iframe.src = 'javascript:'; // eslint-disable-line no-script-url
5579 // createDict = iframe.contentWindow.Object;
5580 // html.removeChild(iframe);
5581 iframeDocument = iframe.contentWindow.document;
5582 iframeDocument.open();
5583 iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
5584 iframeDocument.close();
5585 createDict = iframeDocument.F;
5586 while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
5587 return createDict();
5588};
5589
5590module.exports = Object.create || function create(O, Properties) {
5591 var result;
5592 if (O !== null) {
5593 Empty[PROTOTYPE] = anObject(O);
5594 result = new Empty();
5595 Empty[PROTOTYPE] = null;
5596 // add "__proto__" for Object.getPrototypeOf polyfill
5597 result[IE_PROTO] = O;
5598 } else result = createDict();
5599 return Properties === undefined ? result : dPs(result, Properties);
5600};
5601
5602
5603/***/ }),
5604/* 37 */
5605/***/ (function(module, exports, __webpack_require__) {
5606
5607var def = __webpack_require__(11).f;
5608var has = __webpack_require__(8);
5609var TAG = __webpack_require__(14)('toStringTag');
5610
5611module.exports = function (it, tag, stat) {
5612 if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
5613};
5614
5615
5616/***/ }),
5617/* 38 */
5618/***/ (function(module, exports, __webpack_require__) {
5619
5620exports.f = __webpack_require__(14);
5621
5622
5623/***/ }),
5624/* 39 */
5625/***/ (function(module, exports, __webpack_require__) {
5626
5627var global = __webpack_require__(5);
5628var core = __webpack_require__(6);
5629var LIBRARY = __webpack_require__(23);
5630var wksExt = __webpack_require__(38);
5631var defineProperty = __webpack_require__(11).f;
5632module.exports = function (name) {
5633 var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
5634 if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
5635};
5636
5637
5638/***/ }),
5639/* 40 */
5640/***/ (function(module, exports) {
5641
5642module.exports = __WEBPACK_EXTERNAL_MODULE_40__;
5643
5644/***/ }),
5645/* 41 */
5646/***/ (function(module, exports, __webpack_require__) {
5647
5648"use strict";
5649/**
5650 * Copyright (c) 2013-present, Facebook, Inc.
5651 *
5652 * This source code is licensed under the MIT license found in the
5653 * LICENSE file in the root directory of this source tree.
5654 */
5655
5656
5657
5658var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5659
5660module.exports = ReactPropTypesSecret;
5661
5662
5663/***/ }),
5664/* 42 */
5665/***/ (function(module, __webpack_exports__, __webpack_require__) {
5666
5667"use strict";
5668/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return polyfill; });
5669/**
5670 * Copyright (c) 2013-present, Facebook, Inc.
5671 *
5672 * This source code is licensed under the MIT license found in the
5673 * LICENSE file in the root directory of this source tree.
5674 */
5675
5676function componentWillMount() {
5677 // Call this.constructor.gDSFP to support sub-classes.
5678 var state = this.constructor.getDerivedStateFromProps(this.props, this.state);
5679 if (state !== null && state !== undefined) {
5680 this.setState(state);
5681 }
5682}
5683
5684function componentWillReceiveProps(nextProps) {
5685 // Call this.constructor.gDSFP to support sub-classes.
5686 // Use the setState() updater to ensure state isn't stale in certain edge cases.
5687 function updater(prevState) {
5688 var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
5689 return state !== null && state !== undefined ? state : null;
5690 }
5691 // Binding "this" is important for shallow renderer support.
5692 this.setState(updater.bind(this));
5693}
5694
5695function componentWillUpdate(nextProps, nextState) {
5696 try {
5697 var prevProps = this.props;
5698 var prevState = this.state;
5699 this.props = nextProps;
5700 this.state = nextState;
5701 this.__reactInternalSnapshotFlag = true;
5702 this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(
5703 prevProps,
5704 prevState
5705 );
5706 } finally {
5707 this.props = prevProps;
5708 this.state = prevState;
5709 }
5710}
5711
5712// React may warn about cWM/cWRP/cWU methods being deprecated.
5713// Add a flag to suppress these warnings for this special case.
5714componentWillMount.__suppressDeprecationWarning = true;
5715componentWillReceiveProps.__suppressDeprecationWarning = true;
5716componentWillUpdate.__suppressDeprecationWarning = true;
5717
5718function polyfill(Component) {
5719 var prototype = Component.prototype;
5720
5721 if (!prototype || !prototype.isReactComponent) {
5722 throw new Error('Can only polyfill class components');
5723 }
5724
5725 if (
5726 typeof Component.getDerivedStateFromProps !== 'function' &&
5727 typeof prototype.getSnapshotBeforeUpdate !== 'function'
5728 ) {
5729 return Component;
5730 }
5731
5732 // If new component APIs are defined, "unsafe" lifecycles won't be called.
5733 // Error if any of these lifecycles are present,
5734 // Because they would work differently between older and newer (16.3+) versions of React.
5735 var foundWillMountName = null;
5736 var foundWillReceivePropsName = null;
5737 var foundWillUpdateName = null;
5738 if (typeof prototype.componentWillMount === 'function') {
5739 foundWillMountName = 'componentWillMount';
5740 } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {
5741 foundWillMountName = 'UNSAFE_componentWillMount';
5742 }
5743 if (typeof prototype.componentWillReceiveProps === 'function') {
5744 foundWillReceivePropsName = 'componentWillReceiveProps';
5745 } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {
5746 foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
5747 }
5748 if (typeof prototype.componentWillUpdate === 'function') {
5749 foundWillUpdateName = 'componentWillUpdate';
5750 } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {
5751 foundWillUpdateName = 'UNSAFE_componentWillUpdate';
5752 }
5753 if (
5754 foundWillMountName !== null ||
5755 foundWillReceivePropsName !== null ||
5756 foundWillUpdateName !== null
5757 ) {
5758 var componentName = Component.displayName || Component.name;
5759 var newApiName =
5760 typeof Component.getDerivedStateFromProps === 'function'
5761 ? 'getDerivedStateFromProps()'
5762 : 'getSnapshotBeforeUpdate()';
5763
5764 throw Error(
5765 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' +
5766 componentName +
5767 ' uses ' +
5768 newApiName +
5769 ' but also contains the following legacy lifecycles:' +
5770 (foundWillMountName !== null ? '\n ' + foundWillMountName : '') +
5771 (foundWillReceivePropsName !== null
5772 ? '\n ' + foundWillReceivePropsName
5773 : '') +
5774 (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') +
5775 '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' +
5776 'https://fb.me/react-async-component-lifecycle-hooks'
5777 );
5778 }
5779
5780 // React <= 16.2 does not support static getDerivedStateFromProps.
5781 // As a workaround, use cWM and cWRP to invoke the new static lifecycle.
5782 // Newer versions of React will ignore these lifecycles if gDSFP exists.
5783 if (typeof Component.getDerivedStateFromProps === 'function') {
5784 prototype.componentWillMount = componentWillMount;
5785 prototype.componentWillReceiveProps = componentWillReceiveProps;
5786 }
5787
5788 // React <= 16.2 does not support getSnapshotBeforeUpdate.
5789 // As a workaround, use cWU to invoke the new lifecycle.
5790 // Newer versions of React will ignore that lifecycle if gSBU exists.
5791 if (typeof prototype.getSnapshotBeforeUpdate === 'function') {
5792 if (typeof prototype.componentDidUpdate !== 'function') {
5793 throw new Error(
5794 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'
5795 );
5796 }
5797
5798 prototype.componentWillUpdate = componentWillUpdate;
5799
5800 var componentDidUpdate = prototype.componentDidUpdate;
5801
5802 prototype.componentDidUpdate = function componentDidUpdatePolyfill(
5803 prevProps,
5804 prevState,
5805 maybeSnapshot
5806 ) {
5807 // 16.3+ will not execute our will-update method;
5808 // It will pass a snapshot value to did-update though.
5809 // Older versions will require our polyfilled will-update value.
5810 // We need to handle both cases, but can't just check for the presence of "maybeSnapshot",
5811 // Because for <= 15.x versions this might be a "prevContext" object.
5812 // We also can't just check "__reactInternalSnapshot",
5813 // Because get-snapshot might return a falsy value.
5814 // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.
5815 var snapshot = this.__reactInternalSnapshotFlag
5816 ? this.__reactInternalSnapshot
5817 : maybeSnapshot;
5818
5819 componentDidUpdate.call(this, prevProps, prevState, snapshot);
5820 };
5821 }
5822
5823 return Component;
5824}
5825
5826
5827
5828
5829/***/ }),
5830/* 43 */
5831/***/ (function(module, exports, __webpack_require__) {
5832
5833// optional / simple context binding
5834var aFunction = __webpack_require__(65);
5835module.exports = function (fn, that, length) {
5836 aFunction(fn);
5837 if (that === undefined) return fn;
5838 switch (length) {
5839 case 1: return function (a) {
5840 return fn.call(that, a);
5841 };
5842 case 2: return function (a, b) {
5843 return fn.call(that, a, b);
5844 };
5845 case 3: return function (a, b, c) {
5846 return fn.call(that, a, b, c);
5847 };
5848 }
5849 return function (/* ...args */) {
5850 return fn.apply(that, arguments);
5851 };
5852};
5853
5854
5855/***/ }),
5856/* 44 */
5857/***/ (function(module, exports, __webpack_require__) {
5858
5859module.exports = !__webpack_require__(7) && !__webpack_require__(18)(function () {
5860 return Object.defineProperty(__webpack_require__(45)('div'), 'a', { get: function () { return 7; } }).a != 7;
5861});
5862
5863
5864/***/ }),
5865/* 45 */
5866/***/ (function(module, exports, __webpack_require__) {
5867
5868var isObject = __webpack_require__(12);
5869var document = __webpack_require__(5).document;
5870// typeof document.createElement is 'object' in old IE
5871var is = isObject(document) && isObject(document.createElement);
5872module.exports = function (it) {
5873 return is ? document.createElement(it) : {};
5874};
5875
5876
5877/***/ }),
5878/* 46 */
5879/***/ (function(module, exports, __webpack_require__) {
5880
5881var has = __webpack_require__(8);
5882var toIObject = __webpack_require__(13);
5883var arrayIndexOf = __webpack_require__(67)(false);
5884var IE_PROTO = __webpack_require__(30)('IE_PROTO');
5885
5886module.exports = function (object, names) {
5887 var O = toIObject(object);
5888 var i = 0;
5889 var result = [];
5890 var key;
5891 for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
5892 // Don't enum bug & hidden keys
5893 while (names.length > i) if (has(O, key = names[i++])) {
5894 ~arrayIndexOf(result, key) || result.push(key);
5895 }
5896 return result;
5897};
5898
5899
5900/***/ }),
5901/* 47 */
5902/***/ (function(module, exports, __webpack_require__) {
5903
5904// fallback for non-array-like ES3 and non-enumerable old V8 strings
5905var cof = __webpack_require__(48);
5906// eslint-disable-next-line no-prototype-builtins
5907module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
5908 return cof(it) == 'String' ? it.split('') : Object(it);
5909};
5910
5911
5912/***/ }),
5913/* 48 */
5914/***/ (function(module, exports) {
5915
5916var toString = {}.toString;
5917
5918module.exports = function (it) {
5919 return toString.call(it).slice(8, -1);
5920};
5921
5922
5923/***/ }),
5924/* 49 */
5925/***/ (function(module, exports, __webpack_require__) {
5926
5927"use strict";
5928
5929
5930exports.__esModule = true;
5931
5932var _iterator = __webpack_require__(70);
5933
5934var _iterator2 = _interopRequireDefault(_iterator);
5935
5936var _symbol = __webpack_require__(82);
5937
5938var _symbol2 = _interopRequireDefault(_symbol);
5939
5940var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
5941
5942function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5943
5944exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
5945 return typeof obj === "undefined" ? "undefined" : _typeof(obj);
5946} : function (obj) {
5947 return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
5948};
5949
5950/***/ }),
5951/* 50 */
5952/***/ (function(module, exports, __webpack_require__) {
5953
5954"use strict";
5955
5956var LIBRARY = __webpack_require__(23);
5957var $export = __webpack_require__(16);
5958var redefine = __webpack_require__(51);
5959var hide = __webpack_require__(10);
5960var Iterators = __webpack_require__(35);
5961var $iterCreate = __webpack_require__(74);
5962var setToStringTag = __webpack_require__(37);
5963var getPrototypeOf = __webpack_require__(77);
5964var ITERATOR = __webpack_require__(14)('iterator');
5965var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
5966var FF_ITERATOR = '@@iterator';
5967var KEYS = 'keys';
5968var VALUES = 'values';
5969
5970var returnThis = function () { return this; };
5971
5972module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
5973 $iterCreate(Constructor, NAME, next);
5974 var getMethod = function (kind) {
5975 if (!BUGGY && kind in proto) return proto[kind];
5976 switch (kind) {
5977 case KEYS: return function keys() { return new Constructor(this, kind); };
5978 case VALUES: return function values() { return new Constructor(this, kind); };
5979 } return function entries() { return new Constructor(this, kind); };
5980 };
5981 var TAG = NAME + ' Iterator';
5982 var DEF_VALUES = DEFAULT == VALUES;
5983 var VALUES_BUG = false;
5984 var proto = Base.prototype;
5985 var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
5986 var $default = $native || getMethod(DEFAULT);
5987 var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
5988 var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
5989 var methods, key, IteratorPrototype;
5990 // Fix native
5991 if ($anyNative) {
5992 IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
5993 if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
5994 // Set @@toStringTag to native iterators
5995 setToStringTag(IteratorPrototype, TAG, true);
5996 // fix for some old engines
5997 if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
5998 }
5999 }
6000 // fix Array#{values, @@iterator}.name in V8 / FF
6001 if (DEF_VALUES && $native && $native.name !== VALUES) {
6002 VALUES_BUG = true;
6003 $default = function values() { return $native.call(this); };
6004 }
6005 // Define iterator
6006 if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
6007 hide(proto, ITERATOR, $default);
6008 }
6009 // Plug for library
6010 Iterators[NAME] = $default;
6011 Iterators[TAG] = returnThis;
6012 if (DEFAULT) {
6013 methods = {
6014 values: DEF_VALUES ? $default : getMethod(VALUES),
6015 keys: IS_SET ? $default : getMethod(KEYS),
6016 entries: $entries
6017 };
6018 if (FORCED) for (key in methods) {
6019 if (!(key in proto)) redefine(proto, key, methods[key]);
6020 } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
6021 }
6022 return methods;
6023};
6024
6025
6026/***/ }),
6027/* 51 */
6028/***/ (function(module, exports, __webpack_require__) {
6029
6030module.exports = __webpack_require__(10);
6031
6032
6033/***/ }),
6034/* 52 */
6035/***/ (function(module, exports, __webpack_require__) {
6036
6037// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
6038var $keys = __webpack_require__(46);
6039var hiddenKeys = __webpack_require__(32).concat('length', 'prototype');
6040
6041exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
6042 return $keys(O, hiddenKeys);
6043};
6044
6045
6046/***/ }),
6047/* 53 */
6048/***/ (function(module, exports, __webpack_require__) {
6049
6050var pIE = __webpack_require__(25);
6051var createDesc = __webpack_require__(21);
6052var toIObject = __webpack_require__(13);
6053var toPrimitive = __webpack_require__(27);
6054var has = __webpack_require__(8);
6055var IE8_DOM_DEFINE = __webpack_require__(44);
6056var gOPD = Object.getOwnPropertyDescriptor;
6057
6058exports.f = __webpack_require__(7) ? gOPD : function getOwnPropertyDescriptor(O, P) {
6059 O = toIObject(O);
6060 P = toPrimitive(P, true);
6061 if (IE8_DOM_DEFINE) try {
6062 return gOPD(O, P);
6063 } catch (e) { /* empty */ }
6064 if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
6065};
6066
6067
6068/***/ }),
6069/* 54 */
6070/***/ (function(module, exports, __webpack_require__) {
6071
6072"use strict";
6073/* WEBPACK VAR INJECTION */(function(process) {
6074
6075if (process.env.NODE_ENV === 'production') {
6076 module.exports = __webpack_require__(99);
6077} else {
6078 module.exports = __webpack_require__(100);
6079}
6080
6081/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(19)))
6082
6083/***/ }),
6084/* 55 */
6085/***/ (function(module, __webpack_exports__, __webpack_require__) {
6086
6087"use strict";
6088/**
6089 * @ignore
6090 * some key-codes definition and utils from closure-library
6091 * @author yiminghe@gmail.com
6092 */
6093var KeyCode = {
6094 /**
6095 * MAC_ENTER
6096 */
6097 MAC_ENTER: 3,
6098
6099 /**
6100 * BACKSPACE
6101 */
6102 BACKSPACE: 8,
6103
6104 /**
6105 * TAB
6106 */
6107 TAB: 9,
6108
6109 /**
6110 * NUMLOCK on FF/Safari Mac
6111 */
6112 NUM_CENTER: 12,
6113 // NUMLOCK on FF/Safari Mac
6114
6115 /**
6116 * ENTER
6117 */
6118 ENTER: 13,
6119
6120 /**
6121 * SHIFT
6122 */
6123 SHIFT: 16,
6124
6125 /**
6126 * CTRL
6127 */
6128 CTRL: 17,
6129
6130 /**
6131 * ALT
6132 */
6133 ALT: 18,
6134
6135 /**
6136 * PAUSE
6137 */
6138 PAUSE: 19,
6139
6140 /**
6141 * CAPS_LOCK
6142 */
6143 CAPS_LOCK: 20,
6144
6145 /**
6146 * ESC
6147 */
6148 ESC: 27,
6149
6150 /**
6151 * SPACE
6152 */
6153 SPACE: 32,
6154
6155 /**
6156 * PAGE_UP
6157 */
6158 PAGE_UP: 33,
6159 // also NUM_NORTH_EAST
6160
6161 /**
6162 * PAGE_DOWN
6163 */
6164 PAGE_DOWN: 34,
6165 // also NUM_SOUTH_EAST
6166
6167 /**
6168 * END
6169 */
6170 END: 35,
6171 // also NUM_SOUTH_WEST
6172
6173 /**
6174 * HOME
6175 */
6176 HOME: 36,
6177 // also NUM_NORTH_WEST
6178
6179 /**
6180 * LEFT
6181 */
6182 LEFT: 37,
6183 // also NUM_WEST
6184
6185 /**
6186 * UP
6187 */
6188 UP: 38,
6189 // also NUM_NORTH
6190
6191 /**
6192 * RIGHT
6193 */
6194 RIGHT: 39,
6195 // also NUM_EAST
6196
6197 /**
6198 * DOWN
6199 */
6200 DOWN: 40,
6201 // also NUM_SOUTH
6202
6203 /**
6204 * PRINT_SCREEN
6205 */
6206 PRINT_SCREEN: 44,
6207
6208 /**
6209 * INSERT
6210 */
6211 INSERT: 45,
6212 // also NUM_INSERT
6213
6214 /**
6215 * DELETE
6216 */
6217 DELETE: 46,
6218 // also NUM_DELETE
6219
6220 /**
6221 * ZERO
6222 */
6223 ZERO: 48,
6224
6225 /**
6226 * ONE
6227 */
6228 ONE: 49,
6229
6230 /**
6231 * TWO
6232 */
6233 TWO: 50,
6234
6235 /**
6236 * THREE
6237 */
6238 THREE: 51,
6239
6240 /**
6241 * FOUR
6242 */
6243 FOUR: 52,
6244
6245 /**
6246 * FIVE
6247 */
6248 FIVE: 53,
6249
6250 /**
6251 * SIX
6252 */
6253 SIX: 54,
6254
6255 /**
6256 * SEVEN
6257 */
6258 SEVEN: 55,
6259
6260 /**
6261 * EIGHT
6262 */
6263 EIGHT: 56,
6264
6265 /**
6266 * NINE
6267 */
6268 NINE: 57,
6269
6270 /**
6271 * QUESTION_MARK
6272 */
6273 QUESTION_MARK: 63,
6274 // needs localization
6275
6276 /**
6277 * A
6278 */
6279 A: 65,
6280
6281 /**
6282 * B
6283 */
6284 B: 66,
6285
6286 /**
6287 * C
6288 */
6289 C: 67,
6290
6291 /**
6292 * D
6293 */
6294 D: 68,
6295
6296 /**
6297 * E
6298 */
6299 E: 69,
6300
6301 /**
6302 * F
6303 */
6304 F: 70,
6305
6306 /**
6307 * G
6308 */
6309 G: 71,
6310
6311 /**
6312 * H
6313 */
6314 H: 72,
6315
6316 /**
6317 * I
6318 */
6319 I: 73,
6320
6321 /**
6322 * J
6323 */
6324 J: 74,
6325
6326 /**
6327 * K
6328 */
6329 K: 75,
6330
6331 /**
6332 * L
6333 */
6334 L: 76,
6335
6336 /**
6337 * M
6338 */
6339 M: 77,
6340
6341 /**
6342 * N
6343 */
6344 N: 78,
6345
6346 /**
6347 * O
6348 */
6349 O: 79,
6350
6351 /**
6352 * P
6353 */
6354 P: 80,
6355
6356 /**
6357 * Q
6358 */
6359 Q: 81,
6360
6361 /**
6362 * R
6363 */
6364 R: 82,
6365
6366 /**
6367 * S
6368 */
6369 S: 83,
6370
6371 /**
6372 * T
6373 */
6374 T: 84,
6375
6376 /**
6377 * U
6378 */
6379 U: 85,
6380
6381 /**
6382 * V
6383 */
6384 V: 86,
6385
6386 /**
6387 * W
6388 */
6389 W: 87,
6390
6391 /**
6392 * X
6393 */
6394 X: 88,
6395
6396 /**
6397 * Y
6398 */
6399 Y: 89,
6400
6401 /**
6402 * Z
6403 */
6404 Z: 90,
6405
6406 /**
6407 * META
6408 */
6409 META: 91,
6410 // WIN_KEY_LEFT
6411
6412 /**
6413 * WIN_KEY_RIGHT
6414 */
6415 WIN_KEY_RIGHT: 92,
6416
6417 /**
6418 * CONTEXT_MENU
6419 */
6420 CONTEXT_MENU: 93,
6421
6422 /**
6423 * NUM_ZERO
6424 */
6425 NUM_ZERO: 96,
6426
6427 /**
6428 * NUM_ONE
6429 */
6430 NUM_ONE: 97,
6431
6432 /**
6433 * NUM_TWO
6434 */
6435 NUM_TWO: 98,
6436
6437 /**
6438 * NUM_THREE
6439 */
6440 NUM_THREE: 99,
6441
6442 /**
6443 * NUM_FOUR
6444 */
6445 NUM_FOUR: 100,
6446
6447 /**
6448 * NUM_FIVE
6449 */
6450 NUM_FIVE: 101,
6451
6452 /**
6453 * NUM_SIX
6454 */
6455 NUM_SIX: 102,
6456
6457 /**
6458 * NUM_SEVEN
6459 */
6460 NUM_SEVEN: 103,
6461
6462 /**
6463 * NUM_EIGHT
6464 */
6465 NUM_EIGHT: 104,
6466
6467 /**
6468 * NUM_NINE
6469 */
6470 NUM_NINE: 105,
6471
6472 /**
6473 * NUM_MULTIPLY
6474 */
6475 NUM_MULTIPLY: 106,
6476
6477 /**
6478 * NUM_PLUS
6479 */
6480 NUM_PLUS: 107,
6481
6482 /**
6483 * NUM_MINUS
6484 */
6485 NUM_MINUS: 109,
6486
6487 /**
6488 * NUM_PERIOD
6489 */
6490 NUM_PERIOD: 110,
6491
6492 /**
6493 * NUM_DIVISION
6494 */
6495 NUM_DIVISION: 111,
6496
6497 /**
6498 * F1
6499 */
6500 F1: 112,
6501
6502 /**
6503 * F2
6504 */
6505 F2: 113,
6506
6507 /**
6508 * F3
6509 */
6510 F3: 114,
6511
6512 /**
6513 * F4
6514 */
6515 F4: 115,
6516
6517 /**
6518 * F5
6519 */
6520 F5: 116,
6521
6522 /**
6523 * F6
6524 */
6525 F6: 117,
6526
6527 /**
6528 * F7
6529 */
6530 F7: 118,
6531
6532 /**
6533 * F8
6534 */
6535 F8: 119,
6536
6537 /**
6538 * F9
6539 */
6540 F9: 120,
6541
6542 /**
6543 * F10
6544 */
6545 F10: 121,
6546
6547 /**
6548 * F11
6549 */
6550 F11: 122,
6551
6552 /**
6553 * F12
6554 */
6555 F12: 123,
6556
6557 /**
6558 * NUMLOCK
6559 */
6560 NUMLOCK: 144,
6561
6562 /**
6563 * SEMICOLON
6564 */
6565 SEMICOLON: 186,
6566 // needs localization
6567
6568 /**
6569 * DASH
6570 */
6571 DASH: 189,
6572 // needs localization
6573
6574 /**
6575 * EQUALS
6576 */
6577 EQUALS: 187,
6578 // needs localization
6579
6580 /**
6581 * COMMA
6582 */
6583 COMMA: 188,
6584 // needs localization
6585
6586 /**
6587 * PERIOD
6588 */
6589 PERIOD: 190,
6590 // needs localization
6591
6592 /**
6593 * SLASH
6594 */
6595 SLASH: 191,
6596 // needs localization
6597
6598 /**
6599 * APOSTROPHE
6600 */
6601 APOSTROPHE: 192,
6602 // needs localization
6603
6604 /**
6605 * SINGLE_QUOTE
6606 */
6607 SINGLE_QUOTE: 222,
6608 // needs localization
6609
6610 /**
6611 * OPEN_SQUARE_BRACKET
6612 */
6613 OPEN_SQUARE_BRACKET: 219,
6614 // needs localization
6615
6616 /**
6617 * BACKSLASH
6618 */
6619 BACKSLASH: 220,
6620 // needs localization
6621
6622 /**
6623 * CLOSE_SQUARE_BRACKET
6624 */
6625 CLOSE_SQUARE_BRACKET: 221,
6626 // needs localization
6627
6628 /**
6629 * WIN_KEY
6630 */
6631 WIN_KEY: 224,
6632
6633 /**
6634 * MAC_FF_META
6635 */
6636 MAC_FF_META: 224,
6637 // Firefox (Gecko) fires this for the meta key instead of 91
6638
6639 /**
6640 * WIN_IME
6641 */
6642 WIN_IME: 229
6643};
6644/*
6645 whether text and modified key is entered at the same time.
6646 */
6647
6648KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) {
6649 var keyCode = e.keyCode;
6650
6651 if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text
6652 keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
6653 return false;
6654 } // The following keys are quite harmless, even in combination with
6655 // CTRL, ALT or SHIFT.
6656
6657
6658 switch (keyCode) {
6659 case KeyCode.ALT:
6660 case KeyCode.CAPS_LOCK:
6661 case KeyCode.CONTEXT_MENU:
6662 case KeyCode.CTRL:
6663 case KeyCode.DOWN:
6664 case KeyCode.END:
6665 case KeyCode.ESC:
6666 case KeyCode.HOME:
6667 case KeyCode.INSERT:
6668 case KeyCode.LEFT:
6669 case KeyCode.MAC_FF_META:
6670 case KeyCode.META:
6671 case KeyCode.NUMLOCK:
6672 case KeyCode.NUM_CENTER:
6673 case KeyCode.PAGE_DOWN:
6674 case KeyCode.PAGE_UP:
6675 case KeyCode.PAUSE:
6676 case KeyCode.PRINT_SCREEN:
6677 case KeyCode.RIGHT:
6678 case KeyCode.SHIFT:
6679 case KeyCode.UP:
6680 case KeyCode.WIN_KEY:
6681 case KeyCode.WIN_KEY_RIGHT:
6682 return false;
6683
6684 default:
6685 return true;
6686 }
6687};
6688/*
6689 whether character is entered.
6690 */
6691
6692
6693KeyCode.isCharacterKey = function isCharacterKey(keyCode) {
6694 if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
6695 return true;
6696 }
6697
6698 if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
6699 return true;
6700 }
6701
6702 if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
6703 return true;
6704 } // Safari sends zero key code for non-latin characters.
6705
6706
6707 if (window.navigation.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
6708 return true;
6709 }
6710
6711 switch (keyCode) {
6712 case KeyCode.SPACE:
6713 case KeyCode.QUESTION_MARK:
6714 case KeyCode.NUM_PLUS:
6715 case KeyCode.NUM_MINUS:
6716 case KeyCode.NUM_PERIOD:
6717 case KeyCode.NUM_DIVISION:
6718 case KeyCode.SEMICOLON:
6719 case KeyCode.DASH:
6720 case KeyCode.EQUALS:
6721 case KeyCode.COMMA:
6722 case KeyCode.PERIOD:
6723 case KeyCode.SLASH:
6724 case KeyCode.APOSTROPHE:
6725 case KeyCode.SINGLE_QUOTE:
6726 case KeyCode.OPEN_SQUARE_BRACKET:
6727 case KeyCode.BACKSLASH:
6728 case KeyCode.CLOSE_SQUARE_BRACKET:
6729 return true;
6730
6731 default:
6732 return false;
6733 }
6734};
6735
6736/* harmony default export */ __webpack_exports__["a"] = (KeyCode);
6737
6738/***/ }),
6739/* 56 */
6740/***/ (function(module, __webpack_exports__, __webpack_require__) {
6741
6742"use strict";
6743/* harmony default export */ __webpack_exports__["a"] = ({
6744 DATE_ROW_COUNT: 6,
6745 DATE_COL_COUNT: 7
6746});
6747
6748/***/ }),
6749/* 57 */
6750/***/ (function(module, __webpack_exports__, __webpack_require__) {
6751
6752"use strict";
6753/* harmony export (immutable) */ __webpack_exports__["a"] = mapSelf;
6754/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
6755/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
6756
6757
6758function mirror(o) {
6759 return o;
6760}
6761
6762function mapSelf(children) {
6763 // return ReactFragment
6764 return __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.map(children, mirror);
6765}
6766
6767/***/ }),
6768/* 58 */
6769/***/ (function(module, exports, __webpack_require__) {
6770
6771__webpack_require__(59);
6772module.exports = __webpack_require__(60);
6773
6774
6775/***/ }),
6776/* 59 */
6777/***/ (function(module, exports) {
6778
6779// removed by extract-text-webpack-plugin
6780
6781/***/ }),
6782/* 60 */
6783/***/ (function(module, __webpack_exports__, __webpack_require__) {
6784
6785"use strict";
6786Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
6787/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Calendar__ = __webpack_require__(61);
6788
6789
6790/* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__Calendar__["a" /* default */]);
6791
6792/***/ }),
6793/* 61 */
6794/***/ (function(module, __webpack_exports__, __webpack_require__) {
6795
6796"use strict";
6797/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(26);
6798/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
6799/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);
6800/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
6801/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(2);
6802/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
6803/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(3);
6804/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
6805/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
6806/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
6807/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom__ = __webpack_require__(40);
6808/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react_dom__);
6809/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(4);
6810/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
6811/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_rc_util_es_KeyCode__ = __webpack_require__(55);
6812/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_lifecycles_compat__ = __webpack_require__(42);
6813/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__date_DateTable__ = __webpack_require__(105);
6814/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__calendar_CalendarHeader__ = __webpack_require__(108);
6815/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__calendar_CalendarFooter__ = __webpack_require__(113);
6816/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__mixin_CalendarMixin__ = __webpack_require__(117);
6817/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__mixin_CommonMixin__ = __webpack_require__(118);
6818/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__date_DateInput__ = __webpack_require__(120);
6819/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__util__ = __webpack_require__(15);
6820/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__util_toTime__ = __webpack_require__(121);
6821/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_moment__ = __webpack_require__(20);
6822/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_17_moment__);
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842function noop() {}
6843
6844var getMomentObjectIfValid = function getMomentObjectIfValid(date) {
6845 if (__WEBPACK_IMPORTED_MODULE_17_moment___default.a.isMoment(date) && date.isValid()) {
6846 return date;
6847 }
6848 return false;
6849};
6850
6851var Calendar = function (_React$Component) {
6852 __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(Calendar, _React$Component);
6853
6854 function Calendar(props) {
6855 __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, Calendar);
6856
6857 var _this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props));
6858
6859 _initialiseProps.call(_this);
6860
6861 _this.state = {
6862 mode: _this.props.mode || 'date',
6863 value: getMomentObjectIfValid(props.value) || getMomentObjectIfValid(props.defaultValue) || __WEBPACK_IMPORTED_MODULE_17_moment___default()(),
6864 selectedValue: props.selectedValue || props.defaultSelectedValue
6865 };
6866 return _this;
6867 }
6868
6869 Calendar.prototype.componentDidMount = function componentDidMount() {
6870 if (this.props.showDateInput) {
6871 this.saveFocusElement(__WEBPACK_IMPORTED_MODULE_14__date_DateInput__["a" /* default */].getInstance());
6872 }
6873 };
6874
6875 Calendar.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, state) {
6876 var value = nextProps.value,
6877 selectedValue = nextProps.selectedValue;
6878
6879 var newState = {};
6880
6881 if ('mode' in nextProps && state.mode !== nextProps.mode) {
6882 newState = { mode: nextProps.mode };
6883 }
6884 if ('value' in nextProps) {
6885 newState.value = getMomentObjectIfValid(value) || getMomentObjectIfValid(nextProps.defaultValue) || Object(__WEBPACK_IMPORTED_MODULE_12__mixin_CalendarMixin__["d" /* getNowByCurrentStateValue */])(state.value);
6886 }
6887 if ('selectedValue' in nextProps) {
6888 newState.selectedValue = selectedValue;
6889 }
6890
6891 return newState;
6892 };
6893
6894 Calendar.prototype.render = function render() {
6895 var props = this.props,
6896 state = this.state;
6897 var locale = props.locale,
6898 prefixCls = props.prefixCls,
6899 disabledDate = props.disabledDate,
6900 dateInputPlaceholder = props.dateInputPlaceholder,
6901 timePicker = props.timePicker,
6902 disabledTime = props.disabledTime,
6903 clearIcon = props.clearIcon,
6904 renderFooter = props.renderFooter,
6905 inputMode = props.inputMode,
6906 monthCellRender = props.monthCellRender,
6907 monthCellContentRender = props.monthCellContentRender;
6908 var value = state.value,
6909 selectedValue = state.selectedValue,
6910 mode = state.mode;
6911
6912 var showTimePicker = mode === 'time';
6913 var disabledTimeConfig = showTimePicker && disabledTime && timePicker ? Object(__WEBPACK_IMPORTED_MODULE_15__util__["c" /* getTimeConfig */])(selectedValue, disabledTime) : null;
6914
6915 var timePickerEle = null;
6916
6917 if (timePicker && showTimePicker) {
6918 var timePickerProps = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({
6919 showHour: true,
6920 showSecond: true,
6921 showMinute: true
6922 }, timePicker.props, disabledTimeConfig, {
6923 onChange: this.onDateInputChange,
6924 value: selectedValue,
6925 disabledTime: disabledTime
6926 });
6927
6928 if (timePicker.props.defaultValue !== undefined) {
6929 timePickerProps.defaultOpenValue = timePicker.props.defaultValue;
6930 }
6931
6932 timePickerEle = __WEBPACK_IMPORTED_MODULE_4_react___default.a.cloneElement(timePicker, timePickerProps);
6933 }
6934
6935 var dateInputElement = props.showDateInput ? __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14__date_DateInput__["a" /* default */], {
6936 format: this.getFormat(),
6937 key: 'date-input',
6938 value: value,
6939 locale: locale,
6940 placeholder: dateInputPlaceholder,
6941 showClear: true,
6942 disabledTime: disabledTime,
6943 disabledDate: disabledDate,
6944 onClear: this.onClear,
6945 prefixCls: prefixCls,
6946 selectedValue: selectedValue,
6947 onChange: this.onDateInputChange,
6948 onSelect: this.onDateInputSelect,
6949 clearIcon: clearIcon,
6950 inputMode: inputMode
6951 }) : null;
6952
6953 var children = [];
6954 if (props.renderSidebar) {
6955 children.push(props.renderSidebar());
6956 }
6957 children.push(__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
6958 'div',
6959 { className: prefixCls + '-panel', key: 'panel' },
6960 dateInputElement,
6961 __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
6962 'div',
6963 {
6964 tabIndex: this.props.focusablePanel ? 0 : undefined,
6965 className: prefixCls + '-date-panel'
6966 },
6967 __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__calendar_CalendarHeader__["a" /* default */], {
6968 locale: locale,
6969 mode: mode,
6970 value: value,
6971 onValueChange: this.setValue,
6972 onPanelChange: this.onPanelChange,
6973 renderFooter: renderFooter,
6974 showTimePicker: showTimePicker,
6975 prefixCls: prefixCls,
6976 monthCellRender: monthCellRender,
6977 monthCellContentRender: monthCellContentRender
6978 }),
6979 timePicker && showTimePicker ? __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
6980 'div',
6981 { className: prefixCls + '-time-picker' },
6982 __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
6983 'div',
6984 { className: prefixCls + '-time-picker-panel' },
6985 timePickerEle
6986 )
6987 ) : null,
6988 __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
6989 'div',
6990 { className: prefixCls + '-body' },
6991 __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__date_DateTable__["a" /* default */], {
6992 locale: locale,
6993 value: value,
6994 selectedValue: selectedValue,
6995 prefixCls: prefixCls,
6996 dateRender: props.dateRender,
6997 onSelect: this.onDateTableSelect,
6998 disabledDate: disabledDate,
6999 showWeekNumber: props.showWeekNumber
7000 })
7001 ),
7002 __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__calendar_CalendarFooter__["a" /* default */], {
7003 showOk: props.showOk,
7004 mode: mode,
7005 renderFooter: props.renderFooter,
7006 locale: locale,
7007 prefixCls: prefixCls,
7008 showToday: props.showToday,
7009 disabledTime: disabledTime,
7010 showTimePicker: showTimePicker,
7011 showDateInput: props.showDateInput,
7012 timePicker: timePicker,
7013 selectedValue: selectedValue,
7014 value: value,
7015 disabledDate: disabledDate,
7016 okDisabled: props.showOk !== false && (!selectedValue || !this.isAllowedDate(selectedValue)),
7017 onOk: this.onOk,
7018 onSelect: this.onSelect,
7019 onToday: this.onToday,
7020 onOpenTimePicker: this.openTimePicker,
7021 onCloseTimePicker: this.closeTimePicker
7022 })
7023 )
7024 ));
7025
7026 return this.renderRoot({
7027 children: children,
7028 className: props.showWeekNumber ? prefixCls + '-week-number' : ''
7029 });
7030 };
7031
7032 return Calendar;
7033}(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);
7034
7035Calendar.propTypes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __WEBPACK_IMPORTED_MODULE_12__mixin_CalendarMixin__["b" /* calendarMixinPropTypes */], __WEBPACK_IMPORTED_MODULE_13__mixin_CommonMixin__["c" /* propType */], {
7036 prefixCls: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
7037 className: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
7038 style: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
7039 defaultValue: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
7040 value: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
7041 selectedValue: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
7042 defaultSelectedValue: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
7043 mode: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['time', 'date', 'month', 'year', 'decade']),
7044 locale: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
7045 showDateInput: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
7046 showWeekNumber: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
7047 showToday: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
7048 showOk: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
7049 onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
7050 onOk: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
7051 onKeyDown: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
7052 timePicker: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.element,
7053 dateInputPlaceholder: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
7054 onClear: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
7055 onChange: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
7056 onPanelChange: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
7057 disabledDate: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
7058 disabledTime: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
7059 dateRender: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
7060 renderFooter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
7061 renderSidebar: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
7062 clearIcon: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node,
7063 focusablePanel: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
7064 inputMode: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
7065 onBlur: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func
7066});
7067Calendar.defaultProps = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __WEBPACK_IMPORTED_MODULE_12__mixin_CalendarMixin__["a" /* calendarMixinDefaultProps */], __WEBPACK_IMPORTED_MODULE_13__mixin_CommonMixin__["b" /* defaultProp */], {
7068 showToday: true,
7069 showDateInput: true,
7070 timePicker: null,
7071 onOk: noop,
7072 onPanelChange: noop,
7073 focusablePanel: true
7074});
7075
7076var _initialiseProps = function _initialiseProps() {
7077 var _this2 = this;
7078
7079 this.onPanelChange = function (value, mode) {
7080 var props = _this2.props,
7081 state = _this2.state;
7082
7083 if (!('mode' in props)) {
7084 _this2.setState({ mode: mode });
7085 }
7086 props.onPanelChange(value || state.value, mode);
7087 };
7088
7089 this.onKeyDown = function (event) {
7090 if (event.target.nodeName.toLowerCase() === 'input') {
7091 return undefined;
7092 }
7093 var keyCode = event.keyCode;
7094 // mac
7095 var ctrlKey = event.ctrlKey || event.metaKey;
7096 var disabledDate = _this2.props.disabledDate;
7097 var value = _this2.state.value;
7098
7099 switch (keyCode) {
7100 case __WEBPACK_IMPORTED_MODULE_7_rc_util_es_KeyCode__["a" /* default */].DOWN:
7101 _this2.goTime(1, 'weeks');
7102 event.preventDefault();
7103 return 1;
7104 case __WEBPACK_IMPORTED_MODULE_7_rc_util_es_KeyCode__["a" /* default */].UP:
7105 _this2.goTime(-1, 'weeks');
7106 event.preventDefault();
7107 return 1;
7108 case __WEBPACK_IMPORTED_MODULE_7_rc_util_es_KeyCode__["a" /* default */].LEFT:
7109 if (ctrlKey) {
7110 _this2.goTime(-1, 'years');
7111 } else {
7112 _this2.goTime(-1, 'days');
7113 }
7114 event.preventDefault();
7115 return 1;
7116 case __WEBPACK_IMPORTED_MODULE_7_rc_util_es_KeyCode__["a" /* default */].RIGHT:
7117 if (ctrlKey) {
7118 _this2.goTime(1, 'years');
7119 } else {
7120 _this2.goTime(1, 'days');
7121 }
7122 event.preventDefault();
7123 return 1;
7124 case __WEBPACK_IMPORTED_MODULE_7_rc_util_es_KeyCode__["a" /* default */].HOME:
7125 _this2.setValue(Object(__WEBPACK_IMPORTED_MODULE_16__util_toTime__["b" /* goStartMonth */])(_this2.state.value));
7126 event.preventDefault();
7127 return 1;
7128 case __WEBPACK_IMPORTED_MODULE_7_rc_util_es_KeyCode__["a" /* default */].END:
7129 _this2.setValue(Object(__WEBPACK_IMPORTED_MODULE_16__util_toTime__["a" /* goEndMonth */])(_this2.state.value));
7130 event.preventDefault();
7131 return 1;
7132 case __WEBPACK_IMPORTED_MODULE_7_rc_util_es_KeyCode__["a" /* default */].PAGE_DOWN:
7133 _this2.goTime(1, 'month');
7134 event.preventDefault();
7135 return 1;
7136 case __WEBPACK_IMPORTED_MODULE_7_rc_util_es_KeyCode__["a" /* default */].PAGE_UP:
7137 _this2.goTime(-1, 'month');
7138 event.preventDefault();
7139 return 1;
7140 case __WEBPACK_IMPORTED_MODULE_7_rc_util_es_KeyCode__["a" /* default */].ENTER:
7141 if (!disabledDate || !disabledDate(value)) {
7142 _this2.onSelect(value, {
7143 source: 'keyboard'
7144 });
7145 }
7146 event.preventDefault();
7147 return 1;
7148 default:
7149 _this2.props.onKeyDown(event);
7150 return 1;
7151 }
7152 };
7153
7154 this.onClear = function () {
7155 _this2.onSelect(null);
7156 _this2.props.onClear();
7157 };
7158
7159 this.onOk = function () {
7160 var selectedValue = _this2.state.selectedValue;
7161
7162 if (_this2.isAllowedDate(selectedValue)) {
7163 _this2.props.onOk(selectedValue);
7164 }
7165 };
7166
7167 this.onDateInputChange = function (value) {
7168 _this2.onSelect(value, {
7169 source: 'dateInput'
7170 });
7171 };
7172
7173 this.onDateInputSelect = function (value) {
7174 _this2.onSelect(value, {
7175 source: 'dateInputSelect'
7176 });
7177 };
7178
7179 this.onDateTableSelect = function (value) {
7180 var timePicker = _this2.props.timePicker;
7181 var selectedValue = _this2.state.selectedValue;
7182
7183 if (!selectedValue && timePicker) {
7184 var timePickerDefaultValue = timePicker.props.defaultValue;
7185 if (timePickerDefaultValue) {
7186 Object(__WEBPACK_IMPORTED_MODULE_15__util__["h" /* syncTime */])(timePickerDefaultValue, value);
7187 }
7188 }
7189 _this2.onSelect(value);
7190 };
7191
7192 this.onToday = function () {
7193 var value = _this2.state.value;
7194
7195 var now = Object(__WEBPACK_IMPORTED_MODULE_15__util__["e" /* getTodayTime */])(value);
7196 _this2.onSelect(now, {
7197 source: 'todayButton'
7198 });
7199 };
7200
7201 this.onBlur = function (event) {
7202 setTimeout(function () {
7203 var dateInput = __WEBPACK_IMPORTED_MODULE_14__date_DateInput__["a" /* default */].getInstance();
7204 var rootInstance = _this2.rootInstance;
7205
7206 if (!rootInstance || rootInstance.contains(document.activeElement) || dateInput && dateInput.contains(document.activeElement)) {
7207 // focused element is still part of Calendar
7208 return;
7209 }
7210
7211 if (_this2.props.onBlur) {
7212 _this2.props.onBlur(event);
7213 }
7214 }, 0);
7215 };
7216
7217 this.getRootDOMNode = function () {
7218 return __WEBPACK_IMPORTED_MODULE_5_react_dom___default.a.findDOMNode(_this2);
7219 };
7220
7221 this.openTimePicker = function () {
7222 _this2.onPanelChange(null, 'time');
7223 };
7224
7225 this.closeTimePicker = function () {
7226 _this2.onPanelChange(null, 'date');
7227 };
7228
7229 this.goTime = function (direction, unit) {
7230 _this2.setValue(Object(__WEBPACK_IMPORTED_MODULE_16__util_toTime__["c" /* goTime */])(_this2.state.value, direction, unit));
7231 };
7232};
7233
7234Object(__WEBPACK_IMPORTED_MODULE_8_react_lifecycles_compat__["a" /* polyfill */])(Calendar);
7235
7236/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_12__mixin_CalendarMixin__["c" /* calendarMixinWrapper */])(Object(__WEBPACK_IMPORTED_MODULE_13__mixin_CommonMixin__["a" /* commonMixinWrapper */])(Calendar)));
7237
7238/***/ }),
7239/* 62 */
7240/***/ (function(module, exports, __webpack_require__) {
7241
7242module.exports = { "default": __webpack_require__(63), __esModule: true };
7243
7244/***/ }),
7245/* 63 */
7246/***/ (function(module, exports, __webpack_require__) {
7247
7248__webpack_require__(64);
7249module.exports = __webpack_require__(6).Object.assign;
7250
7251
7252/***/ }),
7253/* 64 */
7254/***/ (function(module, exports, __webpack_require__) {
7255
7256// 19.1.3.1 Object.assign(target, source)
7257var $export = __webpack_require__(16);
7258
7259$export($export.S + $export.F, 'Object', { assign: __webpack_require__(66) });
7260
7261
7262/***/ }),
7263/* 65 */
7264/***/ (function(module, exports) {
7265
7266module.exports = function (it) {
7267 if (typeof it != 'function') throw TypeError(it + ' is not a function!');
7268 return it;
7269};
7270
7271
7272/***/ }),
7273/* 66 */
7274/***/ (function(module, exports, __webpack_require__) {
7275
7276"use strict";
7277
7278// 19.1.2.1 Object.assign(target, source, ...)
7279var DESCRIPTORS = __webpack_require__(7);
7280var getKeys = __webpack_require__(22);
7281var gOPS = __webpack_require__(33);
7282var pIE = __webpack_require__(25);
7283var toObject = __webpack_require__(34);
7284var IObject = __webpack_require__(47);
7285var $assign = Object.assign;
7286
7287// should work with symbols and should have deterministic property order (V8 bug)
7288module.exports = !$assign || __webpack_require__(18)(function () {
7289 var A = {};
7290 var B = {};
7291 // eslint-disable-next-line no-undef
7292 var S = Symbol();
7293 var K = 'abcdefghijklmnopqrst';
7294 A[S] = 7;
7295 K.split('').forEach(function (k) { B[k] = k; });
7296 return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
7297}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
7298 var T = toObject(target);
7299 var aLen = arguments.length;
7300 var index = 1;
7301 var getSymbols = gOPS.f;
7302 var isEnum = pIE.f;
7303 while (aLen > index) {
7304 var S = IObject(arguments[index++]);
7305 var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
7306 var length = keys.length;
7307 var j = 0;
7308 var key;
7309 while (length > j) {
7310 key = keys[j++];
7311 if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
7312 }
7313 } return T;
7314} : $assign;
7315
7316
7317/***/ }),
7318/* 67 */
7319/***/ (function(module, exports, __webpack_require__) {
7320
7321// false -> Array#indexOf
7322// true -> Array#includes
7323var toIObject = __webpack_require__(13);
7324var toLength = __webpack_require__(68);
7325var toAbsoluteIndex = __webpack_require__(69);
7326module.exports = function (IS_INCLUDES) {
7327 return function ($this, el, fromIndex) {
7328 var O = toIObject($this);
7329 var length = toLength(O.length);
7330 var index = toAbsoluteIndex(fromIndex, length);
7331 var value;
7332 // Array#includes uses SameValueZero equality algorithm
7333 // eslint-disable-next-line no-self-compare
7334 if (IS_INCLUDES && el != el) while (length > index) {
7335 value = O[index++];
7336 // eslint-disable-next-line no-self-compare
7337 if (value != value) return true;
7338 // Array#indexOf ignores holes, Array#includes - not
7339 } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
7340 if (O[index] === el) return IS_INCLUDES || index || 0;
7341 } return !IS_INCLUDES && -1;
7342 };
7343};
7344
7345
7346/***/ }),
7347/* 68 */
7348/***/ (function(module, exports, __webpack_require__) {
7349
7350// 7.1.15 ToLength
7351var toInteger = __webpack_require__(29);
7352var min = Math.min;
7353module.exports = function (it) {
7354 return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
7355};
7356
7357
7358/***/ }),
7359/* 69 */
7360/***/ (function(module, exports, __webpack_require__) {
7361
7362var toInteger = __webpack_require__(29);
7363var max = Math.max;
7364var min = Math.min;
7365module.exports = function (index, length) {
7366 index = toInteger(index);
7367 return index < 0 ? max(index + length, 0) : min(index, length);
7368};
7369
7370
7371/***/ }),
7372/* 70 */
7373/***/ (function(module, exports, __webpack_require__) {
7374
7375module.exports = { "default": __webpack_require__(71), __esModule: true };
7376
7377/***/ }),
7378/* 71 */
7379/***/ (function(module, exports, __webpack_require__) {
7380
7381__webpack_require__(72);
7382__webpack_require__(78);
7383module.exports = __webpack_require__(38).f('iterator');
7384
7385
7386/***/ }),
7387/* 72 */
7388/***/ (function(module, exports, __webpack_require__) {
7389
7390"use strict";
7391
7392var $at = __webpack_require__(73)(true);
7393
7394// 21.1.3.27 String.prototype[@@iterator]()
7395__webpack_require__(50)(String, 'String', function (iterated) {
7396 this._t = String(iterated); // target
7397 this._i = 0; // next index
7398// 21.1.5.2.1 %StringIteratorPrototype%.next()
7399}, function () {
7400 var O = this._t;
7401 var index = this._i;
7402 var point;
7403 if (index >= O.length) return { value: undefined, done: true };
7404 point = $at(O, index);
7405 this._i += point.length;
7406 return { value: point, done: false };
7407});
7408
7409
7410/***/ }),
7411/* 73 */
7412/***/ (function(module, exports, __webpack_require__) {
7413
7414var toInteger = __webpack_require__(29);
7415var defined = __webpack_require__(28);
7416// true -> String#at
7417// false -> String#codePointAt
7418module.exports = function (TO_STRING) {
7419 return function (that, pos) {
7420 var s = String(defined(that));
7421 var i = toInteger(pos);
7422 var l = s.length;
7423 var a, b;
7424 if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
7425 a = s.charCodeAt(i);
7426 return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
7427 ? TO_STRING ? s.charAt(i) : a
7428 : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
7429 };
7430};
7431
7432
7433/***/ }),
7434/* 74 */
7435/***/ (function(module, exports, __webpack_require__) {
7436
7437"use strict";
7438
7439var create = __webpack_require__(36);
7440var descriptor = __webpack_require__(21);
7441var setToStringTag = __webpack_require__(37);
7442var IteratorPrototype = {};
7443
7444// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
7445__webpack_require__(10)(IteratorPrototype, __webpack_require__(14)('iterator'), function () { return this; });
7446
7447module.exports = function (Constructor, NAME, next) {
7448 Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
7449 setToStringTag(Constructor, NAME + ' Iterator');
7450};
7451
7452
7453/***/ }),
7454/* 75 */
7455/***/ (function(module, exports, __webpack_require__) {
7456
7457var dP = __webpack_require__(11);
7458var anObject = __webpack_require__(17);
7459var getKeys = __webpack_require__(22);
7460
7461module.exports = __webpack_require__(7) ? Object.defineProperties : function defineProperties(O, Properties) {
7462 anObject(O);
7463 var keys = getKeys(Properties);
7464 var length = keys.length;
7465 var i = 0;
7466 var P;
7467 while (length > i) dP.f(O, P = keys[i++], Properties[P]);
7468 return O;
7469};
7470
7471
7472/***/ }),
7473/* 76 */
7474/***/ (function(module, exports, __webpack_require__) {
7475
7476var document = __webpack_require__(5).document;
7477module.exports = document && document.documentElement;
7478
7479
7480/***/ }),
7481/* 77 */
7482/***/ (function(module, exports, __webpack_require__) {
7483
7484// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
7485var has = __webpack_require__(8);
7486var toObject = __webpack_require__(34);
7487var IE_PROTO = __webpack_require__(30)('IE_PROTO');
7488var ObjectProto = Object.prototype;
7489
7490module.exports = Object.getPrototypeOf || function (O) {
7491 O = toObject(O);
7492 if (has(O, IE_PROTO)) return O[IE_PROTO];
7493 if (typeof O.constructor == 'function' && O instanceof O.constructor) {
7494 return O.constructor.prototype;
7495 } return O instanceof Object ? ObjectProto : null;
7496};
7497
7498
7499/***/ }),
7500/* 78 */
7501/***/ (function(module, exports, __webpack_require__) {
7502
7503__webpack_require__(79);
7504var global = __webpack_require__(5);
7505var hide = __webpack_require__(10);
7506var Iterators = __webpack_require__(35);
7507var TO_STRING_TAG = __webpack_require__(14)('toStringTag');
7508
7509var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
7510 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
7511 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
7512 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
7513 'TextTrackList,TouchList').split(',');
7514
7515for (var i = 0; i < DOMIterables.length; i++) {
7516 var NAME = DOMIterables[i];
7517 var Collection = global[NAME];
7518 var proto = Collection && Collection.prototype;
7519 if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
7520 Iterators[NAME] = Iterators.Array;
7521}
7522
7523
7524/***/ }),
7525/* 79 */
7526/***/ (function(module, exports, __webpack_require__) {
7527
7528"use strict";
7529
7530var addToUnscopables = __webpack_require__(80);
7531var step = __webpack_require__(81);
7532var Iterators = __webpack_require__(35);
7533var toIObject = __webpack_require__(13);
7534
7535// 22.1.3.4 Array.prototype.entries()
7536// 22.1.3.13 Array.prototype.keys()
7537// 22.1.3.29 Array.prototype.values()
7538// 22.1.3.30 Array.prototype[@@iterator]()
7539module.exports = __webpack_require__(50)(Array, 'Array', function (iterated, kind) {
7540 this._t = toIObject(iterated); // target
7541 this._i = 0; // next index
7542 this._k = kind; // kind
7543// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
7544}, function () {
7545 var O = this._t;
7546 var kind = this._k;
7547 var index = this._i++;
7548 if (!O || index >= O.length) {
7549 this._t = undefined;
7550 return step(1);
7551 }
7552 if (kind == 'keys') return step(0, index);
7553 if (kind == 'values') return step(0, O[index]);
7554 return step(0, [index, O[index]]);
7555}, 'values');
7556
7557// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
7558Iterators.Arguments = Iterators.Array;
7559
7560addToUnscopables('keys');
7561addToUnscopables('values');
7562addToUnscopables('entries');
7563
7564
7565/***/ }),
7566/* 80 */
7567/***/ (function(module, exports) {
7568
7569module.exports = function () { /* empty */ };
7570
7571
7572/***/ }),
7573/* 81 */
7574/***/ (function(module, exports) {
7575
7576module.exports = function (done, value) {
7577 return { value: value, done: !!done };
7578};
7579
7580
7581/***/ }),
7582/* 82 */
7583/***/ (function(module, exports, __webpack_require__) {
7584
7585module.exports = { "default": __webpack_require__(83), __esModule: true };
7586
7587/***/ }),
7588/* 83 */
7589/***/ (function(module, exports, __webpack_require__) {
7590
7591__webpack_require__(84);
7592__webpack_require__(89);
7593__webpack_require__(90);
7594__webpack_require__(91);
7595module.exports = __webpack_require__(6).Symbol;
7596
7597
7598/***/ }),
7599/* 84 */
7600/***/ (function(module, exports, __webpack_require__) {
7601
7602"use strict";
7603
7604// ECMAScript 6 symbols shim
7605var global = __webpack_require__(5);
7606var has = __webpack_require__(8);
7607var DESCRIPTORS = __webpack_require__(7);
7608var $export = __webpack_require__(16);
7609var redefine = __webpack_require__(51);
7610var META = __webpack_require__(85).KEY;
7611var $fails = __webpack_require__(18);
7612var shared = __webpack_require__(31);
7613var setToStringTag = __webpack_require__(37);
7614var uid = __webpack_require__(24);
7615var wks = __webpack_require__(14);
7616var wksExt = __webpack_require__(38);
7617var wksDefine = __webpack_require__(39);
7618var enumKeys = __webpack_require__(86);
7619var isArray = __webpack_require__(87);
7620var anObject = __webpack_require__(17);
7621var isObject = __webpack_require__(12);
7622var toObject = __webpack_require__(34);
7623var toIObject = __webpack_require__(13);
7624var toPrimitive = __webpack_require__(27);
7625var createDesc = __webpack_require__(21);
7626var _create = __webpack_require__(36);
7627var gOPNExt = __webpack_require__(88);
7628var $GOPD = __webpack_require__(53);
7629var $GOPS = __webpack_require__(33);
7630var $DP = __webpack_require__(11);
7631var $keys = __webpack_require__(22);
7632var gOPD = $GOPD.f;
7633var dP = $DP.f;
7634var gOPN = gOPNExt.f;
7635var $Symbol = global.Symbol;
7636var $JSON = global.JSON;
7637var _stringify = $JSON && $JSON.stringify;
7638var PROTOTYPE = 'prototype';
7639var HIDDEN = wks('_hidden');
7640var TO_PRIMITIVE = wks('toPrimitive');
7641var isEnum = {}.propertyIsEnumerable;
7642var SymbolRegistry = shared('symbol-registry');
7643var AllSymbols = shared('symbols');
7644var OPSymbols = shared('op-symbols');
7645var ObjectProto = Object[PROTOTYPE];
7646var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
7647var QObject = global.QObject;
7648// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
7649var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
7650
7651// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
7652var setSymbolDesc = DESCRIPTORS && $fails(function () {
7653 return _create(dP({}, 'a', {
7654 get: function () { return dP(this, 'a', { value: 7 }).a; }
7655 })).a != 7;
7656}) ? function (it, key, D) {
7657 var protoDesc = gOPD(ObjectProto, key);
7658 if (protoDesc) delete ObjectProto[key];
7659 dP(it, key, D);
7660 if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
7661} : dP;
7662
7663var wrap = function (tag) {
7664 var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
7665 sym._k = tag;
7666 return sym;
7667};
7668
7669var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
7670 return typeof it == 'symbol';
7671} : function (it) {
7672 return it instanceof $Symbol;
7673};
7674
7675var $defineProperty = function defineProperty(it, key, D) {
7676 if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
7677 anObject(it);
7678 key = toPrimitive(key, true);
7679 anObject(D);
7680 if (has(AllSymbols, key)) {
7681 if (!D.enumerable) {
7682 if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
7683 it[HIDDEN][key] = true;
7684 } else {
7685 if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
7686 D = _create(D, { enumerable: createDesc(0, false) });
7687 } return setSymbolDesc(it, key, D);
7688 } return dP(it, key, D);
7689};
7690var $defineProperties = function defineProperties(it, P) {
7691 anObject(it);
7692 var keys = enumKeys(P = toIObject(P));
7693 var i = 0;
7694 var l = keys.length;
7695 var key;
7696 while (l > i) $defineProperty(it, key = keys[i++], P[key]);
7697 return it;
7698};
7699var $create = function create(it, P) {
7700 return P === undefined ? _create(it) : $defineProperties(_create(it), P);
7701};
7702var $propertyIsEnumerable = function propertyIsEnumerable(key) {
7703 var E = isEnum.call(this, key = toPrimitive(key, true));
7704 if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
7705 return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
7706};
7707var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
7708 it = toIObject(it);
7709 key = toPrimitive(key, true);
7710 if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
7711 var D = gOPD(it, key);
7712 if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
7713 return D;
7714};
7715var $getOwnPropertyNames = function getOwnPropertyNames(it) {
7716 var names = gOPN(toIObject(it));
7717 var result = [];
7718 var i = 0;
7719 var key;
7720 while (names.length > i) {
7721 if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
7722 } return result;
7723};
7724var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
7725 var IS_OP = it === ObjectProto;
7726 var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
7727 var result = [];
7728 var i = 0;
7729 var key;
7730 while (names.length > i) {
7731 if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
7732 } return result;
7733};
7734
7735// 19.4.1.1 Symbol([description])
7736if (!USE_NATIVE) {
7737 $Symbol = function Symbol() {
7738 if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
7739 var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
7740 var $set = function (value) {
7741 if (this === ObjectProto) $set.call(OPSymbols, value);
7742 if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
7743 setSymbolDesc(this, tag, createDesc(1, value));
7744 };
7745 if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
7746 return wrap(tag);
7747 };
7748 redefine($Symbol[PROTOTYPE], 'toString', function toString() {
7749 return this._k;
7750 });
7751
7752 $GOPD.f = $getOwnPropertyDescriptor;
7753 $DP.f = $defineProperty;
7754 __webpack_require__(52).f = gOPNExt.f = $getOwnPropertyNames;
7755 __webpack_require__(25).f = $propertyIsEnumerable;
7756 $GOPS.f = $getOwnPropertySymbols;
7757
7758 if (DESCRIPTORS && !__webpack_require__(23)) {
7759 redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
7760 }
7761
7762 wksExt.f = function (name) {
7763 return wrap(wks(name));
7764 };
7765}
7766
7767$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
7768
7769for (var es6Symbols = (
7770 // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
7771 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
7772).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
7773
7774for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
7775
7776$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
7777 // 19.4.2.1 Symbol.for(key)
7778 'for': function (key) {
7779 return has(SymbolRegistry, key += '')
7780 ? SymbolRegistry[key]
7781 : SymbolRegistry[key] = $Symbol(key);
7782 },
7783 // 19.4.2.5 Symbol.keyFor(sym)
7784 keyFor: function keyFor(sym) {
7785 if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
7786 for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
7787 },
7788 useSetter: function () { setter = true; },
7789 useSimple: function () { setter = false; }
7790});
7791
7792$export($export.S + $export.F * !USE_NATIVE, 'Object', {
7793 // 19.1.2.2 Object.create(O [, Properties])
7794 create: $create,
7795 // 19.1.2.4 Object.defineProperty(O, P, Attributes)
7796 defineProperty: $defineProperty,
7797 // 19.1.2.3 Object.defineProperties(O, Properties)
7798 defineProperties: $defineProperties,
7799 // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
7800 getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
7801 // 19.1.2.7 Object.getOwnPropertyNames(O)
7802 getOwnPropertyNames: $getOwnPropertyNames,
7803 // 19.1.2.8 Object.getOwnPropertySymbols(O)
7804 getOwnPropertySymbols: $getOwnPropertySymbols
7805});
7806
7807// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
7808// https://bugs.chromium.org/p/v8/issues/detail?id=3443
7809var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
7810
7811$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
7812 getOwnPropertySymbols: function getOwnPropertySymbols(it) {
7813 return $GOPS.f(toObject(it));
7814 }
7815});
7816
7817// 24.3.2 JSON.stringify(value [, replacer [, space]])
7818$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
7819 var S = $Symbol();
7820 // MS Edge converts symbol values to JSON as {}
7821 // WebKit converts symbol values to JSON as null
7822 // V8 throws on boxed symbols
7823 return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
7824})), 'JSON', {
7825 stringify: function stringify(it) {
7826 var args = [it];
7827 var i = 1;
7828 var replacer, $replacer;
7829 while (arguments.length > i) args.push(arguments[i++]);
7830 $replacer = replacer = args[1];
7831 if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
7832 if (!isArray(replacer)) replacer = function (key, value) {
7833 if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
7834 if (!isSymbol(value)) return value;
7835 };
7836 args[1] = replacer;
7837 return _stringify.apply($JSON, args);
7838 }
7839});
7840
7841// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
7842$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(10)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
7843// 19.4.3.5 Symbol.prototype[@@toStringTag]
7844setToStringTag($Symbol, 'Symbol');
7845// 20.2.1.9 Math[@@toStringTag]
7846setToStringTag(Math, 'Math', true);
7847// 24.3.3 JSON[@@toStringTag]
7848setToStringTag(global.JSON, 'JSON', true);
7849
7850
7851/***/ }),
7852/* 85 */
7853/***/ (function(module, exports, __webpack_require__) {
7854
7855var META = __webpack_require__(24)('meta');
7856var isObject = __webpack_require__(12);
7857var has = __webpack_require__(8);
7858var setDesc = __webpack_require__(11).f;
7859var id = 0;
7860var isExtensible = Object.isExtensible || function () {
7861 return true;
7862};
7863var FREEZE = !__webpack_require__(18)(function () {
7864 return isExtensible(Object.preventExtensions({}));
7865});
7866var setMeta = function (it) {
7867 setDesc(it, META, { value: {
7868 i: 'O' + ++id, // object ID
7869 w: {} // weak collections IDs
7870 } });
7871};
7872var fastKey = function (it, create) {
7873 // return primitive with prefix
7874 if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
7875 if (!has(it, META)) {
7876 // can't set metadata to uncaught frozen object
7877 if (!isExtensible(it)) return 'F';
7878 // not necessary to add metadata
7879 if (!create) return 'E';
7880 // add missing metadata
7881 setMeta(it);
7882 // return object ID
7883 } return it[META].i;
7884};
7885var getWeak = function (it, create) {
7886 if (!has(it, META)) {
7887 // can't set metadata to uncaught frozen object
7888 if (!isExtensible(it)) return true;
7889 // not necessary to add metadata
7890 if (!create) return false;
7891 // add missing metadata
7892 setMeta(it);
7893 // return hash weak collections IDs
7894 } return it[META].w;
7895};
7896// add metadata on freeze-family methods calling
7897var onFreeze = function (it) {
7898 if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
7899 return it;
7900};
7901var meta = module.exports = {
7902 KEY: META,
7903 NEED: false,
7904 fastKey: fastKey,
7905 getWeak: getWeak,
7906 onFreeze: onFreeze
7907};
7908
7909
7910/***/ }),
7911/* 86 */
7912/***/ (function(module, exports, __webpack_require__) {
7913
7914// all enumerable object keys, includes symbols
7915var getKeys = __webpack_require__(22);
7916var gOPS = __webpack_require__(33);
7917var pIE = __webpack_require__(25);
7918module.exports = function (it) {
7919 var result = getKeys(it);
7920 var getSymbols = gOPS.f;
7921 if (getSymbols) {
7922 var symbols = getSymbols(it);
7923 var isEnum = pIE.f;
7924 var i = 0;
7925 var key;
7926 while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
7927 } return result;
7928};
7929
7930
7931/***/ }),
7932/* 87 */
7933/***/ (function(module, exports, __webpack_require__) {
7934
7935// 7.2.2 IsArray(argument)
7936var cof = __webpack_require__(48);
7937module.exports = Array.isArray || function isArray(arg) {
7938 return cof(arg) == 'Array';
7939};
7940
7941
7942/***/ }),
7943/* 88 */
7944/***/ (function(module, exports, __webpack_require__) {
7945
7946// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
7947var toIObject = __webpack_require__(13);
7948var gOPN = __webpack_require__(52).f;
7949var toString = {}.toString;
7950
7951var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
7952 ? Object.getOwnPropertyNames(window) : [];
7953
7954var getWindowNames = function (it) {
7955 try {
7956 return gOPN(it);
7957 } catch (e) {
7958 return windowNames.slice();
7959 }
7960};
7961
7962module.exports.f = function getOwnPropertyNames(it) {
7963 return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
7964};
7965
7966
7967/***/ }),
7968/* 89 */
7969/***/ (function(module, exports) {
7970
7971
7972
7973/***/ }),
7974/* 90 */
7975/***/ (function(module, exports, __webpack_require__) {
7976
7977__webpack_require__(39)('asyncIterator');
7978
7979
7980/***/ }),
7981/* 91 */
7982/***/ (function(module, exports, __webpack_require__) {
7983
7984__webpack_require__(39)('observable');
7985
7986
7987/***/ }),
7988/* 92 */
7989/***/ (function(module, exports, __webpack_require__) {
7990
7991module.exports = { "default": __webpack_require__(93), __esModule: true };
7992
7993/***/ }),
7994/* 93 */
7995/***/ (function(module, exports, __webpack_require__) {
7996
7997__webpack_require__(94);
7998module.exports = __webpack_require__(6).Object.setPrototypeOf;
7999
8000
8001/***/ }),
8002/* 94 */
8003/***/ (function(module, exports, __webpack_require__) {
8004
8005// 19.1.3.19 Object.setPrototypeOf(O, proto)
8006var $export = __webpack_require__(16);
8007$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(95).set });
8008
8009
8010/***/ }),
8011/* 95 */
8012/***/ (function(module, exports, __webpack_require__) {
8013
8014// Works with __proto__ only. Old v8 can't work with null proto objects.
8015/* eslint-disable no-proto */
8016var isObject = __webpack_require__(12);
8017var anObject = __webpack_require__(17);
8018var check = function (O, proto) {
8019 anObject(O);
8020 if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
8021};
8022module.exports = {
8023 set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
8024 function (test, buggy, set) {
8025 try {
8026 set = __webpack_require__(43)(Function.call, __webpack_require__(53).f(Object.prototype, '__proto__').set, 2);
8027 set(test, []);
8028 buggy = !(test instanceof Array);
8029 } catch (e) { buggy = true; }
8030 return function setPrototypeOf(O, proto) {
8031 check(O, proto);
8032 if (buggy) O.__proto__ = proto;
8033 else set(O, proto);
8034 return O;
8035 };
8036 }({}, false) : undefined),
8037 check: check
8038};
8039
8040
8041/***/ }),
8042/* 96 */
8043/***/ (function(module, exports, __webpack_require__) {
8044
8045module.exports = { "default": __webpack_require__(97), __esModule: true };
8046
8047/***/ }),
8048/* 97 */
8049/***/ (function(module, exports, __webpack_require__) {
8050
8051__webpack_require__(98);
8052var $Object = __webpack_require__(6).Object;
8053module.exports = function create(P, D) {
8054 return $Object.create(P, D);
8055};
8056
8057
8058/***/ }),
8059/* 98 */
8060/***/ (function(module, exports, __webpack_require__) {
8061
8062var $export = __webpack_require__(16);
8063// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
8064$export($export.S, 'Object', { create: __webpack_require__(36) });
8065
8066
8067/***/ }),
8068/* 99 */
8069/***/ (function(module, exports, __webpack_require__) {
8070
8071"use strict";
8072/** @license React v16.11.0
8073 * react-is.production.min.js
8074 *
8075 * Copyright (c) Facebook, Inc. and its affiliates.
8076 *
8077 * This source code is licensed under the MIT license found in the
8078 * LICENSE file in the root directory of this source tree.
8079 */
8080
8081Object.defineProperty(exports,"__esModule",{value:!0});
8082var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.suspense_list"):
808360120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.fundamental"):60117,w=b?Symbol.for("react.responder"):60118,x=b?Symbol.for("react.scope"):60119;function y(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case t:case r:case d:return u}}}function z(a){return y(a)===m}
8084exports.typeOf=y;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;
8085exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===v||a.$$typeof===w||a.$$typeof===x)};exports.isAsyncMode=function(a){return z(a)||y(a)===l};exports.isConcurrentMode=z;exports.isContextConsumer=function(a){return y(a)===k};exports.isContextProvider=function(a){return y(a)===h};
8086exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return y(a)===n};exports.isFragment=function(a){return y(a)===e};exports.isLazy=function(a){return y(a)===t};exports.isMemo=function(a){return y(a)===r};exports.isPortal=function(a){return y(a)===d};exports.isProfiler=function(a){return y(a)===g};exports.isStrictMode=function(a){return y(a)===f};exports.isSuspense=function(a){return y(a)===p};
8087
8088
8089/***/ }),
8090/* 100 */
8091/***/ (function(module, exports, __webpack_require__) {
8092
8093"use strict";
8094/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.11.0
8095 * react-is.development.js
8096 *
8097 * Copyright (c) Facebook, Inc. and its affiliates.
8098 *
8099 * This source code is licensed under the MIT license found in the
8100 * LICENSE file in the root directory of this source tree.
8101 */
8102
8103
8104
8105
8106
8107if (process.env.NODE_ENV !== "production") {
8108 (function() {
8109'use strict';
8110
8111Object.defineProperty(exports, '__esModule', { value: true });
8112
8113// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8114// nor polyfill, then a plain number is used for performance.
8115var hasSymbol = typeof Symbol === 'function' && Symbol.for;
8116var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
8117var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
8118var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
8119var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
8120var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
8121var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
8122var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
8123// (unstable) APIs that have been removed. Can we remove the symbols?
8124
8125var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
8126var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
8127var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
8128var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
8129var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
8130var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
8131var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
8132var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
8133var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
8134var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
8135
8136function isValidElementType(type) {
8137 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
8138 type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE);
8139}
8140
8141/**
8142 * Forked from fbjs/warning:
8143 * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
8144 *
8145 * Only change is we use console.warn instead of console.error,
8146 * and do nothing when 'console' is not supported.
8147 * This really simplifies the code.
8148 * ---
8149 * Similar to invariant but only logs a warning if the condition is not met.
8150 * This can be used to log issues in development environments in critical
8151 * paths. Removing the logging code for production environments will keep the
8152 * same logic and follow the same code paths.
8153 */
8154var lowPriorityWarningWithoutStack = function () {};
8155
8156{
8157 var printWarning = function (format) {
8158 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
8159 args[_key - 1] = arguments[_key];
8160 }
8161
8162 var argIndex = 0;
8163 var message = 'Warning: ' + format.replace(/%s/g, function () {
8164 return args[argIndex++];
8165 });
8166
8167 if (typeof console !== 'undefined') {
8168 console.warn(message);
8169 }
8170
8171 try {
8172 // --- Welcome to debugging React ---
8173 // This error was thrown as a convenience so that you can use this stack
8174 // to find the callsite that caused this warning to fire.
8175 throw new Error(message);
8176 } catch (x) {}
8177 };
8178
8179 lowPriorityWarningWithoutStack = function (condition, format) {
8180 if (format === undefined) {
8181 throw new Error('`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
8182 }
8183
8184 if (!condition) {
8185 for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
8186 args[_key2 - 2] = arguments[_key2];
8187 }
8188
8189 printWarning.apply(void 0, [format].concat(args));
8190 }
8191 };
8192}
8193
8194var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack;
8195
8196function typeOf(object) {
8197 if (typeof object === 'object' && object !== null) {
8198 var $$typeof = object.$$typeof;
8199
8200 switch ($$typeof) {
8201 case REACT_ELEMENT_TYPE:
8202 var type = object.type;
8203
8204 switch (type) {
8205 case REACT_ASYNC_MODE_TYPE:
8206 case REACT_CONCURRENT_MODE_TYPE:
8207 case REACT_FRAGMENT_TYPE:
8208 case REACT_PROFILER_TYPE:
8209 case REACT_STRICT_MODE_TYPE:
8210 case REACT_SUSPENSE_TYPE:
8211 return type;
8212
8213 default:
8214 var $$typeofType = type && type.$$typeof;
8215
8216 switch ($$typeofType) {
8217 case REACT_CONTEXT_TYPE:
8218 case REACT_FORWARD_REF_TYPE:
8219 case REACT_PROVIDER_TYPE:
8220 return $$typeofType;
8221
8222 default:
8223 return $$typeof;
8224 }
8225
8226 }
8227
8228 case REACT_LAZY_TYPE:
8229 case REACT_MEMO_TYPE:
8230 case REACT_PORTAL_TYPE:
8231 return $$typeof;
8232 }
8233 }
8234
8235 return undefined;
8236} // AsyncMode is deprecated along with isAsyncMode
8237
8238var AsyncMode = REACT_ASYNC_MODE_TYPE;
8239var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
8240var ContextConsumer = REACT_CONTEXT_TYPE;
8241var ContextProvider = REACT_PROVIDER_TYPE;
8242var Element = REACT_ELEMENT_TYPE;
8243var ForwardRef = REACT_FORWARD_REF_TYPE;
8244var Fragment = REACT_FRAGMENT_TYPE;
8245var Lazy = REACT_LAZY_TYPE;
8246var Memo = REACT_MEMO_TYPE;
8247var Portal = REACT_PORTAL_TYPE;
8248var Profiler = REACT_PROFILER_TYPE;
8249var StrictMode = REACT_STRICT_MODE_TYPE;
8250var Suspense = REACT_SUSPENSE_TYPE;
8251var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
8252
8253function isAsyncMode(object) {
8254 {
8255 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
8256 hasWarnedAboutDeprecatedIsAsyncMode = true;
8257 lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
8258 }
8259 }
8260
8261 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
8262}
8263function isConcurrentMode(object) {
8264 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
8265}
8266function isContextConsumer(object) {
8267 return typeOf(object) === REACT_CONTEXT_TYPE;
8268}
8269function isContextProvider(object) {
8270 return typeOf(object) === REACT_PROVIDER_TYPE;
8271}
8272function isElement(object) {
8273 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
8274}
8275function isForwardRef(object) {
8276 return typeOf(object) === REACT_FORWARD_REF_TYPE;
8277}
8278function isFragment(object) {
8279 return typeOf(object) === REACT_FRAGMENT_TYPE;
8280}
8281function isLazy(object) {
8282 return typeOf(object) === REACT_LAZY_TYPE;
8283}
8284function isMemo(object) {
8285 return typeOf(object) === REACT_MEMO_TYPE;
8286}
8287function isPortal(object) {
8288 return typeOf(object) === REACT_PORTAL_TYPE;
8289}
8290function isProfiler(object) {
8291 return typeOf(object) === REACT_PROFILER_TYPE;
8292}
8293function isStrictMode(object) {
8294 return typeOf(object) === REACT_STRICT_MODE_TYPE;
8295}
8296function isSuspense(object) {
8297 return typeOf(object) === REACT_SUSPENSE_TYPE;
8298}
8299
8300exports.typeOf = typeOf;
8301exports.AsyncMode = AsyncMode;
8302exports.ConcurrentMode = ConcurrentMode;
8303exports.ContextConsumer = ContextConsumer;
8304exports.ContextProvider = ContextProvider;
8305exports.Element = Element;
8306exports.ForwardRef = ForwardRef;
8307exports.Fragment = Fragment;
8308exports.Lazy = Lazy;
8309exports.Memo = Memo;
8310exports.Portal = Portal;
8311exports.Profiler = Profiler;
8312exports.StrictMode = StrictMode;
8313exports.Suspense = Suspense;
8314exports.isValidElementType = isValidElementType;
8315exports.isAsyncMode = isAsyncMode;
8316exports.isConcurrentMode = isConcurrentMode;
8317exports.isContextConsumer = isContextConsumer;
8318exports.isContextProvider = isContextProvider;
8319exports.isElement = isElement;
8320exports.isForwardRef = isForwardRef;
8321exports.isFragment = isFragment;
8322exports.isLazy = isLazy;
8323exports.isMemo = isMemo;
8324exports.isPortal = isPortal;
8325exports.isProfiler = isProfiler;
8326exports.isStrictMode = isStrictMode;
8327exports.isSuspense = isSuspense;
8328 })();
8329}
8330
8331/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(19)))
8332
8333/***/ }),
8334/* 101 */
8335/***/ (function(module, exports, __webpack_require__) {
8336
8337"use strict";
8338/* WEBPACK VAR INJECTION */(function(process) {/**
8339 * Copyright (c) 2013-present, Facebook, Inc.
8340 *
8341 * This source code is licensed under the MIT license found in the
8342 * LICENSE file in the root directory of this source tree.
8343 */
8344
8345
8346
8347var ReactIs = __webpack_require__(54);
8348var assign = __webpack_require__(102);
8349
8350var ReactPropTypesSecret = __webpack_require__(41);
8351var checkPropTypes = __webpack_require__(103);
8352
8353var has = Function.call.bind(Object.prototype.hasOwnProperty);
8354var printWarning = function() {};
8355
8356if (process.env.NODE_ENV !== 'production') {
8357 printWarning = function(text) {
8358 var message = 'Warning: ' + text;
8359 if (typeof console !== 'undefined') {
8360 console.error(message);
8361 }
8362 try {
8363 // --- Welcome to debugging React ---
8364 // This error was thrown as a convenience so that you can use this stack
8365 // to find the callsite that caused this warning to fire.
8366 throw new Error(message);
8367 } catch (x) {}
8368 };
8369}
8370
8371function emptyFunctionThatReturnsNull() {
8372 return null;
8373}
8374
8375module.exports = function(isValidElement, throwOnDirectAccess) {
8376 /* global Symbol */
8377 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
8378 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
8379
8380 /**
8381 * Returns the iterator method function contained on the iterable object.
8382 *
8383 * Be sure to invoke the function with the iterable as context:
8384 *
8385 * var iteratorFn = getIteratorFn(myIterable);
8386 * if (iteratorFn) {
8387 * var iterator = iteratorFn.call(myIterable);
8388 * ...
8389 * }
8390 *
8391 * @param {?object} maybeIterable
8392 * @return {?function}
8393 */
8394 function getIteratorFn(maybeIterable) {
8395 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
8396 if (typeof iteratorFn === 'function') {
8397 return iteratorFn;
8398 }
8399 }
8400
8401 /**
8402 * Collection of methods that allow declaration and validation of props that are
8403 * supplied to React components. Example usage:
8404 *
8405 * var Props = require('ReactPropTypes');
8406 * var MyArticle = React.createClass({
8407 * propTypes: {
8408 * // An optional string prop named "description".
8409 * description: Props.string,
8410 *
8411 * // A required enum prop named "category".
8412 * category: Props.oneOf(['News','Photos']).isRequired,
8413 *
8414 * // A prop named "dialog" that requires an instance of Dialog.
8415 * dialog: Props.instanceOf(Dialog).isRequired
8416 * },
8417 * render: function() { ... }
8418 * });
8419 *
8420 * A more formal specification of how these methods are used:
8421 *
8422 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
8423 * decl := ReactPropTypes.{type}(.isRequired)?
8424 *
8425 * Each and every declaration produces a function with the same signature. This
8426 * allows the creation of custom validation functions. For example:
8427 *
8428 * var MyLink = React.createClass({
8429 * propTypes: {
8430 * // An optional string or URI prop named "href".
8431 * href: function(props, propName, componentName) {
8432 * var propValue = props[propName];
8433 * if (propValue != null && typeof propValue !== 'string' &&
8434 * !(propValue instanceof URI)) {
8435 * return new Error(
8436 * 'Expected a string or an URI for ' + propName + ' in ' +
8437 * componentName
8438 * );
8439 * }
8440 * }
8441 * },
8442 * render: function() {...}
8443 * });
8444 *
8445 * @internal
8446 */
8447
8448 var ANONYMOUS = '<<anonymous>>';
8449
8450 // Important!
8451 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
8452 var ReactPropTypes = {
8453 array: createPrimitiveTypeChecker('array'),
8454 bool: createPrimitiveTypeChecker('boolean'),
8455 func: createPrimitiveTypeChecker('function'),
8456 number: createPrimitiveTypeChecker('number'),
8457 object: createPrimitiveTypeChecker('object'),
8458 string: createPrimitiveTypeChecker('string'),
8459 symbol: createPrimitiveTypeChecker('symbol'),
8460
8461 any: createAnyTypeChecker(),
8462 arrayOf: createArrayOfTypeChecker,
8463 element: createElementTypeChecker(),
8464 elementType: createElementTypeTypeChecker(),
8465 instanceOf: createInstanceTypeChecker,
8466 node: createNodeChecker(),
8467 objectOf: createObjectOfTypeChecker,
8468 oneOf: createEnumTypeChecker,
8469 oneOfType: createUnionTypeChecker,
8470 shape: createShapeTypeChecker,
8471 exact: createStrictShapeTypeChecker,
8472 };
8473
8474 /**
8475 * inlined Object.is polyfill to avoid requiring consumers ship their own
8476 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
8477 */
8478 /*eslint-disable no-self-compare*/
8479 function is(x, y) {
8480 // SameValue algorithm
8481 if (x === y) {
8482 // Steps 1-5, 7-10
8483 // Steps 6.b-6.e: +0 != -0
8484 return x !== 0 || 1 / x === 1 / y;
8485 } else {
8486 // Step 6.a: NaN == NaN
8487 return x !== x && y !== y;
8488 }
8489 }
8490 /*eslint-enable no-self-compare*/
8491
8492 /**
8493 * We use an Error-like object for backward compatibility as people may call
8494 * PropTypes directly and inspect their output. However, we don't use real
8495 * Errors anymore. We don't inspect their stack anyway, and creating them
8496 * is prohibitively expensive if they are created too often, such as what
8497 * happens in oneOfType() for any type before the one that matched.
8498 */
8499 function PropTypeError(message) {
8500 this.message = message;
8501 this.stack = '';
8502 }
8503 // Make `instanceof Error` still work for returned errors.
8504 PropTypeError.prototype = Error.prototype;
8505
8506 function createChainableTypeChecker(validate) {
8507 if (process.env.NODE_ENV !== 'production') {
8508 var manualPropTypeCallCache = {};
8509 var manualPropTypeWarningCount = 0;
8510 }
8511 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
8512 componentName = componentName || ANONYMOUS;
8513 propFullName = propFullName || propName;
8514
8515 if (secret !== ReactPropTypesSecret) {
8516 if (throwOnDirectAccess) {
8517 // New behavior only for users of `prop-types` package
8518 var err = new Error(
8519 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
8520 'Use `PropTypes.checkPropTypes()` to call them. ' +
8521 'Read more at http://fb.me/use-check-prop-types'
8522 );
8523 err.name = 'Invariant Violation';
8524 throw err;
8525 } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
8526 // Old behavior for people using React.PropTypes
8527 var cacheKey = componentName + ':' + propName;
8528 if (
8529 !manualPropTypeCallCache[cacheKey] &&
8530 // Avoid spamming the console because they are often not actionable except for lib authors
8531 manualPropTypeWarningCount < 3
8532 ) {
8533 printWarning(
8534 'You are manually calling a React.PropTypes validation ' +
8535 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
8536 'and will throw in the standalone `prop-types` package. ' +
8537 'You may be seeing this warning due to a third-party PropTypes ' +
8538 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
8539 );
8540 manualPropTypeCallCache[cacheKey] = true;
8541 manualPropTypeWarningCount++;
8542 }
8543 }
8544 }
8545 if (props[propName] == null) {
8546 if (isRequired) {
8547 if (props[propName] === null) {
8548 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
8549 }
8550 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
8551 }
8552 return null;
8553 } else {
8554 return validate(props, propName, componentName, location, propFullName);
8555 }
8556 }
8557
8558 var chainedCheckType = checkType.bind(null, false);
8559 chainedCheckType.isRequired = checkType.bind(null, true);
8560
8561 return chainedCheckType;
8562 }
8563
8564 function createPrimitiveTypeChecker(expectedType) {
8565 function validate(props, propName, componentName, location, propFullName, secret) {
8566 var propValue = props[propName];
8567 var propType = getPropType(propValue);
8568 if (propType !== expectedType) {
8569 // `propValue` being instance of, say, date/regexp, pass the 'object'
8570 // check, but we can offer a more precise error message here rather than
8571 // 'of type `object`'.
8572 var preciseType = getPreciseType(propValue);
8573
8574 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
8575 }
8576 return null;
8577 }
8578 return createChainableTypeChecker(validate);
8579 }
8580
8581 function createAnyTypeChecker() {
8582 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
8583 }
8584
8585 function createArrayOfTypeChecker(typeChecker) {
8586 function validate(props, propName, componentName, location, propFullName) {
8587 if (typeof typeChecker !== 'function') {
8588 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
8589 }
8590 var propValue = props[propName];
8591 if (!Array.isArray(propValue)) {
8592 var propType = getPropType(propValue);
8593 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
8594 }
8595 for (var i = 0; i < propValue.length; i++) {
8596 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
8597 if (error instanceof Error) {
8598 return error;
8599 }
8600 }
8601 return null;
8602 }
8603 return createChainableTypeChecker(validate);
8604 }
8605
8606 function createElementTypeChecker() {
8607 function validate(props, propName, componentName, location, propFullName) {
8608 var propValue = props[propName];
8609 if (!isValidElement(propValue)) {
8610 var propType = getPropType(propValue);
8611 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
8612 }
8613 return null;
8614 }
8615 return createChainableTypeChecker(validate);
8616 }
8617
8618 function createElementTypeTypeChecker() {
8619 function validate(props, propName, componentName, location, propFullName) {
8620 var propValue = props[propName];
8621 if (!ReactIs.isValidElementType(propValue)) {
8622 var propType = getPropType(propValue);
8623 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
8624 }
8625 return null;
8626 }
8627 return createChainableTypeChecker(validate);
8628 }
8629
8630 function createInstanceTypeChecker(expectedClass) {
8631 function validate(props, propName, componentName, location, propFullName) {
8632 if (!(props[propName] instanceof expectedClass)) {
8633 var expectedClassName = expectedClass.name || ANONYMOUS;
8634 var actualClassName = getClassName(props[propName]);
8635 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
8636 }
8637 return null;
8638 }
8639 return createChainableTypeChecker(validate);
8640 }
8641
8642 function createEnumTypeChecker(expectedValues) {
8643 if (!Array.isArray(expectedValues)) {
8644 if (process.env.NODE_ENV !== 'production') {
8645 if (arguments.length > 1) {
8646 printWarning(
8647 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
8648 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
8649 );
8650 } else {
8651 printWarning('Invalid argument supplied to oneOf, expected an array.');
8652 }
8653 }
8654 return emptyFunctionThatReturnsNull;
8655 }
8656
8657 function validate(props, propName, componentName, location, propFullName) {
8658 var propValue = props[propName];
8659 for (var i = 0; i < expectedValues.length; i++) {
8660 if (is(propValue, expectedValues[i])) {
8661 return null;
8662 }
8663 }
8664
8665 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
8666 var type = getPreciseType(value);
8667 if (type === 'symbol') {
8668 return String(value);
8669 }
8670 return value;
8671 });
8672 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
8673 }
8674 return createChainableTypeChecker(validate);
8675 }
8676
8677 function createObjectOfTypeChecker(typeChecker) {
8678 function validate(props, propName, componentName, location, propFullName) {
8679 if (typeof typeChecker !== 'function') {
8680 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
8681 }
8682 var propValue = props[propName];
8683 var propType = getPropType(propValue);
8684 if (propType !== 'object') {
8685 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
8686 }
8687 for (var key in propValue) {
8688 if (has(propValue, key)) {
8689 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
8690 if (error instanceof Error) {
8691 return error;
8692 }
8693 }
8694 }
8695 return null;
8696 }
8697 return createChainableTypeChecker(validate);
8698 }
8699
8700 function createUnionTypeChecker(arrayOfTypeCheckers) {
8701 if (!Array.isArray(arrayOfTypeCheckers)) {
8702 process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
8703 return emptyFunctionThatReturnsNull;
8704 }
8705
8706 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
8707 var checker = arrayOfTypeCheckers[i];
8708 if (typeof checker !== 'function') {
8709 printWarning(
8710 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
8711 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
8712 );
8713 return emptyFunctionThatReturnsNull;
8714 }
8715 }
8716
8717 function validate(props, propName, componentName, location, propFullName) {
8718 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
8719 var checker = arrayOfTypeCheckers[i];
8720 if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
8721 return null;
8722 }
8723 }
8724
8725 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
8726 }
8727 return createChainableTypeChecker(validate);
8728 }
8729
8730 function createNodeChecker() {
8731 function validate(props, propName, componentName, location, propFullName) {
8732 if (!isNode(props[propName])) {
8733 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
8734 }
8735 return null;
8736 }
8737 return createChainableTypeChecker(validate);
8738 }
8739
8740 function createShapeTypeChecker(shapeTypes) {
8741 function validate(props, propName, componentName, location, propFullName) {
8742 var propValue = props[propName];
8743 var propType = getPropType(propValue);
8744 if (propType !== 'object') {
8745 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
8746 }
8747 for (var key in shapeTypes) {
8748 var checker = shapeTypes[key];
8749 if (!checker) {
8750 continue;
8751 }
8752 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
8753 if (error) {
8754 return error;
8755 }
8756 }
8757 return null;
8758 }
8759 return createChainableTypeChecker(validate);
8760 }
8761
8762 function createStrictShapeTypeChecker(shapeTypes) {
8763 function validate(props, propName, componentName, location, propFullName) {
8764 var propValue = props[propName];
8765 var propType = getPropType(propValue);
8766 if (propType !== 'object') {
8767 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
8768 }
8769 // We need to check all keys in case some are required but missing from
8770 // props.
8771 var allKeys = assign({}, props[propName], shapeTypes);
8772 for (var key in allKeys) {
8773 var checker = shapeTypes[key];
8774 if (!checker) {
8775 return new PropTypeError(
8776 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
8777 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
8778 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
8779 );
8780 }
8781 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
8782 if (error) {
8783 return error;
8784 }
8785 }
8786 return null;
8787 }
8788
8789 return createChainableTypeChecker(validate);
8790 }
8791
8792 function isNode(propValue) {
8793 switch (typeof propValue) {
8794 case 'number':
8795 case 'string':
8796 case 'undefined':
8797 return true;
8798 case 'boolean':
8799 return !propValue;
8800 case 'object':
8801 if (Array.isArray(propValue)) {
8802 return propValue.every(isNode);
8803 }
8804 if (propValue === null || isValidElement(propValue)) {
8805 return true;
8806 }
8807
8808 var iteratorFn = getIteratorFn(propValue);
8809 if (iteratorFn) {
8810 var iterator = iteratorFn.call(propValue);
8811 var step;
8812 if (iteratorFn !== propValue.entries) {
8813 while (!(step = iterator.next()).done) {
8814 if (!isNode(step.value)) {
8815 return false;
8816 }
8817 }
8818 } else {
8819 // Iterator will provide entry [k,v] tuples rather than values.
8820 while (!(step = iterator.next()).done) {
8821 var entry = step.value;
8822 if (entry) {
8823 if (!isNode(entry[1])) {
8824 return false;
8825 }
8826 }
8827 }
8828 }
8829 } else {
8830 return false;
8831 }
8832
8833 return true;
8834 default:
8835 return false;
8836 }
8837 }
8838
8839 function isSymbol(propType, propValue) {
8840 // Native Symbol.
8841 if (propType === 'symbol') {
8842 return true;
8843 }
8844
8845 // falsy value can't be a Symbol
8846 if (!propValue) {
8847 return false;
8848 }
8849
8850 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
8851 if (propValue['@@toStringTag'] === 'Symbol') {
8852 return true;
8853 }
8854
8855 // Fallback for non-spec compliant Symbols which are polyfilled.
8856 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
8857 return true;
8858 }
8859
8860 return false;
8861 }
8862
8863 // Equivalent of `typeof` but with special handling for array and regexp.
8864 function getPropType(propValue) {
8865 var propType = typeof propValue;
8866 if (Array.isArray(propValue)) {
8867 return 'array';
8868 }
8869 if (propValue instanceof RegExp) {
8870 // Old webkits (at least until Android 4.0) return 'function' rather than
8871 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
8872 // passes PropTypes.object.
8873 return 'object';
8874 }
8875 if (isSymbol(propType, propValue)) {
8876 return 'symbol';
8877 }
8878 return propType;
8879 }
8880
8881 // This handles more types than `getPropType`. Only used for error messages.
8882 // See `createPrimitiveTypeChecker`.
8883 function getPreciseType(propValue) {
8884 if (typeof propValue === 'undefined' || propValue === null) {
8885 return '' + propValue;
8886 }
8887 var propType = getPropType(propValue);
8888 if (propType === 'object') {
8889 if (propValue instanceof Date) {
8890 return 'date';
8891 } else if (propValue instanceof RegExp) {
8892 return 'regexp';
8893 }
8894 }
8895 return propType;
8896 }
8897
8898 // Returns a string that is postfixed to a warning about an invalid type.
8899 // For example, "undefined" or "of type array"
8900 function getPostfixForTypeWarning(value) {
8901 var type = getPreciseType(value);
8902 switch (type) {
8903 case 'array':
8904 case 'object':
8905 return 'an ' + type;
8906 case 'boolean':
8907 case 'date':
8908 case 'regexp':
8909 return 'a ' + type;
8910 default:
8911 return type;
8912 }
8913 }
8914
8915 // Returns class name of the object, if any.
8916 function getClassName(propValue) {
8917 if (!propValue.constructor || !propValue.constructor.name) {
8918 return ANONYMOUS;
8919 }
8920 return propValue.constructor.name;
8921 }
8922
8923 ReactPropTypes.checkPropTypes = checkPropTypes;
8924 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
8925 ReactPropTypes.PropTypes = ReactPropTypes;
8926
8927 return ReactPropTypes;
8928};
8929
8930/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(19)))
8931
8932/***/ }),
8933/* 102 */
8934/***/ (function(module, exports, __webpack_require__) {
8935
8936"use strict";
8937/*
8938object-assign
8939(c) Sindre Sorhus
8940@license MIT
8941*/
8942
8943
8944/* eslint-disable no-unused-vars */
8945var getOwnPropertySymbols = Object.getOwnPropertySymbols;
8946var hasOwnProperty = Object.prototype.hasOwnProperty;
8947var propIsEnumerable = Object.prototype.propertyIsEnumerable;
8948
8949function toObject(val) {
8950 if (val === null || val === undefined) {
8951 throw new TypeError('Object.assign cannot be called with null or undefined');
8952 }
8953
8954 return Object(val);
8955}
8956
8957function shouldUseNative() {
8958 try {
8959 if (!Object.assign) {
8960 return false;
8961 }
8962
8963 // Detect buggy property enumeration order in older V8 versions.
8964
8965 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
8966 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
8967 test1[5] = 'de';
8968 if (Object.getOwnPropertyNames(test1)[0] === '5') {
8969 return false;
8970 }
8971
8972 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
8973 var test2 = {};
8974 for (var i = 0; i < 10; i++) {
8975 test2['_' + String.fromCharCode(i)] = i;
8976 }
8977 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
8978 return test2[n];
8979 });
8980 if (order2.join('') !== '0123456789') {
8981 return false;
8982 }
8983
8984 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
8985 var test3 = {};
8986 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
8987 test3[letter] = letter;
8988 });
8989 if (Object.keys(Object.assign({}, test3)).join('') !==
8990 'abcdefghijklmnopqrst') {
8991 return false;
8992 }
8993
8994 return true;
8995 } catch (err) {
8996 // We don't expect any of the above to throw, but better to be safe.
8997 return false;
8998 }
8999}
9000
9001module.exports = shouldUseNative() ? Object.assign : function (target, source) {
9002 var from;
9003 var to = toObject(target);
9004 var symbols;
9005
9006 for (var s = 1; s < arguments.length; s++) {
9007 from = Object(arguments[s]);
9008
9009 for (var key in from) {
9010 if (hasOwnProperty.call(from, key)) {
9011 to[key] = from[key];
9012 }
9013 }
9014
9015 if (getOwnPropertySymbols) {
9016 symbols = getOwnPropertySymbols(from);
9017 for (var i = 0; i < symbols.length; i++) {
9018 if (propIsEnumerable.call(from, symbols[i])) {
9019 to[symbols[i]] = from[symbols[i]];
9020 }
9021 }
9022 }
9023 }
9024
9025 return to;
9026};
9027
9028
9029/***/ }),
9030/* 103 */
9031/***/ (function(module, exports, __webpack_require__) {
9032
9033"use strict";
9034/* WEBPACK VAR INJECTION */(function(process) {/**
9035 * Copyright (c) 2013-present, Facebook, Inc.
9036 *
9037 * This source code is licensed under the MIT license found in the
9038 * LICENSE file in the root directory of this source tree.
9039 */
9040
9041
9042
9043var printWarning = function() {};
9044
9045if (process.env.NODE_ENV !== 'production') {
9046 var ReactPropTypesSecret = __webpack_require__(41);
9047 var loggedTypeFailures = {};
9048 var has = Function.call.bind(Object.prototype.hasOwnProperty);
9049
9050 printWarning = function(text) {
9051 var message = 'Warning: ' + text;
9052 if (typeof console !== 'undefined') {
9053 console.error(message);
9054 }
9055 try {
9056 // --- Welcome to debugging React ---
9057 // This error was thrown as a convenience so that you can use this stack
9058 // to find the callsite that caused this warning to fire.
9059 throw new Error(message);
9060 } catch (x) {}
9061 };
9062}
9063
9064/**
9065 * Assert that the values match with the type specs.
9066 * Error messages are memorized and will only be shown once.
9067 *
9068 * @param {object} typeSpecs Map of name to a ReactPropType
9069 * @param {object} values Runtime values that need to be type-checked
9070 * @param {string} location e.g. "prop", "context", "child context"
9071 * @param {string} componentName Name of the component for error messages.
9072 * @param {?Function} getStack Returns the component stack.
9073 * @private
9074 */
9075function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
9076 if (process.env.NODE_ENV !== 'production') {
9077 for (var typeSpecName in typeSpecs) {
9078 if (has(typeSpecs, typeSpecName)) {
9079 var error;
9080 // Prop type validation may throw. In case they do, we don't want to
9081 // fail the render phase where it didn't fail before. So we log it.
9082 // After these have been cleaned up, we'll let them throw.
9083 try {
9084 // This is intentionally an invariant that gets caught. It's the same
9085 // behavior as without this statement except with a better message.
9086 if (typeof typeSpecs[typeSpecName] !== 'function') {
9087 var err = Error(
9088 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
9089 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
9090 );
9091 err.name = 'Invariant Violation';
9092 throw err;
9093 }
9094 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
9095 } catch (ex) {
9096 error = ex;
9097 }
9098 if (error && !(error instanceof Error)) {
9099 printWarning(
9100 (componentName || 'React class') + ': type specification of ' +
9101 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
9102 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
9103 'You may have forgotten to pass an argument to the type checker ' +
9104 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
9105 'shape all require an argument).'
9106 );
9107 }
9108 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
9109 // Only monitor this failure once because there tends to be a lot of the
9110 // same error.
9111 loggedTypeFailures[error.message] = true;
9112
9113 var stack = getStack ? getStack() : '';
9114
9115 printWarning(
9116 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
9117 );
9118 }
9119 }
9120 }
9121 }
9122}
9123
9124/**
9125 * Resets warning cache when testing.
9126 *
9127 * @private
9128 */
9129checkPropTypes.resetWarningCache = function() {
9130 if (process.env.NODE_ENV !== 'production') {
9131 loggedTypeFailures = {};
9132 }
9133}
9134
9135module.exports = checkPropTypes;
9136
9137/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(19)))
9138
9139/***/ }),
9140/* 104 */
9141/***/ (function(module, exports, __webpack_require__) {
9142
9143"use strict";
9144/**
9145 * Copyright (c) 2013-present, Facebook, Inc.
9146 *
9147 * This source code is licensed under the MIT license found in the
9148 * LICENSE file in the root directory of this source tree.
9149 */
9150
9151
9152
9153var ReactPropTypesSecret = __webpack_require__(41);
9154
9155function emptyFunction() {}
9156function emptyFunctionWithReset() {}
9157emptyFunctionWithReset.resetWarningCache = emptyFunction;
9158
9159module.exports = function() {
9160 function shim(props, propName, componentName, location, propFullName, secret) {
9161 if (secret === ReactPropTypesSecret) {
9162 // It is still safe when called from React.
9163 return;
9164 }
9165 var err = new Error(
9166 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
9167 'Use PropTypes.checkPropTypes() to call them. ' +
9168 'Read more at http://fb.me/use-check-prop-types'
9169 );
9170 err.name = 'Invariant Violation';
9171 throw err;
9172 };
9173 shim.isRequired = shim;
9174 function getShim() {
9175 return shim;
9176 };
9177 // Important!
9178 // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
9179 var ReactPropTypes = {
9180 array: shim,
9181 bool: shim,
9182 func: shim,
9183 number: shim,
9184 object: shim,
9185 string: shim,
9186 symbol: shim,
9187
9188 any: shim,
9189 arrayOf: getShim,
9190 element: shim,
9191 elementType: shim,
9192 instanceOf: getShim,
9193 node: shim,
9194 objectOf: getShim,
9195 oneOf: getShim,
9196 oneOfType: getShim,
9197 shape: getShim,
9198 exact: getShim,
9199
9200 checkPropTypes: emptyFunctionWithReset,
9201 resetWarningCache: emptyFunction
9202 };
9203
9204 ReactPropTypes.PropTypes = ReactPropTypes;
9205
9206 return ReactPropTypes;
9207};
9208
9209
9210/***/ }),
9211/* 105 */
9212/***/ (function(module, __webpack_exports__, __webpack_require__) {
9213
9214"use strict";
9215/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);
9216/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
9217/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(2);
9218/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);
9219/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(3);
9220/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);
9221/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0);
9222/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__);
9223/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__DateTHead__ = __webpack_require__(106);
9224/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DateTBody__ = __webpack_require__(107);
9225
9226
9227
9228
9229
9230
9231
9232
9233var DateTable = function (_React$Component) {
9234 __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(DateTable, _React$Component);
9235
9236 function DateTable() {
9237 __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, DateTable);
9238
9239 return __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));
9240 }
9241
9242 DateTable.prototype.render = function render() {
9243 var props = this.props;
9244 var prefixCls = props.prefixCls;
9245 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9246 'table',
9247 { className: prefixCls + '-table', cellSpacing: '0', role: 'grid' },
9248 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__DateTHead__["a" /* default */], props),
9249 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__DateTBody__["a" /* default */], props)
9250 );
9251 };
9252
9253 return DateTable;
9254}(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component);
9255
9256/* harmony default export */ __webpack_exports__["a"] = (DateTable);
9257
9258/***/ }),
9259/* 106 */
9260/***/ (function(module, __webpack_exports__, __webpack_require__) {
9261
9262"use strict";
9263/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);
9264/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
9265/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(2);
9266/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);
9267/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(3);
9268/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);
9269/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0);
9270/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__);
9271/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__DateConstants__ = __webpack_require__(56);
9272/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_moment__ = __webpack_require__(20);
9273/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_moment__);
9274
9275
9276
9277
9278
9279
9280
9281var DateTHead = function (_React$Component) {
9282 __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(DateTHead, _React$Component);
9283
9284 function DateTHead() {
9285 __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, DateTHead);
9286
9287 return __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));
9288 }
9289
9290 DateTHead.prototype.render = function render() {
9291 var props = this.props;
9292 var value = props.value;
9293 var localeData = value.localeData();
9294 var prefixCls = props.prefixCls;
9295 var veryShortWeekdays = [];
9296 var weekDays = [];
9297 var firstDayOfWeek = localeData.firstDayOfWeek();
9298 var showWeekNumberEl = void 0;
9299 var now = __WEBPACK_IMPORTED_MODULE_5_moment___default()();
9300 for (var dateColIndex = 0; dateColIndex < __WEBPACK_IMPORTED_MODULE_4__DateConstants__["a" /* default */].DATE_COL_COUNT; dateColIndex++) {
9301 var index = (firstDayOfWeek + dateColIndex) % __WEBPACK_IMPORTED_MODULE_4__DateConstants__["a" /* default */].DATE_COL_COUNT;
9302 now.day(index);
9303 veryShortWeekdays[dateColIndex] = localeData.weekdaysMin(now);
9304 weekDays[dateColIndex] = localeData.weekdaysShort(now);
9305 }
9306
9307 if (props.showWeekNumber) {
9308 showWeekNumberEl = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9309 'th',
9310 {
9311 role: 'columnheader',
9312 className: prefixCls + '-column-header ' + prefixCls + '-week-number-header'
9313 },
9314 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9315 'span',
9316 { className: prefixCls + '-column-header-inner' },
9317 'x'
9318 )
9319 );
9320 }
9321 var weekDaysEls = weekDays.map(function (day, xindex) {
9322 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9323 'th',
9324 {
9325 key: xindex,
9326 role: 'columnheader',
9327 title: day,
9328 className: prefixCls + '-column-header'
9329 },
9330 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9331 'span',
9332 { className: prefixCls + '-column-header-inner' },
9333 veryShortWeekdays[xindex]
9334 )
9335 );
9336 });
9337 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9338 'thead',
9339 null,
9340 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9341 'tr',
9342 { role: 'row' },
9343 showWeekNumberEl,
9344 weekDaysEls
9345 )
9346 );
9347 };
9348
9349 return DateTHead;
9350}(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component);
9351
9352/* harmony default export */ __webpack_exports__["a"] = (DateTHead);
9353
9354/***/ }),
9355/* 107 */
9356/***/ (function(module, __webpack_exports__, __webpack_require__) {
9357
9358"use strict";
9359/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);
9360/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
9361/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(2);
9362/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);
9363/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(3);
9364/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);
9365/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0);
9366/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__);
9367/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(4);
9368/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__);
9369/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(9);
9370/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);
9371/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__DateConstants__ = __webpack_require__(56);
9372/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util___ = __webpack_require__(15);
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382function isSameDay(one, two) {
9383 return one && two && one.isSame(two, 'day');
9384}
9385
9386function beforeCurrentMonthYear(current, today) {
9387 if (current.year() < today.year()) {
9388 return 1;
9389 }
9390 return current.year() === today.year() && current.month() < today.month();
9391}
9392
9393function afterCurrentMonthYear(current, today) {
9394 if (current.year() > today.year()) {
9395 return 1;
9396 }
9397 return current.year() === today.year() && current.month() > today.month();
9398}
9399
9400function getIdFromDate(date) {
9401 return 'rc-calendar-' + date.year() + '-' + date.month() + '-' + date.date();
9402}
9403
9404var DateTBody = function (_React$Component) {
9405 __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(DateTBody, _React$Component);
9406
9407 function DateTBody() {
9408 __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, DateTBody);
9409
9410 return __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));
9411 }
9412
9413 DateTBody.prototype.render = function render() {
9414 var props = this.props;
9415 var contentRender = props.contentRender,
9416 prefixCls = props.prefixCls,
9417 selectedValue = props.selectedValue,
9418 value = props.value,
9419 showWeekNumber = props.showWeekNumber,
9420 dateRender = props.dateRender,
9421 disabledDate = props.disabledDate,
9422 hoverValue = props.hoverValue;
9423
9424 var iIndex = void 0;
9425 var jIndex = void 0;
9426 var current = void 0;
9427 var dateTable = [];
9428 var today = Object(__WEBPACK_IMPORTED_MODULE_7__util___["e" /* getTodayTime */])(value);
9429 var cellClass = prefixCls + '-cell';
9430 var weekNumberCellClass = prefixCls + '-week-number-cell';
9431 var dateClass = prefixCls + '-date';
9432 var todayClass = prefixCls + '-today';
9433 var selectedClass = prefixCls + '-selected-day';
9434 var selectedDateClass = prefixCls + '-selected-date'; // do not move with mouse operation
9435 var selectedStartDateClass = prefixCls + '-selected-start-date';
9436 var selectedEndDateClass = prefixCls + '-selected-end-date';
9437 var inRangeClass = prefixCls + '-in-range-cell';
9438 var lastMonthDayClass = prefixCls + '-last-month-cell';
9439 var nextMonthDayClass = prefixCls + '-next-month-btn-day';
9440 var disabledClass = prefixCls + '-disabled-cell';
9441 var firstDisableClass = prefixCls + '-disabled-cell-first-of-row';
9442 var lastDisableClass = prefixCls + '-disabled-cell-last-of-row';
9443 var lastDayOfMonthClass = prefixCls + '-last-day-of-month';
9444 var month1 = value.clone();
9445 month1.date(1);
9446 var day = month1.day();
9447 var lastMonthDiffDay = (day + 7 - value.localeData().firstDayOfWeek()) % 7;
9448 // calculate last month
9449 var lastMonth1 = month1.clone();
9450 lastMonth1.add(0 - lastMonthDiffDay, 'days');
9451 var passed = 0;
9452
9453 for (iIndex = 0; iIndex < __WEBPACK_IMPORTED_MODULE_6__DateConstants__["a" /* default */].DATE_ROW_COUNT; iIndex++) {
9454 for (jIndex = 0; jIndex < __WEBPACK_IMPORTED_MODULE_6__DateConstants__["a" /* default */].DATE_COL_COUNT; jIndex++) {
9455 current = lastMonth1;
9456 if (passed) {
9457 current = current.clone();
9458 current.add(passed, 'days');
9459 }
9460 dateTable.push(current);
9461 passed++;
9462 }
9463 }
9464 var tableHtml = [];
9465 passed = 0;
9466
9467 for (iIndex = 0; iIndex < __WEBPACK_IMPORTED_MODULE_6__DateConstants__["a" /* default */].DATE_ROW_COUNT; iIndex++) {
9468 var _cx;
9469
9470 var isCurrentWeek = void 0;
9471 var weekNumberCell = void 0;
9472 var isActiveWeek = false;
9473 var dateCells = [];
9474 if (showWeekNumber) {
9475 weekNumberCell = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9476 'td',
9477 {
9478 key: dateTable[passed].week(),
9479 role: 'gridcell',
9480 className: weekNumberCellClass
9481 },
9482 dateTable[passed].week()
9483 );
9484 }
9485 for (jIndex = 0; jIndex < __WEBPACK_IMPORTED_MODULE_6__DateConstants__["a" /* default */].DATE_COL_COUNT; jIndex++) {
9486 var next = null;
9487 var last = null;
9488 current = dateTable[passed];
9489 if (jIndex < __WEBPACK_IMPORTED_MODULE_6__DateConstants__["a" /* default */].DATE_COL_COUNT - 1) {
9490 next = dateTable[passed + 1];
9491 }
9492 if (jIndex > 0) {
9493 last = dateTable[passed - 1];
9494 }
9495 var cls = cellClass;
9496 var disabled = false;
9497 var selected = false;
9498
9499 if (isSameDay(current, today)) {
9500 cls += ' ' + todayClass;
9501 isCurrentWeek = true;
9502 }
9503
9504 var isBeforeCurrentMonthYear = beforeCurrentMonthYear(current, value);
9505 var isAfterCurrentMonthYear = afterCurrentMonthYear(current, value);
9506
9507 if (selectedValue && Array.isArray(selectedValue)) {
9508 var rangeValue = hoverValue.length ? hoverValue : selectedValue;
9509 if (!isBeforeCurrentMonthYear && !isAfterCurrentMonthYear) {
9510 var startValue = rangeValue[0];
9511 var endValue = rangeValue[1];
9512 if (startValue) {
9513 if (isSameDay(current, startValue)) {
9514 selected = true;
9515 isActiveWeek = true;
9516 cls += ' ' + selectedStartDateClass;
9517 }
9518 }
9519 if (startValue || endValue) {
9520 if (isSameDay(current, endValue)) {
9521 selected = true;
9522 isActiveWeek = true;
9523 cls += ' ' + selectedEndDateClass;
9524 } else if ((startValue === null || startValue === undefined) && current.isBefore(endValue, 'day')) {
9525 cls += ' ' + inRangeClass;
9526 } else if ((endValue === null || endValue === undefined) && current.isAfter(startValue, 'day')) {
9527 cls += ' ' + inRangeClass;
9528 } else if (current.isAfter(startValue, 'day') && current.isBefore(endValue, 'day')) {
9529 cls += ' ' + inRangeClass;
9530 }
9531 }
9532 }
9533 } else if (isSameDay(current, value)) {
9534 // keyboard change value, highlight works
9535 selected = true;
9536 isActiveWeek = true;
9537 }
9538
9539 if (isSameDay(current, selectedValue)) {
9540 cls += ' ' + selectedDateClass;
9541 }
9542
9543 if (isBeforeCurrentMonthYear) {
9544 cls += ' ' + lastMonthDayClass;
9545 }
9546
9547 if (isAfterCurrentMonthYear) {
9548 cls += ' ' + nextMonthDayClass;
9549 }
9550
9551 if (current.clone().endOf('month').date() === current.date()) {
9552 cls += ' ' + lastDayOfMonthClass;
9553 }
9554
9555 if (disabledDate) {
9556 if (disabledDate(current, value)) {
9557 disabled = true;
9558
9559 if (!last || !disabledDate(last, value)) {
9560 cls += ' ' + firstDisableClass;
9561 }
9562
9563 if (!next || !disabledDate(next, value)) {
9564 cls += ' ' + lastDisableClass;
9565 }
9566 }
9567 }
9568
9569 if (selected) {
9570 cls += ' ' + selectedClass;
9571 }
9572
9573 if (disabled) {
9574 cls += ' ' + disabledClass;
9575 }
9576
9577 var dateHtml = void 0;
9578 if (dateRender) {
9579 dateHtml = dateRender(current, value);
9580 } else {
9581 var content = contentRender ? contentRender(current, value) : current.date();
9582 dateHtml = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9583 'div',
9584 {
9585 key: getIdFromDate(current),
9586 className: dateClass,
9587 'aria-selected': selected,
9588 'aria-disabled': disabled
9589 },
9590 content
9591 );
9592 }
9593
9594 dateCells.push(__WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9595 'td',
9596 {
9597 key: passed,
9598 onClick: disabled ? undefined : props.onSelect.bind(null, current),
9599 onMouseEnter: disabled ? undefined : props.onDayHover && props.onDayHover.bind(null, current) || undefined,
9600 role: 'gridcell',
9601 title: Object(__WEBPACK_IMPORTED_MODULE_7__util___["d" /* getTitleString */])(current),
9602 className: cls
9603 },
9604 dateHtml
9605 ));
9606
9607 passed++;
9608 }
9609
9610 tableHtml.push(__WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9611 'tr',
9612 {
9613 key: iIndex,
9614 role: 'row',
9615 className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()((_cx = {}, _cx[prefixCls + '-current-week'] = isCurrentWeek, _cx[prefixCls + '-active-week'] = isActiveWeek, _cx))
9616 },
9617 weekNumberCell,
9618 dateCells
9619 ));
9620 }
9621 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9622 'tbody',
9623 { className: prefixCls + '-tbody' },
9624 tableHtml
9625 );
9626 };
9627
9628 return DateTBody;
9629}(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component);
9630
9631DateTBody.propTypes = {
9632 contentRender: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
9633 dateRender: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
9634 disabledDate: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
9635 prefixCls: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string,
9636 selectedValue: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object)]),
9637 value: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object,
9638 hoverValue: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any,
9639 showWeekNumber: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool
9640};
9641DateTBody.defaultProps = {
9642 hoverValue: []
9643};
9644/* harmony default export */ __webpack_exports__["a"] = (DateTBody);
9645
9646/***/ }),
9647/* 108 */
9648/***/ (function(module, __webpack_exports__, __webpack_require__) {
9649
9650"use strict";
9651/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);
9652/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
9653/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(2);
9654/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);
9655/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(3);
9656/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);
9657/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0);
9658/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__);
9659/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(4);
9660/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__);
9661/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_rc_util_es_Children_mapSelf__ = __webpack_require__(57);
9662/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__month_MonthPanel__ = __webpack_require__(109);
9663/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__year_YearPanel__ = __webpack_require__(111);
9664/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__decade_DecadePanel__ = __webpack_require__(112);
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675function goMonth(direction) {
9676 var next = this.props.value.clone();
9677 next.add(direction, 'months');
9678 this.props.onValueChange(next);
9679}
9680
9681function goYear(direction) {
9682 var next = this.props.value.clone();
9683 next.add(direction, 'years');
9684 this.props.onValueChange(next);
9685}
9686
9687function showIf(condition, el) {
9688 return condition ? el : null;
9689}
9690
9691var CalendarHeader = function (_React$Component) {
9692 __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(CalendarHeader, _React$Component);
9693
9694 function CalendarHeader(props) {
9695 __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, CalendarHeader);
9696
9697 var _this = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props));
9698
9699 _initialiseProps.call(_this);
9700
9701 _this.nextMonth = goMonth.bind(_this, 1);
9702 _this.previousMonth = goMonth.bind(_this, -1);
9703 _this.nextYear = goYear.bind(_this, 1);
9704 _this.previousYear = goYear.bind(_this, -1);
9705
9706 _this.state = { yearPanelReferer: null };
9707 return _this;
9708 }
9709
9710 CalendarHeader.prototype.render = function render() {
9711 var _this2 = this;
9712
9713 var props = this.props;
9714 var prefixCls = props.prefixCls,
9715 locale = props.locale,
9716 mode = props.mode,
9717 value = props.value,
9718 showTimePicker = props.showTimePicker,
9719 enableNext = props.enableNext,
9720 enablePrev = props.enablePrev,
9721 disabledMonth = props.disabledMonth,
9722 renderFooter = props.renderFooter;
9723
9724
9725 var panel = null;
9726 if (mode === 'month') {
9727 panel = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__month_MonthPanel__["a" /* default */], {
9728 locale: locale,
9729 value: value,
9730 rootPrefixCls: prefixCls,
9731 onSelect: this.onMonthSelect,
9732 onYearPanelShow: function onYearPanelShow() {
9733 return _this2.showYearPanel('month');
9734 },
9735 disabledDate: disabledMonth,
9736 cellRender: props.monthCellRender,
9737 contentRender: props.monthCellContentRender,
9738 renderFooter: renderFooter,
9739 changeYear: this.changeYear
9740 });
9741 }
9742 if (mode === 'year') {
9743 panel = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__year_YearPanel__["a" /* default */], {
9744 locale: locale,
9745 defaultValue: value,
9746 rootPrefixCls: prefixCls,
9747 onSelect: this.onYearSelect,
9748 onDecadePanelShow: this.showDecadePanel,
9749 renderFooter: renderFooter
9750 });
9751 }
9752 if (mode === 'decade') {
9753 panel = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__decade_DecadePanel__["a" /* default */], {
9754 locale: locale,
9755 defaultValue: value,
9756 rootPrefixCls: prefixCls,
9757 onSelect: this.onDecadeSelect,
9758 renderFooter: renderFooter
9759 });
9760 }
9761
9762 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9763 'div',
9764 { className: prefixCls + '-header' },
9765 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9766 'div',
9767 { style: { position: 'relative' } },
9768 showIf(enablePrev && !showTimePicker, __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement('a', {
9769 className: prefixCls + '-prev-year-btn',
9770 role: 'button',
9771 onClick: this.previousYear,
9772 title: locale.previousYear
9773 })),
9774 showIf(enablePrev && !showTimePicker, __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement('a', {
9775 className: prefixCls + '-prev-month-btn',
9776 role: 'button',
9777 onClick: this.previousMonth,
9778 title: locale.previousMonth
9779 })),
9780 this.monthYearElement(showTimePicker),
9781 showIf(enableNext && !showTimePicker, __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement('a', {
9782 className: prefixCls + '-next-month-btn',
9783 onClick: this.nextMonth,
9784 title: locale.nextMonth
9785 })),
9786 showIf(enableNext && !showTimePicker, __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement('a', {
9787 className: prefixCls + '-next-year-btn',
9788 onClick: this.nextYear,
9789 title: locale.nextYear
9790 }))
9791 ),
9792 panel
9793 );
9794 };
9795
9796 return CalendarHeader;
9797}(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component);
9798
9799CalendarHeader.propTypes = {
9800 prefixCls: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string,
9801 value: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object,
9802 onValueChange: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
9803 showTimePicker: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool,
9804 onPanelChange: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
9805 locale: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object,
9806 enablePrev: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any,
9807 enableNext: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any,
9808 disabledMonth: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
9809 renderFooter: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
9810 onMonthSelect: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func
9811};
9812CalendarHeader.defaultProps = {
9813 enableNext: 1,
9814 enablePrev: 1,
9815 onPanelChange: function onPanelChange() {},
9816 onValueChange: function onValueChange() {}
9817};
9818
9819var _initialiseProps = function _initialiseProps() {
9820 var _this3 = this;
9821
9822 this.onMonthSelect = function (value) {
9823 _this3.props.onPanelChange(value, 'date');
9824 if (_this3.props.onMonthSelect) {
9825 _this3.props.onMonthSelect(value);
9826 } else {
9827 _this3.props.onValueChange(value);
9828 }
9829 };
9830
9831 this.onYearSelect = function (value) {
9832 var referer = _this3.state.yearPanelReferer;
9833 _this3.setState({ yearPanelReferer: null });
9834 _this3.props.onPanelChange(value, referer);
9835 _this3.props.onValueChange(value);
9836 };
9837
9838 this.onDecadeSelect = function (value) {
9839 _this3.props.onPanelChange(value, 'year');
9840 _this3.props.onValueChange(value);
9841 };
9842
9843 this.changeYear = function (direction) {
9844 if (direction > 0) {
9845 _this3.nextYear();
9846 } else {
9847 _this3.previousYear();
9848 }
9849 };
9850
9851 this.monthYearElement = function (showTimePicker) {
9852 var props = _this3.props;
9853 var prefixCls = props.prefixCls;
9854 var locale = props.locale;
9855 var value = props.value;
9856 var localeData = value.localeData();
9857 var monthBeforeYear = locale.monthBeforeYear;
9858 var selectClassName = prefixCls + '-' + (monthBeforeYear ? 'my-select' : 'ym-select');
9859 var timeClassName = showTimePicker ? ' ' + prefixCls + '-time-status' : '';
9860 var year = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9861 'a',
9862 {
9863 className: prefixCls + '-year-select' + timeClassName,
9864 role: 'button',
9865 onClick: showTimePicker ? null : function () {
9866 return _this3.showYearPanel('date');
9867 },
9868 title: showTimePicker ? null : locale.yearSelect
9869 },
9870 value.format(locale.yearFormat)
9871 );
9872 var month = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9873 'a',
9874 {
9875 className: prefixCls + '-month-select' + timeClassName,
9876 role: 'button',
9877 onClick: showTimePicker ? null : _this3.showMonthPanel,
9878 title: showTimePicker ? null : locale.monthSelect
9879 },
9880 locale.monthFormat ? value.format(locale.monthFormat) : localeData.monthsShort(value)
9881 );
9882 var day = void 0;
9883 if (showTimePicker) {
9884 day = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9885 'a',
9886 {
9887 className: prefixCls + '-day-select' + timeClassName,
9888 role: 'button'
9889 },
9890 value.format(locale.dayFormat)
9891 );
9892 }
9893 var my = [];
9894 if (monthBeforeYear) {
9895 my = [month, day, year];
9896 } else {
9897 my = [year, month, day];
9898 }
9899 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
9900 'span',
9901 { className: selectClassName },
9902 Object(__WEBPACK_IMPORTED_MODULE_5_rc_util_es_Children_mapSelf__["a" /* default */])(my)
9903 );
9904 };
9905
9906 this.showMonthPanel = function () {
9907 // null means that users' interaction doesn't change value
9908 _this3.props.onPanelChange(null, 'month');
9909 };
9910
9911 this.showYearPanel = function (referer) {
9912 _this3.setState({ yearPanelReferer: referer });
9913 _this3.props.onPanelChange(null, 'year');
9914 };
9915
9916 this.showDecadePanel = function () {
9917 _this3.props.onPanelChange(null, 'decade');
9918 };
9919};
9920
9921/* harmony default export */ __webpack_exports__["a"] = (CalendarHeader);
9922
9923/***/ }),
9924/* 109 */
9925/***/ (function(module, __webpack_exports__, __webpack_require__) {
9926
9927"use strict";
9928/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);
9929/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
9930/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(2);
9931/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);
9932/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(3);
9933/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);
9934/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0);
9935/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__);
9936/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(4);
9937/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__);
9938/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_lifecycles_compat__ = __webpack_require__(42);
9939/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__MonthTable__ = __webpack_require__(110);
9940
9941
9942
9943
9944
9945
9946
9947
9948function goYear(direction) {
9949 this.props.changeYear(direction);
9950}
9951
9952function noop() {}
9953
9954var MonthPanel = function (_React$Component) {
9955 __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(MonthPanel, _React$Component);
9956
9957 function MonthPanel(props) {
9958 __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, MonthPanel);
9959
9960 var _this = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props));
9961
9962 _this.setAndSelectValue = function (value) {
9963 _this.setValue(value);
9964 _this.props.onSelect(value);
9965 };
9966
9967 _this.setValue = function (value) {
9968 if ('value' in _this.props) {
9969 _this.setState({
9970 value: value
9971 });
9972 }
9973 };
9974
9975 _this.nextYear = goYear.bind(_this, 1);
9976 _this.previousYear = goYear.bind(_this, -1);
9977 _this.prefixCls = props.rootPrefixCls + '-month-panel';
9978
9979 _this.state = {
9980 value: props.value || props.defaultValue
9981 };
9982 return _this;
9983 }
9984
9985 MonthPanel.getDerivedStateFromProps = function getDerivedStateFromProps(props) {
9986 var newState = {};
9987
9988 if ('value' in props) {
9989 newState = {
9990 value: props.value
9991 };
9992 }
9993
9994 return newState;
9995 };
9996
9997 MonthPanel.prototype.render = function render() {
9998 var props = this.props;
9999 var value = this.state.value;
10000 var locale = props.locale,
10001 cellRender = props.cellRender,
10002 contentRender = props.contentRender,
10003 renderFooter = props.renderFooter;
10004
10005 var year = value.year();
10006 var prefixCls = this.prefixCls;
10007
10008 var footer = renderFooter && renderFooter('month');
10009
10010 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10011 'div',
10012 { className: prefixCls, style: props.style },
10013 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10014 'div',
10015 null,
10016 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10017 'div',
10018 { className: prefixCls + '-header' },
10019 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement('a', {
10020 className: prefixCls + '-prev-year-btn',
10021 role: 'button',
10022 onClick: this.previousYear,
10023 title: locale.previousYear
10024 }),
10025 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10026 'a',
10027 {
10028 className: prefixCls + '-year-select',
10029 role: 'button',
10030 onClick: props.onYearPanelShow,
10031 title: locale.yearSelect
10032 },
10033 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10034 'span',
10035 { className: prefixCls + '-year-select-content' },
10036 year
10037 ),
10038 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10039 'span',
10040 { className: prefixCls + '-year-select-arrow' },
10041 'x'
10042 )
10043 ),
10044 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement('a', {
10045 className: prefixCls + '-next-year-btn',
10046 role: 'button',
10047 onClick: this.nextYear,
10048 title: locale.nextYear
10049 })
10050 ),
10051 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10052 'div',
10053 { className: prefixCls + '-body' },
10054 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__MonthTable__["a" /* default */], {
10055 disabledDate: props.disabledDate,
10056 onSelect: this.setAndSelectValue,
10057 locale: locale,
10058 value: value,
10059 cellRender: cellRender,
10060 contentRender: contentRender,
10061 prefixCls: prefixCls
10062 })
10063 ),
10064 footer && __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10065 'div',
10066 { className: prefixCls + '-footer' },
10067 footer
10068 )
10069 )
10070 );
10071 };
10072
10073 return MonthPanel;
10074}(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component);
10075
10076MonthPanel.propTypes = {
10077 onChange: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
10078 disabledDate: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
10079 onSelect: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
10080 renderFooter: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
10081 rootPrefixCls: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string,
10082 value: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object,
10083 defaultValue: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object
10084};
10085MonthPanel.defaultProps = {
10086 onChange: noop,
10087 onSelect: noop
10088};
10089
10090
10091Object(__WEBPACK_IMPORTED_MODULE_5_react_lifecycles_compat__["a" /* polyfill */])(MonthPanel);
10092
10093/* harmony default export */ __webpack_exports__["a"] = (MonthPanel);
10094
10095/***/ }),
10096/* 110 */
10097/***/ (function(module, __webpack_exports__, __webpack_require__) {
10098
10099"use strict";
10100/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);
10101/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
10102/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(2);
10103/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);
10104/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(3);
10105/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);
10106/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0);
10107/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__);
10108/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(4);
10109/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__);
10110/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(9);
10111/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);
10112/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_index__ = __webpack_require__(15);
10113
10114
10115
10116
10117
10118
10119
10120
10121var ROW = 4;
10122var COL = 3;
10123
10124function chooseMonth(month) {
10125 var next = this.state.value.clone();
10126 next.month(month);
10127 this.setAndSelectValue(next);
10128}
10129
10130function noop() {}
10131
10132var MonthTable = function (_Component) {
10133 __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(MonthTable, _Component);
10134
10135 function MonthTable(props) {
10136 __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, MonthTable);
10137
10138 var _this = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _Component.call(this, props));
10139
10140 _this.state = {
10141 value: props.value
10142 };
10143 return _this;
10144 }
10145
10146 MonthTable.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
10147 if ('value' in nextProps) {
10148 this.setState({
10149 value: nextProps.value
10150 });
10151 }
10152 };
10153
10154 MonthTable.prototype.setAndSelectValue = function setAndSelectValue(value) {
10155 this.setState({
10156 value: value
10157 });
10158 this.props.onSelect(value);
10159 };
10160
10161 MonthTable.prototype.months = function months() {
10162 var value = this.state.value;
10163 var current = value.clone();
10164 var months = [];
10165 var index = 0;
10166 for (var rowIndex = 0; rowIndex < ROW; rowIndex++) {
10167 months[rowIndex] = [];
10168 for (var colIndex = 0; colIndex < COL; colIndex++) {
10169 current.month(index);
10170 var content = Object(__WEBPACK_IMPORTED_MODULE_6__util_index__["b" /* getMonthName */])(current);
10171 months[rowIndex][colIndex] = {
10172 value: index,
10173 content: content,
10174 title: content
10175 };
10176 index++;
10177 }
10178 }
10179 return months;
10180 };
10181
10182 MonthTable.prototype.render = function render() {
10183 var _this2 = this;
10184
10185 var props = this.props;
10186 var value = this.state.value;
10187 var today = Object(__WEBPACK_IMPORTED_MODULE_6__util_index__["e" /* getTodayTime */])(value);
10188 var months = this.months();
10189 var currentMonth = value.month();
10190 var prefixCls = props.prefixCls,
10191 locale = props.locale,
10192 contentRender = props.contentRender,
10193 cellRender = props.cellRender;
10194
10195 var monthsEls = months.map(function (month, index) {
10196 var tds = month.map(function (monthData) {
10197 var _classNameMap;
10198
10199 var disabled = false;
10200 if (props.disabledDate) {
10201 var testValue = value.clone();
10202 testValue.month(monthData.value);
10203 disabled = props.disabledDate(testValue);
10204 }
10205 var classNameMap = (_classNameMap = {}, _classNameMap[prefixCls + '-cell'] = 1, _classNameMap[prefixCls + '-cell-disabled'] = disabled, _classNameMap[prefixCls + '-selected-cell'] = monthData.value === currentMonth, _classNameMap[prefixCls + '-current-cell'] = today.year() === value.year() && monthData.value === today.month(), _classNameMap);
10206 var cellEl = void 0;
10207 if (cellRender) {
10208 var currentValue = value.clone();
10209 currentValue.month(monthData.value);
10210 cellEl = cellRender(currentValue, locale);
10211 } else {
10212 var content = void 0;
10213 if (contentRender) {
10214 var _currentValue = value.clone();
10215 _currentValue.month(monthData.value);
10216 content = contentRender(_currentValue, locale);
10217 } else {
10218 content = monthData.content;
10219 }
10220 cellEl = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10221 'a',
10222 { className: prefixCls + '-month' },
10223 content
10224 );
10225 }
10226 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10227 'td',
10228 {
10229 role: 'gridcell',
10230 key: monthData.value,
10231 onClick: disabled ? null : chooseMonth.bind(_this2, monthData.value),
10232 title: monthData.title,
10233 className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(classNameMap)
10234 },
10235 cellEl
10236 );
10237 });
10238 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10239 'tr',
10240 { key: index, role: 'row' },
10241 tds
10242 );
10243 });
10244
10245 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10246 'table',
10247 { className: prefixCls + '-table', cellSpacing: '0', role: 'grid' },
10248 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10249 'tbody',
10250 { className: prefixCls + '-tbody' },
10251 monthsEls
10252 )
10253 );
10254 };
10255
10256 return MonthTable;
10257}(__WEBPACK_IMPORTED_MODULE_3_react__["Component"]);
10258
10259MonthTable.defaultProps = {
10260 onSelect: noop
10261};
10262MonthTable.propTypes = {
10263 onSelect: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
10264 cellRender: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
10265 prefixCls: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string,
10266 value: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object
10267};
10268/* harmony default export */ __webpack_exports__["a"] = (MonthTable);
10269
10270/***/ }),
10271/* 111 */
10272/***/ (function(module, __webpack_exports__, __webpack_require__) {
10273
10274"use strict";
10275/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);
10276/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
10277/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(2);
10278/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);
10279/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(3);
10280/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);
10281/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0);
10282/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__);
10283/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(4);
10284/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__);
10285/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(9);
10286/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);
10287
10288
10289
10290
10291
10292
10293var ROW = 4;
10294var COL = 3;
10295
10296function goYear(direction) {
10297 var value = this.state.value.clone();
10298 value.add(direction, 'year');
10299 this.setState({
10300 value: value
10301 });
10302}
10303
10304function chooseYear(year) {
10305 var value = this.state.value.clone();
10306 value.year(year);
10307 value.month(this.state.value.month());
10308 this.setState({
10309 value: value
10310 });
10311 this.props.onSelect(value);
10312}
10313
10314var YearPanel = function (_React$Component) {
10315 __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(YearPanel, _React$Component);
10316
10317 function YearPanel(props) {
10318 __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, YearPanel);
10319
10320 var _this = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props));
10321
10322 _this.prefixCls = props.rootPrefixCls + '-year-panel';
10323 _this.state = {
10324 value: props.value || props.defaultValue
10325 };
10326 _this.nextDecade = goYear.bind(_this, 10);
10327 _this.previousDecade = goYear.bind(_this, -10);
10328 return _this;
10329 }
10330
10331 YearPanel.prototype.years = function years() {
10332 var value = this.state.value;
10333 var currentYear = value.year();
10334 var startYear = parseInt(currentYear / 10, 10) * 10;
10335 var previousYear = startYear - 1;
10336 var years = [];
10337 var index = 0;
10338 for (var rowIndex = 0; rowIndex < ROW; rowIndex++) {
10339 years[rowIndex] = [];
10340 for (var colIndex = 0; colIndex < COL; colIndex++) {
10341 var year = previousYear + index;
10342 var content = String(year);
10343 years[rowIndex][colIndex] = {
10344 content: content,
10345 year: year,
10346 title: content
10347 };
10348 index++;
10349 }
10350 }
10351 return years;
10352 };
10353
10354 YearPanel.prototype.render = function render() {
10355 var _this2 = this;
10356
10357 var props = this.props;
10358 var value = this.state.value;
10359 var locale = props.locale,
10360 renderFooter = props.renderFooter;
10361
10362 var years = this.years();
10363 var currentYear = value.year();
10364 var startYear = parseInt(currentYear / 10, 10) * 10;
10365 var endYear = startYear + 9;
10366 var prefixCls = this.prefixCls;
10367
10368 var yeasEls = years.map(function (row, index) {
10369 var tds = row.map(function (yearData) {
10370 var _classNameMap;
10371
10372 var classNameMap = (_classNameMap = {}, _classNameMap[prefixCls + '-cell'] = 1, _classNameMap[prefixCls + '-selected-cell'] = yearData.year === currentYear, _classNameMap[prefixCls + '-last-decade-cell'] = yearData.year < startYear, _classNameMap[prefixCls + '-next-decade-cell'] = yearData.year > endYear, _classNameMap);
10373 var clickHandler = void 0;
10374 if (yearData.year < startYear) {
10375 clickHandler = _this2.previousDecade;
10376 } else if (yearData.year > endYear) {
10377 clickHandler = _this2.nextDecade;
10378 } else {
10379 clickHandler = chooseYear.bind(_this2, yearData.year);
10380 }
10381 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10382 'td',
10383 {
10384 role: 'gridcell',
10385 title: yearData.title,
10386 key: yearData.content,
10387 onClick: clickHandler,
10388 className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(classNameMap)
10389 },
10390 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10391 'a',
10392 {
10393 className: prefixCls + '-year'
10394 },
10395 yearData.content
10396 )
10397 );
10398 });
10399 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10400 'tr',
10401 { key: index, role: 'row' },
10402 tds
10403 );
10404 });
10405
10406 var footer = renderFooter && renderFooter('year');
10407
10408 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10409 'div',
10410 { className: this.prefixCls },
10411 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10412 'div',
10413 null,
10414 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10415 'div',
10416 { className: prefixCls + '-header' },
10417 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement('a', {
10418 className: prefixCls + '-prev-decade-btn',
10419 role: 'button',
10420 onClick: this.previousDecade,
10421 title: locale.previousDecade
10422 }),
10423 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10424 'a',
10425 {
10426 className: prefixCls + '-decade-select',
10427 role: 'button',
10428 onClick: props.onDecadePanelShow,
10429 title: locale.decadeSelect
10430 },
10431 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10432 'span',
10433 { className: prefixCls + '-decade-select-content' },
10434 startYear,
10435 '-',
10436 endYear
10437 ),
10438 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10439 'span',
10440 { className: prefixCls + '-decade-select-arrow' },
10441 'x'
10442 )
10443 ),
10444 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement('a', {
10445 className: prefixCls + '-next-decade-btn',
10446 role: 'button',
10447 onClick: this.nextDecade,
10448 title: locale.nextDecade
10449 })
10450 ),
10451 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10452 'div',
10453 { className: prefixCls + '-body' },
10454 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10455 'table',
10456 { className: prefixCls + '-table', cellSpacing: '0', role: 'grid' },
10457 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10458 'tbody',
10459 { className: prefixCls + '-tbody' },
10460 yeasEls
10461 )
10462 )
10463 ),
10464 footer && __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10465 'div',
10466 { className: prefixCls + '-footer' },
10467 footer
10468 )
10469 )
10470 );
10471 };
10472
10473 return YearPanel;
10474}(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component);
10475
10476/* harmony default export */ __webpack_exports__["a"] = (YearPanel);
10477
10478
10479YearPanel.propTypes = {
10480 rootPrefixCls: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string,
10481 value: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object,
10482 defaultValue: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object,
10483 renderFooter: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func
10484};
10485
10486YearPanel.defaultProps = {
10487 onSelect: function onSelect() {}
10488};
10489
10490/***/ }),
10491/* 112 */
10492/***/ (function(module, __webpack_exports__, __webpack_require__) {
10493
10494"use strict";
10495/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);
10496/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
10497/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(2);
10498/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);
10499/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(3);
10500/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);
10501/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0);
10502/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__);
10503/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(4);
10504/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__);
10505/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(9);
10506/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);
10507
10508
10509
10510
10511
10512var ROW = 4;
10513var COL = 3;
10514
10515
10516function goYear(direction) {
10517 var next = this.state.value.clone();
10518 next.add(direction, 'years');
10519 this.setState({
10520 value: next
10521 });
10522}
10523
10524function chooseDecade(year, event) {
10525 var next = this.state.value.clone();
10526 next.year(year);
10527 next.month(this.state.value.month());
10528 this.props.onSelect(next);
10529 event.preventDefault();
10530}
10531
10532var DecadePanel = function (_React$Component) {
10533 __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(DecadePanel, _React$Component);
10534
10535 function DecadePanel(props) {
10536 __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, DecadePanel);
10537
10538 var _this = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props));
10539
10540 _this.state = {
10541 value: props.value || props.defaultValue
10542 };
10543
10544 // bind methods
10545 _this.prefixCls = props.rootPrefixCls + '-decade-panel';
10546 _this.nextCentury = goYear.bind(_this, 100);
10547 _this.previousCentury = goYear.bind(_this, -100);
10548 return _this;
10549 }
10550
10551 DecadePanel.prototype.render = function render() {
10552 var _this2 = this;
10553
10554 var value = this.state.value;
10555 var _props = this.props,
10556 locale = _props.locale,
10557 renderFooter = _props.renderFooter;
10558
10559 var currentYear = value.year();
10560 var startYear = parseInt(currentYear / 100, 10) * 100;
10561 var preYear = startYear - 10;
10562 var endYear = startYear + 99;
10563 var decades = [];
10564 var index = 0;
10565 var prefixCls = this.prefixCls;
10566
10567 for (var rowIndex = 0; rowIndex < ROW; rowIndex++) {
10568 decades[rowIndex] = [];
10569 for (var colIndex = 0; colIndex < COL; colIndex++) {
10570 var startDecade = preYear + index * 10;
10571 var endDecade = preYear + index * 10 + 9;
10572 decades[rowIndex][colIndex] = {
10573 startDecade: startDecade,
10574 endDecade: endDecade
10575 };
10576 index++;
10577 }
10578 }
10579
10580 var footer = renderFooter && renderFooter('decade');
10581
10582 var decadesEls = decades.map(function (row, decadeIndex) {
10583 var tds = row.map(function (decadeData) {
10584 var _classNameMap;
10585
10586 var dStartDecade = decadeData.startDecade;
10587 var dEndDecade = decadeData.endDecade;
10588 var isLast = dStartDecade < startYear;
10589 var isNext = dEndDecade > endYear;
10590 var classNameMap = (_classNameMap = {}, _classNameMap[prefixCls + '-cell'] = 1, _classNameMap[prefixCls + '-selected-cell'] = dStartDecade <= currentYear && currentYear <= dEndDecade, _classNameMap[prefixCls + '-last-century-cell'] = isLast, _classNameMap[prefixCls + '-next-century-cell'] = isNext, _classNameMap);
10591 var content = dStartDecade + '-' + dEndDecade;
10592 var clickHandler = void 0;
10593 if (isLast) {
10594 clickHandler = _this2.previousCentury;
10595 } else if (isNext) {
10596 clickHandler = _this2.nextCentury;
10597 } else {
10598 clickHandler = chooseDecade.bind(_this2, dStartDecade);
10599 }
10600 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10601 'td',
10602 {
10603 key: dStartDecade,
10604 onClick: clickHandler,
10605 role: 'gridcell',
10606 className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(classNameMap)
10607 },
10608 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10609 'a',
10610 {
10611 className: prefixCls + '-decade'
10612 },
10613 content
10614 )
10615 );
10616 });
10617 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10618 'tr',
10619 { key: decadeIndex, role: 'row' },
10620 tds
10621 );
10622 });
10623
10624 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10625 'div',
10626 { className: this.prefixCls },
10627 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10628 'div',
10629 { className: prefixCls + '-header' },
10630 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement('a', {
10631 className: prefixCls + '-prev-century-btn',
10632 role: 'button',
10633 onClick: this.previousCentury,
10634 title: locale.previousCentury
10635 }),
10636 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10637 'div',
10638 { className: prefixCls + '-century' },
10639 startYear,
10640 '-',
10641 endYear
10642 ),
10643 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement('a', {
10644 className: prefixCls + '-next-century-btn',
10645 role: 'button',
10646 onClick: this.nextCentury,
10647 title: locale.nextCentury
10648 })
10649 ),
10650 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10651 'div',
10652 { className: prefixCls + '-body' },
10653 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10654 'table',
10655 { className: prefixCls + '-table', cellSpacing: '0', role: 'grid' },
10656 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10657 'tbody',
10658 { className: prefixCls + '-tbody' },
10659 decadesEls
10660 )
10661 )
10662 ),
10663 footer && __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
10664 'div',
10665 { className: prefixCls + '-footer' },
10666 footer
10667 )
10668 );
10669 };
10670
10671 return DecadePanel;
10672}(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component);
10673
10674/* harmony default export */ __webpack_exports__["a"] = (DecadePanel);
10675
10676
10677DecadePanel.propTypes = {
10678 locale: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object,
10679 value: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object,
10680 defaultValue: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object,
10681 rootPrefixCls: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string,
10682 renderFooter: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func
10683};
10684
10685DecadePanel.defaultProps = {
10686 onSelect: function onSelect() {}
10687};
10688
10689/***/ }),
10690/* 113 */
10691/***/ (function(module, __webpack_exports__, __webpack_require__) {
10692
10693"use strict";
10694/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(26);
10695/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
10696/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);
10697/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
10698/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(2);
10699/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
10700/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(3);
10701/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
10702/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
10703/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
10704/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom__ = __webpack_require__(40);
10705/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react_dom__);
10706/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(4);
10707/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
10708/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_rc_util_es_Children_mapSelf__ = __webpack_require__(57);
10709/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames__ = __webpack_require__(9);
10710/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_classnames__);
10711/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__calendar_TodayButton__ = __webpack_require__(114);
10712/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__calendar_OkButton__ = __webpack_require__(115);
10713/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__calendar_TimePickerButton__ = __webpack_require__(116);
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727var CalendarFooter = function (_React$Component) {
10728 __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(CalendarFooter, _React$Component);
10729
10730 function CalendarFooter() {
10731 __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, CalendarFooter);
10732
10733 return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));
10734 }
10735
10736 CalendarFooter.prototype.onSelect = function onSelect(value) {
10737 this.props.onSelect(value);
10738 };
10739
10740 CalendarFooter.prototype.getRootDOMNode = function getRootDOMNode() {
10741 return __WEBPACK_IMPORTED_MODULE_5_react_dom___default.a.findDOMNode(this);
10742 };
10743
10744 CalendarFooter.prototype.render = function render() {
10745 var props = this.props;
10746 var value = props.value,
10747 prefixCls = props.prefixCls,
10748 showOk = props.showOk,
10749 timePicker = props.timePicker,
10750 renderFooter = props.renderFooter,
10751 mode = props.mode;
10752
10753 var footerEl = null;
10754 var extraFooter = renderFooter && renderFooter(mode);
10755 if (props.showToday || timePicker || extraFooter) {
10756 var _cx;
10757
10758 var nowEl = void 0;
10759 if (props.showToday) {
10760 nowEl = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__calendar_TodayButton__["a" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, { value: value }));
10761 }
10762 var okBtn = void 0;
10763 if (showOk === true || showOk !== false && !!props.timePicker) {
10764 okBtn = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__calendar_OkButton__["a" /* default */], props);
10765 }
10766 var timePickerBtn = void 0;
10767 if (!!props.timePicker) {
10768 timePickerBtn = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__calendar_TimePickerButton__["a" /* default */], props);
10769 }
10770
10771 var footerBtn = void 0;
10772 if (nowEl || timePickerBtn || okBtn || extraFooter) {
10773 footerBtn = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
10774 'span',
10775 { className: prefixCls + '-footer-btn' },
10776 extraFooter,
10777 Object(__WEBPACK_IMPORTED_MODULE_7_rc_util_es_Children_mapSelf__["a" /* default */])([nowEl, timePickerBtn, okBtn])
10778 );
10779 }
10780 var cls = __WEBPACK_IMPORTED_MODULE_8_classnames___default()(prefixCls + '-footer', (_cx = {}, _cx[prefixCls + '-footer-show-ok'] = okBtn, _cx));
10781 footerEl = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
10782 'div',
10783 { className: cls },
10784 footerBtn
10785 );
10786 }
10787 return footerEl;
10788 };
10789
10790 return CalendarFooter;
10791}(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);
10792
10793CalendarFooter.propTypes = {
10794 prefixCls: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
10795 showDateInput: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
10796 disabledTime: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
10797 timePicker: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.element,
10798 selectedValue: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
10799 showOk: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
10800 onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
10801 value: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
10802 renderFooter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
10803 defaultValue: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
10804 mode: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string
10805};
10806/* harmony default export */ __webpack_exports__["a"] = (CalendarFooter);
10807
10808/***/ }),
10809/* 114 */
10810/***/ (function(module, __webpack_exports__, __webpack_require__) {
10811
10812"use strict";
10813/* harmony export (immutable) */ __webpack_exports__["a"] = TodayButton;
10814/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
10815/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
10816/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util___ = __webpack_require__(15);
10817
10818
10819
10820function TodayButton(_ref) {
10821 var prefixCls = _ref.prefixCls,
10822 locale = _ref.locale,
10823 value = _ref.value,
10824 timePicker = _ref.timePicker,
10825 disabled = _ref.disabled,
10826 disabledDate = _ref.disabledDate,
10827 onToday = _ref.onToday,
10828 text = _ref.text;
10829
10830 var localeNow = (!text && timePicker ? locale.now : text) || locale.today;
10831 var disabledToday = disabledDate && !Object(__WEBPACK_IMPORTED_MODULE_1__util___["g" /* isAllowedDate */])(Object(__WEBPACK_IMPORTED_MODULE_1__util___["e" /* getTodayTime */])(value), disabledDate);
10832 var isDisabled = disabledToday || disabled;
10833 var disabledTodayClass = isDisabled ? prefixCls + '-today-btn-disabled' : '';
10834 return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
10835 'a',
10836 {
10837 className: prefixCls + '-today-btn ' + disabledTodayClass,
10838 role: 'button',
10839 onClick: isDisabled ? null : onToday,
10840 title: Object(__WEBPACK_IMPORTED_MODULE_1__util___["f" /* getTodayTimeStr */])(value)
10841 },
10842 localeNow
10843 );
10844}
10845
10846/***/ }),
10847/* 115 */
10848/***/ (function(module, __webpack_exports__, __webpack_require__) {
10849
10850"use strict";
10851/* harmony export (immutable) */ __webpack_exports__["a"] = OkButton;
10852/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
10853/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
10854
10855
10856function OkButton(_ref) {
10857 var prefixCls = _ref.prefixCls,
10858 locale = _ref.locale,
10859 okDisabled = _ref.okDisabled,
10860 onOk = _ref.onOk;
10861
10862 var className = prefixCls + "-ok-btn";
10863 if (okDisabled) {
10864 className += " " + prefixCls + "-ok-btn-disabled";
10865 }
10866 return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
10867 "a",
10868 {
10869 className: className,
10870 role: "button",
10871 onClick: okDisabled ? null : onOk
10872 },
10873 locale.ok
10874 );
10875}
10876
10877/***/ }),
10878/* 116 */
10879/***/ (function(module, __webpack_exports__, __webpack_require__) {
10880
10881"use strict";
10882/* harmony export (immutable) */ __webpack_exports__["a"] = TimePickerButton;
10883/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
10884/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
10885/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(9);
10886/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);
10887
10888
10889
10890function TimePickerButton(_ref) {
10891 var _classnames;
10892
10893 var prefixCls = _ref.prefixCls,
10894 locale = _ref.locale,
10895 showTimePicker = _ref.showTimePicker,
10896 onOpenTimePicker = _ref.onOpenTimePicker,
10897 onCloseTimePicker = _ref.onCloseTimePicker,
10898 timePickerDisabled = _ref.timePickerDisabled;
10899
10900 var className = __WEBPACK_IMPORTED_MODULE_1_classnames___default()((_classnames = {}, _classnames[prefixCls + '-time-picker-btn'] = true, _classnames[prefixCls + '-time-picker-btn-disabled'] = timePickerDisabled, _classnames));
10901 var onClick = null;
10902 if (!timePickerDisabled) {
10903 onClick = showTimePicker ? onCloseTimePicker : onOpenTimePicker;
10904 }
10905 return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
10906 'a',
10907 {
10908 className: className,
10909 role: 'button',
10910 onClick: onClick
10911 },
10912 showTimePicker ? locale.dateSelect : locale.timeSelect
10913 );
10914}
10915
10916/***/ }),
10917/* 117 */
10918/***/ (function(module, __webpack_exports__, __webpack_require__) {
10919
10920"use strict";
10921/* harmony export (immutable) */ __webpack_exports__["d"] = getNowByCurrentStateValue;
10922/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return calendarMixinPropTypes; });
10923/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return calendarMixinDefaultProps; });
10924/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return calendarMixinWrapper; });
10925/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);
10926/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
10927/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(2);
10928/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);
10929/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(3);
10930/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);
10931/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0);
10932/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__);
10933/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(4);
10934/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__);
10935/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(9);
10936/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);
10937/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_moment__ = __webpack_require__(20);
10938/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_moment__);
10939/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util_index__ = __webpack_require__(15);
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949function noop() {}
10950
10951function getNowByCurrentStateValue(value) {
10952 var ret = void 0;
10953 if (value) {
10954 ret = Object(__WEBPACK_IMPORTED_MODULE_7__util_index__["e" /* getTodayTime */])(value);
10955 } else {
10956 ret = __WEBPACK_IMPORTED_MODULE_6_moment___default()();
10957 }
10958 return ret;
10959}
10960
10961var calendarMixinPropTypes = {
10962 value: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object,
10963 defaultValue: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object,
10964 onKeyDown: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func
10965};
10966
10967var calendarMixinDefaultProps = {
10968 onKeyDown: noop
10969};
10970
10971var calendarMixinWrapper = function calendarMixinWrapper(ComposeComponent) {
10972 var _class, _temp2;
10973
10974 return _temp2 = _class = function (_ComposeComponent) {
10975 __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(_class, _ComposeComponent);
10976
10977 function _class() {
10978 var _temp, _this, _ret;
10979
10980 __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, _class);
10981
10982 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
10983 args[_key] = arguments[_key];
10984 }
10985
10986 return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _ComposeComponent.call.apply(_ComposeComponent, [this].concat(args))), _this), _this.onSelect = function (value, cause) {
10987 if (value) {
10988 _this.setValue(value);
10989 }
10990 _this.setSelectedValue(value, cause);
10991 }, _this.renderRoot = function (newProps) {
10992 var _className;
10993
10994 var props = _this.props;
10995 var prefixCls = props.prefixCls;
10996
10997 var className = (_className = {}, _className[prefixCls] = 1, _className[prefixCls + '-hidden'] = !props.visible, _className[props.className] = !!props.className, _className[newProps.className] = !!newProps.className, _className);
10998
10999 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
11000 'div',
11001 {
11002 ref: _this.saveRoot,
11003 className: '' + __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className),
11004 style: _this.props.style,
11005 tabIndex: '0',
11006 onKeyDown: _this.onKeyDown,
11007 onBlur: _this.onBlur
11008 },
11009 newProps.children
11010 );
11011 }, _this.setSelectedValue = function (selectedValue, cause) {
11012 // if (this.isAllowedDate(selectedValue)) {
11013 if (!('selectedValue' in _this.props)) {
11014 _this.setState({
11015 selectedValue: selectedValue
11016 });
11017 }
11018 if (_this.props.onSelect) {
11019 _this.props.onSelect(selectedValue, cause);
11020 }
11021 // }
11022 }, _this.setValue = function (value) {
11023 var originalValue = _this.state.value;
11024 if (!('value' in _this.props)) {
11025 _this.setState({
11026 value: value
11027 });
11028 }
11029 if (originalValue && value && !originalValue.isSame(value) || !originalValue && value || originalValue && !value) {
11030 _this.props.onChange(value);
11031 }
11032 }, _this.isAllowedDate = function (value) {
11033 var disabledDate = _this.props.disabledDate;
11034 var disabledTime = _this.props.disabledTime;
11035 return Object(__WEBPACK_IMPORTED_MODULE_7__util_index__["g" /* isAllowedDate */])(value, disabledDate, disabledTime);
11036 }, _temp), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
11037 }
11038
11039 _class.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
11040 // Use origin function if provided
11041 if (ComposeComponent.getDerivedStateFromProps) {
11042 return ComposeComponent.getDerivedStateFromProps(nextProps, prevState);
11043 }
11044
11045 var value = nextProps.value,
11046 selectedValue = nextProps.selectedValue;
11047
11048 var newState = {};
11049
11050 if ('value' in nextProps) {
11051 newState.value = value || nextProps.defaultValue || getNowByCurrentStateValue(prevState.value);
11052 }
11053 if ('selectedValue' in nextProps) {
11054 newState.selectedValue = selectedValue;
11055 }
11056
11057 return newState;
11058 };
11059
11060 return _class;
11061 }(ComposeComponent), _class.displayName = 'CalendarMixinWrapper', _class.defaultProps = ComposeComponent.defaultProps, _temp2;
11062};
11063
11064/***/ }),
11065/* 118 */
11066/***/ (function(module, __webpack_exports__, __webpack_require__) {
11067
11068"use strict";
11069/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return propType; });
11070/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return defaultProp; });
11071/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return commonMixinWrapper; });
11072/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);
11073/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
11074/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(2);
11075/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);
11076/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(3);
11077/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);
11078/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(4);
11079/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
11080/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__locale_en_US__ = __webpack_require__(119);
11081
11082
11083
11084
11085
11086
11087function noop() {}
11088
11089var propType = {
11090 className: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,
11091 locale: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object,
11092 style: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object,
11093 visible: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,
11094 onSelect: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,
11095 prefixCls: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,
11096 onChange: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,
11097 onOk: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func
11098};
11099
11100var defaultProp = {
11101 locale: __WEBPACK_IMPORTED_MODULE_4__locale_en_US__["a" /* default */],
11102 style: {},
11103 visible: true,
11104 prefixCls: 'rc-calendar',
11105 className: '',
11106 onSelect: noop,
11107 onChange: noop,
11108 onClear: noop,
11109 renderFooter: function renderFooter() {
11110 return null;
11111 },
11112 renderSidebar: function renderSidebar() {
11113 return null;
11114 }
11115};
11116
11117var commonMixinWrapper = function commonMixinWrapper(ComposeComponent) {
11118 var _class, _temp2;
11119
11120 return _temp2 = _class = function (_ComposeComponent) {
11121 __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(_class, _ComposeComponent);
11122
11123 function _class() {
11124 var _temp, _this, _ret;
11125
11126 __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, _class);
11127
11128 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
11129 args[_key] = arguments[_key];
11130 }
11131
11132 return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _ComposeComponent.call.apply(_ComposeComponent, [this].concat(args))), _this), _this.getFormat = function () {
11133 var format = _this.props.format;
11134 var _this$props = _this.props,
11135 locale = _this$props.locale,
11136 timePicker = _this$props.timePicker;
11137
11138 if (!format) {
11139 if (timePicker) {
11140 format = locale.dateTimeFormat;
11141 } else {
11142 format = locale.dateFormat;
11143 }
11144 }
11145 return format;
11146 }, _this.focus = function () {
11147 if (_this.focusElement) {
11148 _this.focusElement.focus();
11149 } else if (_this.rootInstance) {
11150 _this.rootInstance.focus();
11151 }
11152 }, _this.saveFocusElement = function (focusElement) {
11153 _this.focusElement = focusElement;
11154 }, _this.saveRoot = function (root) {
11155 _this.rootInstance = root;
11156 }, _temp), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
11157 }
11158
11159 _class.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
11160 return this.props.visible || nextProps.visible;
11161 };
11162
11163 return _class;
11164 }(ComposeComponent), _class.displayName = 'CommonMixinWrapper', _class.defaultProps = ComposeComponent.defaultProps, _class.getDerivedStateFromProps = ComposeComponent.getDerivedStateFromProps, _temp2;
11165};
11166
11167/***/ }),
11168/* 119 */
11169/***/ (function(module, __webpack_exports__, __webpack_require__) {
11170
11171"use strict";
11172/* harmony default export */ __webpack_exports__["a"] = ({
11173 today: 'Today',
11174 now: 'Now',
11175 backToToday: 'Back to today',
11176 ok: 'Ok',
11177 clear: 'Clear',
11178 month: 'Month',
11179 year: 'Year',
11180 timeSelect: 'select time',
11181 dateSelect: 'select date',
11182 weekSelect: 'Choose a week',
11183 monthSelect: 'Choose a month',
11184 yearSelect: 'Choose a year',
11185 decadeSelect: 'Choose a decade',
11186 yearFormat: 'YYYY',
11187 dateFormat: 'M/D/YYYY',
11188 dayFormat: 'D',
11189 dateTimeFormat: 'M/D/YYYY HH:mm:ss',
11190 monthBeforeYear: true,
11191 previousMonth: 'Previous month (PageUp)',
11192 nextMonth: 'Next month (PageDown)',
11193 previousYear: 'Last year (Control + left)',
11194 nextYear: 'Next year (Control + right)',
11195 previousDecade: 'Last decade',
11196 nextDecade: 'Next decade',
11197 previousCentury: 'Last century',
11198 nextCentury: 'Next century'
11199});
11200
11201/***/ }),
11202/* 120 */
11203/***/ (function(module, __webpack_exports__, __webpack_require__) {
11204
11205"use strict";
11206/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);
11207/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
11208/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(2);
11209/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);
11210/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(3);
11211/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);
11212/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0);
11213/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__);
11214/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_dom__ = __webpack_require__(40);
11215/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_dom__);
11216/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(4);
11217/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__);
11218/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_rc_util_es_KeyCode__ = __webpack_require__(55);
11219/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_lifecycles_compat__ = __webpack_require__(42);
11220/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_moment__ = __webpack_require__(20);
11221/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_moment__);
11222/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__util__ = __webpack_require__(15);
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234var cachedSelectionStart = void 0;
11235var cachedSelectionEnd = void 0;
11236var dateInputInstance = void 0;
11237
11238var DateInput = function (_React$Component) {
11239 __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(DateInput, _React$Component);
11240
11241 function DateInput(props) {
11242 __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, DateInput);
11243
11244 var _this = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props));
11245
11246 _initialiseProps.call(_this);
11247
11248 var selectedValue = props.selectedValue;
11249
11250 _this.state = {
11251 str: Object(__WEBPACK_IMPORTED_MODULE_9__util__["a" /* formatDate */])(selectedValue, _this.props.format),
11252 invalid: false,
11253 hasFocus: false
11254 };
11255 return _this;
11256 }
11257
11258 DateInput.prototype.componentDidUpdate = function componentDidUpdate() {
11259 if (dateInputInstance && this.state.hasFocus && !this.state.invalid && !(cachedSelectionStart === 0 && cachedSelectionEnd === 0)) {
11260 dateInputInstance.setSelectionRange(cachedSelectionStart, cachedSelectionEnd);
11261 }
11262 };
11263
11264 DateInput.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, state) {
11265 var newState = {};
11266
11267 if (dateInputInstance) {
11268 cachedSelectionStart = dateInputInstance.selectionStart;
11269 cachedSelectionEnd = dateInputInstance.selectionEnd;
11270 }
11271 // when popup show, click body will call this, bug!
11272 var selectedValue = nextProps.selectedValue;
11273 if (!state.hasFocus) {
11274 newState = {
11275 str: Object(__WEBPACK_IMPORTED_MODULE_9__util__["a" /* formatDate */])(selectedValue, nextProps.format),
11276 invalid: false
11277 };
11278 }
11279
11280 return newState;
11281 };
11282
11283 DateInput.getInstance = function getInstance() {
11284 return dateInputInstance;
11285 };
11286
11287 DateInput.prototype.render = function render() {
11288 var props = this.props;
11289 var _state = this.state,
11290 invalid = _state.invalid,
11291 str = _state.str;
11292 var locale = props.locale,
11293 prefixCls = props.prefixCls,
11294 placeholder = props.placeholder,
11295 clearIcon = props.clearIcon,
11296 inputMode = props.inputMode;
11297
11298 var invalidClass = invalid ? prefixCls + '-input-invalid' : '';
11299 return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
11300 'div',
11301 { className: prefixCls + '-input-wrap' },
11302 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
11303 'div',
11304 { className: prefixCls + '-date-input-wrap' },
11305 __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement('input', {
11306 ref: this.saveDateInput,
11307 className: prefixCls + '-input ' + invalidClass,
11308 value: str,
11309 disabled: props.disabled,
11310 placeholder: placeholder,
11311 onChange: this.onInputChange,
11312 onKeyDown: this.onKeyDown,
11313 onFocus: this.onFocus,
11314 onBlur: this.onBlur,
11315 inputMode: inputMode
11316 })
11317 ),
11318 props.showClear ? __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
11319 'a',
11320 {
11321 role: 'button',
11322 title: locale.clear,
11323 onClick: this.onClear
11324 },
11325 clearIcon || __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement('span', { className: prefixCls + '-clear-btn' })
11326 ) : null
11327 );
11328 };
11329
11330 return DateInput;
11331}(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component);
11332
11333DateInput.propTypes = {
11334 prefixCls: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string,
11335 timePicker: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object,
11336 value: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object,
11337 disabledTime: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any,
11338 format: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string)]),
11339 locale: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object,
11340 disabledDate: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
11341 onChange: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
11342 onClear: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
11343 placeholder: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string,
11344 onSelect: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
11345 selectedValue: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object,
11346 clearIcon: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.node,
11347 inputMode: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string
11348};
11349
11350var _initialiseProps = function _initialiseProps() {
11351 var _this2 = this;
11352
11353 this.onClear = function () {
11354 _this2.setState({
11355 str: ''
11356 });
11357 _this2.props.onClear(null);
11358 };
11359
11360 this.onInputChange = function (event) {
11361 var str = event.target.value;
11362 var _props = _this2.props,
11363 disabledDate = _props.disabledDate,
11364 format = _props.format,
11365 onChange = _props.onChange,
11366 selectedValue = _props.selectedValue;
11367
11368 // 没有内容,合法并直接退出
11369
11370 if (!str) {
11371 onChange(null);
11372 _this2.setState({
11373 invalid: false,
11374 str: str
11375 });
11376 return;
11377 }
11378
11379 // 不合法直接退出
11380 var parsed = __WEBPACK_IMPORTED_MODULE_8_moment___default()(str, format, true);
11381 if (!parsed.isValid()) {
11382 _this2.setState({
11383 invalid: true,
11384 str: str
11385 });
11386 return;
11387 }
11388
11389 var value = _this2.props.value.clone();
11390 value.year(parsed.year()).month(parsed.month()).date(parsed.date()).hour(parsed.hour()).minute(parsed.minute()).second(parsed.second());
11391
11392 if (!value || disabledDate && disabledDate(value)) {
11393 _this2.setState({
11394 invalid: true,
11395 str: str
11396 });
11397 return;
11398 }
11399
11400 if (selectedValue !== value || selectedValue && value && !selectedValue.isSame(value)) {
11401 _this2.setState({
11402 invalid: false,
11403 str: str
11404 });
11405 onChange(value);
11406 }
11407 };
11408
11409 this.onFocus = function () {
11410 _this2.setState({ hasFocus: true });
11411 };
11412
11413 this.onBlur = function () {
11414 _this2.setState(function (prevState, prevProps) {
11415 return {
11416 hasFocus: false,
11417 str: Object(__WEBPACK_IMPORTED_MODULE_9__util__["a" /* formatDate */])(prevProps.value, prevProps.format)
11418 };
11419 });
11420 };
11421
11422 this.onKeyDown = function (event) {
11423 var keyCode = event.keyCode;
11424 var _props2 = _this2.props,
11425 onSelect = _props2.onSelect,
11426 value = _props2.value,
11427 disabledDate = _props2.disabledDate;
11428
11429 if (keyCode === __WEBPACK_IMPORTED_MODULE_6_rc_util_es_KeyCode__["a" /* default */].ENTER && onSelect) {
11430 var validateDate = !disabledDate || !disabledDate(value);
11431 if (validateDate) {
11432 onSelect(value.clone());
11433 }
11434 event.preventDefault();
11435 }
11436 };
11437
11438 this.getRootDOMNode = function () {
11439 return __WEBPACK_IMPORTED_MODULE_4_react_dom___default.a.findDOMNode(_this2);
11440 };
11441
11442 this.focus = function () {
11443 if (dateInputInstance) {
11444 dateInputInstance.focus();
11445 }
11446 };
11447
11448 this.saveDateInput = function (dateInput) {
11449 dateInputInstance = dateInput;
11450 };
11451};
11452
11453Object(__WEBPACK_IMPORTED_MODULE_7_react_lifecycles_compat__["a" /* polyfill */])(DateInput);
11454
11455/* harmony default export */ __webpack_exports__["a"] = (DateInput);
11456
11457/***/ }),
11458/* 121 */
11459/***/ (function(module, __webpack_exports__, __webpack_require__) {
11460
11461"use strict";
11462/* harmony export (immutable) */ __webpack_exports__["b"] = goStartMonth;
11463/* harmony export (immutable) */ __webpack_exports__["a"] = goEndMonth;
11464/* harmony export (immutable) */ __webpack_exports__["c"] = goTime;
11465/* unused harmony export includesTime */
11466function goStartMonth(time) {
11467 return time.clone().startOf('month');
11468}
11469
11470function goEndMonth(time) {
11471 return time.clone().endOf('month');
11472}
11473
11474function goTime(time, direction, unit) {
11475 return time.clone().add(direction, unit);
11476}
11477
11478function includesTime() {
11479 var timeList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
11480 var time = arguments[1];
11481 var unit = arguments[2];
11482
11483 return timeList.some(function (t) {
11484 return t.isSame(time, unit);
11485 });
11486}
11487
11488/***/ })
11489/******/ ])["default"];
11490});
11491//# sourceMappingURL=rc-calendar.js.map
\No newline at end of file