UNPKG

251 kBJavaScriptView Raw
1(function (global, factory) {
2 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-popper'), require('react-dom')) :
3 typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-popper', 'react-dom'], factory) :
4 (global = global || self, factory(global.Reactstrap = {}, global.React, global.ReactPopper, global.ReactDOM));
5}(this, function (exports, React, reactPopper, ReactDOM) { 'use strict';
6
7 var React__default = 'default' in React ? React['default'] : React;
8 ReactDOM = ReactDOM && ReactDOM.hasOwnProperty('default') ? ReactDOM['default'] : ReactDOM;
9
10 function _extends() {
11 _extends = Object.assign || function (target) {
12 for (var i = 1; i < arguments.length; i++) {
13 var source = arguments[i];
14
15 for (var key in source) {
16 if (Object.prototype.hasOwnProperty.call(source, key)) {
17 target[key] = source[key];
18 }
19 }
20 }
21
22 return target;
23 };
24
25 return _extends.apply(this, arguments);
26 }
27
28 function _inheritsLoose(subClass, superClass) {
29 subClass.prototype = Object.create(superClass.prototype);
30 subClass.prototype.constructor = subClass;
31 subClass.__proto__ = superClass;
32 }
33
34 function _objectWithoutPropertiesLoose(source, excluded) {
35 if (source == null) return {};
36 var target = {};
37 var sourceKeys = Object.keys(source);
38 var key, i;
39
40 for (i = 0; i < sourceKeys.length; i++) {
41 key = sourceKeys[i];
42 if (excluded.indexOf(key) >= 0) continue;
43 target[key] = source[key];
44 }
45
46 return target;
47 }
48
49 function _assertThisInitialized(self) {
50 if (self === void 0) {
51 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
52 }
53
54 return self;
55 }
56
57 var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
58
59 function unwrapExports (x) {
60 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
61 }
62
63 function createCommonjsModule(fn, module) {
64 return module = { exports: {} }, fn(module, module.exports), module.exports;
65 }
66
67 var reactIs_production_min = createCommonjsModule(function (module, exports) {
68
69 Object.defineProperty(exports, "__esModule", {
70 value: !0
71 });
72 var b = "function" === typeof Symbol && Symbol.for,
73 c = b ? Symbol.for("react.element") : 60103,
74 d = b ? Symbol.for("react.portal") : 60106,
75 e = b ? Symbol.for("react.fragment") : 60107,
76 f = b ? Symbol.for("react.strict_mode") : 60108,
77 g = b ? Symbol.for("react.profiler") : 60114,
78 h = b ? Symbol.for("react.provider") : 60109,
79 k = b ? Symbol.for("react.context") : 60110,
80 l = b ? Symbol.for("react.async_mode") : 60111,
81 m = b ? Symbol.for("react.concurrent_mode") : 60111,
82 n = b ? Symbol.for("react.forward_ref") : 60112,
83 p = b ? Symbol.for("react.suspense") : 60113,
84 q = b ? Symbol.for("react.memo") : 60115,
85 r = b ? Symbol.for("react.lazy") : 60116;
86
87 function t(a) {
88 if ("object" === typeof a && null !== a) {
89 var u = a.$$typeof;
90
91 switch (u) {
92 case c:
93 switch (a = a.type, a) {
94 case l:
95 case m:
96 case e:
97 case g:
98 case f:
99 case p:
100 return a;
101
102 default:
103 switch (a = a && a.$$typeof, a) {
104 case k:
105 case n:
106 case h:
107 return a;
108
109 default:
110 return u;
111 }
112
113 }
114
115 case r:
116 case q:
117 case d:
118 return u;
119 }
120 }
121 }
122
123 function v(a) {
124 return t(a) === m;
125 }
126
127 exports.typeOf = t;
128 exports.AsyncMode = l;
129 exports.ConcurrentMode = m;
130 exports.ContextConsumer = k;
131 exports.ContextProvider = h;
132 exports.Element = c;
133 exports.ForwardRef = n;
134 exports.Fragment = e;
135 exports.Lazy = r;
136 exports.Memo = q;
137 exports.Portal = d;
138 exports.Profiler = g;
139 exports.StrictMode = f;
140 exports.Suspense = p;
141
142 exports.isValidElementType = function (a) {
143 return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || "object" === typeof a && null !== a && (a.$$typeof === r || a.$$typeof === q || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n);
144 };
145
146 exports.isAsyncMode = function (a) {
147 return v(a) || t(a) === l;
148 };
149
150 exports.isConcurrentMode = v;
151
152 exports.isContextConsumer = function (a) {
153 return t(a) === k;
154 };
155
156 exports.isContextProvider = function (a) {
157 return t(a) === h;
158 };
159
160 exports.isElement = function (a) {
161 return "object" === typeof a && null !== a && a.$$typeof === c;
162 };
163
164 exports.isForwardRef = function (a) {
165 return t(a) === n;
166 };
167
168 exports.isFragment = function (a) {
169 return t(a) === e;
170 };
171
172 exports.isLazy = function (a) {
173 return t(a) === r;
174 };
175
176 exports.isMemo = function (a) {
177 return t(a) === q;
178 };
179
180 exports.isPortal = function (a) {
181 return t(a) === d;
182 };
183
184 exports.isProfiler = function (a) {
185 return t(a) === g;
186 };
187
188 exports.isStrictMode = function (a) {
189 return t(a) === f;
190 };
191
192 exports.isSuspense = function (a) {
193 return t(a) === p;
194 };
195 });
196 unwrapExports(reactIs_production_min);
197 var reactIs_production_min_1 = reactIs_production_min.typeOf;
198 var reactIs_production_min_2 = reactIs_production_min.AsyncMode;
199 var reactIs_production_min_3 = reactIs_production_min.ConcurrentMode;
200 var reactIs_production_min_4 = reactIs_production_min.ContextConsumer;
201 var reactIs_production_min_5 = reactIs_production_min.ContextProvider;
202 var reactIs_production_min_6 = reactIs_production_min.Element;
203 var reactIs_production_min_7 = reactIs_production_min.ForwardRef;
204 var reactIs_production_min_8 = reactIs_production_min.Fragment;
205 var reactIs_production_min_9 = reactIs_production_min.Lazy;
206 var reactIs_production_min_10 = reactIs_production_min.Memo;
207 var reactIs_production_min_11 = reactIs_production_min.Portal;
208 var reactIs_production_min_12 = reactIs_production_min.Profiler;
209 var reactIs_production_min_13 = reactIs_production_min.StrictMode;
210 var reactIs_production_min_14 = reactIs_production_min.Suspense;
211 var reactIs_production_min_15 = reactIs_production_min.isValidElementType;
212 var reactIs_production_min_16 = reactIs_production_min.isAsyncMode;
213 var reactIs_production_min_17 = reactIs_production_min.isConcurrentMode;
214 var reactIs_production_min_18 = reactIs_production_min.isContextConsumer;
215 var reactIs_production_min_19 = reactIs_production_min.isContextProvider;
216 var reactIs_production_min_20 = reactIs_production_min.isElement;
217 var reactIs_production_min_21 = reactIs_production_min.isForwardRef;
218 var reactIs_production_min_22 = reactIs_production_min.isFragment;
219 var reactIs_production_min_23 = reactIs_production_min.isLazy;
220 var reactIs_production_min_24 = reactIs_production_min.isMemo;
221 var reactIs_production_min_25 = reactIs_production_min.isPortal;
222 var reactIs_production_min_26 = reactIs_production_min.isProfiler;
223 var reactIs_production_min_27 = reactIs_production_min.isStrictMode;
224 var reactIs_production_min_28 = reactIs_production_min.isSuspense;
225
226 var reactIs_development = createCommonjsModule(function (module, exports) {
227 });
228 unwrapExports(reactIs_development);
229 var reactIs_development_1 = reactIs_development.typeOf;
230 var reactIs_development_2 = reactIs_development.AsyncMode;
231 var reactIs_development_3 = reactIs_development.ConcurrentMode;
232 var reactIs_development_4 = reactIs_development.ContextConsumer;
233 var reactIs_development_5 = reactIs_development.ContextProvider;
234 var reactIs_development_6 = reactIs_development.Element;
235 var reactIs_development_7 = reactIs_development.ForwardRef;
236 var reactIs_development_8 = reactIs_development.Fragment;
237 var reactIs_development_9 = reactIs_development.Lazy;
238 var reactIs_development_10 = reactIs_development.Memo;
239 var reactIs_development_11 = reactIs_development.Portal;
240 var reactIs_development_12 = reactIs_development.Profiler;
241 var reactIs_development_13 = reactIs_development.StrictMode;
242 var reactIs_development_14 = reactIs_development.Suspense;
243 var reactIs_development_15 = reactIs_development.isValidElementType;
244 var reactIs_development_16 = reactIs_development.isAsyncMode;
245 var reactIs_development_17 = reactIs_development.isConcurrentMode;
246 var reactIs_development_18 = reactIs_development.isContextConsumer;
247 var reactIs_development_19 = reactIs_development.isContextProvider;
248 var reactIs_development_20 = reactIs_development.isElement;
249 var reactIs_development_21 = reactIs_development.isForwardRef;
250 var reactIs_development_22 = reactIs_development.isFragment;
251 var reactIs_development_23 = reactIs_development.isLazy;
252 var reactIs_development_24 = reactIs_development.isMemo;
253 var reactIs_development_25 = reactIs_development.isPortal;
254 var reactIs_development_26 = reactIs_development.isProfiler;
255 var reactIs_development_27 = reactIs_development.isStrictMode;
256 var reactIs_development_28 = reactIs_development.isSuspense;
257
258 var reactIs = createCommonjsModule(function (module) {
259
260 {
261 module.exports = reactIs_production_min;
262 }
263 });
264
265 /*
266 object-assign
267 (c) Sindre Sorhus
268 @license MIT
269 */
270 /* eslint-disable no-unused-vars */
271
272 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
273 var hasOwnProperty = Object.prototype.hasOwnProperty;
274 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
275
276 function toObject(val) {
277 if (val === null || val === undefined) {
278 throw new TypeError('Object.assign cannot be called with null or undefined');
279 }
280
281 return Object(val);
282 }
283
284 function shouldUseNative() {
285 try {
286 if (!Object.assign) {
287 return false;
288 } // Detect buggy property enumeration order in older V8 versions.
289 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
290
291
292 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
293
294 test1[5] = 'de';
295
296 if (Object.getOwnPropertyNames(test1)[0] === '5') {
297 return false;
298 } // https://bugs.chromium.org/p/v8/issues/detail?id=3056
299
300
301 var test2 = {};
302
303 for (var i = 0; i < 10; i++) {
304 test2['_' + String.fromCharCode(i)] = i;
305 }
306
307 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
308 return test2[n];
309 });
310
311 if (order2.join('') !== '0123456789') {
312 return false;
313 } // https://bugs.chromium.org/p/v8/issues/detail?id=3056
314
315
316 var test3 = {};
317 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
318 test3[letter] = letter;
319 });
320
321 if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
322 return false;
323 }
324
325 return true;
326 } catch (err) {
327 // We don't expect any of the above to throw, but better to be safe.
328 return false;
329 }
330 }
331
332 var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
333 var from;
334 var to = toObject(target);
335 var symbols;
336
337 for (var s = 1; s < arguments.length; s++) {
338 from = Object(arguments[s]);
339
340 for (var key in from) {
341 if (hasOwnProperty.call(from, key)) {
342 to[key] = from[key];
343 }
344 }
345
346 if (getOwnPropertySymbols) {
347 symbols = getOwnPropertySymbols(from);
348
349 for (var i = 0; i < symbols.length; i++) {
350 if (propIsEnumerable.call(from, symbols[i])) {
351 to[symbols[i]] = from[symbols[i]];
352 }
353 }
354 }
355 }
356
357 return to;
358 };
359
360 /**
361 * Copyright (c) 2013-present, Facebook, Inc.
362 *
363 * This source code is licensed under the MIT license found in the
364 * LICENSE file in the root directory of this source tree.
365 */
366
367 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
368 var ReactPropTypesSecret_1 = ReactPropTypesSecret;
369
370 var has = Function.call.bind(Object.prototype.hasOwnProperty);
371
372 function emptyFunction() {}
373
374 function emptyFunctionWithReset() {}
375
376 emptyFunctionWithReset.resetWarningCache = emptyFunction;
377
378 var factoryWithThrowingShims = function factoryWithThrowingShims() {
379 function shim(props, propName, componentName, location, propFullName, secret) {
380 if (secret === ReactPropTypesSecret_1) {
381 // It is still safe when called from React.
382 return;
383 }
384
385 var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
386 err.name = 'Invariant Violation';
387 throw err;
388 }
389 shim.isRequired = shim;
390
391 function getShim() {
392 return shim;
393 }
394 // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
395
396 var ReactPropTypes = {
397 array: shim,
398 bool: shim,
399 func: shim,
400 number: shim,
401 object: shim,
402 string: shim,
403 symbol: shim,
404 any: shim,
405 arrayOf: getShim,
406 element: shim,
407 elementType: shim,
408 instanceOf: getShim,
409 node: shim,
410 objectOf: getShim,
411 oneOf: getShim,
412 oneOfType: getShim,
413 shape: getShim,
414 exact: getShim,
415 checkPropTypes: emptyFunctionWithReset,
416 resetWarningCache: emptyFunction
417 };
418 ReactPropTypes.PropTypes = ReactPropTypes;
419 return ReactPropTypes;
420 };
421
422 var propTypes = createCommonjsModule(function (module) {
423 /**
424 * Copyright (c) 2013-present, Facebook, Inc.
425 *
426 * This source code is licensed under the MIT license found in the
427 * LICENSE file in the root directory of this source tree.
428 */
429 {
430 // By explicitly using `prop-types` you are opting into new production behavior.
431 // http://fb.me/prop-types-in-prod
432 module.exports = factoryWithThrowingShims();
433 }
434 });
435
436 var classnames = createCommonjsModule(function (module) {
437 /*!
438 Copyright (c) 2017 Jed Watson.
439 Licensed under the MIT License (MIT), see
440 http://jedwatson.github.io/classnames
441 */
442
443 /* global define */
444 (function () {
445
446 var hasOwn = {}.hasOwnProperty;
447
448 function classNames() {
449 var classes = [];
450
451 for (var i = 0; i < arguments.length; i++) {
452 var arg = arguments[i];
453 if (!arg) continue;
454 var argType = typeof arg;
455
456 if (argType === 'string' || argType === 'number') {
457 classes.push(arg);
458 } else if (Array.isArray(arg) && arg.length) {
459 var inner = classNames.apply(null, arg);
460
461 if (inner) {
462 classes.push(inner);
463 }
464 } else if (argType === 'object') {
465 for (var key in arg) {
466 if (hasOwn.call(arg, key) && arg[key]) {
467 classes.push(key);
468 }
469 }
470 }
471 }
472
473 return classes.join(' ');
474 }
475
476 if (module.exports) {
477 classNames.default = classNames;
478 module.exports = classNames;
479 } else {
480 window.classNames = classNames;
481 }
482 })();
483 });
484
485 /**
486 * Lodash (Custom Build) <https://lodash.com/>
487 * Build: `lodash modularize exports="npm" -o ./`
488 * Copyright JS Foundation and other contributors <https://js.foundation/>
489 * Released under MIT license <https://lodash.com/license>
490 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
491 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
492 */
493
494 /** `Object#toString` result references. */
495
496 var asyncTag = '[object AsyncFunction]',
497 funcTag = '[object Function]',
498 genTag = '[object GeneratorFunction]',
499 nullTag = '[object Null]',
500 proxyTag = '[object Proxy]',
501 undefinedTag = '[object Undefined]';
502 /** Detect free variable `global` from Node.js. */
503
504 var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
505 /** Detect free variable `self`. */
506
507 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
508 /** Used as a reference to the global object. */
509
510 var root = freeGlobal || freeSelf || Function('return this')();
511 /** Used for built-in method references. */
512
513 var objectProto = Object.prototype;
514 /** Used to check objects for own properties. */
515
516 var hasOwnProperty$1 = objectProto.hasOwnProperty;
517 /**
518 * Used to resolve the
519 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
520 * of values.
521 */
522
523 var nativeObjectToString = objectProto.toString;
524 /** Built-in value references. */
525
526 var Symbol$1 = root.Symbol,
527 symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
528 /**
529 * The base implementation of `getTag` without fallbacks for buggy environments.
530 *
531 * @private
532 * @param {*} value The value to query.
533 * @returns {string} Returns the `toStringTag`.
534 */
535
536 function baseGetTag(value) {
537 if (value == null) {
538 return value === undefined ? undefinedTag : nullTag;
539 }
540
541 return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
542 }
543 /**
544 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
545 *
546 * @private
547 * @param {*} value The value to query.
548 * @returns {string} Returns the raw `toStringTag`.
549 */
550
551
552 function getRawTag(value) {
553 var isOwn = hasOwnProperty$1.call(value, symToStringTag),
554 tag = value[symToStringTag];
555
556 try {
557 value[symToStringTag] = undefined;
558 var unmasked = true;
559 } catch (e) {}
560
561 var result = nativeObjectToString.call(value);
562
563 if (unmasked) {
564 if (isOwn) {
565 value[symToStringTag] = tag;
566 } else {
567 delete value[symToStringTag];
568 }
569 }
570
571 return result;
572 }
573 /**
574 * Converts `value` to a string using `Object.prototype.toString`.
575 *
576 * @private
577 * @param {*} value The value to convert.
578 * @returns {string} Returns the converted string.
579 */
580
581
582 function objectToString(value) {
583 return nativeObjectToString.call(value);
584 }
585 /**
586 * Checks if `value` is classified as a `Function` object.
587 *
588 * @static
589 * @memberOf _
590 * @since 0.1.0
591 * @category Lang
592 * @param {*} value The value to check.
593 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
594 * @example
595 *
596 * _.isFunction(_);
597 * // => true
598 *
599 * _.isFunction(/abc/);
600 * // => false
601 */
602
603
604 function isFunction(value) {
605 if (!isObject(value)) {
606 return false;
607 } // The use of `Object#toString` avoids issues with the `typeof` operator
608 // in Safari 9 which returns 'object' for typed arrays and other constructors.
609
610
611 var tag = baseGetTag(value);
612 return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
613 }
614 /**
615 * Checks if `value` is the
616 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
617 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
618 *
619 * @static
620 * @memberOf _
621 * @since 0.1.0
622 * @category Lang
623 * @param {*} value The value to check.
624 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
625 * @example
626 *
627 * _.isObject({});
628 * // => true
629 *
630 * _.isObject([1, 2, 3]);
631 * // => true
632 *
633 * _.isObject(_.noop);
634 * // => true
635 *
636 * _.isObject(null);
637 * // => false
638 */
639
640
641 function isObject(value) {
642 var type = typeof value;
643 return value != null && (type == 'object' || type == 'function');
644 }
645
646 var lodash_isfunction = isFunction;
647
648 function getScrollbarWidth() {
649 var scrollDiv = document.createElement('div'); // .modal-scrollbar-measure styles // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/scss/_modal.scss#L106-L113
650
651 scrollDiv.style.position = 'absolute';
652 scrollDiv.style.top = '-9999px';
653 scrollDiv.style.width = '50px';
654 scrollDiv.style.height = '50px';
655 scrollDiv.style.overflow = 'scroll';
656 document.body.appendChild(scrollDiv);
657 var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
658 document.body.removeChild(scrollDiv);
659 return scrollbarWidth;
660 }
661 function setScrollbarWidth(padding) {
662 document.body.style.paddingRight = padding > 0 ? padding + "px" : null;
663 }
664 function isBodyOverflowing() {
665 return document.body.clientWidth < window.innerWidth;
666 }
667 function getOriginalBodyPadding() {
668 var style = window.getComputedStyle(document.body, null);
669 return parseInt(style && style.getPropertyValue('padding-right') || 0, 10);
670 }
671 function conditionallyUpdateScrollbar() {
672 var scrollbarWidth = getScrollbarWidth(); // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.6/js/src/modal.js#L433
673
674 var fixedContent = document.querySelectorAll('.fixed-top, .fixed-bottom, .is-fixed, .sticky-top')[0];
675 var bodyPadding = fixedContent ? parseInt(fixedContent.style.paddingRight || 0, 10) : 0;
676
677 if (isBodyOverflowing()) {
678 setScrollbarWidth(bodyPadding + scrollbarWidth);
679 }
680 }
681 var globalCssModule;
682 function setGlobalCssModule(cssModule) {
683 globalCssModule = cssModule;
684 }
685 function mapToCssModules(className, cssModule) {
686 if (className === void 0) {
687 className = '';
688 }
689
690 if (cssModule === void 0) {
691 cssModule = globalCssModule;
692 }
693
694 if (!cssModule) return className;
695 return className.split(' ').map(function (c) {
696 return cssModule[c] || c;
697 }).join(' ');
698 }
699 /**
700 * Returns a new object with the key/value pairs from `obj` that are not in the array `omitKeys`.
701 */
702
703 function omit(obj, omitKeys) {
704 var result = {};
705 Object.keys(obj).forEach(function (key) {
706 if (omitKeys.indexOf(key) === -1) {
707 result[key] = obj[key];
708 }
709 });
710 return result;
711 }
712 /**
713 * Returns a filtered copy of an object with only the specified keys.
714 */
715
716 function pick(obj, keys) {
717 var pickKeys = Array.isArray(keys) ? keys : [keys];
718 var length = pickKeys.length;
719 var key;
720 var result = {};
721
722 while (length > 0) {
723 length -= 1;
724 key = pickKeys[length];
725 result[key] = obj[key];
726 }
727
728 return result;
729 }
730 var warned = {};
731 function warnOnce(message) {
732 if (!warned[message]) {
733 /* istanbul ignore else */
734 if (typeof console !== 'undefined') {
735 console.error(message); // eslint-disable-line no-console
736 }
737
738 warned[message] = true;
739 }
740 }
741 function deprecated(propType, explanation) {
742 return function validate(props, propName, componentName) {
743 if (props[propName] !== null && typeof props[propName] !== 'undefined') {
744 warnOnce("\"" + propName + "\" property of \"" + componentName + "\" has been deprecated.\n" + explanation);
745 }
746
747 for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
748 rest[_key - 3] = arguments[_key];
749 }
750
751 return propType.apply(void 0, [props, propName, componentName].concat(rest));
752 };
753 } // Shim Element if needed (e.g. in Node environment)
754
755 var Element = typeof window === 'object' && window.Element || function () {};
756
757 function DOMElement(props, propName, componentName) {
758 if (!(props[propName] instanceof Element)) {
759 return new Error('Invalid prop `' + propName + '` supplied to `' + componentName + '`. Expected prop to be an instance of Element. Validation failed.');
760 }
761 }
762 var targetPropType = propTypes.oneOfType([propTypes.string, propTypes.func, DOMElement, propTypes.shape({
763 current: propTypes.any
764 })]);
765 var tagPropType = propTypes.oneOfType([propTypes.func, propTypes.string, propTypes.shape({
766 $$typeof: propTypes.symbol,
767 render: propTypes.func
768 }), propTypes.arrayOf(propTypes.oneOfType([propTypes.func, propTypes.string, propTypes.shape({
769 $$typeof: propTypes.symbol,
770 render: propTypes.func
771 })]))]);
772 /* eslint key-spacing: ["error", { afterColon: true, align: "value" }] */
773 // These are all setup to match what is in the bootstrap _variables.scss
774 // https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss
775
776 var TransitionTimeouts = {
777 Fade: 150,
778 // $transition-fade
779 Collapse: 350,
780 // $transition-collapse
781 Modal: 300,
782 // $modal-transition
783 Carousel: 600 // $carousel-transition
784
785 }; // Duplicated Transition.propType keys to ensure that Reactstrap builds
786 // for distribution properly exclude these keys for nested child HTML attributes
787 // since `react-transition-group` removes propTypes in production builds.
788
789 var TransitionPropTypeKeys = ['in', 'mountOnEnter', 'unmountOnExit', 'appear', 'enter', 'exit', 'timeout', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'];
790 var TransitionStatuses = {
791 ENTERING: 'entering',
792 ENTERED: 'entered',
793 EXITING: 'exiting',
794 EXITED: 'exited'
795 };
796 var keyCodes = {
797 esc: 27,
798 space: 32,
799 enter: 13,
800 tab: 9,
801 up: 38,
802 down: 40,
803 home: 36,
804 end: 35,
805 n: 78,
806 p: 80
807 };
808 var PopperPlacements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
809 var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
810 function isReactRefObj(target) {
811 if (target && typeof target === 'object') {
812 return 'current' in target;
813 }
814
815 return false;
816 }
817 function findDOMElements(target) {
818 if (isReactRefObj(target)) {
819 return target.current;
820 }
821
822 if (lodash_isfunction(target)) {
823 return target();
824 }
825
826 if (typeof target === 'string' && canUseDOM) {
827 var selection = document.querySelectorAll(target);
828
829 if (!selection.length) {
830 selection = document.querySelectorAll("#" + target);
831 }
832
833 if (!selection.length) {
834 throw new Error("The target '" + target + "' could not be identified in the dom, tip: check spelling");
835 }
836
837 return selection;
838 }
839
840 return target;
841 }
842 function isArrayOrNodeList(els) {
843 if (els === null) {
844 return false;
845 }
846
847 return Array.isArray(els) || canUseDOM && typeof els.length === 'number';
848 }
849 function getTarget(target) {
850 var els = findDOMElements(target);
851
852 if (isArrayOrNodeList(els)) {
853 return els[0];
854 }
855
856 return els;
857 }
858 var defaultToggleEvents = ['touchstart', 'click'];
859 function addMultipleEventListeners(_els, handler, _events, useCapture) {
860 var els = _els;
861
862 if (!isArrayOrNodeList(els)) {
863 els = [els];
864 }
865
866 var events = _events;
867
868 if (typeof events === 'string') {
869 events = events.split(/\s+/);
870 }
871
872 if (!isArrayOrNodeList(els) || typeof handler !== 'function' || !Array.isArray(events)) {
873 throw new Error("\n The first argument of this function must be DOM node or an array on DOM nodes or NodeList.\n The second must be a function.\n The third is a string or an array of strings that represents DOM events\n ");
874 }
875
876 Array.prototype.forEach.call(events, function (event) {
877 Array.prototype.forEach.call(els, function (el) {
878 el.addEventListener(event, handler, useCapture);
879 });
880 });
881 return function removeEvents() {
882 Array.prototype.forEach.call(events, function (event) {
883 Array.prototype.forEach.call(els, function (el) {
884 el.removeEventListener(event, handler, useCapture);
885 });
886 });
887 };
888 }
889 var focusableElements = ['a[href]', 'area[href]', 'input:not([disabled]):not([type=hidden])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'object', 'embed', '[tabindex]:not(.modal)', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])'];
890
891 var utils = /*#__PURE__*/Object.freeze({
892 getScrollbarWidth: getScrollbarWidth,
893 setScrollbarWidth: setScrollbarWidth,
894 isBodyOverflowing: isBodyOverflowing,
895 getOriginalBodyPadding: getOriginalBodyPadding,
896 conditionallyUpdateScrollbar: conditionallyUpdateScrollbar,
897 setGlobalCssModule: setGlobalCssModule,
898 mapToCssModules: mapToCssModules,
899 omit: omit,
900 pick: pick,
901 warnOnce: warnOnce,
902 deprecated: deprecated,
903 DOMElement: DOMElement,
904 targetPropType: targetPropType,
905 tagPropType: tagPropType,
906 TransitionTimeouts: TransitionTimeouts,
907 TransitionPropTypeKeys: TransitionPropTypeKeys,
908 TransitionStatuses: TransitionStatuses,
909 keyCodes: keyCodes,
910 PopperPlacements: PopperPlacements,
911 canUseDOM: canUseDOM,
912 isReactRefObj: isReactRefObj,
913 findDOMElements: findDOMElements,
914 isArrayOrNodeList: isArrayOrNodeList,
915 getTarget: getTarget,
916 defaultToggleEvents: defaultToggleEvents,
917 addMultipleEventListeners: addMultipleEventListeners,
918 focusableElements: focusableElements
919 });
920
921 var propTypes$1 = {
922 tag: tagPropType,
923 fluid: propTypes.bool,
924 className: propTypes.string,
925 cssModule: propTypes.object
926 };
927 var defaultProps = {
928 tag: 'div'
929 };
930
931 var Container = function Container(props) {
932 var className = props.className,
933 cssModule = props.cssModule,
934 fluid = props.fluid,
935 Tag = props.tag,
936 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "fluid", "tag"]);
937
938 var classes = mapToCssModules(classnames(className, fluid ? 'container-fluid' : 'container'), cssModule);
939 return React__default.createElement(Tag, _extends({}, attributes, {
940 className: classes
941 }));
942 };
943
944 Container.propTypes = propTypes$1;
945 Container.defaultProps = defaultProps;
946
947 var propTypes$2 = {
948 tag: tagPropType,
949 noGutters: propTypes.bool,
950 className: propTypes.string,
951 cssModule: propTypes.object,
952 form: propTypes.bool
953 };
954 var defaultProps$1 = {
955 tag: 'div'
956 };
957
958 var Row = function Row(props) {
959 var className = props.className,
960 cssModule = props.cssModule,
961 noGutters = props.noGutters,
962 Tag = props.tag,
963 form = props.form,
964 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "noGutters", "tag", "form"]);
965
966 var classes = mapToCssModules(classnames(className, noGutters ? 'no-gutters' : null, form ? 'form-row' : 'row'), cssModule);
967 return React__default.createElement(Tag, _extends({}, attributes, {
968 className: classes
969 }));
970 };
971
972 Row.propTypes = propTypes$2;
973 Row.defaultProps = defaultProps$1;
974
975 /**
976 * lodash 3.0.2 (Custom Build) <https://lodash.com/>
977 * Build: `lodash modern modularize exports="npm" -o ./`
978 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
979 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
980 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
981 * Available under MIT license <https://lodash.com/license>
982 */
983
984 /**
985 * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
986 * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
987 *
988 * @static
989 * @memberOf _
990 * @category Lang
991 * @param {*} value The value to check.
992 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
993 * @example
994 *
995 * _.isObject({});
996 * // => true
997 *
998 * _.isObject([1, 2, 3]);
999 * // => true
1000 *
1001 * _.isObject(1);
1002 * // => false
1003 */
1004 function isObject$1(value) {
1005 // Avoid a V8 JIT bug in Chrome 19-20.
1006 // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
1007 var type = typeof value;
1008 return !!value && (type == 'object' || type == 'function');
1009 }
1010
1011 var lodash_isobject = isObject$1;
1012
1013 var colWidths = ['xs', 'sm', 'md', 'lg', 'xl'];
1014 var stringOrNumberProp = propTypes.oneOfType([propTypes.number, propTypes.string]);
1015 var columnProps = propTypes.oneOfType([propTypes.bool, propTypes.number, propTypes.string, propTypes.shape({
1016 size: propTypes.oneOfType([propTypes.bool, propTypes.number, propTypes.string]),
1017 order: stringOrNumberProp,
1018 offset: stringOrNumberProp
1019 })]);
1020 var propTypes$3 = {
1021 tag: tagPropType,
1022 xs: columnProps,
1023 sm: columnProps,
1024 md: columnProps,
1025 lg: columnProps,
1026 xl: columnProps,
1027 className: propTypes.string,
1028 cssModule: propTypes.object,
1029 widths: propTypes.array
1030 };
1031 var defaultProps$2 = {
1032 tag: 'div',
1033 widths: colWidths
1034 };
1035
1036 var getColumnSizeClass = function getColumnSizeClass(isXs, colWidth, colSize) {
1037 if (colSize === true || colSize === '') {
1038 return isXs ? 'col' : "col-" + colWidth;
1039 } else if (colSize === 'auto') {
1040 return isXs ? 'col-auto' : "col-" + colWidth + "-auto";
1041 }
1042
1043 return isXs ? "col-" + colSize : "col-" + colWidth + "-" + colSize;
1044 };
1045
1046 var Col = function Col(props) {
1047 var className = props.className,
1048 cssModule = props.cssModule,
1049 widths = props.widths,
1050 Tag = props.tag,
1051 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "widths", "tag"]);
1052
1053 var colClasses = [];
1054 widths.forEach(function (colWidth, i) {
1055 var columnProp = props[colWidth];
1056 delete attributes[colWidth];
1057
1058 if (!columnProp && columnProp !== '') {
1059 return;
1060 }
1061
1062 var isXs = !i;
1063
1064 if (lodash_isobject(columnProp)) {
1065 var _classNames;
1066
1067 var colSizeInterfix = isXs ? '-' : "-" + colWidth + "-";
1068 var colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);
1069 colClasses.push(mapToCssModules(classnames((_classNames = {}, _classNames[colClass] = columnProp.size || columnProp.size === '', _classNames["order" + colSizeInterfix + columnProp.order] = columnProp.order || columnProp.order === 0, _classNames["offset" + colSizeInterfix + columnProp.offset] = columnProp.offset || columnProp.offset === 0, _classNames)), cssModule));
1070 } else {
1071 var _colClass = getColumnSizeClass(isXs, colWidth, columnProp);
1072
1073 colClasses.push(_colClass);
1074 }
1075 });
1076
1077 if (!colClasses.length) {
1078 colClasses.push('col');
1079 }
1080
1081 var classes = mapToCssModules(classnames(className, colClasses), cssModule);
1082 return React__default.createElement(Tag, _extends({}, attributes, {
1083 className: classes
1084 }));
1085 };
1086
1087 Col.propTypes = propTypes$3;
1088 Col.defaultProps = defaultProps$2;
1089
1090 var propTypes$4 = {
1091 light: propTypes.bool,
1092 dark: propTypes.bool,
1093 full: propTypes.bool,
1094 fixed: propTypes.string,
1095 sticky: propTypes.string,
1096 color: propTypes.string,
1097 role: propTypes.string,
1098 tag: tagPropType,
1099 className: propTypes.string,
1100 cssModule: propTypes.object,
1101 expand: propTypes.oneOfType([propTypes.bool, propTypes.string])
1102 };
1103 var defaultProps$3 = {
1104 tag: 'nav',
1105 expand: false
1106 };
1107
1108 var getExpandClass = function getExpandClass(expand) {
1109 if (expand === false) {
1110 return false;
1111 } else if (expand === true || expand === 'xs') {
1112 return 'navbar-expand';
1113 }
1114
1115 return "navbar-expand-" + expand;
1116 };
1117
1118 var Navbar = function Navbar(props) {
1119 var _classNames;
1120
1121 var expand = props.expand,
1122 className = props.className,
1123 cssModule = props.cssModule,
1124 light = props.light,
1125 dark = props.dark,
1126 fixed = props.fixed,
1127 sticky = props.sticky,
1128 color = props.color,
1129 Tag = props.tag,
1130 attributes = _objectWithoutPropertiesLoose(props, ["expand", "className", "cssModule", "light", "dark", "fixed", "sticky", "color", "tag"]);
1131
1132 var classes = mapToCssModules(classnames(className, 'navbar', getExpandClass(expand), (_classNames = {
1133 'navbar-light': light,
1134 'navbar-dark': dark
1135 }, _classNames["bg-" + color] = color, _classNames["fixed-" + fixed] = fixed, _classNames["sticky-" + sticky] = sticky, _classNames)), cssModule);
1136 return React__default.createElement(Tag, _extends({}, attributes, {
1137 className: classes
1138 }));
1139 };
1140
1141 Navbar.propTypes = propTypes$4;
1142 Navbar.defaultProps = defaultProps$3;
1143
1144 var propTypes$5 = {
1145 tag: tagPropType,
1146 className: propTypes.string,
1147 cssModule: propTypes.object
1148 };
1149 var defaultProps$4 = {
1150 tag: 'a'
1151 };
1152
1153 var NavbarBrand = function NavbarBrand(props) {
1154 var className = props.className,
1155 cssModule = props.cssModule,
1156 Tag = props.tag,
1157 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
1158
1159 var classes = mapToCssModules(classnames(className, 'navbar-brand'), cssModule);
1160 return React__default.createElement(Tag, _extends({}, attributes, {
1161 className: classes
1162 }));
1163 };
1164
1165 NavbarBrand.propTypes = propTypes$5;
1166 NavbarBrand.defaultProps = defaultProps$4;
1167
1168 var propTypes$6 = {
1169 tag: tagPropType,
1170 type: propTypes.string,
1171 className: propTypes.string,
1172 cssModule: propTypes.object,
1173 children: propTypes.node
1174 };
1175 var defaultProps$5 = {
1176 tag: 'button',
1177 type: 'button'
1178 };
1179
1180 var NavbarToggler = function NavbarToggler(props) {
1181 var className = props.className,
1182 cssModule = props.cssModule,
1183 children = props.children,
1184 Tag = props.tag,
1185 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "children", "tag"]);
1186
1187 var classes = mapToCssModules(classnames(className, 'navbar-toggler'), cssModule);
1188 return React__default.createElement(Tag, _extends({}, attributes, {
1189 className: classes
1190 }), children || React__default.createElement("span", {
1191 className: mapToCssModules('navbar-toggler-icon', cssModule)
1192 }));
1193 };
1194
1195 NavbarToggler.propTypes = propTypes$6;
1196 NavbarToggler.defaultProps = defaultProps$5;
1197
1198 var propTypes$7 = {
1199 tabs: propTypes.bool,
1200 pills: propTypes.bool,
1201 vertical: propTypes.oneOfType([propTypes.bool, propTypes.string]),
1202 horizontal: propTypes.string,
1203 justified: propTypes.bool,
1204 fill: propTypes.bool,
1205 navbar: propTypes.bool,
1206 card: propTypes.bool,
1207 tag: tagPropType,
1208 className: propTypes.string,
1209 cssModule: propTypes.object
1210 };
1211 var defaultProps$6 = {
1212 tag: 'ul',
1213 vertical: false
1214 };
1215
1216 var getVerticalClass = function getVerticalClass(vertical) {
1217 if (vertical === false) {
1218 return false;
1219 } else if (vertical === true || vertical === 'xs') {
1220 return 'flex-column';
1221 }
1222
1223 return "flex-" + vertical + "-column";
1224 };
1225
1226 var Nav = function Nav(props) {
1227 var className = props.className,
1228 cssModule = props.cssModule,
1229 tabs = props.tabs,
1230 pills = props.pills,
1231 vertical = props.vertical,
1232 horizontal = props.horizontal,
1233 justified = props.justified,
1234 fill = props.fill,
1235 navbar = props.navbar,
1236 card = props.card,
1237 Tag = props.tag,
1238 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tabs", "pills", "vertical", "horizontal", "justified", "fill", "navbar", "card", "tag"]);
1239
1240 var classes = mapToCssModules(classnames(className, navbar ? 'navbar-nav' : 'nav', horizontal ? "justify-content-" + horizontal : false, getVerticalClass(vertical), {
1241 'nav-tabs': tabs,
1242 'card-header-tabs': card && tabs,
1243 'nav-pills': pills,
1244 'card-header-pills': card && pills,
1245 'nav-justified': justified,
1246 'nav-fill': fill
1247 }), cssModule);
1248 return React__default.createElement(Tag, _extends({}, attributes, {
1249 className: classes
1250 }));
1251 };
1252
1253 Nav.propTypes = propTypes$7;
1254 Nav.defaultProps = defaultProps$6;
1255
1256 var propTypes$8 = {
1257 tag: tagPropType,
1258 active: propTypes.bool,
1259 className: propTypes.string,
1260 cssModule: propTypes.object
1261 };
1262 var defaultProps$7 = {
1263 tag: 'li'
1264 };
1265
1266 var NavItem = function NavItem(props) {
1267 var className = props.className,
1268 cssModule = props.cssModule,
1269 active = props.active,
1270 Tag = props.tag,
1271 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "active", "tag"]);
1272
1273 var classes = mapToCssModules(classnames(className, 'nav-item', active ? 'active' : false), cssModule);
1274 return React__default.createElement(Tag, _extends({}, attributes, {
1275 className: classes
1276 }));
1277 };
1278
1279 NavItem.propTypes = propTypes$8;
1280 NavItem.defaultProps = defaultProps$7;
1281
1282 var propTypes$9 = {
1283 tag: tagPropType,
1284 innerRef: propTypes.oneOfType([propTypes.object, propTypes.func, propTypes.string]),
1285 disabled: propTypes.bool,
1286 active: propTypes.bool,
1287 className: propTypes.string,
1288 cssModule: propTypes.object,
1289 onClick: propTypes.func,
1290 href: propTypes.any
1291 };
1292 var defaultProps$8 = {
1293 tag: 'a'
1294 };
1295
1296 var NavLink =
1297 /*#__PURE__*/
1298 function (_React$Component) {
1299 _inheritsLoose(NavLink, _React$Component);
1300
1301 function NavLink(props) {
1302 var _this;
1303
1304 _this = _React$Component.call(this, props) || this;
1305 _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));
1306 return _this;
1307 }
1308
1309 var _proto = NavLink.prototype;
1310
1311 _proto.onClick = function onClick(e) {
1312 if (this.props.disabled) {
1313 e.preventDefault();
1314 return;
1315 }
1316
1317 if (this.props.href === '#') {
1318 e.preventDefault();
1319 }
1320
1321 if (this.props.onClick) {
1322 this.props.onClick(e);
1323 }
1324 };
1325
1326 _proto.render = function render() {
1327 var _this$props = this.props,
1328 className = _this$props.className,
1329 cssModule = _this$props.cssModule,
1330 active = _this$props.active,
1331 Tag = _this$props.tag,
1332 innerRef = _this$props.innerRef,
1333 attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "cssModule", "active", "tag", "innerRef"]);
1334
1335 var classes = mapToCssModules(classnames(className, 'nav-link', {
1336 disabled: attributes.disabled,
1337 active: active
1338 }), cssModule);
1339 return React__default.createElement(Tag, _extends({}, attributes, {
1340 ref: innerRef,
1341 onClick: this.onClick,
1342 className: classes
1343 }));
1344 };
1345
1346 return NavLink;
1347 }(React__default.Component);
1348
1349 NavLink.propTypes = propTypes$9;
1350 NavLink.defaultProps = defaultProps$8;
1351
1352 var propTypes$a = {
1353 tag: tagPropType,
1354 listTag: tagPropType,
1355 className: propTypes.string,
1356 listClassName: propTypes.string,
1357 cssModule: propTypes.object,
1358 children: propTypes.node,
1359 'aria-label': propTypes.string
1360 };
1361 var defaultProps$9 = {
1362 tag: 'nav',
1363 listTag: 'ol',
1364 'aria-label': 'breadcrumb'
1365 };
1366
1367 var Breadcrumb = function Breadcrumb(props) {
1368 var className = props.className,
1369 listClassName = props.listClassName,
1370 cssModule = props.cssModule,
1371 children = props.children,
1372 Tag = props.tag,
1373 ListTag = props.listTag,
1374 label = props['aria-label'],
1375 attributes = _objectWithoutPropertiesLoose(props, ["className", "listClassName", "cssModule", "children", "tag", "listTag", "aria-label"]);
1376
1377 var classes = mapToCssModules(classnames(className), cssModule);
1378 var listClasses = mapToCssModules(classnames('breadcrumb', listClassName), cssModule);
1379 return React__default.createElement(Tag, _extends({}, attributes, {
1380 className: classes,
1381 "aria-label": label
1382 }), React__default.createElement(ListTag, {
1383 className: listClasses
1384 }, children));
1385 };
1386
1387 Breadcrumb.propTypes = propTypes$a;
1388 Breadcrumb.defaultProps = defaultProps$9;
1389
1390 var propTypes$b = {
1391 tag: tagPropType,
1392 active: propTypes.bool,
1393 className: propTypes.string,
1394 cssModule: propTypes.object
1395 };
1396 var defaultProps$a = {
1397 tag: 'li'
1398 };
1399
1400 var BreadcrumbItem = function BreadcrumbItem(props) {
1401 var className = props.className,
1402 cssModule = props.cssModule,
1403 active = props.active,
1404 Tag = props.tag,
1405 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "active", "tag"]);
1406
1407 var classes = mapToCssModules(classnames(className, active ? 'active' : false, 'breadcrumb-item'), cssModule);
1408 return React__default.createElement(Tag, _extends({}, attributes, {
1409 className: classes,
1410 "aria-current": active ? 'page' : undefined
1411 }));
1412 };
1413
1414 BreadcrumbItem.propTypes = propTypes$b;
1415 BreadcrumbItem.defaultProps = defaultProps$a;
1416
1417 var propTypes$c = {
1418 active: propTypes.bool,
1419 'aria-label': propTypes.string,
1420 block: propTypes.bool,
1421 color: propTypes.string,
1422 disabled: propTypes.bool,
1423 outline: propTypes.bool,
1424 tag: tagPropType,
1425 innerRef: propTypes.oneOfType([propTypes.object, propTypes.func, propTypes.string]),
1426 onClick: propTypes.func,
1427 size: propTypes.string,
1428 children: propTypes.node,
1429 className: propTypes.string,
1430 cssModule: propTypes.object,
1431 close: propTypes.bool
1432 };
1433 var defaultProps$b = {
1434 color: 'secondary',
1435 tag: 'button'
1436 };
1437
1438 var Button =
1439 /*#__PURE__*/
1440 function (_React$Component) {
1441 _inheritsLoose(Button, _React$Component);
1442
1443 function Button(props) {
1444 var _this;
1445
1446 _this = _React$Component.call(this, props) || this;
1447 _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));
1448 return _this;
1449 }
1450
1451 var _proto = Button.prototype;
1452
1453 _proto.onClick = function onClick(e) {
1454 if (this.props.disabled) {
1455 e.preventDefault();
1456 return;
1457 }
1458
1459 if (this.props.onClick) {
1460 this.props.onClick(e);
1461 }
1462 };
1463
1464 _proto.render = function render() {
1465 var _this$props = this.props,
1466 active = _this$props.active,
1467 ariaLabel = _this$props['aria-label'],
1468 block = _this$props.block,
1469 className = _this$props.className,
1470 close = _this$props.close,
1471 cssModule = _this$props.cssModule,
1472 color = _this$props.color,
1473 outline = _this$props.outline,
1474 size = _this$props.size,
1475 Tag = _this$props.tag,
1476 innerRef = _this$props.innerRef,
1477 attributes = _objectWithoutPropertiesLoose(_this$props, ["active", "aria-label", "block", "className", "close", "cssModule", "color", "outline", "size", "tag", "innerRef"]);
1478
1479 if (close && typeof attributes.children === 'undefined') {
1480 attributes.children = React__default.createElement("span", {
1481 "aria-hidden": true
1482 }, "\xD7");
1483 }
1484
1485 var btnOutlineColor = "btn" + (outline ? '-outline' : '') + "-" + color;
1486 var classes = mapToCssModules(classnames(className, {
1487 close: close
1488 }, close || 'btn', close || btnOutlineColor, size ? "btn-" + size : false, block ? 'btn-block' : false, {
1489 active: active,
1490 disabled: this.props.disabled
1491 }), cssModule);
1492
1493 if (attributes.href && Tag === 'button') {
1494 Tag = 'a';
1495 }
1496
1497 var defaultAriaLabel = close ? 'Close' : null;
1498 return React__default.createElement(Tag, _extends({
1499 type: Tag === 'button' && attributes.onClick ? 'button' : undefined
1500 }, attributes, {
1501 className: classes,
1502 ref: innerRef,
1503 onClick: this.onClick,
1504 "aria-label": ariaLabel || defaultAriaLabel
1505 }));
1506 };
1507
1508 return Button;
1509 }(React__default.Component);
1510
1511 Button.propTypes = propTypes$c;
1512 Button.defaultProps = defaultProps$b;
1513
1514 /**
1515 * DropdownContext
1516 * {
1517 * toggle: PropTypes.func.isRequired,
1518 * isOpen: PropTypes.bool.isRequired,
1519 * direction: PropTypes.oneOf(['up', 'down', 'left', 'right']).isRequired,
1520 * inNavbar: PropTypes.bool.isRequired,
1521 * }
1522 */
1523
1524 var DropdownContext = React__default.createContext({});
1525
1526 var propTypes$d = {
1527 disabled: propTypes.bool,
1528 direction: propTypes.oneOf(['up', 'down', 'left', 'right']),
1529 group: propTypes.bool,
1530 isOpen: propTypes.bool,
1531 nav: propTypes.bool,
1532 active: propTypes.bool,
1533 addonType: propTypes.oneOfType([propTypes.bool, propTypes.oneOf(['prepend', 'append'])]),
1534 size: propTypes.string,
1535 tag: tagPropType,
1536 toggle: propTypes.func,
1537 children: propTypes.node,
1538 className: propTypes.string,
1539 cssModule: propTypes.object,
1540 inNavbar: propTypes.bool,
1541 setActiveFromChild: propTypes.bool
1542 };
1543 var defaultProps$c = {
1544 isOpen: false,
1545 direction: 'down',
1546 nav: false,
1547 active: false,
1548 addonType: false,
1549 inNavbar: false,
1550 setActiveFromChild: false
1551 };
1552
1553 var Dropdown =
1554 /*#__PURE__*/
1555 function (_React$Component) {
1556 _inheritsLoose(Dropdown, _React$Component);
1557
1558 function Dropdown(props) {
1559 var _this;
1560
1561 _this = _React$Component.call(this, props) || this;
1562 _this.addEvents = _this.addEvents.bind(_assertThisInitialized(_this));
1563 _this.handleDocumentClick = _this.handleDocumentClick.bind(_assertThisInitialized(_this));
1564 _this.handleKeyDown = _this.handleKeyDown.bind(_assertThisInitialized(_this));
1565 _this.removeEvents = _this.removeEvents.bind(_assertThisInitialized(_this));
1566 _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));
1567 _this.containerRef = React__default.createRef();
1568 return _this;
1569 }
1570
1571 var _proto = Dropdown.prototype;
1572
1573 _proto.getContextValue = function getContextValue() {
1574 return {
1575 toggle: this.props.toggle,
1576 isOpen: this.props.isOpen,
1577 direction: this.props.direction === 'down' && this.props.dropup ? 'up' : this.props.direction,
1578 inNavbar: this.props.inNavbar
1579 };
1580 };
1581
1582 _proto.componentDidMount = function componentDidMount() {
1583 this.handleProps();
1584 };
1585
1586 _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
1587 if (this.props.isOpen !== prevProps.isOpen) {
1588 this.handleProps();
1589 }
1590 };
1591
1592 _proto.componentWillUnmount = function componentWillUnmount() {
1593 this.removeEvents();
1594 };
1595
1596 _proto.getContainer = function getContainer() {
1597 return this.containerRef.current;
1598 };
1599
1600 _proto.getMenuCtrl = function getMenuCtrl() {
1601 if (this._$menuCtrl) return this._$menuCtrl;
1602 this._$menuCtrl = this.getContainer().querySelector('[aria-expanded]');
1603 return this._$menuCtrl;
1604 };
1605
1606 _proto.getMenuItems = function getMenuItems() {
1607 return [].slice.call(this.getContainer().querySelectorAll('[role="menuitem"]'));
1608 };
1609
1610 _proto.addEvents = function addEvents() {
1611 var _this2 = this;
1612
1613 ['click', 'touchstart', 'keyup'].forEach(function (event) {
1614 return document.addEventListener(event, _this2.handleDocumentClick, true);
1615 });
1616 };
1617
1618 _proto.removeEvents = function removeEvents() {
1619 var _this3 = this;
1620
1621 ['click', 'touchstart', 'keyup'].forEach(function (event) {
1622 return document.removeEventListener(event, _this3.handleDocumentClick, true);
1623 });
1624 };
1625
1626 _proto.handleDocumentClick = function handleDocumentClick(e) {
1627 if (e && (e.which === 3 || e.type === 'keyup' && e.which !== keyCodes.tab)) return;
1628 var container = this.getContainer();
1629
1630 if (container.contains(e.target) && container !== e.target && (e.type !== 'keyup' || e.which === keyCodes.tab)) {
1631 return;
1632 }
1633
1634 this.toggle(e);
1635 };
1636
1637 _proto.handleKeyDown = function handleKeyDown(e) {
1638 var _this4 = this;
1639
1640 if (/input|textarea/i.test(e.target.tagName) || keyCodes.tab === e.which && e.target.getAttribute('role') !== 'menuitem') {
1641 return;
1642 }
1643
1644 e.preventDefault();
1645 if (this.props.disabled) return;
1646
1647 if (this.getMenuCtrl() === e.target) {
1648 if (!this.props.isOpen && [keyCodes.space, keyCodes.enter, keyCodes.up, keyCodes.down].indexOf(e.which) > -1) {
1649 this.toggle(e);
1650 setTimeout(function () {
1651 return _this4.getMenuItems()[0].focus();
1652 });
1653 }
1654 }
1655
1656 if (this.props.isOpen && e.target.getAttribute('role') === 'menuitem') {
1657 if ([keyCodes.tab, keyCodes.esc].indexOf(e.which) > -1) {
1658 this.toggle(e);
1659 this.getMenuCtrl().focus();
1660 } else if ([keyCodes.space, keyCodes.enter].indexOf(e.which) > -1) {
1661 e.target.click();
1662 this.getMenuCtrl().focus();
1663 } else if ([keyCodes.down, keyCodes.up].indexOf(e.which) > -1 || [keyCodes.n, keyCodes.p].indexOf(e.which) > -1 && e.ctrlKey) {
1664 var $menuitems = this.getMenuItems();
1665 var index = $menuitems.indexOf(e.target);
1666
1667 if (keyCodes.up === e.which || keyCodes.p === e.which && e.ctrlKey) {
1668 index = index !== 0 ? index - 1 : $menuitems.length - 1;
1669 } else if (keyCodes.down === e.which || keyCodes.n === e.which && e.ctrlKey) {
1670 index = index === $menuitems.length - 1 ? 0 : index + 1;
1671 }
1672
1673 $menuitems[index].focus();
1674 } else if (keyCodes.end === e.which) {
1675 var _$menuitems = this.getMenuItems();
1676
1677 _$menuitems[_$menuitems.length - 1].focus();
1678 } else if (keyCodes.home === e.which) {
1679 var _$menuitems2 = this.getMenuItems();
1680
1681 _$menuitems2[0].focus();
1682 } else if (e.which >= 48 && e.which <= 90) {
1683 var _$menuitems3 = this.getMenuItems();
1684
1685 var charPressed = String.fromCharCode(e.which).toLowerCase();
1686
1687 for (var i = 0; i < _$menuitems3.length; i += 1) {
1688 var firstLetter = _$menuitems3[i].textContent && _$menuitems3[i].textContent[0].toLowerCase();
1689
1690 if (firstLetter === charPressed) {
1691 _$menuitems3[i].focus();
1692
1693 break;
1694 }
1695 }
1696 }
1697 }
1698 };
1699
1700 _proto.handleProps = function handleProps() {
1701 if (this.props.isOpen) {
1702 this.addEvents();
1703 } else {
1704 this.removeEvents();
1705 }
1706 };
1707
1708 _proto.toggle = function toggle(e) {
1709 if (this.props.disabled) {
1710 return e && e.preventDefault();
1711 }
1712
1713 return this.props.toggle(e);
1714 };
1715
1716 _proto.render = function render() {
1717 var _classNames, _ref;
1718
1719 var _omit = omit(this.props, ['toggle', 'disabled', 'inNavbar']),
1720 className = _omit.className,
1721 cssModule = _omit.cssModule,
1722 direction = _omit.direction,
1723 isOpen = _omit.isOpen,
1724 group = _omit.group,
1725 size = _omit.size,
1726 nav = _omit.nav,
1727 setActiveFromChild = _omit.setActiveFromChild,
1728 active = _omit.active,
1729 addonType = _omit.addonType,
1730 tag = _omit.tag,
1731 attrs = _objectWithoutPropertiesLoose(_omit, ["className", "cssModule", "direction", "isOpen", "group", "size", "nav", "setActiveFromChild", "active", "addonType", "tag"]);
1732
1733 var Tag = tag || (nav ? 'li' : 'div');
1734 var subItemIsActive = false;
1735
1736 if (setActiveFromChild) {
1737 React__default.Children.map(this.props.children[1].props.children, function (dropdownItem) {
1738 if (dropdownItem && dropdownItem.props.active) subItemIsActive = true;
1739 });
1740 }
1741
1742 var classes = mapToCssModules(classnames(className, direction !== 'down' && "drop" + direction, nav && active ? 'active' : false, setActiveFromChild && subItemIsActive ? 'active' : false, (_classNames = {}, _classNames["input-group-" + addonType] = addonType, _classNames['btn-group'] = group, _classNames["btn-group-" + size] = !!size, _classNames.dropdown = !group && !addonType, _classNames.show = isOpen, _classNames['nav-item'] = nav, _classNames)), cssModule);
1743 return React__default.createElement(DropdownContext.Provider, {
1744 value: this.getContextValue()
1745 }, React__default.createElement(reactPopper.Manager, null, React__default.createElement(Tag, _extends({}, attrs, (_ref = {}, _ref[typeof Tag === 'string' ? 'ref' : 'innerRef'] = this.containerRef, _ref), {
1746 onKeyDown: this.handleKeyDown,
1747 className: classes
1748 }))));
1749 };
1750
1751 return Dropdown;
1752 }(React__default.Component);
1753
1754 Dropdown.propTypes = propTypes$d;
1755 Dropdown.defaultProps = defaultProps$c;
1756
1757 var propTypes$e = {
1758 children: propTypes.node
1759 };
1760
1761 var ButtonDropdown = function ButtonDropdown(props) {
1762 return React__default.createElement(Dropdown, _extends({
1763 group: true
1764 }, props));
1765 };
1766
1767 ButtonDropdown.propTypes = propTypes$e;
1768
1769 var propTypes$f = {
1770 tag: tagPropType,
1771 'aria-label': propTypes.string,
1772 className: propTypes.string,
1773 cssModule: propTypes.object,
1774 role: propTypes.string,
1775 size: propTypes.string,
1776 vertical: propTypes.bool
1777 };
1778 var defaultProps$d = {
1779 tag: 'div',
1780 role: 'group'
1781 };
1782
1783 var ButtonGroup = function ButtonGroup(props) {
1784 var className = props.className,
1785 cssModule = props.cssModule,
1786 size = props.size,
1787 vertical = props.vertical,
1788 Tag = props.tag,
1789 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "size", "vertical", "tag"]);
1790
1791 var classes = mapToCssModules(classnames(className, size ? 'btn-group-' + size : false, vertical ? 'btn-group-vertical' : 'btn-group'), cssModule);
1792 return React__default.createElement(Tag, _extends({}, attributes, {
1793 className: classes
1794 }));
1795 };
1796
1797 ButtonGroup.propTypes = propTypes$f;
1798 ButtonGroup.defaultProps = defaultProps$d;
1799
1800 var propTypes$g = {
1801 tag: tagPropType,
1802 'aria-label': propTypes.string,
1803 className: propTypes.string,
1804 cssModule: propTypes.object,
1805 role: propTypes.string
1806 };
1807 var defaultProps$e = {
1808 tag: 'div',
1809 role: 'toolbar'
1810 };
1811
1812 var ButtonToolbar = function ButtonToolbar(props) {
1813 var className = props.className,
1814 cssModule = props.cssModule,
1815 Tag = props.tag,
1816 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
1817
1818 var classes = mapToCssModules(classnames(className, 'btn-toolbar'), cssModule);
1819 return React__default.createElement(Tag, _extends({}, attributes, {
1820 className: classes
1821 }));
1822 };
1823
1824 ButtonToolbar.propTypes = propTypes$g;
1825 ButtonToolbar.defaultProps = defaultProps$e;
1826
1827 var propTypes$h = {
1828 children: propTypes.node,
1829 active: propTypes.bool,
1830 disabled: propTypes.bool,
1831 divider: propTypes.bool,
1832 tag: tagPropType,
1833 header: propTypes.bool,
1834 onClick: propTypes.func,
1835 className: propTypes.string,
1836 cssModule: propTypes.object,
1837 toggle: propTypes.bool
1838 };
1839 var defaultProps$f = {
1840 tag: 'button',
1841 toggle: true
1842 };
1843
1844 var DropdownItem =
1845 /*#__PURE__*/
1846 function (_React$Component) {
1847 _inheritsLoose(DropdownItem, _React$Component);
1848
1849 function DropdownItem(props) {
1850 var _this;
1851
1852 _this = _React$Component.call(this, props) || this;
1853 _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));
1854 _this.getTabIndex = _this.getTabIndex.bind(_assertThisInitialized(_this));
1855 return _this;
1856 }
1857
1858 var _proto = DropdownItem.prototype;
1859
1860 _proto.onClick = function onClick(e) {
1861 if (this.props.disabled || this.props.header || this.props.divider) {
1862 e.preventDefault();
1863 return;
1864 }
1865
1866 if (this.props.onClick) {
1867 this.props.onClick(e);
1868 }
1869
1870 if (this.props.toggle) {
1871 this.context.toggle(e);
1872 }
1873 };
1874
1875 _proto.getTabIndex = function getTabIndex() {
1876 if (this.props.disabled || this.props.header || this.props.divider) {
1877 return '-1';
1878 }
1879
1880 return '0';
1881 };
1882
1883 _proto.render = function render() {
1884 var tabIndex = this.getTabIndex();
1885 var role = tabIndex > -1 ? 'menuitem' : undefined;
1886
1887 var _omit = omit(this.props, ['toggle']),
1888 className = _omit.className,
1889 cssModule = _omit.cssModule,
1890 divider = _omit.divider,
1891 Tag = _omit.tag,
1892 header = _omit.header,
1893 active = _omit.active,
1894 props = _objectWithoutPropertiesLoose(_omit, ["className", "cssModule", "divider", "tag", "header", "active"]);
1895
1896 var classes = mapToCssModules(classnames(className, {
1897 disabled: props.disabled,
1898 'dropdown-item': !divider && !header,
1899 active: active,
1900 'dropdown-header': header,
1901 'dropdown-divider': divider
1902 }), cssModule);
1903
1904 if (Tag === 'button') {
1905 if (header) {
1906 Tag = 'h6';
1907 } else if (divider) {
1908 Tag = 'div';
1909 } else if (props.href) {
1910 Tag = 'a';
1911 }
1912 }
1913
1914 return React__default.createElement(Tag, _extends({
1915 type: Tag === 'button' && (props.onClick || this.props.toggle) ? 'button' : undefined
1916 }, props, {
1917 tabIndex: tabIndex,
1918 role: role,
1919 className: classes,
1920 onClick: this.onClick
1921 }));
1922 };
1923
1924 return DropdownItem;
1925 }(React__default.Component);
1926
1927 DropdownItem.propTypes = propTypes$h;
1928 DropdownItem.defaultProps = defaultProps$f;
1929 DropdownItem.contextType = DropdownContext;
1930
1931 var propTypes$i = {
1932 tag: tagPropType,
1933 children: propTypes.node.isRequired,
1934 right: propTypes.bool,
1935 flip: propTypes.bool,
1936 modifiers: propTypes.object,
1937 className: propTypes.string,
1938 cssModule: propTypes.object,
1939 persist: propTypes.bool,
1940 positionFixed: propTypes.bool
1941 };
1942 var defaultProps$g = {
1943 tag: 'div',
1944 flip: true
1945 };
1946 var noFlipModifier = {
1947 flip: {
1948 enabled: false
1949 }
1950 };
1951 var directionPositionMap = {
1952 up: 'top',
1953 left: 'left',
1954 right: 'right',
1955 down: 'bottom'
1956 };
1957
1958 var DropdownMenu =
1959 /*#__PURE__*/
1960 function (_React$Component) {
1961 _inheritsLoose(DropdownMenu, _React$Component);
1962
1963 function DropdownMenu() {
1964 return _React$Component.apply(this, arguments) || this;
1965 }
1966
1967 var _proto = DropdownMenu.prototype;
1968
1969 _proto.render = function render() {
1970 var _this = this;
1971
1972 var _this$props = this.props,
1973 className = _this$props.className,
1974 cssModule = _this$props.cssModule,
1975 right = _this$props.right,
1976 tag = _this$props.tag,
1977 flip = _this$props.flip,
1978 modifiers = _this$props.modifiers,
1979 persist = _this$props.persist,
1980 positionFixed = _this$props.positionFixed,
1981 attrs = _objectWithoutPropertiesLoose(_this$props, ["className", "cssModule", "right", "tag", "flip", "modifiers", "persist", "positionFixed"]);
1982
1983 var classes = mapToCssModules(classnames(className, 'dropdown-menu', {
1984 'dropdown-menu-right': right,
1985 show: this.context.isOpen
1986 }), cssModule);
1987 var Tag = tag;
1988
1989 if (persist || this.context.isOpen && !this.context.inNavbar) {
1990 var position1 = directionPositionMap[this.context.direction] || 'bottom';
1991 var position2 = right ? 'end' : 'start';
1992 var poperPlacement = position1 + "-" + position2;
1993 var poperModifiers = !flip ? _extends({}, modifiers, noFlipModifier) : modifiers;
1994 var popperPositionFixed = !!positionFixed;
1995 return React__default.createElement(reactPopper.Popper, {
1996 placement: poperPlacement,
1997 modifiers: poperModifiers,
1998 positionFixed: popperPositionFixed
1999 }, function (_ref) {
2000 var ref = _ref.ref,
2001 style = _ref.style,
2002 placement = _ref.placement;
2003 return React__default.createElement(Tag, _extends({
2004 tabIndex: "-1",
2005 role: "menu",
2006 ref: ref,
2007 style: style
2008 }, attrs, {
2009 "aria-hidden": !_this.context.isOpen,
2010 className: classes,
2011 "x-placement": placement
2012 }));
2013 });
2014 }
2015
2016 return React__default.createElement(Tag, _extends({
2017 tabIndex: "-1",
2018 role: "menu"
2019 }, attrs, {
2020 "aria-hidden": !this.context.isOpen,
2021 className: classes,
2022 "x-placement": attrs.placement
2023 }));
2024 };
2025
2026 return DropdownMenu;
2027 }(React__default.Component);
2028 DropdownMenu.propTypes = propTypes$i;
2029 DropdownMenu.defaultProps = defaultProps$g;
2030 DropdownMenu.contextType = DropdownContext;
2031
2032 var propTypes$j = {
2033 caret: propTypes.bool,
2034 color: propTypes.string,
2035 children: propTypes.node,
2036 className: propTypes.string,
2037 cssModule: propTypes.object,
2038 disabled: propTypes.bool,
2039 onClick: propTypes.func,
2040 'aria-haspopup': propTypes.bool,
2041 split: propTypes.bool,
2042 tag: tagPropType,
2043 nav: propTypes.bool
2044 };
2045 var defaultProps$h = {
2046 'aria-haspopup': true,
2047 color: 'secondary'
2048 };
2049
2050 var DropdownToggle =
2051 /*#__PURE__*/
2052 function (_React$Component) {
2053 _inheritsLoose(DropdownToggle, _React$Component);
2054
2055 function DropdownToggle(props) {
2056 var _this;
2057
2058 _this = _React$Component.call(this, props) || this;
2059 _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));
2060 return _this;
2061 }
2062
2063 var _proto = DropdownToggle.prototype;
2064
2065 _proto.onClick = function onClick(e) {
2066 if (this.props.disabled) {
2067 e.preventDefault();
2068 return;
2069 }
2070
2071 if (this.props.nav && !this.props.tag) {
2072 e.preventDefault();
2073 }
2074
2075 if (this.props.onClick) {
2076 this.props.onClick(e);
2077 }
2078
2079 this.context.toggle(e);
2080 };
2081
2082 _proto.render = function render() {
2083 var _this2 = this;
2084
2085 var _this$props = this.props,
2086 className = _this$props.className,
2087 color = _this$props.color,
2088 cssModule = _this$props.cssModule,
2089 caret = _this$props.caret,
2090 split = _this$props.split,
2091 nav = _this$props.nav,
2092 tag = _this$props.tag,
2093 props = _objectWithoutPropertiesLoose(_this$props, ["className", "color", "cssModule", "caret", "split", "nav", "tag"]);
2094
2095 var ariaLabel = props['aria-label'] || 'Toggle Dropdown';
2096 var classes = mapToCssModules(classnames(className, {
2097 'dropdown-toggle': caret || split,
2098 'dropdown-toggle-split': split,
2099 'nav-link': nav
2100 }), cssModule);
2101 var children = props.children || React__default.createElement("span", {
2102 className: "sr-only"
2103 }, ariaLabel);
2104 var Tag;
2105
2106 if (nav && !tag) {
2107 Tag = 'a';
2108 props.href = '#';
2109 } else if (!tag) {
2110 Tag = Button;
2111 props.color = color;
2112 props.cssModule = cssModule;
2113 } else {
2114 Tag = tag;
2115 }
2116
2117 if (this.context.inNavbar) {
2118 return React__default.createElement(Tag, _extends({}, props, {
2119 className: classes,
2120 onClick: this.onClick,
2121 "aria-expanded": this.context.isOpen,
2122 children: children
2123 }));
2124 }
2125
2126 return React__default.createElement(reactPopper.Reference, null, function (_ref) {
2127 var _ref2;
2128
2129 var ref = _ref.ref;
2130 return React__default.createElement(Tag, _extends({}, props, (_ref2 = {}, _ref2[typeof Tag === 'string' ? 'ref' : 'innerRef'] = ref, _ref2), {
2131 className: classes,
2132 onClick: _this2.onClick,
2133 "aria-expanded": _this2.context.isOpen,
2134 children: children
2135 }));
2136 });
2137 };
2138
2139 return DropdownToggle;
2140 }(React__default.Component);
2141
2142 DropdownToggle.propTypes = propTypes$j;
2143 DropdownToggle.defaultProps = defaultProps$h;
2144 DropdownToggle.contextType = DropdownContext;
2145
2146 var interopRequireDefault = createCommonjsModule(function (module) {
2147 function _interopRequireDefault(obj) {
2148 return obj && obj.__esModule ? obj : {
2149 "default": obj
2150 };
2151 }
2152
2153 module.exports = _interopRequireDefault;
2154 });
2155 unwrapExports(interopRequireDefault);
2156
2157 var hasClass_1 = createCommonjsModule(function (module, exports) {
2158
2159 exports.__esModule = true;
2160 exports.default = hasClass;
2161
2162 function hasClass(element, className) {
2163 if (element.classList) return !!className && element.classList.contains(className);else return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
2164 }
2165
2166 module.exports = exports["default"];
2167 });
2168 unwrapExports(hasClass_1);
2169
2170 var addClass_1 = createCommonjsModule(function (module, exports) {
2171
2172 exports.__esModule = true;
2173 exports.default = addClass;
2174
2175 var _hasClass = interopRequireDefault(hasClass_1);
2176
2177 function addClass(element, className) {
2178 if (element.classList) element.classList.add(className);else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className);
2179 }
2180
2181 module.exports = exports["default"];
2182 });
2183 unwrapExports(addClass_1);
2184
2185 function replaceClassName(origClass, classToRemove) {
2186 return origClass.replace(new RegExp('(^|\\s)' + classToRemove + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
2187 }
2188
2189 var removeClass = function removeClass(element, className) {
2190 if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));
2191 };
2192
2193 /**
2194 * Copyright (c) 2013-present, Facebook, Inc.
2195 *
2196 * This source code is licensed under the MIT license found in the
2197 * LICENSE file in the root directory of this source tree.
2198 */
2199 function componentWillMount() {
2200 // Call this.constructor.gDSFP to support sub-classes.
2201 var state = this.constructor.getDerivedStateFromProps(this.props, this.state);
2202
2203 if (state !== null && state !== undefined) {
2204 this.setState(state);
2205 }
2206 }
2207
2208 function componentWillReceiveProps(nextProps) {
2209 // Call this.constructor.gDSFP to support sub-classes.
2210 // Use the setState() updater to ensure state isn't stale in certain edge cases.
2211 function updater(prevState) {
2212 var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
2213 return state !== null && state !== undefined ? state : null;
2214 } // Binding "this" is important for shallow renderer support.
2215
2216
2217 this.setState(updater.bind(this));
2218 }
2219
2220 function componentWillUpdate(nextProps, nextState) {
2221 try {
2222 var prevProps = this.props;
2223 var prevState = this.state;
2224 this.props = nextProps;
2225 this.state = nextState;
2226 this.__reactInternalSnapshotFlag = true;
2227 this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(prevProps, prevState);
2228 } finally {
2229 this.props = prevProps;
2230 this.state = prevState;
2231 }
2232 } // React may warn about cWM/cWRP/cWU methods being deprecated.
2233 // Add a flag to suppress these warnings for this special case.
2234
2235
2236 componentWillMount.__suppressDeprecationWarning = true;
2237 componentWillReceiveProps.__suppressDeprecationWarning = true;
2238 componentWillUpdate.__suppressDeprecationWarning = true;
2239
2240 function polyfill(Component) {
2241 var prototype = Component.prototype;
2242
2243 if (!prototype || !prototype.isReactComponent) {
2244 throw new Error('Can only polyfill class components');
2245 }
2246
2247 if (typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function') {
2248 return Component;
2249 } // If new component APIs are defined, "unsafe" lifecycles won't be called.
2250 // Error if any of these lifecycles are present,
2251 // Because they would work differently between older and newer (16.3+) versions of React.
2252
2253
2254 var foundWillMountName = null;
2255 var foundWillReceivePropsName = null;
2256 var foundWillUpdateName = null;
2257
2258 if (typeof prototype.componentWillMount === 'function') {
2259 foundWillMountName = 'componentWillMount';
2260 } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {
2261 foundWillMountName = 'UNSAFE_componentWillMount';
2262 }
2263
2264 if (typeof prototype.componentWillReceiveProps === 'function') {
2265 foundWillReceivePropsName = 'componentWillReceiveProps';
2266 } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {
2267 foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
2268 }
2269
2270 if (typeof prototype.componentWillUpdate === 'function') {
2271 foundWillUpdateName = 'componentWillUpdate';
2272 } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {
2273 foundWillUpdateName = 'UNSAFE_componentWillUpdate';
2274 }
2275
2276 if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
2277 var componentName = Component.displayName || Component.name;
2278 var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
2279 throw Error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks');
2280 } // React <= 16.2 does not support static getDerivedStateFromProps.
2281 // As a workaround, use cWM and cWRP to invoke the new static lifecycle.
2282 // Newer versions of React will ignore these lifecycles if gDSFP exists.
2283
2284
2285 if (typeof Component.getDerivedStateFromProps === 'function') {
2286 prototype.componentWillMount = componentWillMount;
2287 prototype.componentWillReceiveProps = componentWillReceiveProps;
2288 } // React <= 16.2 does not support getSnapshotBeforeUpdate.
2289 // As a workaround, use cWU to invoke the new lifecycle.
2290 // Newer versions of React will ignore that lifecycle if gSBU exists.
2291
2292
2293 if (typeof prototype.getSnapshotBeforeUpdate === 'function') {
2294 if (typeof prototype.componentDidUpdate !== 'function') {
2295 throw new Error('Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype');
2296 }
2297
2298 prototype.componentWillUpdate = componentWillUpdate;
2299 var componentDidUpdate = prototype.componentDidUpdate;
2300
2301 prototype.componentDidUpdate = function componentDidUpdatePolyfill(prevProps, prevState, maybeSnapshot) {
2302 // 16.3+ will not execute our will-update method;
2303 // It will pass a snapshot value to did-update though.
2304 // Older versions will require our polyfilled will-update value.
2305 // We need to handle both cases, but can't just check for the presence of "maybeSnapshot",
2306 // Because for <= 15.x versions this might be a "prevContext" object.
2307 // We also can't just check "__reactInternalSnapshot",
2308 // Because get-snapshot might return a falsy value.
2309 // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.
2310 var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot;
2311 componentDidUpdate.call(this, prevProps, prevState, snapshot);
2312 };
2313 }
2314
2315 return Component;
2316 }
2317
2318 var reactLifecyclesCompat_es = /*#__PURE__*/Object.freeze({
2319 polyfill: polyfill
2320 });
2321
2322 var PropTypes = createCommonjsModule(function (module, exports) {
2323
2324 exports.__esModule = true;
2325 exports.classNamesShape = exports.timeoutsShape = void 0;
2326
2327 var _propTypes = _interopRequireDefault(propTypes);
2328
2329 function _interopRequireDefault(obj) {
2330 return obj && obj.__esModule ? obj : {
2331 default: obj
2332 };
2333 }
2334
2335 var timeoutsShape = null;
2336 exports.timeoutsShape = timeoutsShape;
2337 var classNamesShape = null;
2338 exports.classNamesShape = classNamesShape;
2339 });
2340 unwrapExports(PropTypes);
2341 var PropTypes_1 = PropTypes.classNamesShape;
2342 var PropTypes_2 = PropTypes.timeoutsShape;
2343
2344 var Transition_1 = createCommonjsModule(function (module, exports) {
2345
2346 exports.__esModule = true;
2347 exports.default = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0;
2348
2349 var PropTypes = _interopRequireWildcard(propTypes);
2350
2351 var _react = _interopRequireDefault(React__default);
2352
2353 var _reactDom = _interopRequireDefault(ReactDOM);
2354
2355 function _interopRequireDefault(obj) {
2356 return obj && obj.__esModule ? obj : {
2357 default: obj
2358 };
2359 }
2360
2361 function _interopRequireWildcard(obj) {
2362 if (obj && obj.__esModule) {
2363 return obj;
2364 } else {
2365 var newObj = {};
2366
2367 if (obj != null) {
2368 for (var key in obj) {
2369 if (Object.prototype.hasOwnProperty.call(obj, key)) {
2370 var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
2371
2372 if (desc.get || desc.set) {
2373 Object.defineProperty(newObj, key, desc);
2374 } else {
2375 newObj[key] = obj[key];
2376 }
2377 }
2378 }
2379 }
2380
2381 newObj.default = obj;
2382 return newObj;
2383 }
2384 }
2385
2386 function _objectWithoutPropertiesLoose(source, excluded) {
2387 if (source == null) return {};
2388 var target = {};
2389 var sourceKeys = Object.keys(source);
2390 var key, i;
2391
2392 for (i = 0; i < sourceKeys.length; i++) {
2393 key = sourceKeys[i];
2394 if (excluded.indexOf(key) >= 0) continue;
2395 target[key] = source[key];
2396 }
2397
2398 return target;
2399 }
2400
2401 function _inheritsLoose(subClass, superClass) {
2402 subClass.prototype = Object.create(superClass.prototype);
2403 subClass.prototype.constructor = subClass;
2404 subClass.__proto__ = superClass;
2405 }
2406
2407 var UNMOUNTED = 'unmounted';
2408 exports.UNMOUNTED = UNMOUNTED;
2409 var EXITED = 'exited';
2410 exports.EXITED = EXITED;
2411 var ENTERING = 'entering';
2412 exports.ENTERING = ENTERING;
2413 var ENTERED = 'entered';
2414 exports.ENTERED = ENTERED;
2415 var EXITING = 'exiting';
2416 /**
2417 * The Transition component lets you describe a transition from one component
2418 * state to another _over time_ with a simple declarative API. Most commonly
2419 * it's used to animate the mounting and unmounting of a component, but can also
2420 * be used to describe in-place transition states as well.
2421 *
2422 * ---
2423 *
2424 * **Note**: `Transition` is a platform-agnostic base component. If you're using
2425 * transitions in CSS, you'll probably want to use
2426 * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
2427 * instead. It inherits all the features of `Transition`, but contains
2428 * additional features necessary to play nice with CSS transitions (hence the
2429 * name of the component).
2430 *
2431 * ---
2432 *
2433 * By default the `Transition` component does not alter the behavior of the
2434 * component it renders, it only tracks "enter" and "exit" states for the
2435 * components. It's up to you to give meaning and effect to those states. For
2436 * example we can add styles to a component when it enters or exits:
2437 *
2438 * ```jsx
2439 * import { Transition } from 'react-transition-group';
2440 *
2441 * const duration = 300;
2442 *
2443 * const defaultStyle = {
2444 * transition: `opacity ${duration}ms ease-in-out`,
2445 * opacity: 0,
2446 * }
2447 *
2448 * const transitionStyles = {
2449 * entering: { opacity: 0 },
2450 * entered: { opacity: 1 },
2451 * };
2452 *
2453 * const Fade = ({ in: inProp }) => (
2454 * <Transition in={inProp} timeout={duration}>
2455 * {state => (
2456 * <div style={{
2457 * ...defaultStyle,
2458 * ...transitionStyles[state]
2459 * }}>
2460 * I'm a fade Transition!
2461 * </div>
2462 * )}
2463 * </Transition>
2464 * );
2465 * ```
2466 *
2467 * There are 4 main states a Transition can be in:
2468 * - `'entering'`
2469 * - `'entered'`
2470 * - `'exiting'`
2471 * - `'exited'`
2472 *
2473 * Transition state is toggled via the `in` prop. When `true` the component
2474 * begins the "Enter" stage. During this stage, the component will shift from
2475 * its current transition state, to `'entering'` for the duration of the
2476 * transition and then to the `'entered'` stage once it's complete. Let's take
2477 * the following example (we'll use the
2478 * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):
2479 *
2480 * ```jsx
2481 * function App() {
2482 * const [inProp, setInProp] = useState(false);
2483 * return (
2484 * <div>
2485 * <Transition in={inProp} timeout={500}>
2486 * {state => (
2487 * // ...
2488 * )}
2489 * </Transition>
2490 * <button onClick={() => setInProp(true)}>
2491 * Click to Enter
2492 * </button>
2493 * </div>
2494 * );
2495 * }
2496 * ```
2497 *
2498 * When the button is clicked the component will shift to the `'entering'` state
2499 * and stay there for 500ms (the value of `timeout`) before it finally switches
2500 * to `'entered'`.
2501 *
2502 * When `in` is `false` the same thing happens except the state moves from
2503 * `'exiting'` to `'exited'`.
2504 */
2505
2506 exports.EXITING = EXITING;
2507
2508 var Transition =
2509 /*#__PURE__*/
2510 function (_React$Component) {
2511 _inheritsLoose(Transition, _React$Component);
2512
2513 function Transition(props, context) {
2514 var _this;
2515
2516 _this = _React$Component.call(this, props, context) || this;
2517 var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears
2518
2519 var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
2520 var initialStatus;
2521 _this.appearStatus = null;
2522
2523 if (props.in) {
2524 if (appear) {
2525 initialStatus = EXITED;
2526 _this.appearStatus = ENTERING;
2527 } else {
2528 initialStatus = ENTERED;
2529 }
2530 } else {
2531 if (props.unmountOnExit || props.mountOnEnter) {
2532 initialStatus = UNMOUNTED;
2533 } else {
2534 initialStatus = EXITED;
2535 }
2536 }
2537
2538 _this.state = {
2539 status: initialStatus
2540 };
2541 _this.nextCallback = null;
2542 return _this;
2543 }
2544
2545 var _proto = Transition.prototype;
2546
2547 _proto.getChildContext = function getChildContext() {
2548 return {
2549 transitionGroup: null // allows for nested Transitions
2550
2551 };
2552 };
2553
2554 Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
2555 var nextIn = _ref.in;
2556
2557 if (nextIn && prevState.status === UNMOUNTED) {
2558 return {
2559 status: EXITED
2560 };
2561 }
2562
2563 return null;
2564 }; // getSnapshotBeforeUpdate(prevProps) {
2565 // let nextStatus = null
2566 // if (prevProps !== this.props) {
2567 // const { status } = this.state
2568 // if (this.props.in) {
2569 // if (status !== ENTERING && status !== ENTERED) {
2570 // nextStatus = ENTERING
2571 // }
2572 // } else {
2573 // if (status === ENTERING || status === ENTERED) {
2574 // nextStatus = EXITING
2575 // }
2576 // }
2577 // }
2578 // return { nextStatus }
2579 // }
2580
2581
2582 _proto.componentDidMount = function componentDidMount() {
2583 this.updateStatus(true, this.appearStatus);
2584 };
2585
2586 _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
2587 var nextStatus = null;
2588
2589 if (prevProps !== this.props) {
2590 var status = this.state.status;
2591
2592 if (this.props.in) {
2593 if (status !== ENTERING && status !== ENTERED) {
2594 nextStatus = ENTERING;
2595 }
2596 } else {
2597 if (status === ENTERING || status === ENTERED) {
2598 nextStatus = EXITING;
2599 }
2600 }
2601 }
2602
2603 this.updateStatus(false, nextStatus);
2604 };
2605
2606 _proto.componentWillUnmount = function componentWillUnmount() {
2607 this.cancelNextCallback();
2608 };
2609
2610 _proto.getTimeouts = function getTimeouts() {
2611 var timeout = this.props.timeout;
2612 var exit, enter, appear;
2613 exit = enter = appear = timeout;
2614
2615 if (timeout != null && typeof timeout !== 'number') {
2616 exit = timeout.exit;
2617 enter = timeout.enter; // TODO: remove fallback for next major
2618
2619 appear = timeout.appear !== undefined ? timeout.appear : enter;
2620 }
2621
2622 return {
2623 exit: exit,
2624 enter: enter,
2625 appear: appear
2626 };
2627 };
2628
2629 _proto.updateStatus = function updateStatus(mounting, nextStatus) {
2630 if (mounting === void 0) {
2631 mounting = false;
2632 }
2633
2634 if (nextStatus !== null) {
2635 // nextStatus will always be ENTERING or EXITING.
2636 this.cancelNextCallback();
2637
2638 var node = _reactDom.default.findDOMNode(this);
2639
2640 if (nextStatus === ENTERING) {
2641 this.performEnter(node, mounting);
2642 } else {
2643 this.performExit(node);
2644 }
2645 } else if (this.props.unmountOnExit && this.state.status === EXITED) {
2646 this.setState({
2647 status: UNMOUNTED
2648 });
2649 }
2650 };
2651
2652 _proto.performEnter = function performEnter(node, mounting) {
2653 var _this2 = this;
2654
2655 var enter = this.props.enter;
2656 var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;
2657 var timeouts = this.getTimeouts();
2658 var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
2659 // if we are mounting and running this it means appear _must_ be set
2660
2661 if (!mounting && !enter) {
2662 this.safeSetState({
2663 status: ENTERED
2664 }, function () {
2665 _this2.props.onEntered(node);
2666 });
2667 return;
2668 }
2669
2670 this.props.onEnter(node, appearing);
2671 this.safeSetState({
2672 status: ENTERING
2673 }, function () {
2674 _this2.props.onEntering(node, appearing);
2675
2676 _this2.onTransitionEnd(node, enterTimeout, function () {
2677 _this2.safeSetState({
2678 status: ENTERED
2679 }, function () {
2680 _this2.props.onEntered(node, appearing);
2681 });
2682 });
2683 });
2684 };
2685
2686 _proto.performExit = function performExit(node) {
2687 var _this3 = this;
2688
2689 var exit = this.props.exit;
2690 var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED
2691
2692 if (!exit) {
2693 this.safeSetState({
2694 status: EXITED
2695 }, function () {
2696 _this3.props.onExited(node);
2697 });
2698 return;
2699 }
2700
2701 this.props.onExit(node);
2702 this.safeSetState({
2703 status: EXITING
2704 }, function () {
2705 _this3.props.onExiting(node);
2706
2707 _this3.onTransitionEnd(node, timeouts.exit, function () {
2708 _this3.safeSetState({
2709 status: EXITED
2710 }, function () {
2711 _this3.props.onExited(node);
2712 });
2713 });
2714 });
2715 };
2716
2717 _proto.cancelNextCallback = function cancelNextCallback() {
2718 if (this.nextCallback !== null) {
2719 this.nextCallback.cancel();
2720 this.nextCallback = null;
2721 }
2722 };
2723
2724 _proto.safeSetState = function safeSetState(nextState, callback) {
2725 // This shouldn't be necessary, but there are weird race conditions with
2726 // setState callbacks and unmounting in testing, so always make sure that
2727 // we can cancel any pending setState callbacks after we unmount.
2728 callback = this.setNextCallback(callback);
2729 this.setState(nextState, callback);
2730 };
2731
2732 _proto.setNextCallback = function setNextCallback(callback) {
2733 var _this4 = this;
2734
2735 var active = true;
2736
2737 this.nextCallback = function (event) {
2738 if (active) {
2739 active = false;
2740 _this4.nextCallback = null;
2741 callback(event);
2742 }
2743 };
2744
2745 this.nextCallback.cancel = function () {
2746 active = false;
2747 };
2748
2749 return this.nextCallback;
2750 };
2751
2752 _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {
2753 this.setNextCallback(handler);
2754 var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
2755
2756 if (!node || doesNotHaveTimeoutOrListener) {
2757 setTimeout(this.nextCallback, 0);
2758 return;
2759 }
2760
2761 if (this.props.addEndListener) {
2762 this.props.addEndListener(node, this.nextCallback);
2763 }
2764
2765 if (timeout != null) {
2766 setTimeout(this.nextCallback, timeout);
2767 }
2768 };
2769
2770 _proto.render = function render() {
2771 var status = this.state.status;
2772
2773 if (status === UNMOUNTED) {
2774 return null;
2775 }
2776
2777 var _this$props = this.props,
2778 children = _this$props.children,
2779 childProps = _objectWithoutPropertiesLoose(_this$props, ["children"]); // filter props for Transtition
2780
2781
2782 delete childProps.in;
2783 delete childProps.mountOnEnter;
2784 delete childProps.unmountOnExit;
2785 delete childProps.appear;
2786 delete childProps.enter;
2787 delete childProps.exit;
2788 delete childProps.timeout;
2789 delete childProps.addEndListener;
2790 delete childProps.onEnter;
2791 delete childProps.onEntering;
2792 delete childProps.onEntered;
2793 delete childProps.onExit;
2794 delete childProps.onExiting;
2795 delete childProps.onExited;
2796
2797 if (typeof children === 'function') {
2798 return children(status, childProps);
2799 }
2800
2801 var child = _react.default.Children.only(children);
2802
2803 return _react.default.cloneElement(child, childProps);
2804 };
2805
2806 return Transition;
2807 }(_react.default.Component);
2808
2809 Transition.contextTypes = {
2810 transitionGroup: PropTypes.object
2811 };
2812 Transition.childContextTypes = {
2813 transitionGroup: function transitionGroup() {}
2814 };
2815 Transition.propTypes = {};
2816
2817 function noop() {}
2818
2819 Transition.defaultProps = {
2820 in: false,
2821 mountOnEnter: false,
2822 unmountOnExit: false,
2823 appear: false,
2824 enter: true,
2825 exit: true,
2826 onEnter: noop,
2827 onEntering: noop,
2828 onEntered: noop,
2829 onExit: noop,
2830 onExiting: noop,
2831 onExited: noop
2832 };
2833 Transition.UNMOUNTED = 0;
2834 Transition.EXITED = 1;
2835 Transition.ENTERING = 2;
2836 Transition.ENTERED = 3;
2837 Transition.EXITING = 4;
2838
2839 var _default = (0, reactLifecyclesCompat_es.polyfill)(Transition);
2840
2841 exports.default = _default;
2842 });
2843 unwrapExports(Transition_1);
2844 var Transition_2 = Transition_1.EXITING;
2845 var Transition_3 = Transition_1.ENTERED;
2846 var Transition_4 = Transition_1.ENTERING;
2847 var Transition_5 = Transition_1.EXITED;
2848 var Transition_6 = Transition_1.UNMOUNTED;
2849
2850 var CSSTransition_1 = createCommonjsModule(function (module, exports) {
2851
2852 exports.__esModule = true;
2853 exports.default = void 0;
2854
2855 var PropTypes = _interopRequireWildcard(propTypes);
2856
2857 var _addClass = _interopRequireDefault(addClass_1);
2858
2859 var _removeClass = _interopRequireDefault(removeClass);
2860
2861 var _react = _interopRequireDefault(React__default);
2862
2863 var _Transition = _interopRequireDefault(Transition_1);
2864
2865 function _interopRequireDefault(obj) {
2866 return obj && obj.__esModule ? obj : {
2867 default: obj
2868 };
2869 }
2870
2871 function _interopRequireWildcard(obj) {
2872 if (obj && obj.__esModule) {
2873 return obj;
2874 } else {
2875 var newObj = {};
2876
2877 if (obj != null) {
2878 for (var key in obj) {
2879 if (Object.prototype.hasOwnProperty.call(obj, key)) {
2880 var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
2881
2882 if (desc.get || desc.set) {
2883 Object.defineProperty(newObj, key, desc);
2884 } else {
2885 newObj[key] = obj[key];
2886 }
2887 }
2888 }
2889 }
2890
2891 newObj.default = obj;
2892 return newObj;
2893 }
2894 }
2895
2896 function _extends() {
2897 _extends = Object.assign || function (target) {
2898 for (var i = 1; i < arguments.length; i++) {
2899 var source = arguments[i];
2900
2901 for (var key in source) {
2902 if (Object.prototype.hasOwnProperty.call(source, key)) {
2903 target[key] = source[key];
2904 }
2905 }
2906 }
2907
2908 return target;
2909 };
2910
2911 return _extends.apply(this, arguments);
2912 }
2913
2914 function _inheritsLoose(subClass, superClass) {
2915 subClass.prototype = Object.create(superClass.prototype);
2916 subClass.prototype.constructor = subClass;
2917 subClass.__proto__ = superClass;
2918 }
2919
2920 var addClass = function addClass(node, classes) {
2921 return node && classes && classes.split(' ').forEach(function (c) {
2922 return (0, _addClass.default)(node, c);
2923 });
2924 };
2925
2926 var removeClass$1 = function removeClass(node, classes) {
2927 return node && classes && classes.split(' ').forEach(function (c) {
2928 return (0, _removeClass.default)(node, c);
2929 });
2930 };
2931 /**
2932 * A transition component inspired by the excellent
2933 * [ng-animate](http://www.nganimate.org/) library, you should use it if you're
2934 * using CSS transitions or animations. It's built upon the
2935 * [`Transition`](https://reactcommunity.org/react-transition-group/transition)
2936 * component, so it inherits all of its props.
2937 *
2938 * `CSSTransition` applies a pair of class names during the `appear`, `enter`,
2939 * and `exit` states of the transition. The first class is applied and then a
2940 * second `*-active` class in order to activate the CSSS transition. After the
2941 * transition, matching `*-done` class names are applied to persist the
2942 * transition state.
2943 *
2944 * ```jsx
2945 * function App() {
2946 * const [inProp, setInProp] = useState(false);
2947 * return (
2948 * <div>
2949 * <CSSTransition in={inProp} timeout={200} classNames="my-node">
2950 * <div>
2951 * {"I'll receive my-node-* classes"}
2952 * </div>
2953 * </CSSTransition>
2954 * <button type="button" onClick={() => setInProp(true)}>
2955 * Click to Enter
2956 * </button>
2957 * </div>
2958 * );
2959 * }
2960 * ```
2961 *
2962 * When the `in` prop is set to `true`, the child component will first receive
2963 * the class `example-enter`, then the `example-enter-active` will be added in
2964 * the next tick. `CSSTransition` [forces a
2965 * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)
2966 * between before adding the `example-enter-active`. This is an important trick
2967 * because it allows us to transition between `example-enter` and
2968 * `example-enter-active` even though they were added immediately one after
2969 * another. Most notably, this is what makes it possible for us to animate
2970 * _appearance_.
2971 *
2972 * ```css
2973 * .my-node-enter {
2974 * opacity: 0;
2975 * }
2976 * .my-node-enter-active {
2977 * opacity: 1;
2978 * transition: opacity 200ms;
2979 * }
2980 * .my-node-exit {
2981 * opacity: 1;
2982 * }
2983 * .my-node-exit-active {
2984 * opacity: 0;
2985 * transition: opacity: 200ms;
2986 * }
2987 * ```
2988 *
2989 * `*-active` classes represent which styles you want to animate **to**.
2990 */
2991
2992
2993 var CSSTransition =
2994 /*#__PURE__*/
2995 function (_React$Component) {
2996 _inheritsLoose(CSSTransition, _React$Component);
2997
2998 function CSSTransition() {
2999 var _this;
3000
3001 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3002 args[_key] = arguments[_key];
3003 }
3004
3005 _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
3006
3007 _this.onEnter = function (node, appearing) {
3008 var _this$getClassNames = _this.getClassNames(appearing ? 'appear' : 'enter'),
3009 className = _this$getClassNames.className;
3010
3011 _this.removeClasses(node, 'exit');
3012
3013 addClass(node, className);
3014
3015 if (_this.props.onEnter) {
3016 _this.props.onEnter(node, appearing);
3017 }
3018 };
3019
3020 _this.onEntering = function (node, appearing) {
3021 var _this$getClassNames2 = _this.getClassNames(appearing ? 'appear' : 'enter'),
3022 activeClassName = _this$getClassNames2.activeClassName;
3023
3024 _this.reflowAndAddClass(node, activeClassName);
3025
3026 if (_this.props.onEntering) {
3027 _this.props.onEntering(node, appearing);
3028 }
3029 };
3030
3031 _this.onEntered = function (node, appearing) {
3032 var _this$getClassNames3 = _this.getClassNames('enter'),
3033 doneClassName = _this$getClassNames3.doneClassName;
3034
3035 _this.removeClasses(node, appearing ? 'appear' : 'enter');
3036
3037 addClass(node, doneClassName);
3038
3039 if (_this.props.onEntered) {
3040 _this.props.onEntered(node, appearing);
3041 }
3042 };
3043
3044 _this.onExit = function (node) {
3045 var _this$getClassNames4 = _this.getClassNames('exit'),
3046 className = _this$getClassNames4.className;
3047
3048 _this.removeClasses(node, 'appear');
3049
3050 _this.removeClasses(node, 'enter');
3051
3052 addClass(node, className);
3053
3054 if (_this.props.onExit) {
3055 _this.props.onExit(node);
3056 }
3057 };
3058
3059 _this.onExiting = function (node) {
3060 var _this$getClassNames5 = _this.getClassNames('exit'),
3061 activeClassName = _this$getClassNames5.activeClassName;
3062
3063 _this.reflowAndAddClass(node, activeClassName);
3064
3065 if (_this.props.onExiting) {
3066 _this.props.onExiting(node);
3067 }
3068 };
3069
3070 _this.onExited = function (node) {
3071 var _this$getClassNames6 = _this.getClassNames('exit'),
3072 doneClassName = _this$getClassNames6.doneClassName;
3073
3074 _this.removeClasses(node, 'exit');
3075
3076 addClass(node, doneClassName);
3077
3078 if (_this.props.onExited) {
3079 _this.props.onExited(node);
3080 }
3081 };
3082
3083 _this.getClassNames = function (type) {
3084 var classNames = _this.props.classNames;
3085 var isStringClassNames = typeof classNames === 'string';
3086 var prefix = isStringClassNames && classNames ? classNames + '-' : '';
3087 var className = isStringClassNames ? prefix + type : classNames[type];
3088 var activeClassName = isStringClassNames ? className + '-active' : classNames[type + 'Active'];
3089 var doneClassName = isStringClassNames ? className + '-done' : classNames[type + 'Done'];
3090 return {
3091 className: className,
3092 activeClassName: activeClassName,
3093 doneClassName: doneClassName
3094 };
3095 };
3096
3097 return _this;
3098 }
3099
3100 var _proto = CSSTransition.prototype;
3101
3102 _proto.removeClasses = function removeClasses(node, type) {
3103 var _this$getClassNames7 = this.getClassNames(type),
3104 className = _this$getClassNames7.className,
3105 activeClassName = _this$getClassNames7.activeClassName,
3106 doneClassName = _this$getClassNames7.doneClassName;
3107
3108 className && removeClass$1(node, className);
3109 activeClassName && removeClass$1(node, activeClassName);
3110 doneClassName && removeClass$1(node, doneClassName);
3111 };
3112
3113 _proto.reflowAndAddClass = function reflowAndAddClass(node, className) {
3114 // This is for to force a repaint,
3115 // which is necessary in order to transition styles when adding a class name.
3116 if (className) {
3117 /* eslint-disable no-unused-expressions */
3118 node && node.scrollTop;
3119 /* eslint-enable no-unused-expressions */
3120
3121 addClass(node, className);
3122 }
3123 };
3124
3125 _proto.render = function render() {
3126 var props = _extends({}, this.props);
3127
3128 delete props.classNames;
3129 return _react.default.createElement(_Transition.default, _extends({}, props, {
3130 onEnter: this.onEnter,
3131 onEntered: this.onEntered,
3132 onEntering: this.onEntering,
3133 onExit: this.onExit,
3134 onExiting: this.onExiting,
3135 onExited: this.onExited
3136 }));
3137 };
3138
3139 return CSSTransition;
3140 }(_react.default.Component);
3141
3142 CSSTransition.defaultProps = {
3143 classNames: ''
3144 };
3145 CSSTransition.propTypes = {};
3146 var _default = CSSTransition;
3147 exports.default = _default;
3148 module.exports = exports["default"];
3149 });
3150 unwrapExports(CSSTransition_1);
3151
3152 var ChildMapping = createCommonjsModule(function (module, exports) {
3153
3154 exports.__esModule = true;
3155 exports.getChildMapping = getChildMapping;
3156 exports.mergeChildMappings = mergeChildMappings;
3157 exports.getInitialChildMapping = getInitialChildMapping;
3158 exports.getNextChildMapping = getNextChildMapping;
3159 /**
3160 * Given `this.props.children`, return an object mapping key to child.
3161 *
3162 * @param {*} children `this.props.children`
3163 * @return {object} Mapping of key to child
3164 */
3165
3166 function getChildMapping(children, mapFn) {
3167 var mapper = function mapper(child) {
3168 return mapFn && (0, React__default.isValidElement)(child) ? mapFn(child) : child;
3169 };
3170
3171 var result = Object.create(null);
3172 if (children) React__default.Children.map(children, function (c) {
3173 return c;
3174 }).forEach(function (child) {
3175 // run the map function here instead so that the key is the computed one
3176 result[child.key] = mapper(child);
3177 });
3178 return result;
3179 }
3180 /**
3181 * When you're adding or removing children some may be added or removed in the
3182 * same render pass. We want to show *both* since we want to simultaneously
3183 * animate elements in and out. This function takes a previous set of keys
3184 * and a new set of keys and merges them with its best guess of the correct
3185 * ordering. In the future we may expose some of the utilities in
3186 * ReactMultiChild to make this easy, but for now React itself does not
3187 * directly have this concept of the union of prevChildren and nextChildren
3188 * so we implement it here.
3189 *
3190 * @param {object} prev prev children as returned from
3191 * `ReactTransitionChildMapping.getChildMapping()`.
3192 * @param {object} next next children as returned from
3193 * `ReactTransitionChildMapping.getChildMapping()`.
3194 * @return {object} a key set that contains all keys in `prev` and all keys
3195 * in `next` in a reasonable order.
3196 */
3197
3198
3199 function mergeChildMappings(prev, next) {
3200 prev = prev || {};
3201 next = next || {};
3202
3203 function getValueForKey(key) {
3204 return key in next ? next[key] : prev[key];
3205 } // For each key of `next`, the list of keys to insert before that key in
3206 // the combined list
3207
3208
3209 var nextKeysPending = Object.create(null);
3210 var pendingKeys = [];
3211
3212 for (var prevKey in prev) {
3213 if (prevKey in next) {
3214 if (pendingKeys.length) {
3215 nextKeysPending[prevKey] = pendingKeys;
3216 pendingKeys = [];
3217 }
3218 } else {
3219 pendingKeys.push(prevKey);
3220 }
3221 }
3222
3223 var i;
3224 var childMapping = {};
3225
3226 for (var nextKey in next) {
3227 if (nextKeysPending[nextKey]) {
3228 for (i = 0; i < nextKeysPending[nextKey].length; i++) {
3229 var pendingNextKey = nextKeysPending[nextKey][i];
3230 childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
3231 }
3232 }
3233
3234 childMapping[nextKey] = getValueForKey(nextKey);
3235 } // Finally, add the keys which didn't appear before any key in `next`
3236
3237
3238 for (i = 0; i < pendingKeys.length; i++) {
3239 childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
3240 }
3241
3242 return childMapping;
3243 }
3244
3245 function getProp(child, prop, props) {
3246 return props[prop] != null ? props[prop] : child.props[prop];
3247 }
3248
3249 function getInitialChildMapping(props, onExited) {
3250 return getChildMapping(props.children, function (child) {
3251 return (0, React__default.cloneElement)(child, {
3252 onExited: onExited.bind(null, child),
3253 in: true,
3254 appear: getProp(child, 'appear', props),
3255 enter: getProp(child, 'enter', props),
3256 exit: getProp(child, 'exit', props)
3257 });
3258 });
3259 }
3260
3261 function getNextChildMapping(nextProps, prevChildMapping, onExited) {
3262 var nextChildMapping = getChildMapping(nextProps.children);
3263 var children = mergeChildMappings(prevChildMapping, nextChildMapping);
3264 Object.keys(children).forEach(function (key) {
3265 var child = children[key];
3266 if (!(0, React__default.isValidElement)(child)) return;
3267 var hasPrev = key in prevChildMapping;
3268 var hasNext = key in nextChildMapping;
3269 var prevChild = prevChildMapping[key];
3270 var isLeaving = (0, React__default.isValidElement)(prevChild) && !prevChild.props.in; // item is new (entering)
3271
3272 if (hasNext && (!hasPrev || isLeaving)) {
3273 // console.log('entering', key)
3274 children[key] = (0, React__default.cloneElement)(child, {
3275 onExited: onExited.bind(null, child),
3276 in: true,
3277 exit: getProp(child, 'exit', nextProps),
3278 enter: getProp(child, 'enter', nextProps)
3279 });
3280 } else if (!hasNext && hasPrev && !isLeaving) {
3281 // item is old (exiting)
3282 // console.log('leaving', key)
3283 children[key] = (0, React__default.cloneElement)(child, {
3284 in: false
3285 });
3286 } else if (hasNext && hasPrev && (0, React__default.isValidElement)(prevChild)) {
3287 // item hasn't changed transition states
3288 // copy over the last transition props;
3289 // console.log('unchanged', key)
3290 children[key] = (0, React__default.cloneElement)(child, {
3291 onExited: onExited.bind(null, child),
3292 in: prevChild.props.in,
3293 exit: getProp(child, 'exit', nextProps),
3294 enter: getProp(child, 'enter', nextProps)
3295 });
3296 }
3297 });
3298 return children;
3299 }
3300 });
3301 unwrapExports(ChildMapping);
3302 var ChildMapping_1 = ChildMapping.getChildMapping;
3303 var ChildMapping_2 = ChildMapping.mergeChildMappings;
3304 var ChildMapping_3 = ChildMapping.getInitialChildMapping;
3305 var ChildMapping_4 = ChildMapping.getNextChildMapping;
3306
3307 var TransitionGroup_1 = createCommonjsModule(function (module, exports) {
3308
3309 exports.__esModule = true;
3310 exports.default = void 0;
3311
3312 var _propTypes = _interopRequireDefault(propTypes);
3313
3314 var _react = _interopRequireDefault(React__default);
3315
3316 function _interopRequireDefault(obj) {
3317 return obj && obj.__esModule ? obj : {
3318 default: obj
3319 };
3320 }
3321
3322 function _objectWithoutPropertiesLoose(source, excluded) {
3323 if (source == null) return {};
3324 var target = {};
3325 var sourceKeys = Object.keys(source);
3326 var key, i;
3327
3328 for (i = 0; i < sourceKeys.length; i++) {
3329 key = sourceKeys[i];
3330 if (excluded.indexOf(key) >= 0) continue;
3331 target[key] = source[key];
3332 }
3333
3334 return target;
3335 }
3336
3337 function _extends() {
3338 _extends = Object.assign || function (target) {
3339 for (var i = 1; i < arguments.length; i++) {
3340 var source = arguments[i];
3341
3342 for (var key in source) {
3343 if (Object.prototype.hasOwnProperty.call(source, key)) {
3344 target[key] = source[key];
3345 }
3346 }
3347 }
3348
3349 return target;
3350 };
3351
3352 return _extends.apply(this, arguments);
3353 }
3354
3355 function _inheritsLoose(subClass, superClass) {
3356 subClass.prototype = Object.create(superClass.prototype);
3357 subClass.prototype.constructor = subClass;
3358 subClass.__proto__ = superClass;
3359 }
3360
3361 function _assertThisInitialized(self) {
3362 if (self === void 0) {
3363 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
3364 }
3365
3366 return self;
3367 }
3368
3369 var values = Object.values || function (obj) {
3370 return Object.keys(obj).map(function (k) {
3371 return obj[k];
3372 });
3373 };
3374
3375 var defaultProps = {
3376 component: 'div',
3377 childFactory: function childFactory(child) {
3378 return child;
3379 }
3380 /**
3381 * The `<TransitionGroup>` component manages a set of transition components
3382 * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition
3383 * components, `<TransitionGroup>` is a state machine for managing the mounting
3384 * and unmounting of components over time.
3385 *
3386 * Consider the example below. As items are removed or added to the TodoList the
3387 * `in` prop is toggled automatically by the `<TransitionGroup>`.
3388 *
3389 * Note that `<TransitionGroup>` does not define any animation behavior!
3390 * Exactly _how_ a list item animates is up to the individual transition
3391 * component. This means you can mix and match animations across different list
3392 * items.
3393 */
3394
3395 };
3396
3397 var TransitionGroup =
3398 /*#__PURE__*/
3399 function (_React$Component) {
3400 _inheritsLoose(TransitionGroup, _React$Component);
3401
3402 function TransitionGroup(props, context) {
3403 var _this;
3404
3405 _this = _React$Component.call(this, props, context) || this;
3406
3407 var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this))); // Initial children should all be entering, dependent on appear
3408
3409
3410 _this.state = {
3411 handleExited: handleExited,
3412 firstRender: true
3413 };
3414 return _this;
3415 }
3416
3417 var _proto = TransitionGroup.prototype;
3418
3419 _proto.getChildContext = function getChildContext() {
3420 return {
3421 transitionGroup: {
3422 isMounting: !this.appeared
3423 }
3424 };
3425 };
3426
3427 _proto.componentDidMount = function componentDidMount() {
3428 this.appeared = true;
3429 this.mounted = true;
3430 };
3431
3432 _proto.componentWillUnmount = function componentWillUnmount() {
3433 this.mounted = false;
3434 };
3435
3436 TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
3437 var prevChildMapping = _ref.children,
3438 handleExited = _ref.handleExited,
3439 firstRender = _ref.firstRender;
3440 return {
3441 children: firstRender ? (0, ChildMapping.getInitialChildMapping)(nextProps, handleExited) : (0, ChildMapping.getNextChildMapping)(nextProps, prevChildMapping, handleExited),
3442 firstRender: false
3443 };
3444 };
3445
3446 _proto.handleExited = function handleExited(child, node) {
3447 var currentChildMapping = (0, ChildMapping.getChildMapping)(this.props.children);
3448 if (child.key in currentChildMapping) return;
3449
3450 if (child.props.onExited) {
3451 child.props.onExited(node);
3452 }
3453
3454 if (this.mounted) {
3455 this.setState(function (state) {
3456 var children = _extends({}, state.children);
3457
3458 delete children[child.key];
3459 return {
3460 children: children
3461 };
3462 });
3463 }
3464 };
3465
3466 _proto.render = function render() {
3467 var _this$props = this.props,
3468 Component = _this$props.component,
3469 childFactory = _this$props.childFactory,
3470 props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
3471
3472 var children = values(this.state.children).map(childFactory);
3473 delete props.appear;
3474 delete props.enter;
3475 delete props.exit;
3476
3477 if (Component === null) {
3478 return children;
3479 }
3480
3481 return _react.default.createElement(Component, props, children);
3482 };
3483
3484 return TransitionGroup;
3485 }(_react.default.Component);
3486
3487 TransitionGroup.childContextTypes = {
3488 transitionGroup: _propTypes.default.object.isRequired
3489 };
3490 TransitionGroup.propTypes = {};
3491 TransitionGroup.defaultProps = defaultProps;
3492
3493 var _default = (0, reactLifecyclesCompat_es.polyfill)(TransitionGroup);
3494
3495 exports.default = _default;
3496 module.exports = exports["default"];
3497 });
3498 unwrapExports(TransitionGroup_1);
3499
3500 var ReplaceTransition_1 = createCommonjsModule(function (module, exports) {
3501
3502 exports.__esModule = true;
3503 exports.default = void 0;
3504
3505 var _propTypes = _interopRequireDefault(propTypes);
3506
3507 var _react = _interopRequireDefault(React__default);
3508
3509 var _TransitionGroup = _interopRequireDefault(TransitionGroup_1);
3510
3511 function _interopRequireDefault(obj) {
3512 return obj && obj.__esModule ? obj : {
3513 default: obj
3514 };
3515 }
3516
3517 function _objectWithoutPropertiesLoose(source, excluded) {
3518 if (source == null) return {};
3519 var target = {};
3520 var sourceKeys = Object.keys(source);
3521 var key, i;
3522
3523 for (i = 0; i < sourceKeys.length; i++) {
3524 key = sourceKeys[i];
3525 if (excluded.indexOf(key) >= 0) continue;
3526 target[key] = source[key];
3527 }
3528
3529 return target;
3530 }
3531
3532 function _inheritsLoose(subClass, superClass) {
3533 subClass.prototype = Object.create(superClass.prototype);
3534 subClass.prototype.constructor = subClass;
3535 subClass.__proto__ = superClass;
3536 }
3537 /**
3538 * The `<ReplaceTransition>` component is a specialized `Transition` component
3539 * that animates between two children.
3540 *
3541 * ```jsx
3542 * <ReplaceTransition in>
3543 * <Fade><div>I appear first</div></Fade>
3544 * <Fade><div>I replace the above</div></Fade>
3545 * </ReplaceTransition>
3546 * ```
3547 */
3548
3549
3550 var ReplaceTransition =
3551 /*#__PURE__*/
3552 function (_React$Component) {
3553 _inheritsLoose(ReplaceTransition, _React$Component);
3554
3555 function ReplaceTransition() {
3556 var _this;
3557
3558 for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
3559 _args[_key] = arguments[_key];
3560 }
3561
3562 _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;
3563
3564 _this.handleEnter = function () {
3565 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
3566 args[_key2] = arguments[_key2];
3567 }
3568
3569 return _this.handleLifecycle('onEnter', 0, args);
3570 };
3571
3572 _this.handleEntering = function () {
3573 for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
3574 args[_key3] = arguments[_key3];
3575 }
3576
3577 return _this.handleLifecycle('onEntering', 0, args);
3578 };
3579
3580 _this.handleEntered = function () {
3581 for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
3582 args[_key4] = arguments[_key4];
3583 }
3584
3585 return _this.handleLifecycle('onEntered', 0, args);
3586 };
3587
3588 _this.handleExit = function () {
3589 for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
3590 args[_key5] = arguments[_key5];
3591 }
3592
3593 return _this.handleLifecycle('onExit', 1, args);
3594 };
3595
3596 _this.handleExiting = function () {
3597 for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
3598 args[_key6] = arguments[_key6];
3599 }
3600
3601 return _this.handleLifecycle('onExiting', 1, args);
3602 };
3603
3604 _this.handleExited = function () {
3605 for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
3606 args[_key7] = arguments[_key7];
3607 }
3608
3609 return _this.handleLifecycle('onExited', 1, args);
3610 };
3611
3612 return _this;
3613 }
3614
3615 var _proto = ReplaceTransition.prototype;
3616
3617 _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) {
3618 var _child$props;
3619
3620 var children = this.props.children;
3621
3622 var child = _react.default.Children.toArray(children)[idx];
3623
3624 if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs);
3625 if (this.props[handler]) this.props[handler]((0, ReactDOM.findDOMNode)(this));
3626 };
3627
3628 _proto.render = function render() {
3629 var _this$props = this.props,
3630 children = _this$props.children,
3631 inProp = _this$props.in,
3632 props = _objectWithoutPropertiesLoose(_this$props, ["children", "in"]);
3633
3634 var _React$Children$toArr = _react.default.Children.toArray(children),
3635 first = _React$Children$toArr[0],
3636 second = _React$Children$toArr[1];
3637
3638 delete props.onEnter;
3639 delete props.onEntering;
3640 delete props.onEntered;
3641 delete props.onExit;
3642 delete props.onExiting;
3643 delete props.onExited;
3644 return _react.default.createElement(_TransitionGroup.default, props, inProp ? _react.default.cloneElement(first, {
3645 key: 'first',
3646 onEnter: this.handleEnter,
3647 onEntering: this.handleEntering,
3648 onEntered: this.handleEntered
3649 }) : _react.default.cloneElement(second, {
3650 key: 'second',
3651 onEnter: this.handleExit,
3652 onEntering: this.handleExiting,
3653 onEntered: this.handleExited
3654 }));
3655 };
3656
3657 return ReplaceTransition;
3658 }(_react.default.Component);
3659
3660 ReplaceTransition.propTypes = {};
3661 var _default = ReplaceTransition;
3662 exports.default = _default;
3663 module.exports = exports["default"];
3664 });
3665 unwrapExports(ReplaceTransition_1);
3666
3667 var reactTransitionGroup = createCommonjsModule(function (module) {
3668
3669 var _CSSTransition = _interopRequireDefault(CSSTransition_1);
3670
3671 var _ReplaceTransition = _interopRequireDefault(ReplaceTransition_1);
3672
3673 var _TransitionGroup = _interopRequireDefault(TransitionGroup_1);
3674
3675 var _Transition = _interopRequireDefault(Transition_1);
3676
3677 function _interopRequireDefault(obj) {
3678 return obj && obj.__esModule ? obj : {
3679 default: obj
3680 };
3681 }
3682
3683 module.exports = {
3684 Transition: _Transition.default,
3685 TransitionGroup: _TransitionGroup.default,
3686 ReplaceTransition: _ReplaceTransition.default,
3687 CSSTransition: _CSSTransition.default
3688 };
3689 });
3690 unwrapExports(reactTransitionGroup);
3691 var reactTransitionGroup_1 = reactTransitionGroup.Transition;
3692 var reactTransitionGroup_2 = reactTransitionGroup.TransitionGroup;
3693 var reactTransitionGroup_3 = reactTransitionGroup.ReplaceTransition;
3694 var reactTransitionGroup_4 = reactTransitionGroup.CSSTransition;
3695
3696 var propTypes$k = _extends({}, reactTransitionGroup_1.propTypes, {
3697 children: propTypes.oneOfType([propTypes.arrayOf(propTypes.node), propTypes.node]),
3698 tag: tagPropType,
3699 baseClass: propTypes.string,
3700 baseClassActive: propTypes.string,
3701 className: propTypes.string,
3702 cssModule: propTypes.object,
3703 innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func])
3704 });
3705
3706 var defaultProps$i = _extends({}, reactTransitionGroup_1.defaultProps, {
3707 tag: 'div',
3708 baseClass: 'fade',
3709 baseClassActive: 'show',
3710 timeout: TransitionTimeouts.Fade,
3711 appear: true,
3712 enter: true,
3713 exit: true,
3714 in: true
3715 });
3716
3717 function Fade(props) {
3718 var Tag = props.tag,
3719 baseClass = props.baseClass,
3720 baseClassActive = props.baseClassActive,
3721 className = props.className,
3722 cssModule = props.cssModule,
3723 children = props.children,
3724 innerRef = props.innerRef,
3725 otherProps = _objectWithoutPropertiesLoose(props, ["tag", "baseClass", "baseClassActive", "className", "cssModule", "children", "innerRef"]);
3726
3727 var transitionProps = pick(otherProps, TransitionPropTypeKeys);
3728 var childProps = omit(otherProps, TransitionPropTypeKeys);
3729 return React__default.createElement(reactTransitionGroup_1, transitionProps, function (status) {
3730 var isActive = status === 'entered';
3731 var classes = mapToCssModules(classnames(className, baseClass, isActive && baseClassActive), cssModule);
3732 return React__default.createElement(Tag, _extends({
3733 className: classes
3734 }, childProps, {
3735 ref: innerRef
3736 }), children);
3737 });
3738 }
3739
3740 Fade.propTypes = propTypes$k;
3741 Fade.defaultProps = defaultProps$i;
3742
3743 var propTypes$l = {
3744 color: propTypes.string,
3745 pill: propTypes.bool,
3746 tag: tagPropType,
3747 innerRef: propTypes.oneOfType([propTypes.object, propTypes.func, propTypes.string]),
3748 children: propTypes.node,
3749 className: propTypes.string,
3750 cssModule: propTypes.object
3751 };
3752 var defaultProps$j = {
3753 color: 'secondary',
3754 pill: false,
3755 tag: 'span'
3756 };
3757
3758 var Badge = function Badge(props) {
3759 var className = props.className,
3760 cssModule = props.cssModule,
3761 color = props.color,
3762 innerRef = props.innerRef,
3763 pill = props.pill,
3764 Tag = props.tag,
3765 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "color", "innerRef", "pill", "tag"]);
3766
3767 var classes = mapToCssModules(classnames(className, 'badge', 'badge-' + color, pill ? 'badge-pill' : false), cssModule);
3768
3769 if (attributes.href && Tag === 'span') {
3770 Tag = 'a';
3771 }
3772
3773 return React__default.createElement(Tag, _extends({}, attributes, {
3774 className: classes,
3775 ref: innerRef
3776 }));
3777 };
3778
3779 Badge.propTypes = propTypes$l;
3780 Badge.defaultProps = defaultProps$j;
3781
3782 var propTypes$m = {
3783 tag: tagPropType,
3784 inverse: propTypes.bool,
3785 color: propTypes.string,
3786 body: propTypes.bool,
3787 outline: propTypes.bool,
3788 className: propTypes.string,
3789 cssModule: propTypes.object,
3790 innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func])
3791 };
3792 var defaultProps$k = {
3793 tag: 'div'
3794 };
3795
3796 var Card = function Card(props) {
3797 var className = props.className,
3798 cssModule = props.cssModule,
3799 color = props.color,
3800 body = props.body,
3801 inverse = props.inverse,
3802 outline = props.outline,
3803 Tag = props.tag,
3804 innerRef = props.innerRef,
3805 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "color", "body", "inverse", "outline", "tag", "innerRef"]);
3806
3807 var classes = mapToCssModules(classnames(className, 'card', inverse ? 'text-white' : false, body ? 'card-body' : false, color ? (outline ? 'border' : 'bg') + "-" + color : false), cssModule);
3808 return React__default.createElement(Tag, _extends({}, attributes, {
3809 className: classes,
3810 ref: innerRef
3811 }));
3812 };
3813
3814 Card.propTypes = propTypes$m;
3815 Card.defaultProps = defaultProps$k;
3816
3817 var propTypes$n = {
3818 tag: tagPropType,
3819 className: propTypes.string,
3820 cssModule: propTypes.object
3821 };
3822 var defaultProps$l = {
3823 tag: 'div'
3824 };
3825
3826 var CardGroup = function CardGroup(props) {
3827 var className = props.className,
3828 cssModule = props.cssModule,
3829 Tag = props.tag,
3830 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
3831
3832 var classes = mapToCssModules(classnames(className, 'card-group'), cssModule);
3833 return React__default.createElement(Tag, _extends({}, attributes, {
3834 className: classes
3835 }));
3836 };
3837
3838 CardGroup.propTypes = propTypes$n;
3839 CardGroup.defaultProps = defaultProps$l;
3840
3841 var propTypes$o = {
3842 tag: tagPropType,
3843 className: propTypes.string,
3844 cssModule: propTypes.object
3845 };
3846 var defaultProps$m = {
3847 tag: 'div'
3848 };
3849
3850 var CardDeck = function CardDeck(props) {
3851 var className = props.className,
3852 cssModule = props.cssModule,
3853 Tag = props.tag,
3854 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
3855
3856 var classes = mapToCssModules(classnames(className, 'card-deck'), cssModule);
3857 return React__default.createElement(Tag, _extends({}, attributes, {
3858 className: classes
3859 }));
3860 };
3861
3862 CardDeck.propTypes = propTypes$o;
3863 CardDeck.defaultProps = defaultProps$m;
3864
3865 var propTypes$p = {
3866 tag: tagPropType,
3867 className: propTypes.string,
3868 cssModule: propTypes.object
3869 };
3870 var defaultProps$n = {
3871 tag: 'div'
3872 };
3873
3874 var CardColumns = function CardColumns(props) {
3875 var className = props.className,
3876 cssModule = props.cssModule,
3877 Tag = props.tag,
3878 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
3879
3880 var classes = mapToCssModules(classnames(className, 'card-columns'), cssModule);
3881 return React__default.createElement(Tag, _extends({}, attributes, {
3882 className: classes
3883 }));
3884 };
3885
3886 CardColumns.propTypes = propTypes$p;
3887 CardColumns.defaultProps = defaultProps$n;
3888
3889 var propTypes$q = {
3890 tag: tagPropType,
3891 className: propTypes.string,
3892 cssModule: propTypes.object,
3893 innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func])
3894 };
3895 var defaultProps$o = {
3896 tag: 'div'
3897 };
3898
3899 var CardBody = function CardBody(props) {
3900 var className = props.className,
3901 cssModule = props.cssModule,
3902 innerRef = props.innerRef,
3903 Tag = props.tag,
3904 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "innerRef", "tag"]);
3905
3906 var classes = mapToCssModules(classnames(className, 'card-body'), cssModule);
3907 return React__default.createElement(Tag, _extends({}, attributes, {
3908 className: classes,
3909 ref: innerRef
3910 }));
3911 };
3912
3913 CardBody.propTypes = propTypes$q;
3914 CardBody.defaultProps = defaultProps$o;
3915
3916 var propTypes$r = {
3917 tag: tagPropType,
3918 innerRef: propTypes.oneOfType([propTypes.object, propTypes.func, propTypes.string]),
3919 className: propTypes.string,
3920 cssModule: propTypes.object
3921 };
3922 var defaultProps$p = {
3923 tag: 'a'
3924 };
3925
3926 var CardLink = function CardLink(props) {
3927 var className = props.className,
3928 cssModule = props.cssModule,
3929 Tag = props.tag,
3930 innerRef = props.innerRef,
3931 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "innerRef"]);
3932
3933 var classes = mapToCssModules(classnames(className, 'card-link'), cssModule);
3934 return React__default.createElement(Tag, _extends({}, attributes, {
3935 ref: innerRef,
3936 className: classes
3937 }));
3938 };
3939
3940 CardLink.propTypes = propTypes$r;
3941 CardLink.defaultProps = defaultProps$p;
3942
3943 var propTypes$s = {
3944 tag: tagPropType,
3945 className: propTypes.string,
3946 cssModule: propTypes.object
3947 };
3948 var defaultProps$q = {
3949 tag: 'div'
3950 };
3951
3952 var CardFooter = function CardFooter(props) {
3953 var className = props.className,
3954 cssModule = props.cssModule,
3955 Tag = props.tag,
3956 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
3957
3958 var classes = mapToCssModules(classnames(className, 'card-footer'), cssModule);
3959 return React__default.createElement(Tag, _extends({}, attributes, {
3960 className: classes
3961 }));
3962 };
3963
3964 CardFooter.propTypes = propTypes$s;
3965 CardFooter.defaultProps = defaultProps$q;
3966
3967 var propTypes$t = {
3968 tag: tagPropType,
3969 className: propTypes.string,
3970 cssModule: propTypes.object
3971 };
3972 var defaultProps$r = {
3973 tag: 'div'
3974 };
3975
3976 var CardHeader = function CardHeader(props) {
3977 var className = props.className,
3978 cssModule = props.cssModule,
3979 Tag = props.tag,
3980 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
3981
3982 var classes = mapToCssModules(classnames(className, 'card-header'), cssModule);
3983 return React__default.createElement(Tag, _extends({}, attributes, {
3984 className: classes
3985 }));
3986 };
3987
3988 CardHeader.propTypes = propTypes$t;
3989 CardHeader.defaultProps = defaultProps$r;
3990
3991 var propTypes$u = {
3992 tag: tagPropType,
3993 top: propTypes.bool,
3994 bottom: propTypes.bool,
3995 className: propTypes.string,
3996 cssModule: propTypes.object
3997 };
3998 var defaultProps$s = {
3999 tag: 'img'
4000 };
4001
4002 var CardImg = function CardImg(props) {
4003 var className = props.className,
4004 cssModule = props.cssModule,
4005 top = props.top,
4006 bottom = props.bottom,
4007 Tag = props.tag,
4008 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "top", "bottom", "tag"]);
4009
4010 var cardImgClassName = 'card-img';
4011
4012 if (top) {
4013 cardImgClassName = 'card-img-top';
4014 }
4015
4016 if (bottom) {
4017 cardImgClassName = 'card-img-bottom';
4018 }
4019
4020 var classes = mapToCssModules(classnames(className, cardImgClassName), cssModule);
4021 return React__default.createElement(Tag, _extends({}, attributes, {
4022 className: classes
4023 }));
4024 };
4025
4026 CardImg.propTypes = propTypes$u;
4027 CardImg.defaultProps = defaultProps$s;
4028
4029 var propTypes$v = {
4030 tag: tagPropType,
4031 className: propTypes.string,
4032 cssModule: propTypes.object
4033 };
4034 var defaultProps$t = {
4035 tag: 'div'
4036 };
4037
4038 var CardImgOverlay = function CardImgOverlay(props) {
4039 var className = props.className,
4040 cssModule = props.cssModule,
4041 Tag = props.tag,
4042 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
4043
4044 var classes = mapToCssModules(classnames(className, 'card-img-overlay'), cssModule);
4045 return React__default.createElement(Tag, _extends({}, attributes, {
4046 className: classes
4047 }));
4048 };
4049
4050 CardImgOverlay.propTypes = propTypes$v;
4051 CardImgOverlay.defaultProps = defaultProps$t;
4052
4053 var CarouselItem =
4054 /*#__PURE__*/
4055 function (_React$Component) {
4056 _inheritsLoose(CarouselItem, _React$Component);
4057
4058 function CarouselItem(props) {
4059 var _this;
4060
4061 _this = _React$Component.call(this, props) || this;
4062 _this.state = {
4063 startAnimation: false
4064 };
4065 _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));
4066 _this.onEntering = _this.onEntering.bind(_assertThisInitialized(_this));
4067 _this.onExit = _this.onExit.bind(_assertThisInitialized(_this));
4068 _this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));
4069 _this.onExited = _this.onExited.bind(_assertThisInitialized(_this));
4070 return _this;
4071 }
4072
4073 var _proto = CarouselItem.prototype;
4074
4075 _proto.onEnter = function onEnter(node, isAppearing) {
4076 this.setState({
4077 startAnimation: false
4078 });
4079 this.props.onEnter(node, isAppearing);
4080 };
4081
4082 _proto.onEntering = function onEntering(node, isAppearing) {
4083 // getting this variable triggers a reflow
4084 var offsetHeight = node.offsetHeight;
4085 this.setState({
4086 startAnimation: true
4087 });
4088 this.props.onEntering(node, isAppearing);
4089 return offsetHeight;
4090 };
4091
4092 _proto.onExit = function onExit(node) {
4093 this.setState({
4094 startAnimation: false
4095 });
4096 this.props.onExit(node);
4097 };
4098
4099 _proto.onExiting = function onExiting(node) {
4100 this.setState({
4101 startAnimation: true
4102 });
4103 node.dispatchEvent(new CustomEvent('slide.bs.carousel'));
4104 this.props.onExiting(node);
4105 };
4106
4107 _proto.onExited = function onExited(node) {
4108 node.dispatchEvent(new CustomEvent('slid.bs.carousel'));
4109 this.props.onExited(node);
4110 };
4111
4112 _proto.render = function render() {
4113 var _this2 = this;
4114
4115 var _this$props = this.props,
4116 isIn = _this$props.in,
4117 children = _this$props.children,
4118 cssModule = _this$props.cssModule,
4119 slide = _this$props.slide,
4120 Tag = _this$props.tag,
4121 className = _this$props.className,
4122 transitionProps = _objectWithoutPropertiesLoose(_this$props, ["in", "children", "cssModule", "slide", "tag", "className"]);
4123
4124 return React__default.createElement(reactTransitionGroup_1, _extends({}, transitionProps, {
4125 enter: slide,
4126 exit: slide,
4127 in: isIn,
4128 onEnter: this.onEnter,
4129 onEntering: this.onEntering,
4130 onExit: this.onExit,
4131 onExiting: this.onExiting,
4132 onExited: this.onExited
4133 }), function (status) {
4134 var direction = _this2.context.direction;
4135 var isActive = status === TransitionStatuses.ENTERED || status === TransitionStatuses.EXITING;
4136 var directionClassName = (status === TransitionStatuses.ENTERING || status === TransitionStatuses.EXITING) && _this2.state.startAnimation && (direction === 'right' ? 'carousel-item-left' : 'carousel-item-right');
4137 var orderClassName = status === TransitionStatuses.ENTERING && (direction === 'right' ? 'carousel-item-next' : 'carousel-item-prev');
4138 var itemClasses = mapToCssModules(classnames(className, 'carousel-item', isActive && 'active', directionClassName, orderClassName), cssModule);
4139 return React__default.createElement(Tag, {
4140 className: itemClasses
4141 }, children);
4142 });
4143 };
4144
4145 return CarouselItem;
4146 }(React__default.Component);
4147
4148 CarouselItem.propTypes = _extends({}, reactTransitionGroup_1.propTypes, {
4149 tag: tagPropType,
4150 in: propTypes.bool,
4151 cssModule: propTypes.object,
4152 children: propTypes.node,
4153 slide: propTypes.bool,
4154 className: propTypes.string
4155 });
4156 CarouselItem.defaultProps = _extends({}, reactTransitionGroup_1.defaultProps, {
4157 tag: 'div',
4158 timeout: TransitionTimeouts.Carousel,
4159 slide: true
4160 });
4161 CarouselItem.contextTypes = {
4162 direction: propTypes.string
4163 };
4164
4165 var Carousel =
4166 /*#__PURE__*/
4167 function (_React$Component) {
4168 _inheritsLoose(Carousel, _React$Component);
4169
4170 function Carousel(props) {
4171 var _this;
4172
4173 _this = _React$Component.call(this, props) || this;
4174 _this.handleKeyPress = _this.handleKeyPress.bind(_assertThisInitialized(_this));
4175 _this.renderItems = _this.renderItems.bind(_assertThisInitialized(_this));
4176 _this.hoverStart = _this.hoverStart.bind(_assertThisInitialized(_this));
4177 _this.hoverEnd = _this.hoverEnd.bind(_assertThisInitialized(_this));
4178 _this.state = {
4179 direction: 'right',
4180 indicatorClicked: false
4181 };
4182 return _this;
4183 }
4184
4185 var _proto = Carousel.prototype;
4186
4187 _proto.getChildContext = function getChildContext() {
4188 return {
4189 direction: this.state.direction
4190 };
4191 };
4192
4193 _proto.componentDidMount = function componentDidMount() {
4194 // Set up the cycle
4195 if (this.props.ride === 'carousel') {
4196 this.setInterval();
4197 } // TODO: move this to the specific carousel like bootstrap. Currently it will trigger ALL carousels on the page.
4198
4199
4200 document.addEventListener('keyup', this.handleKeyPress);
4201 };
4202
4203 _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
4204 this.setInterval(nextProps); // Calculate the direction to turn
4205
4206 if (this.props.activeIndex + 1 === nextProps.activeIndex) {
4207 this.setState({
4208 direction: 'right'
4209 });
4210 } else if (this.props.activeIndex - 1 === nextProps.activeIndex) {
4211 this.setState({
4212 direction: 'left'
4213 });
4214 } else if (this.props.activeIndex > nextProps.activeIndex) {
4215 this.setState({
4216 direction: this.state.indicatorClicked ? 'left' : 'right'
4217 });
4218 } else if (this.props.activeIndex !== nextProps.activeIndex) {
4219 this.setState({
4220 direction: this.state.indicatorClicked ? 'right' : 'left'
4221 });
4222 }
4223
4224 this.setState({
4225 indicatorClicked: false
4226 });
4227 };
4228
4229 _proto.componentWillUnmount = function componentWillUnmount() {
4230 this.clearInterval();
4231 document.removeEventListener('keyup', this.handleKeyPress);
4232 };
4233
4234 _proto.setInterval = function (_setInterval) {
4235 function setInterval() {
4236 return _setInterval.apply(this, arguments);
4237 }
4238
4239 setInterval.toString = function () {
4240 return _setInterval.toString();
4241 };
4242
4243 return setInterval;
4244 }(function (props) {
4245 if (props === void 0) {
4246 props = this.props;
4247 }
4248
4249 // make sure not to have multiple intervals going...
4250 this.clearInterval();
4251
4252 if (props.interval) {
4253 this.cycleInterval = setInterval(function () {
4254 props.next();
4255 }, parseInt(props.interval, 10));
4256 }
4257 });
4258
4259 _proto.clearInterval = function (_clearInterval) {
4260 function clearInterval() {
4261 return _clearInterval.apply(this, arguments);
4262 }
4263
4264 clearInterval.toString = function () {
4265 return _clearInterval.toString();
4266 };
4267
4268 return clearInterval;
4269 }(function () {
4270 clearInterval(this.cycleInterval);
4271 });
4272
4273 _proto.hoverStart = function hoverStart() {
4274 if (this.props.pause === 'hover') {
4275 this.clearInterval();
4276 }
4277
4278 if (this.props.mouseEnter) {
4279 var _this$props;
4280
4281 (_this$props = this.props).mouseEnter.apply(_this$props, arguments);
4282 }
4283 };
4284
4285 _proto.hoverEnd = function hoverEnd() {
4286 if (this.props.pause === 'hover') {
4287 this.setInterval();
4288 }
4289
4290 if (this.props.mouseLeave) {
4291 var _this$props2;
4292
4293 (_this$props2 = this.props).mouseLeave.apply(_this$props2, arguments);
4294 }
4295 };
4296
4297 _proto.handleKeyPress = function handleKeyPress(evt) {
4298 if (this.props.keyboard) {
4299 if (evt.keyCode === 37) {
4300 this.props.previous();
4301 } else if (evt.keyCode === 39) {
4302 this.props.next();
4303 }
4304 }
4305 };
4306
4307 _proto.renderItems = function renderItems(carouselItems, className) {
4308 var _this2 = this;
4309
4310 var slide = this.props.slide;
4311 return React__default.createElement("div", {
4312 className: className
4313 }, carouselItems.map(function (item, index) {
4314 var isIn = index === _this2.props.activeIndex;
4315 return React__default.cloneElement(item, {
4316 in: isIn,
4317 slide: slide
4318 });
4319 }));
4320 };
4321
4322 _proto.render = function render() {
4323 var _this3 = this;
4324
4325 var _this$props3 = this.props,
4326 cssModule = _this$props3.cssModule,
4327 slide = _this$props3.slide,
4328 className = _this$props3.className;
4329 var outerClasses = mapToCssModules(classnames(className, 'carousel', slide && 'slide'), cssModule);
4330 var innerClasses = mapToCssModules(classnames('carousel-inner'), cssModule); // filter out booleans, null, or undefined
4331
4332 var children = this.props.children.filter(function (child) {
4333 return child !== null && child !== undefined && typeof child !== 'boolean';
4334 });
4335 var slidesOnly = children.every(function (child) {
4336 return child.type === CarouselItem;
4337 }); // Rendering only slides
4338
4339 if (slidesOnly) {
4340 return React__default.createElement("div", {
4341 className: outerClasses,
4342 onMouseEnter: this.hoverStart,
4343 onMouseLeave: this.hoverEnd
4344 }, this.renderItems(children, innerClasses));
4345 } // Rendering slides and controls
4346
4347
4348 if (children[0] instanceof Array) {
4349 var _carouselItems = children[0];
4350 var _controlLeft = children[1];
4351 var _controlRight = children[2];
4352 return React__default.createElement("div", {
4353 className: outerClasses,
4354 onMouseEnter: this.hoverStart,
4355 onMouseLeave: this.hoverEnd
4356 }, this.renderItems(_carouselItems, innerClasses), _controlLeft, _controlRight);
4357 } // Rendering indicators, slides and controls
4358
4359
4360 var indicators = children[0];
4361
4362 var wrappedOnClick = function wrappedOnClick(e) {
4363 if (typeof indicators.props.onClickHandler === 'function') {
4364 _this3.setState({
4365 indicatorClicked: true
4366 }, function () {
4367 return indicators.props.onClickHandler(e);
4368 });
4369 }
4370 };
4371
4372 var wrappedIndicators = React__default.cloneElement(indicators, {
4373 onClickHandler: wrappedOnClick
4374 });
4375 var carouselItems = children[1];
4376 var controlLeft = children[2];
4377 var controlRight = children[3];
4378 return React__default.createElement("div", {
4379 className: outerClasses,
4380 onMouseEnter: this.hoverStart,
4381 onMouseLeave: this.hoverEnd
4382 }, wrappedIndicators, this.renderItems(carouselItems, innerClasses), controlLeft, controlRight);
4383 };
4384
4385 return Carousel;
4386 }(React__default.Component);
4387
4388 Carousel.propTypes = {
4389 // the current active slide of the carousel
4390 activeIndex: propTypes.number,
4391 // a function which should advance the carousel to the next slide (via activeIndex)
4392 next: propTypes.func.isRequired,
4393 // a function which should advance the carousel to the previous slide (via activeIndex)
4394 previous: propTypes.func.isRequired,
4395 // controls if the left and right arrow keys should control the carousel
4396 keyboard: propTypes.bool,
4397
4398 /* If set to "hover", pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on
4399 * mouseleave. If set to false, hovering over the carousel won't pause it. (default: "hover")
4400 */
4401 pause: propTypes.oneOf(['hover', false]),
4402 // Autoplays the carousel after the user manually cycles the first item. If "carousel", autoplays the carousel on load.
4403 // This is how bootstrap defines it... I would prefer a bool named autoplay or something...
4404 ride: propTypes.oneOf(['carousel']),
4405 // the interval at which the carousel automatically cycles (default: 5000)
4406 // eslint-disable-next-line react/no-unused-prop-types
4407 interval: propTypes.oneOfType([propTypes.number, propTypes.string, propTypes.bool]),
4408 children: propTypes.array,
4409 // called when the mouse enters the Carousel
4410 mouseEnter: propTypes.func,
4411 // called when the mouse exits the Carousel
4412 mouseLeave: propTypes.func,
4413 // controls whether the slide animation on the Carousel works or not
4414 slide: propTypes.bool,
4415 cssModule: propTypes.object,
4416 className: propTypes.string
4417 };
4418 Carousel.defaultProps = {
4419 interval: 5000,
4420 pause: 'hover',
4421 keyboard: true,
4422 slide: true
4423 };
4424 Carousel.childContextTypes = {
4425 direction: propTypes.string
4426 };
4427
4428 var CarouselControl = function CarouselControl(props) {
4429 var direction = props.direction,
4430 onClickHandler = props.onClickHandler,
4431 cssModule = props.cssModule,
4432 directionText = props.directionText,
4433 className = props.className;
4434 var anchorClasses = mapToCssModules(classnames(className, "carousel-control-" + direction), cssModule);
4435 var iconClasses = mapToCssModules(classnames("carousel-control-" + direction + "-icon"), cssModule);
4436 var screenReaderClasses = mapToCssModules(classnames('sr-only'), cssModule);
4437 return React__default.createElement("a", {
4438 className: anchorClasses,
4439 role: "button",
4440 tabIndex: "0",
4441 onClick: function onClick(e) {
4442 e.preventDefault();
4443 onClickHandler();
4444 }
4445 }, React__default.createElement("span", {
4446 className: iconClasses,
4447 "aria-hidden": "true"
4448 }), React__default.createElement("span", {
4449 className: screenReaderClasses
4450 }, directionText || direction));
4451 };
4452
4453 CarouselControl.propTypes = {
4454 direction: propTypes.oneOf(['prev', 'next']).isRequired,
4455 onClickHandler: propTypes.func.isRequired,
4456 cssModule: propTypes.object,
4457 directionText: propTypes.string,
4458 className: propTypes.string
4459 };
4460
4461 var CarouselIndicators = function CarouselIndicators(props) {
4462 var items = props.items,
4463 activeIndex = props.activeIndex,
4464 cssModule = props.cssModule,
4465 onClickHandler = props.onClickHandler,
4466 className = props.className;
4467 var listClasses = mapToCssModules(classnames(className, 'carousel-indicators'), cssModule);
4468 var indicators = items.map(function (item, idx) {
4469 var indicatorClasses = mapToCssModules(classnames({
4470 active: activeIndex === idx
4471 }), cssModule);
4472 return React__default.createElement("li", {
4473 key: "" + (item.key || Object.values(item).join('')),
4474 onClick: function onClick(e) {
4475 e.preventDefault();
4476 onClickHandler(idx);
4477 },
4478 className: indicatorClasses
4479 });
4480 });
4481 return React__default.createElement("ol", {
4482 className: listClasses
4483 }, indicators);
4484 };
4485
4486 CarouselIndicators.propTypes = {
4487 items: propTypes.array.isRequired,
4488 activeIndex: propTypes.number.isRequired,
4489 cssModule: propTypes.object,
4490 onClickHandler: propTypes.func.isRequired,
4491 className: propTypes.string
4492 };
4493
4494 var CarouselCaption = function CarouselCaption(props) {
4495 var captionHeader = props.captionHeader,
4496 captionText = props.captionText,
4497 cssModule = props.cssModule,
4498 className = props.className;
4499 var classes = mapToCssModules(classnames(className, 'carousel-caption', 'd-none', 'd-md-block'), cssModule);
4500 return React__default.createElement("div", {
4501 className: classes
4502 }, React__default.createElement("h3", null, captionHeader), React__default.createElement("p", null, captionText));
4503 };
4504
4505 CarouselCaption.propTypes = {
4506 captionHeader: propTypes.string,
4507 captionText: propTypes.string.isRequired,
4508 cssModule: propTypes.object,
4509 className: propTypes.string
4510 };
4511
4512 var propTypes$w = {
4513 items: propTypes.array.isRequired,
4514 indicators: propTypes.bool,
4515 controls: propTypes.bool,
4516 autoPlay: propTypes.bool,
4517 defaultActiveIndex: propTypes.number,
4518 activeIndex: propTypes.number,
4519 next: propTypes.func,
4520 previous: propTypes.func,
4521 goToIndex: propTypes.func
4522 };
4523
4524 var UncontrolledCarousel =
4525 /*#__PURE__*/
4526 function (_Component) {
4527 _inheritsLoose(UncontrolledCarousel, _Component);
4528
4529 function UncontrolledCarousel(props) {
4530 var _this;
4531
4532 _this = _Component.call(this, props) || this;
4533 _this.animating = false;
4534 _this.state = {
4535 activeIndex: props.defaultActiveIndex || 0
4536 };
4537 _this.next = _this.next.bind(_assertThisInitialized(_this));
4538 _this.previous = _this.previous.bind(_assertThisInitialized(_this));
4539 _this.goToIndex = _this.goToIndex.bind(_assertThisInitialized(_this));
4540 _this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));
4541 _this.onExited = _this.onExited.bind(_assertThisInitialized(_this));
4542 return _this;
4543 }
4544
4545 var _proto = UncontrolledCarousel.prototype;
4546
4547 _proto.onExiting = function onExiting() {
4548 this.animating = true;
4549 };
4550
4551 _proto.onExited = function onExited() {
4552 this.animating = false;
4553 };
4554
4555 _proto.next = function next() {
4556 if (this.animating) return;
4557 var nextIndex = this.state.activeIndex === this.props.items.length - 1 ? 0 : this.state.activeIndex + 1;
4558 this.setState({
4559 activeIndex: nextIndex
4560 });
4561 };
4562
4563 _proto.previous = function previous() {
4564 if (this.animating) return;
4565 var nextIndex = this.state.activeIndex === 0 ? this.props.items.length - 1 : this.state.activeIndex - 1;
4566 this.setState({
4567 activeIndex: nextIndex
4568 });
4569 };
4570
4571 _proto.goToIndex = function goToIndex(newIndex) {
4572 if (this.animating) return;
4573 this.setState({
4574 activeIndex: newIndex
4575 });
4576 };
4577
4578 _proto.render = function render() {
4579 var _this2 = this;
4580
4581 var _this$props = this.props,
4582 defaultActiveIndex = _this$props.defaultActiveIndex,
4583 autoPlay = _this$props.autoPlay,
4584 indicators = _this$props.indicators,
4585 controls = _this$props.controls,
4586 items = _this$props.items,
4587 goToIndex = _this$props.goToIndex,
4588 props = _objectWithoutPropertiesLoose(_this$props, ["defaultActiveIndex", "autoPlay", "indicators", "controls", "items", "goToIndex"]);
4589
4590 var activeIndex = this.state.activeIndex;
4591 var slides = items.map(function (item) {
4592 return React__default.createElement(CarouselItem, {
4593 onExiting: _this2.onExiting,
4594 onExited: _this2.onExited,
4595 key: item.src
4596 }, React__default.createElement("img", {
4597 className: "d-block w-100",
4598 src: item.src,
4599 alt: item.altText
4600 }), React__default.createElement(CarouselCaption, {
4601 captionText: item.caption,
4602 captionHeader: item.header || item.caption
4603 }));
4604 });
4605 return React__default.createElement(Carousel, _extends({
4606 activeIndex: activeIndex,
4607 next: this.next,
4608 previous: this.previous,
4609 ride: autoPlay ? 'carousel' : undefined
4610 }, props), indicators && React__default.createElement(CarouselIndicators, {
4611 items: items,
4612 activeIndex: props.activeIndex || activeIndex,
4613 onClickHandler: goToIndex || this.goToIndex
4614 }), slides, controls && React__default.createElement(CarouselControl, {
4615 direction: "prev",
4616 directionText: "Previous",
4617 onClickHandler: props.previous || this.previous
4618 }), controls && React__default.createElement(CarouselControl, {
4619 direction: "next",
4620 directionText: "Next",
4621 onClickHandler: props.next || this.next
4622 }));
4623 };
4624
4625 return UncontrolledCarousel;
4626 }(React.Component);
4627
4628 UncontrolledCarousel.propTypes = propTypes$w;
4629 UncontrolledCarousel.defaultProps = {
4630 controls: true,
4631 indicators: true,
4632 autoPlay: true
4633 };
4634
4635 var propTypes$x = {
4636 tag: tagPropType,
4637 className: propTypes.string,
4638 cssModule: propTypes.object
4639 };
4640 var defaultProps$u = {
4641 tag: 'div'
4642 };
4643
4644 var CardSubtitle = function CardSubtitle(props) {
4645 var className = props.className,
4646 cssModule = props.cssModule,
4647 Tag = props.tag,
4648 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
4649
4650 var classes = mapToCssModules(classnames(className, 'card-subtitle'), cssModule);
4651 return React__default.createElement(Tag, _extends({}, attributes, {
4652 className: classes
4653 }));
4654 };
4655
4656 CardSubtitle.propTypes = propTypes$x;
4657 CardSubtitle.defaultProps = defaultProps$u;
4658
4659 var propTypes$y = {
4660 tag: tagPropType,
4661 className: propTypes.string,
4662 cssModule: propTypes.object
4663 };
4664 var defaultProps$v = {
4665 tag: 'p'
4666 };
4667
4668 var CardText = function CardText(props) {
4669 var className = props.className,
4670 cssModule = props.cssModule,
4671 Tag = props.tag,
4672 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
4673
4674 var classes = mapToCssModules(classnames(className, 'card-text'), cssModule);
4675 return React__default.createElement(Tag, _extends({}, attributes, {
4676 className: classes
4677 }));
4678 };
4679
4680 CardText.propTypes = propTypes$y;
4681 CardText.defaultProps = defaultProps$v;
4682
4683 var propTypes$z = {
4684 tag: tagPropType,
4685 className: propTypes.string,
4686 cssModule: propTypes.object
4687 };
4688 var defaultProps$w = {
4689 tag: 'div'
4690 };
4691
4692 var CardTitle = function CardTitle(props) {
4693 var className = props.className,
4694 cssModule = props.cssModule,
4695 Tag = props.tag,
4696 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
4697
4698 var classes = mapToCssModules(classnames(className, 'card-title'), cssModule);
4699 return React__default.createElement(Tag, _extends({}, attributes, {
4700 className: classes
4701 }));
4702 };
4703
4704 CardTitle.propTypes = propTypes$z;
4705 CardTitle.defaultProps = defaultProps$w;
4706
4707 var propTypes$A = {
4708 className: propTypes.string,
4709 id: propTypes.oneOfType([propTypes.string, propTypes.number]).isRequired,
4710 type: propTypes.string.isRequired,
4711 label: propTypes.node,
4712 inline: propTypes.bool,
4713 valid: propTypes.bool,
4714 invalid: propTypes.bool,
4715 bsSize: propTypes.string,
4716 htmlFor: propTypes.string,
4717 cssModule: propTypes.object,
4718 children: propTypes.oneOfType([propTypes.node, propTypes.array, propTypes.func]),
4719 innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func])
4720 };
4721
4722 function CustomInput(props) {
4723 var className = props.className,
4724 label = props.label,
4725 inline = props.inline,
4726 valid = props.valid,
4727 invalid = props.invalid,
4728 cssModule = props.cssModule,
4729 children = props.children,
4730 bsSize = props.bsSize,
4731 innerRef = props.innerRef,
4732 htmlFor = props.htmlFor,
4733 attributes = _objectWithoutPropertiesLoose(props, ["className", "label", "inline", "valid", "invalid", "cssModule", "children", "bsSize", "innerRef", "htmlFor"]);
4734
4735 var type = attributes.type;
4736 var customClass = mapToCssModules(classnames(className, "custom-" + type, bsSize ? "custom-" + type + "-" + bsSize : false), cssModule);
4737 var validationClassNames = mapToCssModules(classnames(invalid && 'is-invalid', valid && 'is-valid'), cssModule);
4738 var labelHtmlFor = htmlFor || attributes.id;
4739
4740 if (type === 'select') {
4741 return React__default.createElement("select", _extends({}, attributes, {
4742 ref: innerRef,
4743 className: classnames(validationClassNames, customClass)
4744 }), children);
4745 }
4746
4747 if (type === 'file') {
4748 return React__default.createElement("div", {
4749 className: customClass
4750 }, React__default.createElement("input", _extends({}, attributes, {
4751 ref: innerRef,
4752 className: classnames(validationClassNames, mapToCssModules('custom-file-input', cssModule))
4753 })), React__default.createElement("label", {
4754 className: mapToCssModules('custom-file-label', cssModule),
4755 htmlFor: labelHtmlFor
4756 }, label || 'Choose file'));
4757 }
4758
4759 if (type !== 'checkbox' && type !== 'radio' && type !== 'switch') {
4760 return React__default.createElement("input", _extends({}, attributes, {
4761 ref: innerRef,
4762 className: classnames(validationClassNames, customClass)
4763 }));
4764 }
4765
4766 var wrapperClasses = classnames(customClass, mapToCssModules(classnames('custom-control', {
4767 'custom-control-inline': inline
4768 }), cssModule));
4769 return React__default.createElement("div", {
4770 className: wrapperClasses
4771 }, React__default.createElement("input", _extends({}, attributes, {
4772 type: type === 'switch' ? 'checkbox' : type,
4773 ref: innerRef,
4774 className: classnames(validationClassNames, mapToCssModules('custom-control-input', cssModule))
4775 })), React__default.createElement("label", {
4776 className: mapToCssModules('custom-control-label', cssModule),
4777 htmlFor: labelHtmlFor
4778 }, label), children);
4779 }
4780
4781 CustomInput.propTypes = propTypes$A;
4782
4783 function noop() {}
4784
4785 var propTypes$B = {
4786 children: propTypes.node.isRequired,
4787 popperClassName: propTypes.string,
4788 placement: propTypes.string,
4789 placementPrefix: propTypes.string,
4790 arrowClassName: propTypes.string,
4791 hideArrow: propTypes.bool,
4792 tag: tagPropType,
4793 isOpen: propTypes.bool.isRequired,
4794 cssModule: propTypes.object,
4795 offset: propTypes.oneOfType([propTypes.string, propTypes.number]),
4796 fallbackPlacement: propTypes.oneOfType([propTypes.string, propTypes.array]),
4797 flip: propTypes.bool,
4798 container: targetPropType,
4799 target: targetPropType.isRequired,
4800 modifiers: propTypes.object,
4801 boundariesElement: propTypes.oneOfType([propTypes.string, DOMElement]),
4802 onClosed: propTypes.func,
4803 fade: propTypes.bool,
4804 transition: propTypes.shape(Fade.propTypes)
4805 };
4806 var defaultProps$x = {
4807 boundariesElement: 'scrollParent',
4808 placement: 'auto',
4809 hideArrow: false,
4810 isOpen: false,
4811 offset: 0,
4812 fallbackPlacement: 'flip',
4813 flip: true,
4814 container: 'body',
4815 modifiers: {},
4816 onClosed: noop,
4817 fade: true,
4818 transition: _extends({}, Fade.defaultProps)
4819 };
4820
4821 var PopperContent =
4822 /*#__PURE__*/
4823 function (_React$Component) {
4824 _inheritsLoose(PopperContent, _React$Component);
4825
4826 function PopperContent(props) {
4827 var _this;
4828
4829 _this = _React$Component.call(this, props) || this;
4830 _this.handlePlacementChange = _this.handlePlacementChange.bind(_assertThisInitialized(_this));
4831 _this.setTargetNode = _this.setTargetNode.bind(_assertThisInitialized(_this));
4832 _this.getTargetNode = _this.getTargetNode.bind(_assertThisInitialized(_this));
4833 _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));
4834 _this.onClosed = _this.onClosed.bind(_assertThisInitialized(_this));
4835 _this.state = {
4836 isOpen: props.isOpen
4837 };
4838 return _this;
4839 }
4840
4841 PopperContent.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {
4842 if (props.isOpen && !state.isOpen) {
4843 return {
4844 isOpen: props.isOpen
4845 };
4846 } else return null;
4847 };
4848
4849 var _proto = PopperContent.prototype;
4850
4851 _proto.componentDidUpdate = function componentDidUpdate() {
4852 if (this._element && this._element.childNodes && this._element.childNodes[0] && this._element.childNodes[0].focus) {
4853 this._element.childNodes[0].focus();
4854 }
4855 };
4856
4857 _proto.setTargetNode = function setTargetNode(node) {
4858 this.targetNode = node;
4859 };
4860
4861 _proto.getTargetNode = function getTargetNode() {
4862 return this.targetNode;
4863 };
4864
4865 _proto.getContainerNode = function getContainerNode() {
4866 return getTarget(this.props.container);
4867 };
4868
4869 _proto.getRef = function getRef(ref) {
4870 this._element = ref;
4871 };
4872
4873 _proto.handlePlacementChange = function handlePlacementChange(data) {
4874 if (this.state.placement !== data.placement) {
4875 this.setState({
4876 placement: data.placement
4877 });
4878 }
4879
4880 return data;
4881 };
4882
4883 _proto.onClosed = function onClosed() {
4884 this.props.onClosed();
4885 this.setState({
4886 isOpen: false
4887 });
4888 };
4889
4890 _proto.renderChildren = function renderChildren() {
4891 var _this$props = this.props,
4892 cssModule = _this$props.cssModule,
4893 children = _this$props.children,
4894 isOpen = _this$props.isOpen,
4895 flip = _this$props.flip,
4896 target = _this$props.target,
4897 offset = _this$props.offset,
4898 fallbackPlacement = _this$props.fallbackPlacement,
4899 placementPrefix = _this$props.placementPrefix,
4900 _arrowClassName = _this$props.arrowClassName,
4901 hideArrow = _this$props.hideArrow,
4902 _popperClassName = _this$props.popperClassName,
4903 tag = _this$props.tag,
4904 container = _this$props.container,
4905 modifiers = _this$props.modifiers,
4906 boundariesElement = _this$props.boundariesElement,
4907 onClosed = _this$props.onClosed,
4908 fade = _this$props.fade,
4909 transition = _this$props.transition,
4910 attrs = _objectWithoutPropertiesLoose(_this$props, ["cssModule", "children", "isOpen", "flip", "target", "offset", "fallbackPlacement", "placementPrefix", "arrowClassName", "hideArrow", "popperClassName", "tag", "container", "modifiers", "boundariesElement", "onClosed", "fade", "transition"]);
4911
4912 var arrowClassName = mapToCssModules(classnames('arrow', _arrowClassName), cssModule);
4913 var placement = this.state.placement || attrs.placement;
4914 var placementFirstPart = placement.split('-')[0];
4915 var popperClassName = mapToCssModules(classnames(_popperClassName, placementPrefix ? placementPrefix + "-" + placementFirstPart : placementFirstPart), this.props.cssModule);
4916
4917 var extendedModifiers = _extends({
4918 offset: {
4919 offset: offset
4920 },
4921 flip: {
4922 enabled: flip,
4923 behavior: fallbackPlacement
4924 },
4925 preventOverflow: {
4926 boundariesElement: boundariesElement
4927 },
4928 update: {
4929 enabled: true,
4930 order: 950,
4931 fn: this.handlePlacementChange
4932 }
4933 }, modifiers);
4934
4935 var popperTransition = _extends({}, Fade.defaultProps, transition, {
4936 baseClass: fade ? transition.baseClass : '',
4937 timeout: fade ? transition.timeout : 0
4938 });
4939
4940 return React__default.createElement(Fade, _extends({}, popperTransition, attrs, {
4941 in: isOpen,
4942 onExited: this.onClosed,
4943 tag: tag
4944 }), React__default.createElement(reactPopper.Popper, {
4945 referenceElement: this.targetNode,
4946 modifiers: extendedModifiers,
4947 placement: placement
4948 }, function (_ref) {
4949 var ref = _ref.ref,
4950 style = _ref.style,
4951 placement = _ref.placement,
4952 arrowProps = _ref.arrowProps;
4953 return React__default.createElement("div", {
4954 ref: ref,
4955 style: style,
4956 className: popperClassName,
4957 "x-placement": placement
4958 }, children, !hideArrow && React__default.createElement("span", {
4959 ref: arrowProps.ref,
4960 className: arrowClassName,
4961 style: arrowProps.style
4962 }));
4963 }));
4964 };
4965
4966 _proto.render = function render() {
4967 this.setTargetNode(getTarget(this.props.target));
4968
4969 if (this.state.isOpen) {
4970 return this.props.container === 'inline' ? this.renderChildren() : ReactDOM.createPortal(React__default.createElement("div", {
4971 ref: this.getRef
4972 }, this.renderChildren()), this.getContainerNode());
4973 }
4974
4975 return null;
4976 };
4977
4978 return PopperContent;
4979 }(React__default.Component);
4980
4981 PopperContent.propTypes = propTypes$B;
4982 PopperContent.defaultProps = defaultProps$x;
4983
4984 var PopperTargetHelper = function PopperTargetHelper(props, context) {
4985 context.popperManager.setTargetNode(getTarget(props.target));
4986 return null;
4987 };
4988
4989 PopperTargetHelper.contextTypes = {
4990 popperManager: propTypes.object.isRequired
4991 };
4992 PopperTargetHelper.propTypes = {
4993 target: targetPropType.isRequired
4994 };
4995
4996 var propTypes$C = {
4997 placement: propTypes.oneOf(PopperPlacements),
4998 target: targetPropType.isRequired,
4999 container: targetPropType,
5000 isOpen: propTypes.bool,
5001 disabled: propTypes.bool,
5002 hideArrow: propTypes.bool,
5003 boundariesElement: propTypes.oneOfType([propTypes.string, DOMElement]),
5004 className: propTypes.string,
5005 innerClassName: propTypes.string,
5006 arrowClassName: propTypes.string,
5007 popperClassName: propTypes.string,
5008 cssModule: propTypes.object,
5009 toggle: propTypes.func,
5010 autohide: propTypes.bool,
5011 placementPrefix: propTypes.string,
5012 delay: propTypes.oneOfType([propTypes.shape({
5013 show: propTypes.number,
5014 hide: propTypes.number
5015 }), propTypes.number]),
5016 modifiers: propTypes.object,
5017 offset: propTypes.oneOfType([propTypes.string, propTypes.number]),
5018 innerRef: propTypes.oneOfType([propTypes.func, propTypes.string, propTypes.object]),
5019 trigger: propTypes.string,
5020 fade: propTypes.bool,
5021 flip: propTypes.bool
5022 };
5023 var DEFAULT_DELAYS = {
5024 show: 0,
5025 hide: 0
5026 };
5027 var defaultProps$y = {
5028 isOpen: false,
5029 hideArrow: false,
5030 autohide: false,
5031 delay: DEFAULT_DELAYS,
5032 toggle: function toggle() {},
5033 trigger: 'click',
5034 fade: true
5035 };
5036
5037 function isInDOMSubtree(element, subtreeRoot) {
5038 return subtreeRoot && (element === subtreeRoot || subtreeRoot.contains(element));
5039 }
5040
5041 var TooltipPopoverWrapper =
5042 /*#__PURE__*/
5043 function (_React$Component) {
5044 _inheritsLoose(TooltipPopoverWrapper, _React$Component);
5045
5046 function TooltipPopoverWrapper(props) {
5047 var _this;
5048
5049 _this = _React$Component.call(this, props) || this;
5050 _this._target = null;
5051 _this.addTargetEvents = _this.addTargetEvents.bind(_assertThisInitialized(_this));
5052 _this.handleDocumentClick = _this.handleDocumentClick.bind(_assertThisInitialized(_this));
5053 _this.removeTargetEvents = _this.removeTargetEvents.bind(_assertThisInitialized(_this));
5054 _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));
5055 _this.showWithDelay = _this.showWithDelay.bind(_assertThisInitialized(_this));
5056 _this.hideWithDelay = _this.hideWithDelay.bind(_assertThisInitialized(_this));
5057 _this.onMouseOverTooltipContent = _this.onMouseOverTooltipContent.bind(_assertThisInitialized(_this));
5058 _this.onMouseLeaveTooltipContent = _this.onMouseLeaveTooltipContent.bind(_assertThisInitialized(_this));
5059 _this.show = _this.show.bind(_assertThisInitialized(_this));
5060 _this.hide = _this.hide.bind(_assertThisInitialized(_this));
5061 _this.onEscKeyDown = _this.onEscKeyDown.bind(_assertThisInitialized(_this));
5062 _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));
5063 _this.onClosed = _this.onClosed.bind(_assertThisInitialized(_this));
5064 _this.state = {
5065 isOpen: props.isOpen
5066 };
5067 _this._isMounted = false;
5068 return _this;
5069 }
5070
5071 var _proto = TooltipPopoverWrapper.prototype;
5072
5073 _proto.componentDidMount = function componentDidMount() {
5074 this._isMounted = true;
5075 this.updateTarget();
5076 };
5077
5078 _proto.componentWillUnmount = function componentWillUnmount() {
5079 this._isMounted = false;
5080 this.removeTargetEvents();
5081 this.clearShowTimeout();
5082 this.clearHideTimeout();
5083 };
5084
5085 TooltipPopoverWrapper.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {
5086 if (props.isOpen && !state.isOpen) {
5087 return {
5088 isOpen: props.isOpen
5089 };
5090 } else return null;
5091 };
5092
5093 _proto.onMouseOverTooltipContent = function onMouseOverTooltipContent() {
5094 if (this.props.trigger.indexOf('hover') > -1 && !this.props.autohide) {
5095 if (this._hideTimeout) {
5096 this.clearHideTimeout();
5097 }
5098
5099 if (this.state.isOpen && !this.props.isOpen) {
5100 this.toggle();
5101 }
5102 }
5103 };
5104
5105 _proto.onMouseLeaveTooltipContent = function onMouseLeaveTooltipContent(e) {
5106 if (this.props.trigger.indexOf('hover') > -1 && !this.props.autohide) {
5107 if (this._showTimeout) {
5108 this.clearShowTimeout();
5109 }
5110
5111 e.persist();
5112 this._hideTimeout = setTimeout(this.hide.bind(this, e), this.getDelay('hide'));
5113 }
5114 };
5115
5116 _proto.onEscKeyDown = function onEscKeyDown(e) {
5117 if (e.key === 'Escape') {
5118 this.hide(e);
5119 }
5120 };
5121
5122 _proto.getRef = function getRef(ref) {
5123 var innerRef = this.props.innerRef;
5124
5125 if (innerRef) {
5126 if (typeof innerRef === 'function') {
5127 innerRef(ref);
5128 } else if (typeof innerRef === 'object') {
5129 innerRef.current = ref;
5130 }
5131 }
5132
5133 this._popover = ref;
5134 };
5135
5136 _proto.getDelay = function getDelay(key) {
5137 var delay = this.props.delay;
5138
5139 if (typeof delay === 'object') {
5140 return isNaN(delay[key]) ? DEFAULT_DELAYS[key] : delay[key];
5141 }
5142
5143 return delay;
5144 };
5145
5146 _proto.show = function show(e) {
5147 if (!this.props.isOpen) {
5148 this.clearShowTimeout();
5149 this.toggle(e);
5150 }
5151 };
5152
5153 _proto.showWithDelay = function showWithDelay(e) {
5154 if (this._hideTimeout) {
5155 this.clearHideTimeout();
5156 }
5157
5158 this._showTimeout = setTimeout(this.show.bind(this, e), this.getDelay('show'));
5159 };
5160
5161 _proto.hide = function hide(e) {
5162 if (this.props.isOpen) {
5163 this.clearHideTimeout();
5164 this.toggle(e);
5165 }
5166 };
5167
5168 _proto.hideWithDelay = function hideWithDelay(e) {
5169 if (this._showTimeout) {
5170 this.clearShowTimeout();
5171 }
5172
5173 this._hideTimeout = setTimeout(this.hide.bind(this, e), this.getDelay('hide'));
5174 };
5175
5176 _proto.clearShowTimeout = function clearShowTimeout() {
5177 clearTimeout(this._showTimeout);
5178 this._showTimeout = undefined;
5179 };
5180
5181 _proto.clearHideTimeout = function clearHideTimeout() {
5182 clearTimeout(this._hideTimeout);
5183 this._hideTimeout = undefined;
5184 };
5185
5186 _proto.handleDocumentClick = function handleDocumentClick(e) {
5187 var triggers = this.props.trigger.split(' ');
5188
5189 if (triggers.indexOf('legacy') > -1 && (this.props.isOpen || isInDOMSubtree(e.target, this._target))) {
5190 if (this._hideTimeout) {
5191 this.clearHideTimeout();
5192 }
5193
5194 if (this.props.isOpen && !isInDOMSubtree(e.target, this._popover)) {
5195 this.hideWithDelay(e);
5196 } else if (!this.props.isOpen) {
5197 this.showWithDelay(e);
5198 }
5199 } else if (triggers.indexOf('click') > -1 && isInDOMSubtree(e.target, this._target)) {
5200 if (this._hideTimeout) {
5201 this.clearHideTimeout();
5202 }
5203
5204 if (!this.props.isOpen) {
5205 this.showWithDelay(e);
5206 } else {
5207 this.hideWithDelay(e);
5208 }
5209 }
5210 };
5211
5212 _proto.addTargetEvents = function addTargetEvents() {
5213 if (this.props.trigger) {
5214 var triggers = this.props.trigger.split(' ');
5215
5216 if (triggers.indexOf('manual') === -1) {
5217 if (triggers.indexOf('click') > -1 || triggers.indexOf('legacy') > -1) {
5218 document.addEventListener('click', this.handleDocumentClick, true);
5219 }
5220
5221 if (this._target) {
5222 if (triggers.indexOf('hover') > -1) {
5223 this._target.addEventListener('mouseover', this.showWithDelay, true);
5224
5225 this._target.addEventListener('mouseout', this.hideWithDelay, true);
5226 }
5227
5228 if (triggers.indexOf('focus') > -1) {
5229 this._target.addEventListener('focusin', this.show, true);
5230
5231 this._target.addEventListener('focusout', this.hide, true);
5232 }
5233
5234 this._target.addEventListener('keydown', this.onEscKeyDown, true);
5235 }
5236 }
5237 }
5238 };
5239
5240 _proto.removeTargetEvents = function removeTargetEvents() {
5241 if (this._target) {
5242 this._target.removeEventListener('mouseover', this.showWithDelay, true);
5243
5244 this._target.removeEventListener('mouseout', this.hideWithDelay, true);
5245
5246 this._target.removeEventListener('keydown', this.onEscKeyDown, true);
5247
5248 this._target.removeEventListener('focusin', this.show, true);
5249
5250 this._target.removeEventListener('focusout', this.hide, true);
5251 }
5252
5253 document.removeEventListener('click', this.handleDocumentClick, true);
5254 };
5255
5256 _proto.updateTarget = function updateTarget() {
5257 var newTarget = getTarget(this.props.target);
5258
5259 if (newTarget !== this._target) {
5260 this.removeTargetEvents();
5261 this._target = newTarget;
5262 this.addTargetEvents();
5263 }
5264 };
5265
5266 _proto.toggle = function toggle(e) {
5267 if (this.props.disabled || !this._isMounted) {
5268 return e && e.preventDefault();
5269 }
5270
5271 return this.props.toggle(e);
5272 };
5273
5274 _proto.onClosed = function onClosed() {
5275 this.setState({
5276 isOpen: false
5277 });
5278 };
5279
5280 _proto.render = function render() {
5281 if (!this.state.isOpen) {
5282 return null;
5283 }
5284
5285 this.updateTarget();
5286 var _this$props = this.props,
5287 className = _this$props.className,
5288 cssModule = _this$props.cssModule,
5289 innerClassName = _this$props.innerClassName,
5290 target = _this$props.target,
5291 isOpen = _this$props.isOpen,
5292 hideArrow = _this$props.hideArrow,
5293 boundariesElement = _this$props.boundariesElement,
5294 placement = _this$props.placement,
5295 placementPrefix = _this$props.placementPrefix,
5296 arrowClassName = _this$props.arrowClassName,
5297 popperClassName = _this$props.popperClassName,
5298 container = _this$props.container,
5299 modifiers = _this$props.modifiers,
5300 offset = _this$props.offset,
5301 fade = _this$props.fade,
5302 flip = _this$props.flip;
5303 var attributes = omit(this.props, Object.keys(propTypes$C));
5304 var popperClasses = mapToCssModules(popperClassName, cssModule);
5305 var classes = mapToCssModules(innerClassName, cssModule);
5306 return React__default.createElement(PopperContent, {
5307 className: className,
5308 target: target,
5309 isOpen: isOpen,
5310 hideArrow: hideArrow,
5311 boundariesElement: boundariesElement,
5312 placement: placement,
5313 placementPrefix: placementPrefix,
5314 arrowClassName: arrowClassName,
5315 popperClassName: popperClasses,
5316 container: container,
5317 modifiers: modifiers,
5318 offset: offset,
5319 cssModule: cssModule,
5320 onClosed: this.onClosed,
5321 fade: fade,
5322 flip: flip
5323 }, React__default.createElement("div", _extends({}, attributes, {
5324 ref: this.getRef,
5325 className: classes,
5326 role: "tooltip",
5327 "aria-hidden": isOpen,
5328 onMouseOver: this.onMouseOverTooltipContent,
5329 onMouseLeave: this.onMouseLeaveTooltipContent,
5330 onKeyDown: this.onEscKeyDown
5331 })));
5332 };
5333
5334 return TooltipPopoverWrapper;
5335 }(React__default.Component);
5336
5337 TooltipPopoverWrapper.propTypes = propTypes$C;
5338 TooltipPopoverWrapper.defaultProps = defaultProps$y;
5339
5340 var defaultProps$z = {
5341 placement: 'right',
5342 placementPrefix: 'bs-popover',
5343 trigger: 'click'
5344 };
5345
5346 var Popover = function Popover(props) {
5347 var popperClasses = classnames('popover', 'show');
5348 var classes = classnames('popover-inner', props.innerClassName);
5349 return React__default.createElement(TooltipPopoverWrapper, _extends({}, props, {
5350 popperClassName: popperClasses,
5351 innerClassName: classes
5352 }));
5353 };
5354
5355 Popover.propTypes = propTypes$C;
5356 Popover.defaultProps = defaultProps$z;
5357
5358 var omitKeys = ['defaultOpen'];
5359
5360 var UncontrolledPopover =
5361 /*#__PURE__*/
5362 function (_Component) {
5363 _inheritsLoose(UncontrolledPopover, _Component);
5364
5365 function UncontrolledPopover(props) {
5366 var _this;
5367
5368 _this = _Component.call(this, props) || this;
5369 _this.state = {
5370 isOpen: props.defaultOpen || false
5371 };
5372 _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));
5373 return _this;
5374 }
5375
5376 var _proto = UncontrolledPopover.prototype;
5377
5378 _proto.toggle = function toggle() {
5379 this.setState({
5380 isOpen: !this.state.isOpen
5381 });
5382 };
5383
5384 _proto.render = function render() {
5385 return React__default.createElement(Popover, _extends({
5386 isOpen: this.state.isOpen,
5387 toggle: this.toggle
5388 }, omit(this.props, omitKeys)));
5389 };
5390
5391 return UncontrolledPopover;
5392 }(React.Component);
5393 UncontrolledPopover.propTypes = _extends({
5394 defaultOpen: propTypes.bool
5395 }, Popover.propTypes);
5396
5397 var propTypes$D = {
5398 tag: tagPropType,
5399 className: propTypes.string,
5400 cssModule: propTypes.object
5401 };
5402 var defaultProps$A = {
5403 tag: 'h3'
5404 };
5405
5406 var PopoverHeader = function PopoverHeader(props) {
5407 var className = props.className,
5408 cssModule = props.cssModule,
5409 Tag = props.tag,
5410 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
5411
5412 var classes = mapToCssModules(classnames(className, 'popover-header'), cssModule);
5413 return React__default.createElement(Tag, _extends({}, attributes, {
5414 className: classes
5415 }));
5416 };
5417
5418 PopoverHeader.propTypes = propTypes$D;
5419 PopoverHeader.defaultProps = defaultProps$A;
5420
5421 var propTypes$E = {
5422 tag: tagPropType,
5423 className: propTypes.string,
5424 cssModule: propTypes.object
5425 };
5426 var defaultProps$B = {
5427 tag: 'div'
5428 };
5429
5430 var PopoverBody = function PopoverBody(props) {
5431 var className = props.className,
5432 cssModule = props.cssModule,
5433 Tag = props.tag,
5434 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
5435
5436 var classes = mapToCssModules(classnames(className, 'popover-body'), cssModule);
5437 return React__default.createElement(Tag, _extends({}, attributes, {
5438 className: classes
5439 }));
5440 };
5441
5442 PopoverBody.propTypes = propTypes$E;
5443 PopoverBody.defaultProps = defaultProps$B;
5444
5445 /**
5446 * lodash (Custom Build) <https://lodash.com/>
5447 * Build: `lodash modularize exports="npm" -o ./`
5448 * Copyright jQuery Foundation and other contributors <https://jquery.org/>
5449 * Released under MIT license <https://lodash.com/license>
5450 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
5451 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
5452 */
5453
5454 /** Used as references for various `Number` constants. */
5455 var NAN = 0 / 0;
5456 /** `Object#toString` result references. */
5457
5458 var symbolTag = '[object Symbol]';
5459 /** Used to match leading and trailing whitespace. */
5460
5461 var reTrim = /^\s+|\s+$/g;
5462 /** Used to detect bad signed hexadecimal string values. */
5463
5464 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
5465 /** Used to detect binary string values. */
5466
5467 var reIsBinary = /^0b[01]+$/i;
5468 /** Used to detect octal string values. */
5469
5470 var reIsOctal = /^0o[0-7]+$/i;
5471 /** Built-in method references without a dependency on `root`. */
5472
5473 var freeParseInt = parseInt;
5474 /** Used for built-in method references. */
5475
5476 var objectProto$1 = Object.prototype;
5477 /**
5478 * Used to resolve the
5479 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
5480 * of values.
5481 */
5482
5483 var objectToString$1 = objectProto$1.toString;
5484 /**
5485 * Checks if `value` is the
5486 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
5487 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
5488 *
5489 * @static
5490 * @memberOf _
5491 * @since 0.1.0
5492 * @category Lang
5493 * @param {*} value The value to check.
5494 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
5495 * @example
5496 *
5497 * _.isObject({});
5498 * // => true
5499 *
5500 * _.isObject([1, 2, 3]);
5501 * // => true
5502 *
5503 * _.isObject(_.noop);
5504 * // => true
5505 *
5506 * _.isObject(null);
5507 * // => false
5508 */
5509
5510 function isObject$2(value) {
5511 var type = typeof value;
5512 return !!value && (type == 'object' || type == 'function');
5513 }
5514 /**
5515 * Checks if `value` is object-like. A value is object-like if it's not `null`
5516 * and has a `typeof` result of "object".
5517 *
5518 * @static
5519 * @memberOf _
5520 * @since 4.0.0
5521 * @category Lang
5522 * @param {*} value The value to check.
5523 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
5524 * @example
5525 *
5526 * _.isObjectLike({});
5527 * // => true
5528 *
5529 * _.isObjectLike([1, 2, 3]);
5530 * // => true
5531 *
5532 * _.isObjectLike(_.noop);
5533 * // => false
5534 *
5535 * _.isObjectLike(null);
5536 * // => false
5537 */
5538
5539
5540 function isObjectLike(value) {
5541 return !!value && typeof value == 'object';
5542 }
5543 /**
5544 * Checks if `value` is classified as a `Symbol` primitive or object.
5545 *
5546 * @static
5547 * @memberOf _
5548 * @since 4.0.0
5549 * @category Lang
5550 * @param {*} value The value to check.
5551 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
5552 * @example
5553 *
5554 * _.isSymbol(Symbol.iterator);
5555 * // => true
5556 *
5557 * _.isSymbol('abc');
5558 * // => false
5559 */
5560
5561
5562 function isSymbol(value) {
5563 return typeof value == 'symbol' || isObjectLike(value) && objectToString$1.call(value) == symbolTag;
5564 }
5565 /**
5566 * Converts `value` to a number.
5567 *
5568 * @static
5569 * @memberOf _
5570 * @since 4.0.0
5571 * @category Lang
5572 * @param {*} value The value to process.
5573 * @returns {number} Returns the number.
5574 * @example
5575 *
5576 * _.toNumber(3.2);
5577 * // => 3.2
5578 *
5579 * _.toNumber(Number.MIN_VALUE);
5580 * // => 5e-324
5581 *
5582 * _.toNumber(Infinity);
5583 * // => Infinity
5584 *
5585 * _.toNumber('3.2');
5586 * // => 3.2
5587 */
5588
5589
5590 function toNumber(value) {
5591 if (typeof value == 'number') {
5592 return value;
5593 }
5594
5595 if (isSymbol(value)) {
5596 return NAN;
5597 }
5598
5599 if (isObject$2(value)) {
5600 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
5601 value = isObject$2(other) ? other + '' : other;
5602 }
5603
5604 if (typeof value != 'string') {
5605 return value === 0 ? value : +value;
5606 }
5607
5608 value = value.replace(reTrim, '');
5609 var isBinary = reIsBinary.test(value);
5610 return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
5611 }
5612
5613 var lodash_tonumber = toNumber;
5614
5615 var propTypes$F = {
5616 children: propTypes.node,
5617 bar: propTypes.bool,
5618 multi: propTypes.bool,
5619 tag: tagPropType,
5620 value: propTypes.oneOfType([propTypes.string, propTypes.number]),
5621 max: propTypes.oneOfType([propTypes.string, propTypes.number]),
5622 animated: propTypes.bool,
5623 striped: propTypes.bool,
5624 color: propTypes.string,
5625 className: propTypes.string,
5626 barClassName: propTypes.string,
5627 cssModule: propTypes.object
5628 };
5629 var defaultProps$C = {
5630 tag: 'div',
5631 value: 0,
5632 max: 100
5633 };
5634
5635 var Progress = function Progress(props) {
5636 var children = props.children,
5637 className = props.className,
5638 barClassName = props.barClassName,
5639 cssModule = props.cssModule,
5640 value = props.value,
5641 max = props.max,
5642 animated = props.animated,
5643 striped = props.striped,
5644 color = props.color,
5645 bar = props.bar,
5646 multi = props.multi,
5647 Tag = props.tag,
5648 attributes = _objectWithoutPropertiesLoose(props, ["children", "className", "barClassName", "cssModule", "value", "max", "animated", "striped", "color", "bar", "multi", "tag"]);
5649
5650 var percent = lodash_tonumber(value) / lodash_tonumber(max) * 100;
5651 var progressClasses = mapToCssModules(classnames(className, 'progress'), cssModule);
5652 var progressBarClasses = mapToCssModules(classnames('progress-bar', bar ? className || barClassName : barClassName, animated ? 'progress-bar-animated' : null, color ? "bg-" + color : null, striped || animated ? 'progress-bar-striped' : null), cssModule);
5653 var ProgressBar = multi ? children : React__default.createElement("div", {
5654 className: progressBarClasses,
5655 style: {
5656 width: percent + "%"
5657 },
5658 role: "progressbar",
5659 "aria-valuenow": value,
5660 "aria-valuemin": "0",
5661 "aria-valuemax": max,
5662 children: children
5663 });
5664
5665 if (bar) {
5666 return ProgressBar;
5667 }
5668
5669 return React__default.createElement(Tag, _extends({}, attributes, {
5670 className: progressClasses,
5671 children: ProgressBar
5672 }));
5673 };
5674
5675 Progress.propTypes = propTypes$F;
5676 Progress.defaultProps = defaultProps$C;
5677
5678 var propTypes$G = {
5679 children: propTypes.node.isRequired,
5680 node: propTypes.any
5681 };
5682
5683 var Portal =
5684 /*#__PURE__*/
5685 function (_React$Component) {
5686 _inheritsLoose(Portal, _React$Component);
5687
5688 function Portal() {
5689 return _React$Component.apply(this, arguments) || this;
5690 }
5691
5692 var _proto = Portal.prototype;
5693
5694 _proto.componentWillUnmount = function componentWillUnmount() {
5695 if (this.defaultNode) {
5696 document.body.removeChild(this.defaultNode);
5697 }
5698
5699 this.defaultNode = null;
5700 };
5701
5702 _proto.render = function render() {
5703 if (!canUseDOM) {
5704 return null;
5705 }
5706
5707 if (!this.props.node && !this.defaultNode) {
5708 this.defaultNode = document.createElement('div');
5709 document.body.appendChild(this.defaultNode);
5710 }
5711
5712 return ReactDOM.createPortal(this.props.children, this.props.node || this.defaultNode);
5713 };
5714
5715 return Portal;
5716 }(React__default.Component);
5717
5718 Portal.propTypes = propTypes$G;
5719
5720 function noop$1() {}
5721
5722 var FadePropTypes = propTypes.shape(Fade.propTypes);
5723 var propTypes$H = {
5724 isOpen: propTypes.bool,
5725 autoFocus: propTypes.bool,
5726 centered: propTypes.bool,
5727 scrollable: propTypes.bool,
5728 size: propTypes.string,
5729 toggle: propTypes.func,
5730 keyboard: propTypes.bool,
5731 role: propTypes.string,
5732 labelledBy: propTypes.string,
5733 backdrop: propTypes.oneOfType([propTypes.bool, propTypes.oneOf(['static'])]),
5734 onEnter: propTypes.func,
5735 onExit: propTypes.func,
5736 onOpened: propTypes.func,
5737 onClosed: propTypes.func,
5738 children: propTypes.node,
5739 className: propTypes.string,
5740 wrapClassName: propTypes.string,
5741 modalClassName: propTypes.string,
5742 backdropClassName: propTypes.string,
5743 contentClassName: propTypes.string,
5744 external: propTypes.node,
5745 fade: propTypes.bool,
5746 cssModule: propTypes.object,
5747 zIndex: propTypes.oneOfType([propTypes.number, propTypes.string]),
5748 backdropTransition: FadePropTypes,
5749 modalTransition: FadePropTypes,
5750 innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func]),
5751 unmountOnClose: propTypes.bool,
5752 returnFocusAfterClose: propTypes.bool
5753 };
5754 var propsToOmit = Object.keys(propTypes$H);
5755 var defaultProps$D = {
5756 isOpen: false,
5757 autoFocus: true,
5758 centered: false,
5759 scrollable: false,
5760 role: 'dialog',
5761 backdrop: true,
5762 keyboard: true,
5763 zIndex: 1050,
5764 fade: true,
5765 onOpened: noop$1,
5766 onClosed: noop$1,
5767 modalTransition: {
5768 timeout: TransitionTimeouts.Modal
5769 },
5770 backdropTransition: {
5771 mountOnEnter: true,
5772 timeout: TransitionTimeouts.Fade // uses standard fade transition
5773
5774 },
5775 unmountOnClose: true,
5776 returnFocusAfterClose: true
5777 };
5778
5779 var Modal =
5780 /*#__PURE__*/
5781 function (_React$Component) {
5782 _inheritsLoose(Modal, _React$Component);
5783
5784 function Modal(props) {
5785 var _this;
5786
5787 _this = _React$Component.call(this, props) || this;
5788 _this._element = null;
5789 _this._originalBodyPadding = null;
5790 _this.getFocusableChildren = _this.getFocusableChildren.bind(_assertThisInitialized(_this));
5791 _this.handleBackdropClick = _this.handleBackdropClick.bind(_assertThisInitialized(_this));
5792 _this.handleBackdropMouseDown = _this.handleBackdropMouseDown.bind(_assertThisInitialized(_this));
5793 _this.handleEscape = _this.handleEscape.bind(_assertThisInitialized(_this));
5794 _this.handleTab = _this.handleTab.bind(_assertThisInitialized(_this));
5795 _this.onOpened = _this.onOpened.bind(_assertThisInitialized(_this));
5796 _this.onClosed = _this.onClosed.bind(_assertThisInitialized(_this));
5797 _this.manageFocusAfterClose = _this.manageFocusAfterClose.bind(_assertThisInitialized(_this));
5798 _this.state = {
5799 isOpen: false
5800 };
5801 return _this;
5802 }
5803
5804 var _proto = Modal.prototype;
5805
5806 _proto.componentDidMount = function componentDidMount() {
5807 var _this$props = this.props,
5808 isOpen = _this$props.isOpen,
5809 autoFocus = _this$props.autoFocus,
5810 onEnter = _this$props.onEnter;
5811
5812 if (isOpen) {
5813 this.init();
5814 this.setState({
5815 isOpen: true
5816 });
5817
5818 if (autoFocus) {
5819 this.setFocus();
5820 }
5821 }
5822
5823 if (onEnter) {
5824 onEnter();
5825 }
5826
5827 this._isMounted = true;
5828 };
5829
5830 _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
5831 if (this.props.isOpen && !prevProps.isOpen) {
5832 this.init();
5833 this.setState({
5834 isOpen: true
5835 }); // let render() renders Modal Dialog first
5836
5837 return;
5838 } // now Modal Dialog is rendered and we can refer this._element and this._dialog
5839
5840
5841 if (this.props.autoFocus && this.state.isOpen && !prevState.isOpen) {
5842 this.setFocus();
5843 }
5844
5845 if (this._element && prevProps.zIndex !== this.props.zIndex) {
5846 this._element.style.zIndex = this.props.zIndex;
5847 }
5848 };
5849
5850 _proto.componentWillUnmount = function componentWillUnmount() {
5851 if (this.props.onExit) {
5852 this.props.onExit();
5853 }
5854
5855 if (this._element) {
5856 this.destroy();
5857
5858 if (this.state.isOpen) {
5859 this.close();
5860 }
5861 }
5862
5863 this._isMounted = false;
5864 };
5865
5866 _proto.onOpened = function onOpened(node, isAppearing) {
5867 this.props.onOpened();
5868 (this.props.modalTransition.onEntered || noop$1)(node, isAppearing);
5869 };
5870
5871 _proto.onClosed = function onClosed(node) {
5872 var unmountOnClose = this.props.unmountOnClose; // so all methods get called before it is unmounted
5873
5874 this.props.onClosed();
5875 (this.props.modalTransition.onExited || noop$1)(node);
5876
5877 if (unmountOnClose) {
5878 this.destroy();
5879 }
5880
5881 this.close();
5882
5883 if (this._isMounted) {
5884 this.setState({
5885 isOpen: false
5886 });
5887 }
5888 };
5889
5890 _proto.setFocus = function setFocus() {
5891 if (this._dialog && this._dialog.parentNode && typeof this._dialog.parentNode.focus === 'function') {
5892 this._dialog.parentNode.focus();
5893 }
5894 };
5895
5896 _proto.getFocusableChildren = function getFocusableChildren() {
5897 return this._element.querySelectorAll(focusableElements.join(', '));
5898 };
5899
5900 _proto.getFocusedChild = function getFocusedChild() {
5901 var currentFocus;
5902 var focusableChildren = this.getFocusableChildren();
5903
5904 try {
5905 currentFocus = document.activeElement;
5906 } catch (err) {
5907 currentFocus = focusableChildren[0];
5908 }
5909
5910 return currentFocus;
5911 } // not mouseUp because scrollbar fires it, shouldn't close when user scrolls
5912 ;
5913
5914 _proto.handleBackdropClick = function handleBackdropClick(e) {
5915 if (e.target === this._mouseDownElement) {
5916 e.stopPropagation();
5917 if (!this.props.isOpen || this.props.backdrop !== true) return;
5918 var backdrop = this._dialog ? this._dialog.parentNode : null;
5919
5920 if (backdrop && e.target === backdrop && this.props.toggle) {
5921 this.props.toggle(e);
5922 }
5923 }
5924 };
5925
5926 _proto.handleTab = function handleTab(e) {
5927 if (e.which !== 9) return;
5928 var focusableChildren = this.getFocusableChildren();
5929 var totalFocusable = focusableChildren.length;
5930 if (totalFocusable === 0) return;
5931 var currentFocus = this.getFocusedChild();
5932 var focusedIndex = 0;
5933
5934 for (var i = 0; i < totalFocusable; i += 1) {
5935 if (focusableChildren[i] === currentFocus) {
5936 focusedIndex = i;
5937 break;
5938 }
5939 }
5940
5941 if (e.shiftKey && focusedIndex === 0) {
5942 e.preventDefault();
5943 focusableChildren[totalFocusable - 1].focus();
5944 } else if (!e.shiftKey && focusedIndex === totalFocusable - 1) {
5945 e.preventDefault();
5946 focusableChildren[0].focus();
5947 }
5948 };
5949
5950 _proto.handleBackdropMouseDown = function handleBackdropMouseDown(e) {
5951 this._mouseDownElement = e.target;
5952 };
5953
5954 _proto.handleEscape = function handleEscape(e) {
5955 if (this.props.isOpen && this.props.keyboard && e.keyCode === 27 && this.props.toggle) {
5956 e.preventDefault();
5957 e.stopPropagation();
5958 this.props.toggle(e);
5959 }
5960 };
5961
5962 _proto.init = function init() {
5963 try {
5964 this._triggeringElement = document.activeElement;
5965 } catch (err) {
5966 this._triggeringElement = null;
5967 }
5968
5969 if (!this._element) {
5970 this._element = document.createElement('div');
5971
5972 this._element.setAttribute('tabindex', '-1');
5973
5974 this._element.style.position = 'relative';
5975 this._element.style.zIndex = this.props.zIndex;
5976 document.body.appendChild(this._element);
5977 }
5978
5979 this._originalBodyPadding = getOriginalBodyPadding();
5980 conditionallyUpdateScrollbar();
5981
5982 if (Modal.openCount === 0) {
5983 document.body.className = classnames(document.body.className, mapToCssModules('modal-open', this.props.cssModule));
5984 }
5985
5986 Modal.openCount += 1;
5987 };
5988
5989 _proto.destroy = function destroy() {
5990 if (this._element) {
5991 document.body.removeChild(this._element);
5992 this._element = null;
5993 }
5994
5995 this.manageFocusAfterClose();
5996 };
5997
5998 _proto.manageFocusAfterClose = function manageFocusAfterClose() {
5999 if (this._triggeringElement) {
6000 var returnFocusAfterClose = this.props.returnFocusAfterClose;
6001 if (this._triggeringElement.focus && returnFocusAfterClose) this._triggeringElement.focus();
6002 this._triggeringElement = null;
6003 }
6004 };
6005
6006 _proto.close = function close() {
6007 if (Modal.openCount <= 1) {
6008 var modalOpenClassName = mapToCssModules('modal-open', this.props.cssModule); // Use regex to prevent matching `modal-open` as part of a different class, e.g. `my-modal-opened`
6009
6010 var modalOpenClassNameRegex = new RegExp("(^| )" + modalOpenClassName + "( |$)");
6011 document.body.className = document.body.className.replace(modalOpenClassNameRegex, ' ').trim();
6012 }
6013
6014 this.manageFocusAfterClose();
6015 Modal.openCount = Math.max(0, Modal.openCount - 1);
6016 setScrollbarWidth(this._originalBodyPadding);
6017 };
6018
6019 _proto.renderModalDialog = function renderModalDialog() {
6020 var _classNames,
6021 _this2 = this;
6022
6023 var attributes = omit(this.props, propsToOmit);
6024 var dialogBaseClass = 'modal-dialog';
6025 return React__default.createElement("div", _extends({}, attributes, {
6026 className: mapToCssModules(classnames(dialogBaseClass, this.props.className, (_classNames = {}, _classNames["modal-" + this.props.size] = this.props.size, _classNames[dialogBaseClass + "-centered"] = this.props.centered, _classNames[dialogBaseClass + "-scrollable"] = this.props.scrollable, _classNames)), this.props.cssModule),
6027 role: "document",
6028 ref: function ref(c) {
6029 _this2._dialog = c;
6030 }
6031 }), React__default.createElement("div", {
6032 className: mapToCssModules(classnames('modal-content', this.props.contentClassName), this.props.cssModule)
6033 }, this.props.children));
6034 };
6035
6036 _proto.render = function render() {
6037 var unmountOnClose = this.props.unmountOnClose;
6038
6039 if (!!this._element && (this.state.isOpen || !unmountOnClose)) {
6040 var isModalHidden = !!this._element && !this.state.isOpen && !unmountOnClose;
6041 this._element.style.display = isModalHidden ? 'none' : 'block';
6042 var _this$props2 = this.props,
6043 wrapClassName = _this$props2.wrapClassName,
6044 modalClassName = _this$props2.modalClassName,
6045 backdropClassName = _this$props2.backdropClassName,
6046 cssModule = _this$props2.cssModule,
6047 isOpen = _this$props2.isOpen,
6048 backdrop = _this$props2.backdrop,
6049 role = _this$props2.role,
6050 labelledBy = _this$props2.labelledBy,
6051 external = _this$props2.external,
6052 innerRef = _this$props2.innerRef;
6053 var modalAttributes = {
6054 onClick: this.handleBackdropClick,
6055 onMouseDown: this.handleBackdropMouseDown,
6056 onKeyUp: this.handleEscape,
6057 onKeyDown: this.handleTab,
6058 style: {
6059 display: 'block'
6060 },
6061 'aria-labelledby': labelledBy,
6062 role: role,
6063 tabIndex: '-1'
6064 };
6065 var hasTransition = this.props.fade;
6066
6067 var modalTransition = _extends({}, Fade.defaultProps, this.props.modalTransition, {
6068 baseClass: hasTransition ? this.props.modalTransition.baseClass : '',
6069 timeout: hasTransition ? this.props.modalTransition.timeout : 0
6070 });
6071
6072 var backdropTransition = _extends({}, Fade.defaultProps, this.props.backdropTransition, {
6073 baseClass: hasTransition ? this.props.backdropTransition.baseClass : '',
6074 timeout: hasTransition ? this.props.backdropTransition.timeout : 0
6075 });
6076
6077 var Backdrop = backdrop && (hasTransition ? React__default.createElement(Fade, _extends({}, backdropTransition, {
6078 in: isOpen && !!backdrop,
6079 cssModule: cssModule,
6080 className: mapToCssModules(classnames('modal-backdrop', backdropClassName), cssModule)
6081 })) : React__default.createElement("div", {
6082 className: mapToCssModules(classnames('modal-backdrop', 'show', backdropClassName), cssModule)
6083 }));
6084 return React__default.createElement(Portal, {
6085 node: this._element
6086 }, React__default.createElement("div", {
6087 className: mapToCssModules(wrapClassName)
6088 }, React__default.createElement(Fade, _extends({}, modalAttributes, modalTransition, {
6089 in: isOpen,
6090 onEntered: this.onOpened,
6091 onExited: this.onClosed,
6092 cssModule: cssModule,
6093 className: mapToCssModules(classnames('modal', modalClassName), cssModule),
6094 innerRef: innerRef
6095 }), external, this.renderModalDialog()), Backdrop));
6096 }
6097
6098 return null;
6099 };
6100
6101 return Modal;
6102 }(React__default.Component);
6103
6104 Modal.propTypes = propTypes$H;
6105 Modal.defaultProps = defaultProps$D;
6106 Modal.openCount = 0;
6107
6108 var propTypes$I = {
6109 tag: tagPropType,
6110 wrapTag: tagPropType,
6111 toggle: propTypes.func,
6112 className: propTypes.string,
6113 cssModule: propTypes.object,
6114 children: propTypes.node,
6115 closeAriaLabel: propTypes.string,
6116 charCode: propTypes.oneOfType([propTypes.string, propTypes.number]),
6117 close: propTypes.object
6118 };
6119 var defaultProps$E = {
6120 tag: 'h5',
6121 wrapTag: 'div',
6122 closeAriaLabel: 'Close',
6123 charCode: 215
6124 };
6125
6126 var ModalHeader = function ModalHeader(props) {
6127 var closeButton;
6128
6129 var className = props.className,
6130 cssModule = props.cssModule,
6131 children = props.children,
6132 toggle = props.toggle,
6133 Tag = props.tag,
6134 WrapTag = props.wrapTag,
6135 closeAriaLabel = props.closeAriaLabel,
6136 charCode = props.charCode,
6137 close = props.close,
6138 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "children", "toggle", "tag", "wrapTag", "closeAriaLabel", "charCode", "close"]);
6139
6140 var classes = mapToCssModules(classnames(className, 'modal-header'), cssModule);
6141
6142 if (!close && toggle) {
6143 var closeIcon = typeof charCode === 'number' ? String.fromCharCode(charCode) : charCode;
6144 closeButton = React__default.createElement("button", {
6145 type: "button",
6146 onClick: toggle,
6147 className: mapToCssModules('close', cssModule),
6148 "aria-label": closeAriaLabel
6149 }, React__default.createElement("span", {
6150 "aria-hidden": "true"
6151 }, closeIcon));
6152 }
6153
6154 return React__default.createElement(WrapTag, _extends({}, attributes, {
6155 className: classes
6156 }), React__default.createElement(Tag, {
6157 className: mapToCssModules('modal-title', cssModule)
6158 }, children), close || closeButton);
6159 };
6160
6161 ModalHeader.propTypes = propTypes$I;
6162 ModalHeader.defaultProps = defaultProps$E;
6163
6164 var propTypes$J = {
6165 tag: tagPropType,
6166 className: propTypes.string,
6167 cssModule: propTypes.object
6168 };
6169 var defaultProps$F = {
6170 tag: 'div'
6171 };
6172
6173 var ModalBody = function ModalBody(props) {
6174 var className = props.className,
6175 cssModule = props.cssModule,
6176 Tag = props.tag,
6177 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
6178
6179 var classes = mapToCssModules(classnames(className, 'modal-body'), cssModule);
6180 return React__default.createElement(Tag, _extends({}, attributes, {
6181 className: classes
6182 }));
6183 };
6184
6185 ModalBody.propTypes = propTypes$J;
6186 ModalBody.defaultProps = defaultProps$F;
6187
6188 var propTypes$K = {
6189 tag: tagPropType,
6190 className: propTypes.string,
6191 cssModule: propTypes.object
6192 };
6193 var defaultProps$G = {
6194 tag: 'div'
6195 };
6196
6197 var ModalFooter = function ModalFooter(props) {
6198 var className = props.className,
6199 cssModule = props.cssModule,
6200 Tag = props.tag,
6201 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
6202
6203 var classes = mapToCssModules(classnames(className, 'modal-footer'), cssModule);
6204 return React__default.createElement(Tag, _extends({}, attributes, {
6205 className: classes
6206 }));
6207 };
6208
6209 ModalFooter.propTypes = propTypes$K;
6210 ModalFooter.defaultProps = defaultProps$G;
6211
6212 var defaultProps$H = {
6213 placement: 'top',
6214 autohide: true,
6215 placementPrefix: 'bs-tooltip',
6216 trigger: 'click hover focus'
6217 };
6218
6219 var Tooltip = function Tooltip(props) {
6220 var popperClasses = classnames('tooltip', 'show');
6221 var classes = classnames('tooltip-inner', props.innerClassName);
6222 return React__default.createElement(TooltipPopoverWrapper, _extends({}, props, {
6223 popperClassName: popperClasses,
6224 innerClassName: classes
6225 }));
6226 };
6227
6228 Tooltip.propTypes = propTypes$C;
6229 Tooltip.defaultProps = defaultProps$H;
6230
6231 var propTypes$L = {
6232 className: propTypes.string,
6233 cssModule: propTypes.object,
6234 size: propTypes.string,
6235 bordered: propTypes.bool,
6236 borderless: propTypes.bool,
6237 striped: propTypes.bool,
6238 dark: propTypes.bool,
6239 hover: propTypes.bool,
6240 responsive: propTypes.oneOfType([propTypes.bool, propTypes.string]),
6241 tag: tagPropType,
6242 responsiveTag: tagPropType,
6243 innerRef: propTypes.oneOfType([propTypes.func, propTypes.string, propTypes.object])
6244 };
6245 var defaultProps$I = {
6246 tag: 'table',
6247 responsiveTag: 'div'
6248 };
6249
6250 var Table = function Table(props) {
6251 var className = props.className,
6252 cssModule = props.cssModule,
6253 size = props.size,
6254 bordered = props.bordered,
6255 borderless = props.borderless,
6256 striped = props.striped,
6257 dark = props.dark,
6258 hover = props.hover,
6259 responsive = props.responsive,
6260 Tag = props.tag,
6261 ResponsiveTag = props.responsiveTag,
6262 innerRef = props.innerRef,
6263 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "size", "bordered", "borderless", "striped", "dark", "hover", "responsive", "tag", "responsiveTag", "innerRef"]);
6264
6265 var classes = mapToCssModules(classnames(className, 'table', size ? 'table-' + size : false, bordered ? 'table-bordered' : false, borderless ? 'table-borderless' : false, striped ? 'table-striped' : false, dark ? 'table-dark' : false, hover ? 'table-hover' : false), cssModule);
6266 var table = React__default.createElement(Tag, _extends({}, attributes, {
6267 ref: innerRef,
6268 className: classes
6269 }));
6270
6271 if (responsive) {
6272 var responsiveClassName = mapToCssModules(responsive === true ? 'table-responsive' : "table-responsive-" + responsive, cssModule);
6273 return React__default.createElement(ResponsiveTag, {
6274 className: responsiveClassName
6275 }, table);
6276 }
6277
6278 return table;
6279 };
6280
6281 Table.propTypes = propTypes$L;
6282 Table.defaultProps = defaultProps$I;
6283
6284 var propTypes$M = {
6285 tag: tagPropType,
6286 flush: propTypes.bool,
6287 className: propTypes.string,
6288 cssModule: propTypes.object
6289 };
6290 var defaultProps$J = {
6291 tag: 'ul'
6292 };
6293
6294 var ListGroup = function ListGroup(props) {
6295 var className = props.className,
6296 cssModule = props.cssModule,
6297 Tag = props.tag,
6298 flush = props.flush,
6299 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "flush"]);
6300
6301 var classes = mapToCssModules(classnames(className, 'list-group', flush ? 'list-group-flush' : false), cssModule);
6302 return React__default.createElement(Tag, _extends({}, attributes, {
6303 className: classes
6304 }));
6305 };
6306
6307 ListGroup.propTypes = propTypes$M;
6308 ListGroup.defaultProps = defaultProps$J;
6309
6310 var propTypes$N = {
6311 children: propTypes.node,
6312 inline: propTypes.bool,
6313 tag: tagPropType,
6314 innerRef: propTypes.oneOfType([propTypes.object, propTypes.func, propTypes.string]),
6315 className: propTypes.string,
6316 cssModule: propTypes.object
6317 };
6318 var defaultProps$K = {
6319 tag: 'form'
6320 };
6321
6322 var Form =
6323 /*#__PURE__*/
6324 function (_Component) {
6325 _inheritsLoose(Form, _Component);
6326
6327 function Form(props) {
6328 var _this;
6329
6330 _this = _Component.call(this, props) || this;
6331 _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));
6332 _this.submit = _this.submit.bind(_assertThisInitialized(_this));
6333 return _this;
6334 }
6335
6336 var _proto = Form.prototype;
6337
6338 _proto.getRef = function getRef(ref) {
6339 if (this.props.innerRef) {
6340 this.props.innerRef(ref);
6341 }
6342
6343 this.ref = ref;
6344 };
6345
6346 _proto.submit = function submit() {
6347 if (this.ref) {
6348 this.ref.submit();
6349 }
6350 };
6351
6352 _proto.render = function render() {
6353 var _this$props = this.props,
6354 className = _this$props.className,
6355 cssModule = _this$props.cssModule,
6356 inline = _this$props.inline,
6357 Tag = _this$props.tag,
6358 innerRef = _this$props.innerRef,
6359 attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "cssModule", "inline", "tag", "innerRef"]);
6360
6361 var classes = mapToCssModules(classnames(className, inline ? 'form-inline' : false), cssModule);
6362 return React__default.createElement(Tag, _extends({}, attributes, {
6363 ref: innerRef,
6364 className: classes
6365 }));
6366 };
6367
6368 return Form;
6369 }(React.Component);
6370
6371 Form.propTypes = propTypes$N;
6372 Form.defaultProps = defaultProps$K;
6373
6374 var propTypes$O = {
6375 children: propTypes.node,
6376 tag: tagPropType,
6377 className: propTypes.string,
6378 cssModule: propTypes.object,
6379 valid: propTypes.bool,
6380 tooltip: propTypes.bool
6381 };
6382 var defaultProps$L = {
6383 tag: 'div',
6384 valid: undefined
6385 };
6386
6387 var FormFeedback = function FormFeedback(props) {
6388 var className = props.className,
6389 cssModule = props.cssModule,
6390 valid = props.valid,
6391 tooltip = props.tooltip,
6392 Tag = props.tag,
6393 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "valid", "tooltip", "tag"]);
6394
6395 var validMode = tooltip ? 'tooltip' : 'feedback';
6396 var classes = mapToCssModules(classnames(className, valid ? "valid-" + validMode : "invalid-" + validMode), cssModule);
6397 return React__default.createElement(Tag, _extends({}, attributes, {
6398 className: classes
6399 }));
6400 };
6401
6402 FormFeedback.propTypes = propTypes$O;
6403 FormFeedback.defaultProps = defaultProps$L;
6404
6405 var propTypes$P = {
6406 children: propTypes.node,
6407 row: propTypes.bool,
6408 check: propTypes.bool,
6409 inline: propTypes.bool,
6410 disabled: propTypes.bool,
6411 tag: tagPropType,
6412 className: propTypes.string,
6413 cssModule: propTypes.object
6414 };
6415 var defaultProps$M = {
6416 tag: 'div'
6417 };
6418
6419 var FormGroup = function FormGroup(props) {
6420 var className = props.className,
6421 cssModule = props.cssModule,
6422 row = props.row,
6423 disabled = props.disabled,
6424 check = props.check,
6425 inline = props.inline,
6426 Tag = props.tag,
6427 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "row", "disabled", "check", "inline", "tag"]);
6428
6429 var classes = mapToCssModules(classnames(className, row ? 'row' : false, check ? 'form-check' : 'form-group', check && inline ? 'form-check-inline' : false, check && disabled ? 'disabled' : false), cssModule);
6430
6431 if (Tag === 'fieldset') {
6432 attributes.disabled = disabled;
6433 }
6434
6435 return React__default.createElement(Tag, _extends({}, attributes, {
6436 className: classes
6437 }));
6438 };
6439
6440 FormGroup.propTypes = propTypes$P;
6441 FormGroup.defaultProps = defaultProps$M;
6442
6443 var propTypes$Q = {
6444 children: propTypes.node,
6445 inline: propTypes.bool,
6446 tag: tagPropType,
6447 color: propTypes.string,
6448 className: propTypes.string,
6449 cssModule: propTypes.object
6450 };
6451 var defaultProps$N = {
6452 tag: 'small',
6453 color: 'muted'
6454 };
6455
6456 var FormText = function FormText(props) {
6457 var className = props.className,
6458 cssModule = props.cssModule,
6459 inline = props.inline,
6460 color = props.color,
6461 Tag = props.tag,
6462 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "inline", "color", "tag"]);
6463
6464 var classes = mapToCssModules(classnames(className, !inline ? 'form-text' : false, color ? "text-" + color : false), cssModule);
6465 return React__default.createElement(Tag, _extends({}, attributes, {
6466 className: classes
6467 }));
6468 };
6469
6470 FormText.propTypes = propTypes$Q;
6471 FormText.defaultProps = defaultProps$N;
6472
6473 var propTypes$R = {
6474 children: propTypes.node,
6475 type: propTypes.string,
6476 size: propTypes.string,
6477 bsSize: propTypes.string,
6478 valid: propTypes.bool,
6479 invalid: propTypes.bool,
6480 tag: tagPropType,
6481 innerRef: propTypes.oneOfType([propTypes.object, propTypes.func, propTypes.string]),
6482 plaintext: propTypes.bool,
6483 addon: propTypes.bool,
6484 className: propTypes.string,
6485 cssModule: propTypes.object
6486 };
6487 var defaultProps$O = {
6488 type: 'text'
6489 };
6490
6491 var Input =
6492 /*#__PURE__*/
6493 function (_React$Component) {
6494 _inheritsLoose(Input, _React$Component);
6495
6496 function Input(props) {
6497 var _this;
6498
6499 _this = _React$Component.call(this, props) || this;
6500 _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));
6501 _this.focus = _this.focus.bind(_assertThisInitialized(_this));
6502 return _this;
6503 }
6504
6505 var _proto = Input.prototype;
6506
6507 _proto.getRef = function getRef(ref) {
6508 if (this.props.innerRef) {
6509 this.props.innerRef(ref);
6510 }
6511
6512 this.ref = ref;
6513 };
6514
6515 _proto.focus = function focus() {
6516 if (this.ref) {
6517 this.ref.focus();
6518 }
6519 };
6520
6521 _proto.render = function render() {
6522 var _this$props = this.props,
6523 className = _this$props.className,
6524 cssModule = _this$props.cssModule,
6525 type = _this$props.type,
6526 bsSize = _this$props.bsSize,
6527 valid = _this$props.valid,
6528 invalid = _this$props.invalid,
6529 tag = _this$props.tag,
6530 addon = _this$props.addon,
6531 plaintext = _this$props.plaintext,
6532 innerRef = _this$props.innerRef,
6533 attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "cssModule", "type", "bsSize", "valid", "invalid", "tag", "addon", "plaintext", "innerRef"]);
6534
6535 var checkInput = ['radio', 'checkbox'].indexOf(type) > -1;
6536 var isNotaNumber = new RegExp('\\D', 'g');
6537 var fileInput = type === 'file';
6538 var textareaInput = type === 'textarea';
6539 var selectInput = type === 'select';
6540 var Tag = tag || (selectInput || textareaInput ? type : 'input');
6541 var formControlClass = 'form-control';
6542
6543 if (plaintext) {
6544 formControlClass = formControlClass + "-plaintext";
6545 Tag = tag || 'input';
6546 } else if (fileInput) {
6547 formControlClass = formControlClass + "-file";
6548 } else if (checkInput) {
6549 if (addon) {
6550 formControlClass = null;
6551 } else {
6552 formControlClass = 'form-check-input';
6553 }
6554 }
6555
6556 if (attributes.size && isNotaNumber.test(attributes.size)) {
6557 warnOnce('Please use the prop "bsSize" instead of the "size" to bootstrap\'s input sizing.');
6558 bsSize = attributes.size;
6559 delete attributes.size;
6560 }
6561
6562 var classes = mapToCssModules(classnames(className, invalid && 'is-invalid', valid && 'is-valid', bsSize ? "form-control-" + bsSize : false, formControlClass), cssModule);
6563
6564 if (Tag === 'input' || tag && typeof tag === 'function') {
6565 attributes.type = type;
6566 }
6567
6568 if (attributes.children && !(plaintext || type === 'select' || typeof Tag !== 'string' || Tag === 'select')) {
6569 warnOnce("Input with a type of \"" + type + "\" cannot have children. Please use \"value\"/\"defaultValue\" instead.");
6570 delete attributes.children;
6571 }
6572
6573 return React__default.createElement(Tag, _extends({}, attributes, {
6574 ref: innerRef,
6575 className: classes
6576 }));
6577 };
6578
6579 return Input;
6580 }(React__default.Component);
6581
6582 Input.propTypes = propTypes$R;
6583 Input.defaultProps = defaultProps$O;
6584
6585 var propTypes$S = {
6586 tag: tagPropType,
6587 size: propTypes.string,
6588 className: propTypes.string,
6589 cssModule: propTypes.object
6590 };
6591 var defaultProps$P = {
6592 tag: 'div'
6593 };
6594
6595 var InputGroup = function InputGroup(props) {
6596 var className = props.className,
6597 cssModule = props.cssModule,
6598 Tag = props.tag,
6599 size = props.size,
6600 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "size"]);
6601
6602 var classes = mapToCssModules(classnames(className, 'input-group', size ? "input-group-" + size : null), cssModule);
6603 return React__default.createElement(Tag, _extends({}, attributes, {
6604 className: classes
6605 }));
6606 };
6607
6608 InputGroup.propTypes = propTypes$S;
6609 InputGroup.defaultProps = defaultProps$P;
6610
6611 var propTypes$T = {
6612 tag: tagPropType,
6613 className: propTypes.string,
6614 cssModule: propTypes.object
6615 };
6616 var defaultProps$Q = {
6617 tag: 'span'
6618 };
6619
6620 var InputGroupText = function InputGroupText(props) {
6621 var className = props.className,
6622 cssModule = props.cssModule,
6623 Tag = props.tag,
6624 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
6625
6626 var classes = mapToCssModules(classnames(className, 'input-group-text'), cssModule);
6627 return React__default.createElement(Tag, _extends({}, attributes, {
6628 className: classes
6629 }));
6630 };
6631
6632 InputGroupText.propTypes = propTypes$T;
6633 InputGroupText.defaultProps = defaultProps$Q;
6634
6635 var propTypes$U = {
6636 tag: tagPropType,
6637 addonType: propTypes.oneOf(['prepend', 'append']).isRequired,
6638 children: propTypes.node,
6639 className: propTypes.string,
6640 cssModule: propTypes.object
6641 };
6642 var defaultProps$R = {
6643 tag: 'div'
6644 };
6645
6646 var InputGroupAddon = function InputGroupAddon(props) {
6647 var className = props.className,
6648 cssModule = props.cssModule,
6649 Tag = props.tag,
6650 addonType = props.addonType,
6651 children = props.children,
6652 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "addonType", "children"]);
6653
6654 var classes = mapToCssModules(classnames(className, 'input-group-' + addonType), cssModule); // Convenience to assist with transition
6655
6656 if (typeof children === 'string') {
6657 return React__default.createElement(Tag, _extends({}, attributes, {
6658 className: classes
6659 }), React__default.createElement(InputGroupText, {
6660 children: children
6661 }));
6662 }
6663
6664 return React__default.createElement(Tag, _extends({}, attributes, {
6665 className: classes,
6666 children: children
6667 }));
6668 };
6669
6670 InputGroupAddon.propTypes = propTypes$U;
6671 InputGroupAddon.defaultProps = defaultProps$R;
6672
6673 var propTypes$V = {
6674 addonType: propTypes.oneOf(['prepend', 'append']).isRequired,
6675 children: propTypes.node
6676 };
6677
6678 var InputGroupButtonDropdown = function InputGroupButtonDropdown(props) {
6679 return React__default.createElement(Dropdown, props);
6680 };
6681
6682 InputGroupButtonDropdown.propTypes = propTypes$V;
6683
6684 var colWidths$1 = ['xs', 'sm', 'md', 'lg', 'xl'];
6685 var stringOrNumberProp$1 = propTypes.oneOfType([propTypes.number, propTypes.string]);
6686 var columnProps$1 = propTypes.oneOfType([propTypes.string, propTypes.number, propTypes.shape({
6687 size: stringOrNumberProp$1,
6688 order: stringOrNumberProp$1,
6689 offset: stringOrNumberProp$1
6690 })]);
6691 var propTypes$W = {
6692 children: propTypes.node,
6693 hidden: propTypes.bool,
6694 check: propTypes.bool,
6695 size: propTypes.string,
6696 for: propTypes.string,
6697 tag: tagPropType,
6698 className: propTypes.string,
6699 cssModule: propTypes.object,
6700 xs: columnProps$1,
6701 sm: columnProps$1,
6702 md: columnProps$1,
6703 lg: columnProps$1,
6704 xl: columnProps$1,
6705 widths: propTypes.array
6706 };
6707 var defaultProps$S = {
6708 tag: 'label',
6709 widths: colWidths$1
6710 };
6711
6712 var getColumnSizeClass$1 = function getColumnSizeClass(isXs, colWidth, colSize) {
6713 if (colSize === true || colSize === '') {
6714 return isXs ? 'col' : "col-" + colWidth;
6715 } else if (colSize === 'auto') {
6716 return isXs ? 'col-auto' : "col-" + colWidth + "-auto";
6717 }
6718
6719 return isXs ? "col-" + colSize : "col-" + colWidth + "-" + colSize;
6720 };
6721
6722 var Label = function Label(props) {
6723 var className = props.className,
6724 cssModule = props.cssModule,
6725 hidden = props.hidden,
6726 widths = props.widths,
6727 Tag = props.tag,
6728 check = props.check,
6729 size = props.size,
6730 htmlFor = props.for,
6731 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "hidden", "widths", "tag", "check", "size", "for"]);
6732
6733 var colClasses = [];
6734 widths.forEach(function (colWidth, i) {
6735 var columnProp = props[colWidth];
6736 delete attributes[colWidth];
6737
6738 if (!columnProp && columnProp !== '') {
6739 return;
6740 }
6741
6742 var isXs = !i;
6743 var colClass;
6744
6745 if (lodash_isobject(columnProp)) {
6746 var _classNames;
6747
6748 var colSizeInterfix = isXs ? '-' : "-" + colWidth + "-";
6749 colClass = getColumnSizeClass$1(isXs, colWidth, columnProp.size);
6750 colClasses.push(mapToCssModules(classnames((_classNames = {}, _classNames[colClass] = columnProp.size || columnProp.size === '', _classNames["order" + colSizeInterfix + columnProp.order] = columnProp.order || columnProp.order === 0, _classNames["offset" + colSizeInterfix + columnProp.offset] = columnProp.offset || columnProp.offset === 0, _classNames))), cssModule);
6751 } else {
6752 colClass = getColumnSizeClass$1(isXs, colWidth, columnProp);
6753 colClasses.push(colClass);
6754 }
6755 });
6756 var classes = mapToCssModules(classnames(className, hidden ? 'sr-only' : false, check ? 'form-check-label' : false, size ? "col-form-label-" + size : false, colClasses, colClasses.length ? 'col-form-label' : false), cssModule);
6757 return React__default.createElement(Tag, _extends({
6758 htmlFor: htmlFor
6759 }, attributes, {
6760 className: classes
6761 }));
6762 };
6763
6764 Label.propTypes = propTypes$W;
6765 Label.defaultProps = defaultProps$S;
6766
6767 var propTypes$X = {
6768 body: propTypes.bool,
6769 bottom: propTypes.bool,
6770 children: propTypes.node,
6771 className: propTypes.string,
6772 cssModule: propTypes.object,
6773 heading: propTypes.bool,
6774 left: propTypes.bool,
6775 list: propTypes.bool,
6776 middle: propTypes.bool,
6777 object: propTypes.bool,
6778 right: propTypes.bool,
6779 tag: tagPropType,
6780 top: propTypes.bool
6781 };
6782
6783 var Media = function Media(props) {
6784 var body = props.body,
6785 bottom = props.bottom,
6786 className = props.className,
6787 cssModule = props.cssModule,
6788 heading = props.heading,
6789 left = props.left,
6790 list = props.list,
6791 middle = props.middle,
6792 object = props.object,
6793 right = props.right,
6794 tag = props.tag,
6795 top = props.top,
6796 attributes = _objectWithoutPropertiesLoose(props, ["body", "bottom", "className", "cssModule", "heading", "left", "list", "middle", "object", "right", "tag", "top"]);
6797
6798 var defaultTag;
6799
6800 if (heading) {
6801 defaultTag = 'h4';
6802 } else if (attributes.href) {
6803 defaultTag = 'a';
6804 } else if (attributes.src || object) {
6805 defaultTag = 'img';
6806 } else if (list) {
6807 defaultTag = 'ul';
6808 } else {
6809 defaultTag = 'div';
6810 }
6811
6812 var Tag = tag || defaultTag;
6813 var classes = mapToCssModules(classnames(className, {
6814 'media-body': body,
6815 'media-heading': heading,
6816 'media-left': left,
6817 'media-right': right,
6818 'media-top': top,
6819 'media-bottom': bottom,
6820 'media-middle': middle,
6821 'media-object': object,
6822 'media-list': list,
6823 media: !body && !heading && !left && !right && !top && !bottom && !middle && !object && !list
6824 }), cssModule);
6825 return React__default.createElement(Tag, _extends({}, attributes, {
6826 className: classes
6827 }));
6828 };
6829
6830 Media.propTypes = propTypes$X;
6831
6832 var propTypes$Y = {
6833 children: propTypes.node,
6834 className: propTypes.string,
6835 listClassName: propTypes.string,
6836 cssModule: propTypes.object,
6837 size: propTypes.string,
6838 tag: tagPropType,
6839 listTag: tagPropType,
6840 'aria-label': propTypes.string
6841 };
6842 var defaultProps$T = {
6843 tag: 'nav',
6844 listTag: 'ul',
6845 'aria-label': 'pagination'
6846 };
6847
6848 var Pagination = function Pagination(props) {
6849 var _classNames;
6850
6851 var className = props.className,
6852 listClassName = props.listClassName,
6853 cssModule = props.cssModule,
6854 size = props.size,
6855 Tag = props.tag,
6856 ListTag = props.listTag,
6857 label = props['aria-label'],
6858 attributes = _objectWithoutPropertiesLoose(props, ["className", "listClassName", "cssModule", "size", "tag", "listTag", "aria-label"]);
6859
6860 var classes = mapToCssModules(classnames(className), cssModule);
6861 var listClasses = mapToCssModules(classnames(listClassName, 'pagination', (_classNames = {}, _classNames["pagination-" + size] = !!size, _classNames)), cssModule);
6862 return React__default.createElement(Tag, {
6863 className: classes,
6864 "aria-label": label
6865 }, React__default.createElement(ListTag, _extends({}, attributes, {
6866 className: listClasses
6867 })));
6868 };
6869
6870 Pagination.propTypes = propTypes$Y;
6871 Pagination.defaultProps = defaultProps$T;
6872
6873 var propTypes$Z = {
6874 active: propTypes.bool,
6875 children: propTypes.node,
6876 className: propTypes.string,
6877 cssModule: propTypes.object,
6878 disabled: propTypes.bool,
6879 tag: tagPropType
6880 };
6881 var defaultProps$U = {
6882 tag: 'li'
6883 };
6884
6885 var PaginationItem = function PaginationItem(props) {
6886 var active = props.active,
6887 className = props.className,
6888 cssModule = props.cssModule,
6889 disabled = props.disabled,
6890 Tag = props.tag,
6891 attributes = _objectWithoutPropertiesLoose(props, ["active", "className", "cssModule", "disabled", "tag"]);
6892
6893 var classes = mapToCssModules(classnames(className, 'page-item', {
6894 active: active,
6895 disabled: disabled
6896 }), cssModule);
6897 return React__default.createElement(Tag, _extends({}, attributes, {
6898 className: classes
6899 }));
6900 };
6901
6902 PaginationItem.propTypes = propTypes$Z;
6903 PaginationItem.defaultProps = defaultProps$U;
6904
6905 var propTypes$_ = {
6906 'aria-label': propTypes.string,
6907 children: propTypes.node,
6908 className: propTypes.string,
6909 cssModule: propTypes.object,
6910 next: propTypes.bool,
6911 previous: propTypes.bool,
6912 first: propTypes.bool,
6913 last: propTypes.bool,
6914 tag: tagPropType
6915 };
6916 var defaultProps$V = {
6917 tag: 'a'
6918 };
6919
6920 var PaginationLink = function PaginationLink(props) {
6921 var className = props.className,
6922 cssModule = props.cssModule,
6923 next = props.next,
6924 previous = props.previous,
6925 first = props.first,
6926 last = props.last,
6927 Tag = props.tag,
6928 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "next", "previous", "first", "last", "tag"]);
6929
6930 var classes = mapToCssModules(classnames(className, 'page-link'), cssModule);
6931 var defaultAriaLabel;
6932
6933 if (previous) {
6934 defaultAriaLabel = 'Previous';
6935 } else if (next) {
6936 defaultAriaLabel = 'Next';
6937 } else if (first) {
6938 defaultAriaLabel = 'First';
6939 } else if (last) {
6940 defaultAriaLabel = 'Last';
6941 }
6942
6943 var ariaLabel = props['aria-label'] || defaultAriaLabel;
6944 var defaultCaret;
6945
6946 if (previous) {
6947 defaultCaret = "\u2039";
6948 } else if (next) {
6949 defaultCaret = "\u203A";
6950 } else if (first) {
6951 defaultCaret = "\xAB";
6952 } else if (last) {
6953 defaultCaret = "\xBB";
6954 }
6955
6956 var children = props.children;
6957
6958 if (children && Array.isArray(children) && children.length === 0) {
6959 children = null;
6960 }
6961
6962 if (!attributes.href && Tag === 'a') {
6963 Tag = 'button';
6964 }
6965
6966 if (previous || next || first || last) {
6967 children = [React__default.createElement("span", {
6968 "aria-hidden": "true",
6969 key: "caret"
6970 }, children || defaultCaret), React__default.createElement("span", {
6971 className: "sr-only",
6972 key: "sr"
6973 }, ariaLabel)];
6974 }
6975
6976 return React__default.createElement(Tag, _extends({}, attributes, {
6977 className: classes,
6978 "aria-label": ariaLabel
6979 }), children);
6980 };
6981
6982 PaginationLink.propTypes = propTypes$_;
6983 PaginationLink.defaultProps = defaultProps$V;
6984
6985 /**
6986 * TabContext
6987 * {
6988 * activeTabId: PropTypes.any
6989 * }
6990 */
6991
6992 var TabContext = React__default.createContext({});
6993
6994 var propTypes$$ = {
6995 tag: tagPropType,
6996 activeTab: propTypes.any,
6997 className: propTypes.string,
6998 cssModule: propTypes.object
6999 };
7000 var defaultProps$W = {
7001 tag: 'div'
7002 };
7003
7004 var TabContent =
7005 /*#__PURE__*/
7006 function (_Component) {
7007 _inheritsLoose(TabContent, _Component);
7008
7009 TabContent.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
7010 if (prevState.activeTab !== nextProps.activeTab) {
7011 return {
7012 activeTab: nextProps.activeTab
7013 };
7014 }
7015
7016 return null;
7017 };
7018
7019 function TabContent(props) {
7020 var _this;
7021
7022 _this = _Component.call(this, props) || this;
7023 _this.state = {
7024 activeTab: _this.props.activeTab
7025 };
7026 return _this;
7027 }
7028
7029 var _proto = TabContent.prototype;
7030
7031 _proto.render = function render() {
7032 var _this$props = this.props,
7033 className = _this$props.className,
7034 cssModule = _this$props.cssModule,
7035 Tag = _this$props.tag;
7036 var attributes = omit(this.props, Object.keys(propTypes$$));
7037 var classes = mapToCssModules(classnames('tab-content', className), cssModule);
7038 return React__default.createElement(TabContext.Provider, {
7039 value: {
7040 activeTabId: this.state.activeTab
7041 }
7042 }, React__default.createElement(Tag, _extends({}, attributes, {
7043 className: classes
7044 })));
7045 };
7046
7047 return TabContent;
7048 }(React.Component);
7049
7050 polyfill(TabContent);
7051 TabContent.propTypes = propTypes$$;
7052 TabContent.defaultProps = defaultProps$W;
7053
7054 var propTypes$10 = {
7055 tag: tagPropType,
7056 className: propTypes.string,
7057 cssModule: propTypes.object,
7058 tabId: propTypes.any
7059 };
7060 var defaultProps$X = {
7061 tag: 'div'
7062 };
7063 function TabPane(props) {
7064 var className = props.className,
7065 cssModule = props.cssModule,
7066 tabId = props.tabId,
7067 Tag = props.tag,
7068 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tabId", "tag"]);
7069
7070 var getClasses = function getClasses(activeTabId) {
7071 return mapToCssModules(classnames('tab-pane', className, {
7072 active: tabId === activeTabId
7073 }), cssModule);
7074 };
7075
7076 return React__default.createElement(TabContext.Consumer, null, function (_ref) {
7077 var activeTabId = _ref.activeTabId;
7078 return React__default.createElement(Tag, _extends({}, attributes, {
7079 className: getClasses(activeTabId)
7080 }));
7081 });
7082 }
7083 TabPane.propTypes = propTypes$10;
7084 TabPane.defaultProps = defaultProps$X;
7085
7086 var propTypes$11 = {
7087 tag: tagPropType,
7088 fluid: propTypes.bool,
7089 className: propTypes.string,
7090 cssModule: propTypes.object
7091 };
7092 var defaultProps$Y = {
7093 tag: 'div'
7094 };
7095
7096 var Jumbotron = function Jumbotron(props) {
7097 var className = props.className,
7098 cssModule = props.cssModule,
7099 Tag = props.tag,
7100 fluid = props.fluid,
7101 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "fluid"]);
7102
7103 var classes = mapToCssModules(classnames(className, 'jumbotron', fluid ? 'jumbotron-fluid' : false), cssModule);
7104 return React__default.createElement(Tag, _extends({}, attributes, {
7105 className: classes
7106 }));
7107 };
7108
7109 Jumbotron.propTypes = propTypes$11;
7110 Jumbotron.defaultProps = defaultProps$Y;
7111
7112 var propTypes$12 = {
7113 children: propTypes.node,
7114 className: propTypes.string,
7115 closeClassName: propTypes.string,
7116 closeAriaLabel: propTypes.string,
7117 cssModule: propTypes.object,
7118 color: propTypes.string,
7119 fade: propTypes.bool,
7120 isOpen: propTypes.bool,
7121 toggle: propTypes.func,
7122 tag: tagPropType,
7123 transition: propTypes.shape(Fade.propTypes),
7124 innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func])
7125 };
7126 var defaultProps$Z = {
7127 color: 'success',
7128 isOpen: true,
7129 tag: 'div',
7130 closeAriaLabel: 'Close',
7131 fade: true,
7132 transition: _extends({}, Fade.defaultProps, {
7133 unmountOnExit: true
7134 })
7135 };
7136
7137 function Alert(props) {
7138 var className = props.className,
7139 closeClassName = props.closeClassName,
7140 closeAriaLabel = props.closeAriaLabel,
7141 cssModule = props.cssModule,
7142 Tag = props.tag,
7143 color = props.color,
7144 isOpen = props.isOpen,
7145 toggle = props.toggle,
7146 children = props.children,
7147 transition = props.transition,
7148 fade = props.fade,
7149 innerRef = props.innerRef,
7150 attributes = _objectWithoutPropertiesLoose(props, ["className", "closeClassName", "closeAriaLabel", "cssModule", "tag", "color", "isOpen", "toggle", "children", "transition", "fade", "innerRef"]);
7151
7152 var classes = mapToCssModules(classnames(className, 'alert', "alert-" + color, {
7153 'alert-dismissible': toggle
7154 }), cssModule);
7155 var closeClasses = mapToCssModules(classnames('close', closeClassName), cssModule);
7156
7157 var alertTransition = _extends({}, Fade.defaultProps, transition, {
7158 baseClass: fade ? transition.baseClass : '',
7159 timeout: fade ? transition.timeout : 0
7160 });
7161
7162 return React__default.createElement(Fade, _extends({}, attributes, alertTransition, {
7163 tag: Tag,
7164 className: classes,
7165 in: isOpen,
7166 role: "alert",
7167 innerRef: innerRef
7168 }), toggle ? React__default.createElement("button", {
7169 type: "button",
7170 className: closeClasses,
7171 "aria-label": closeAriaLabel,
7172 onClick: toggle
7173 }, React__default.createElement("span", {
7174 "aria-hidden": "true"
7175 }, "\xD7")) : null, children);
7176 }
7177
7178 Alert.propTypes = propTypes$12;
7179 Alert.defaultProps = defaultProps$Z;
7180
7181 var propTypes$13 = {
7182 children: propTypes.node,
7183 className: propTypes.string,
7184 cssModule: propTypes.object,
7185 fade: propTypes.bool,
7186 isOpen: propTypes.bool,
7187 tag: tagPropType,
7188 transition: propTypes.shape(Fade.propTypes),
7189 innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func])
7190 };
7191 var defaultProps$_ = {
7192 isOpen: true,
7193 tag: 'div',
7194 fade: true,
7195 transition: _extends({}, Fade.defaultProps, {
7196 unmountOnExit: true
7197 })
7198 };
7199
7200 function Toast(props) {
7201 var className = props.className,
7202 cssModule = props.cssModule,
7203 Tag = props.tag,
7204 isOpen = props.isOpen,
7205 children = props.children,
7206 transition = props.transition,
7207 fade = props.fade,
7208 innerRef = props.innerRef,
7209 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "isOpen", "children", "transition", "fade", "innerRef"]);
7210
7211 var classes = mapToCssModules(classnames(className, 'toast'), cssModule);
7212
7213 var toastTransition = _extends({}, Fade.defaultProps, transition, {
7214 baseClass: fade ? transition.baseClass : '',
7215 timeout: fade ? transition.timeout : 0
7216 });
7217
7218 return React__default.createElement(Fade, _extends({}, attributes, toastTransition, {
7219 tag: Tag,
7220 className: classes,
7221 in: isOpen,
7222 role: "alert",
7223 innerRef: innerRef
7224 }), children);
7225 }
7226
7227 Toast.propTypes = propTypes$13;
7228 Toast.defaultProps = defaultProps$_;
7229
7230 var propTypes$14 = {
7231 tag: tagPropType,
7232 className: propTypes.string,
7233 cssModule: propTypes.object,
7234 innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func])
7235 };
7236 var defaultProps$$ = {
7237 tag: 'div'
7238 };
7239
7240 var ToastBody = function ToastBody(props) {
7241 var className = props.className,
7242 cssModule = props.cssModule,
7243 innerRef = props.innerRef,
7244 Tag = props.tag,
7245 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "innerRef", "tag"]);
7246
7247 var classes = mapToCssModules(classnames(className, 'toast-body'), cssModule);
7248 return React__default.createElement(Tag, _extends({}, attributes, {
7249 className: classes,
7250 ref: innerRef
7251 }));
7252 };
7253
7254 ToastBody.propTypes = propTypes$14;
7255 ToastBody.defaultProps = defaultProps$$;
7256
7257 var propTypes$15 = {
7258 tag: tagPropType,
7259 icon: propTypes.oneOfType([propTypes.string, propTypes.node]),
7260 wrapTag: tagPropType,
7261 toggle: propTypes.func,
7262 className: propTypes.string,
7263 cssModule: propTypes.object,
7264 children: propTypes.node,
7265 closeAriaLabel: propTypes.string,
7266 charCode: propTypes.oneOfType([propTypes.string, propTypes.number]),
7267 close: propTypes.object
7268 };
7269 var defaultProps$10 = {
7270 tag: 'strong',
7271 wrapTag: 'div',
7272 tagClassName: 'mr-auto',
7273 closeAriaLabel: 'Close',
7274 charCode: 215
7275 };
7276
7277 var ToastHeader = function ToastHeader(props) {
7278 var closeButton;
7279 var icon;
7280
7281 var className = props.className,
7282 cssModule = props.cssModule,
7283 children = props.children,
7284 toggle = props.toggle,
7285 Tag = props.tag,
7286 WrapTag = props.wrapTag,
7287 closeAriaLabel = props.closeAriaLabel,
7288 charCode = props.charCode,
7289 close = props.close,
7290 tagClassName = props.tagClassName,
7291 iconProp = props.icon,
7292 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "children", "toggle", "tag", "wrapTag", "closeAriaLabel", "charCode", "close", "tagClassName", "icon"]);
7293
7294 var classes = mapToCssModules(classnames(className, 'toast-header'), cssModule);
7295
7296 if (!close && toggle) {
7297 var closeIcon = typeof charCode === 'number' ? String.fromCharCode(charCode) : charCode;
7298 closeButton = React__default.createElement("button", {
7299 type: "button",
7300 onClick: toggle,
7301 className: mapToCssModules('close', cssModule),
7302 "aria-label": closeAriaLabel
7303 }, React__default.createElement("span", {
7304 "aria-hidden": "true"
7305 }, closeIcon));
7306 }
7307
7308 if (typeof iconProp === "string") {
7309 icon = React__default.createElement("svg", {
7310 className: mapToCssModules("rounded text-" + iconProp),
7311 width: "20",
7312 height: "20",
7313 xmlns: "http://www.w3.org/2000/svg",
7314 preserveAspectRatio: "xMidYMid slice",
7315 focusable: "false",
7316 role: "img"
7317 }, React__default.createElement("rect", {
7318 fill: "currentColor",
7319 width: "100%",
7320 height: "100%"
7321 }));
7322 } else if (iconProp) {
7323 icon = iconProp;
7324 }
7325
7326 return React__default.createElement(WrapTag, _extends({}, attributes, {
7327 className: classes
7328 }), icon, React__default.createElement(Tag, {
7329 className: mapToCssModules(classnames(tagClassName, {
7330 "ml-2": icon != null
7331 }), cssModule)
7332 }, children), close || closeButton);
7333 };
7334
7335 ToastHeader.propTypes = propTypes$15;
7336 ToastHeader.defaultProps = defaultProps$10;
7337
7338 var _transitionStatusToCl;
7339
7340 var propTypes$16 = _extends({}, reactTransitionGroup_1.propTypes, {
7341 isOpen: propTypes.bool,
7342 children: propTypes.oneOfType([propTypes.arrayOf(propTypes.node), propTypes.node]),
7343 tag: tagPropType,
7344 className: propTypes.node,
7345 navbar: propTypes.bool,
7346 cssModule: propTypes.object,
7347 innerRef: propTypes.oneOfType([propTypes.func, propTypes.string, propTypes.object])
7348 });
7349
7350 var defaultProps$11 = _extends({}, reactTransitionGroup_1.defaultProps, {
7351 isOpen: false,
7352 appear: false,
7353 enter: true,
7354 exit: true,
7355 tag: 'div',
7356 timeout: TransitionTimeouts.Collapse
7357 });
7358
7359 var transitionStatusToClassHash = (_transitionStatusToCl = {}, _transitionStatusToCl[TransitionStatuses.ENTERING] = 'collapsing', _transitionStatusToCl[TransitionStatuses.ENTERED] = 'collapse show', _transitionStatusToCl[TransitionStatuses.EXITING] = 'collapsing', _transitionStatusToCl[TransitionStatuses.EXITED] = 'collapse', _transitionStatusToCl);
7360
7361 function getTransitionClass(status) {
7362 return transitionStatusToClassHash[status] || 'collapse';
7363 }
7364
7365 function getHeight(node) {
7366 return node.scrollHeight;
7367 }
7368
7369 var Collapse =
7370 /*#__PURE__*/
7371 function (_Component) {
7372 _inheritsLoose(Collapse, _Component);
7373
7374 function Collapse(props) {
7375 var _this;
7376
7377 _this = _Component.call(this, props) || this;
7378 _this.state = {
7379 height: null
7380 };
7381 ['onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'].forEach(function (name) {
7382 _this[name] = _this[name].bind(_assertThisInitialized(_this));
7383 });
7384 return _this;
7385 }
7386
7387 var _proto = Collapse.prototype;
7388
7389 _proto.onEntering = function onEntering(node, isAppearing) {
7390 this.setState({
7391 height: getHeight(node)
7392 });
7393 this.props.onEntering(node, isAppearing);
7394 };
7395
7396 _proto.onEntered = function onEntered(node, isAppearing) {
7397 this.setState({
7398 height: null
7399 });
7400 this.props.onEntered(node, isAppearing);
7401 };
7402
7403 _proto.onExit = function onExit(node) {
7404 this.setState({
7405 height: getHeight(node)
7406 });
7407 this.props.onExit(node);
7408 };
7409
7410 _proto.onExiting = function onExiting(node) {
7411 // getting this variable triggers a reflow
7412 var _unused = node.offsetHeight; // eslint-disable-line no-unused-vars
7413
7414 this.setState({
7415 height: 0
7416 });
7417 this.props.onExiting(node);
7418 };
7419
7420 _proto.onExited = function onExited(node) {
7421 this.setState({
7422 height: null
7423 });
7424 this.props.onExited(node);
7425 };
7426
7427 _proto.render = function render() {
7428 var _this2 = this;
7429
7430 var _this$props = this.props,
7431 Tag = _this$props.tag,
7432 isOpen = _this$props.isOpen,
7433 className = _this$props.className,
7434 navbar = _this$props.navbar,
7435 cssModule = _this$props.cssModule,
7436 children = _this$props.children,
7437 innerRef = _this$props.innerRef,
7438 otherProps = _objectWithoutPropertiesLoose(_this$props, ["tag", "isOpen", "className", "navbar", "cssModule", "children", "innerRef"]);
7439
7440 var height = this.state.height;
7441 var transitionProps = pick(otherProps, TransitionPropTypeKeys);
7442 var childProps = omit(otherProps, TransitionPropTypeKeys);
7443 return React__default.createElement(reactTransitionGroup_1, _extends({}, transitionProps, {
7444 in: isOpen,
7445 onEntering: this.onEntering,
7446 onEntered: this.onEntered,
7447 onExit: this.onExit,
7448 onExiting: this.onExiting,
7449 onExited: this.onExited
7450 }), function (status) {
7451 var collapseClass = getTransitionClass(status);
7452 var classes = mapToCssModules(classnames(className, collapseClass, navbar && 'navbar-collapse'), cssModule);
7453 var style = height === null ? null : {
7454 height: height
7455 };
7456 return React__default.createElement(Tag, _extends({}, childProps, {
7457 style: _extends({}, childProps.style, style),
7458 className: classes,
7459 ref: _this2.props.innerRef
7460 }), children);
7461 });
7462 };
7463
7464 return Collapse;
7465 }(React.Component);
7466
7467 Collapse.propTypes = propTypes$16;
7468 Collapse.defaultProps = defaultProps$11;
7469
7470 var propTypes$17 = {
7471 tag: tagPropType,
7472 active: propTypes.bool,
7473 disabled: propTypes.bool,
7474 color: propTypes.string,
7475 action: propTypes.bool,
7476 className: propTypes.any,
7477 cssModule: propTypes.object
7478 };
7479 var defaultProps$12 = {
7480 tag: 'li'
7481 };
7482
7483 var handleDisabledOnClick = function handleDisabledOnClick(e) {
7484 e.preventDefault();
7485 };
7486
7487 var ListGroupItem = function ListGroupItem(props) {
7488 var className = props.className,
7489 cssModule = props.cssModule,
7490 Tag = props.tag,
7491 active = props.active,
7492 disabled = props.disabled,
7493 action = props.action,
7494 color = props.color,
7495 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "active", "disabled", "action", "color"]);
7496
7497 var classes = mapToCssModules(classnames(className, active ? 'active' : false, disabled ? 'disabled' : false, action ? 'list-group-item-action' : false, color ? "list-group-item-" + color : false, 'list-group-item'), cssModule); // Prevent click event when disabled.
7498
7499 if (disabled) {
7500 attributes.onClick = handleDisabledOnClick;
7501 }
7502
7503 return React__default.createElement(Tag, _extends({}, attributes, {
7504 className: classes
7505 }));
7506 };
7507
7508 ListGroupItem.propTypes = propTypes$17;
7509 ListGroupItem.defaultProps = defaultProps$12;
7510
7511 var propTypes$18 = {
7512 tag: tagPropType,
7513 className: propTypes.any,
7514 cssModule: propTypes.object
7515 };
7516 var defaultProps$13 = {
7517 tag: 'h5'
7518 };
7519
7520 var ListGroupItemHeading = function ListGroupItemHeading(props) {
7521 var className = props.className,
7522 cssModule = props.cssModule,
7523 Tag = props.tag,
7524 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
7525
7526 var classes = mapToCssModules(classnames(className, 'list-group-item-heading'), cssModule);
7527 return React__default.createElement(Tag, _extends({}, attributes, {
7528 className: classes
7529 }));
7530 };
7531
7532 ListGroupItemHeading.propTypes = propTypes$18;
7533 ListGroupItemHeading.defaultProps = defaultProps$13;
7534
7535 var propTypes$19 = {
7536 tag: tagPropType,
7537 className: propTypes.any,
7538 cssModule: propTypes.object
7539 };
7540 var defaultProps$14 = {
7541 tag: 'p'
7542 };
7543
7544 var ListGroupItemText = function ListGroupItemText(props) {
7545 var className = props.className,
7546 cssModule = props.cssModule,
7547 Tag = props.tag,
7548 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
7549
7550 var classes = mapToCssModules(classnames(className, 'list-group-item-text'), cssModule);
7551 return React__default.createElement(Tag, _extends({}, attributes, {
7552 className: classes
7553 }));
7554 };
7555
7556 ListGroupItemText.propTypes = propTypes$19;
7557 ListGroupItemText.defaultProps = defaultProps$14;
7558
7559 var UncontrolledAlert =
7560 /*#__PURE__*/
7561 function (_Component) {
7562 _inheritsLoose(UncontrolledAlert, _Component);
7563
7564 function UncontrolledAlert(props) {
7565 var _this;
7566
7567 _this = _Component.call(this, props) || this;
7568 _this.state = {
7569 isOpen: true
7570 };
7571 _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));
7572 return _this;
7573 }
7574
7575 var _proto = UncontrolledAlert.prototype;
7576
7577 _proto.toggle = function toggle() {
7578 this.setState({
7579 isOpen: !this.state.isOpen
7580 });
7581 };
7582
7583 _proto.render = function render() {
7584 return React__default.createElement(Alert, _extends({
7585 isOpen: this.state.isOpen,
7586 toggle: this.toggle
7587 }, this.props));
7588 };
7589
7590 return UncontrolledAlert;
7591 }(React.Component);
7592
7593 var omitKeys$1 = ['defaultOpen'];
7594
7595 var UncontrolledButtonDropdown =
7596 /*#__PURE__*/
7597 function (_Component) {
7598 _inheritsLoose(UncontrolledButtonDropdown, _Component);
7599
7600 function UncontrolledButtonDropdown(props) {
7601 var _this;
7602
7603 _this = _Component.call(this, props) || this;
7604 _this.state = {
7605 isOpen: props.defaultOpen || false
7606 };
7607 _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));
7608 return _this;
7609 }
7610
7611 var _proto = UncontrolledButtonDropdown.prototype;
7612
7613 _proto.toggle = function toggle() {
7614 this.setState({
7615 isOpen: !this.state.isOpen
7616 });
7617 };
7618
7619 _proto.render = function render() {
7620 return React__default.createElement(ButtonDropdown, _extends({
7621 isOpen: this.state.isOpen,
7622 toggle: this.toggle
7623 }, omit(this.props, omitKeys$1)));
7624 };
7625
7626 return UncontrolledButtonDropdown;
7627 }(React.Component);
7628 UncontrolledButtonDropdown.propTypes = _extends({
7629 defaultOpen: propTypes.bool
7630 }, ButtonDropdown.propTypes);
7631
7632 var omitKeys$2 = ['toggleEvents', 'defaultOpen'];
7633 var propTypes$1a = {
7634 defaultOpen: propTypes.bool,
7635 toggler: propTypes.string.isRequired,
7636 toggleEvents: propTypes.arrayOf(propTypes.string)
7637 };
7638 var defaultProps$15 = {
7639 toggleEvents: defaultToggleEvents
7640 };
7641
7642 var UncontrolledCollapse =
7643 /*#__PURE__*/
7644 function (_Component) {
7645 _inheritsLoose(UncontrolledCollapse, _Component);
7646
7647 function UncontrolledCollapse(props) {
7648 var _this;
7649
7650 _this = _Component.call(this, props) || this;
7651 _this.togglers = null;
7652 _this.removeEventListeners = null;
7653 _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));
7654 _this.state = {
7655 isOpen: props.defaultOpen || false
7656 };
7657 return _this;
7658 }
7659
7660 var _proto = UncontrolledCollapse.prototype;
7661
7662 _proto.componentDidMount = function componentDidMount() {
7663 this.togglers = findDOMElements(this.props.toggler);
7664
7665 if (this.togglers.length) {
7666 this.removeEventListeners = addMultipleEventListeners(this.togglers, this.toggle, this.props.toggleEvents);
7667 }
7668 };
7669
7670 _proto.componentWillUnmount = function componentWillUnmount() {
7671 if (this.togglers.length && this.removeEventListeners) {
7672 this.removeEventListeners();
7673 }
7674 };
7675
7676 _proto.toggle = function toggle(e) {
7677 this.setState(function (_ref) {
7678 var isOpen = _ref.isOpen;
7679 return {
7680 isOpen: !isOpen
7681 };
7682 });
7683 e.preventDefault();
7684 };
7685
7686 _proto.render = function render() {
7687 return React__default.createElement(Collapse, _extends({
7688 isOpen: this.state.isOpen
7689 }, omit(this.props, omitKeys$2)));
7690 };
7691
7692 return UncontrolledCollapse;
7693 }(React.Component);
7694
7695 UncontrolledCollapse.propTypes = propTypes$1a;
7696 UncontrolledCollapse.defaultProps = defaultProps$15;
7697
7698 var omitKeys$3 = ['defaultOpen'];
7699
7700 var UncontrolledDropdown =
7701 /*#__PURE__*/
7702 function (_Component) {
7703 _inheritsLoose(UncontrolledDropdown, _Component);
7704
7705 function UncontrolledDropdown(props) {
7706 var _this;
7707
7708 _this = _Component.call(this, props) || this;
7709 _this.state = {
7710 isOpen: props.defaultOpen || false
7711 };
7712 _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));
7713 return _this;
7714 }
7715
7716 var _proto = UncontrolledDropdown.prototype;
7717
7718 _proto.toggle = function toggle() {
7719 this.setState({
7720 isOpen: !this.state.isOpen
7721 });
7722 };
7723
7724 _proto.render = function render() {
7725 return React__default.createElement(Dropdown, _extends({
7726 isOpen: this.state.isOpen,
7727 toggle: this.toggle
7728 }, omit(this.props, omitKeys$3)));
7729 };
7730
7731 return UncontrolledDropdown;
7732 }(React.Component);
7733 UncontrolledDropdown.propTypes = _extends({
7734 defaultOpen: propTypes.bool
7735 }, Dropdown.propTypes);
7736
7737 var omitKeys$4 = ['defaultOpen'];
7738
7739 var UncontrolledTooltip =
7740 /*#__PURE__*/
7741 function (_Component) {
7742 _inheritsLoose(UncontrolledTooltip, _Component);
7743
7744 function UncontrolledTooltip(props) {
7745 var _this;
7746
7747 _this = _Component.call(this, props) || this;
7748 _this.state = {
7749 isOpen: props.defaultOpen || false
7750 };
7751 _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));
7752 return _this;
7753 }
7754
7755 var _proto = UncontrolledTooltip.prototype;
7756
7757 _proto.toggle = function toggle() {
7758 this.setState({
7759 isOpen: !this.state.isOpen
7760 });
7761 };
7762
7763 _proto.render = function render() {
7764 return React__default.createElement(Tooltip, _extends({
7765 isOpen: this.state.isOpen,
7766 toggle: this.toggle
7767 }, omit(this.props, omitKeys$4)));
7768 };
7769
7770 return UncontrolledTooltip;
7771 }(React.Component);
7772 UncontrolledTooltip.propTypes = _extends({
7773 defaultOpen: propTypes.bool
7774 }, Tooltip.propTypes);
7775
7776 var propTypes$1b = {
7777 tag: tagPropType,
7778 type: propTypes.string,
7779 size: propTypes.string,
7780 color: propTypes.string,
7781 className: propTypes.string,
7782 cssModule: propTypes.object,
7783 children: propTypes.string
7784 };
7785 var defaultProps$16 = {
7786 tag: 'div',
7787 type: 'border',
7788 children: 'Loading...'
7789 };
7790
7791 var Spinner = function Spinner(props) {
7792 var className = props.className,
7793 cssModule = props.cssModule,
7794 type = props.type,
7795 size = props.size,
7796 color = props.color,
7797 children = props.children,
7798 Tag = props.tag,
7799 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "type", "size", "color", "children", "tag"]);
7800
7801 var classes = mapToCssModules(classnames(className, size ? "spinner-" + type + "-" + size : false, "spinner-" + type, color ? "text-" + color : false), cssModule);
7802 return React__default.createElement(Tag, _extends({
7803 role: "status"
7804 }, attributes, {
7805 className: classes
7806 }), children && React__default.createElement("span", {
7807 className: mapToCssModules('sr-only', cssModule)
7808 }, children));
7809 };
7810
7811 Spinner.propTypes = propTypes$1b;
7812 Spinner.defaultProps = defaultProps$16;
7813
7814 exports.Alert = Alert;
7815 exports.Badge = Badge;
7816 exports.Breadcrumb = Breadcrumb;
7817 exports.BreadcrumbItem = BreadcrumbItem;
7818 exports.Button = Button;
7819 exports.ButtonDropdown = ButtonDropdown;
7820 exports.ButtonGroup = ButtonGroup;
7821 exports.ButtonToolbar = ButtonToolbar;
7822 exports.Card = Card;
7823 exports.CardBody = CardBody;
7824 exports.CardColumns = CardColumns;
7825 exports.CardDeck = CardDeck;
7826 exports.CardFooter = CardFooter;
7827 exports.CardGroup = CardGroup;
7828 exports.CardHeader = CardHeader;
7829 exports.CardImg = CardImg;
7830 exports.CardImgOverlay = CardImgOverlay;
7831 exports.CardLink = CardLink;
7832 exports.CardSubtitle = CardSubtitle;
7833 exports.CardText = CardText;
7834 exports.CardTitle = CardTitle;
7835 exports.Carousel = Carousel;
7836 exports.CarouselCaption = CarouselCaption;
7837 exports.CarouselControl = CarouselControl;
7838 exports.CarouselIndicators = CarouselIndicators;
7839 exports.CarouselItem = CarouselItem;
7840 exports.Col = Col;
7841 exports.Collapse = Collapse;
7842 exports.Container = Container;
7843 exports.CustomInput = CustomInput;
7844 exports.Dropdown = Dropdown;
7845 exports.DropdownItem = DropdownItem;
7846 exports.DropdownMenu = DropdownMenu;
7847 exports.DropdownToggle = DropdownToggle;
7848 exports.Fade = Fade;
7849 exports.Form = Form;
7850 exports.FormFeedback = FormFeedback;
7851 exports.FormGroup = FormGroup;
7852 exports.FormText = FormText;
7853 exports.Input = Input;
7854 exports.InputGroup = InputGroup;
7855 exports.InputGroupAddon = InputGroupAddon;
7856 exports.InputGroupButtonDropdown = InputGroupButtonDropdown;
7857 exports.InputGroupText = InputGroupText;
7858 exports.Jumbotron = Jumbotron;
7859 exports.Label = Label;
7860 exports.ListGroup = ListGroup;
7861 exports.ListGroupItem = ListGroupItem;
7862 exports.ListGroupItemHeading = ListGroupItemHeading;
7863 exports.ListGroupItemText = ListGroupItemText;
7864 exports.Media = Media;
7865 exports.Modal = Modal;
7866 exports.ModalBody = ModalBody;
7867 exports.ModalFooter = ModalFooter;
7868 exports.ModalHeader = ModalHeader;
7869 exports.Nav = Nav;
7870 exports.NavItem = NavItem;
7871 exports.NavLink = NavLink;
7872 exports.Navbar = Navbar;
7873 exports.NavbarBrand = NavbarBrand;
7874 exports.NavbarToggler = NavbarToggler;
7875 exports.Pagination = Pagination;
7876 exports.PaginationItem = PaginationItem;
7877 exports.PaginationLink = PaginationLink;
7878 exports.Popover = Popover;
7879 exports.PopoverBody = PopoverBody;
7880 exports.PopoverHeader = PopoverHeader;
7881 exports.PopperContent = PopperContent;
7882 exports.PopperTargetHelper = PopperTargetHelper;
7883 exports.Progress = Progress;
7884 exports.Row = Row;
7885 exports.Spinner = Spinner;
7886 exports.TabContent = TabContent;
7887 exports.TabPane = TabPane;
7888 exports.Table = Table;
7889 exports.Toast = Toast;
7890 exports.ToastBody = ToastBody;
7891 exports.ToastHeader = ToastHeader;
7892 exports.Tooltip = Tooltip;
7893 exports.UncontrolledAlert = UncontrolledAlert;
7894 exports.UncontrolledButtonDropdown = UncontrolledButtonDropdown;
7895 exports.UncontrolledCarousel = UncontrolledCarousel;
7896 exports.UncontrolledCollapse = UncontrolledCollapse;
7897 exports.UncontrolledDropdown = UncontrolledDropdown;
7898 exports.UncontrolledPopover = UncontrolledPopover;
7899 exports.UncontrolledTooltip = UncontrolledTooltip;
7900 exports.Util = utils;
7901
7902 Object.defineProperty(exports, '__esModule', { value: true });
7903
7904}));
7905//# sourceMappingURL=reactstrap.js.map